I'm on
and
, anyone is welcome: feel free to get in contact if you need any help!
If you appreciate my work, consider buying me a coffee and help me go full-time!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Node | |
# Based on this tweet by Clay John: | |
# https://twitter.com/john_clayjohn/status/1306447928932753408 | |
func _ready() -> void: | |
# Create a local rendering device. | |
var rd := RenderingServer.create_local_rendering_device() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
FBO example | |
=========== | |
This is an example of how to use FBO (Frame Buffer Object) to speedup graphics. | |
An Fbo is like a texture that you can draw on it. | |
By default, all the children are added in the canvas of the parent. | |
When you are displaying thousand of widget, you'll do thousands of graphics | |
instructions each frame. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
from ws4py.client.threadedclient import WebSocketClient | |
import binascii | |
class WSClient(WebSocketClient): | |
def __init__(self, url, text, filename): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener('load', function(event) { | |
var targetClassName = 'flex-wrap-anim'; | |
var defaultDuration = '0.3s'; | |
var dummyList = []; | |
function addDummy(item, duration) { | |
var top = item.offsetTop; | |
var left = item.offsetLeft; | |
setTimeout(function() { | |
item.style.position = 'absolute'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: 启动后需要保留窗口, 关闭窗口则结束进程 | |
aria2c --conf-path=aria2.conf -D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
effect_drop_shadow = ''' | |
#define M_PI 3.1415926535897932384626433832795 | |
vec4 effect(vec4 color, sampler2D texture, vec2 tex_coords, vec2 coords) {{ | |
vec2 coords2; | |
float x, y; | |
float radius, sampling, surface; | |
vec4 tint, shadow; | |
coords2 = coords + vec2({offset_x:f}, {offset_y:f}) ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.lang import Builder | |
from kivy.base import runTouchApp | |
KV = ''' | |
#:import DropShadow kivy.uix.effectwidget.DropShadowEffect | |
<T@Label>: | |
size_hint_x: None | |
width: self.texture_size[0] | |
<S@Slider>: |