Skip to content

Instantly share code, notes, and snippets.

View erdavids's full-sized avatar

Eric Davidson erdavids

View GitHub Profile
shader_type canvas_item;
uniform vec4 color_1 = vec4(.0, .0, .0, 1.0);
uniform vec4 color_2 = vec4(0.5, 0.5, 0.5, 1.0);
void fragment() {
vec4 colors[2] = {color_1, color_2};
float min_diff = -1.0;
w, h = 1000, 1000
colors = [[(188, 216, 193), (214, 219, 178), (227, 217, 133), (229, 122, 68)], [(219, 177, 188), (211, 196, 227), (143, 149, 211), (137, 218, 255)], [(191, 107, 99), (217, 163, 132), (91, 158, 166), (169, 212, 217)]]
random_colors = int(random(3))
def get_random_element(l):
return l[int(random(len(l)))]
def deformed_circle(x, y, r, random_colors):
extends RigidBody
var rotating = false
var prev_mouse_position
var next_mouse_position
func _process(delta):
if (Input.is_action_just_pressed("Rotate")):
rotating = true