Switched 'intensive' functions to cpp

This commit is contained in:
Martin committed 2025-11-11 00:23:12 +01:00
1 parent c92c6d4432
commit f9ec2e855d
1 file changed
+6 -3
+6 -3
View File
@@ -1,15 +1,17 @@
extends Sprite2D
var n: int = 64
var n: int = 256
var arr := []
var data_img: Image
var data_tex: ImageTexture
var gol := GoL.new()
@onready var mat: ShaderMaterial = material as ShaderMaterial
# sim. consts
var T := 0.1
var T := 0.01
var t := 0.0
# Called when the node enters the scene tree for the first time.
@@ -38,7 +40,8 @@ func _process(_delta: float) -> void:
t += _delta
if t >= T:
t = 0.0
_game_of_life_step()
#_game_of_life_step()
arr = gol.step_once(arr, n) # cpp step
_upload_arr()
func _game_of_life_step() -> void:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.