Skip to content

Instantly share code, notes, and snippets.

View willnationsdev's full-sized avatar

Will Nations willnationsdev

View GitHub Profile
@EricEzaM
EricEzaM / flex_grid_container.gd
Last active February 1, 2025 18:42
A responsive grid container for GD script. Updates columns as you change the width.
tool
class_name FlexGridContainer
extends Container
var columns: int = 1 setget set_columns
func _notification(p_what):
match p_what:
shader_type spatial;
render_mode shadows_disabled;
uniform float rim = 0.25;
uniform float rim_tint = 0.5;
uniform sampler2D albedo : hint_albedo;
uniform float specular;
uniform float roughness = 1.0;
uniform bool disable_lighting = false;
uniform vec4 shadow_color : hint_color;
shader_type canvas_item;
render_mode unshaded;
uniform sampler2D tex : hint_albedo;
uniform float deform_amt : hint_range(-1,1);
uniform float deform_speed : hint_range(0.5,4);
uniform bool animate;
void fragment() {
float def_amt = deform_amt;