chunkloader.gd 468 B

123456789101112131415
  1. extends Node
  2. @export var block_prefab = preload("res://prefabs/default_block.tscn")
  3. @export var target_chunk: Node3D
  4. # Called when the node enters the scene tree for the first time.
  5. func _ready():
  6. var new_blk: MeshInstance3D = block_prefab.instantiate()
  7. new_blk.set_instance_shader_parameter("blkcolor", Color(0.0, 0.3, 1.0))
  8. target_chunk.add_child(new_blk)
  9. # Called every frame. 'delta' is the elapsed time since the previous frame.
  10. func _process(delta):
  11. pass