1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 01:29:49 +00:00
Pixelorama/Scripts/TransparentChecker.gd
OverloadedOrama 79a4c0232e Minor TransparentChecker performance boost
Got rid of its _process, using _ready() instead. It also gets called when the canvas size changes, or the checker settings in the preferences change.
2020-04-20 19:12:22 +03:00

9 lines
245 B
GDScript

extends ColorRect
func _ready():
rect_size = Global.canvas.size
material.set_shader_param("size", Global.checker_size)
material.set_shader_param("color1", Global.checker_color_1)
material.set_shader_param("color2", Global.checker_color_2)