From ffc92ed12c6e680776d355ff9fcef70e5e28d7c8 Mon Sep 17 00:00:00 2001 From: dusoleil Date: Sun, 18 Sep 2022 08:32:29 -0400 Subject: Prototype levels of detail per chunk --- Chunk.gd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Chunk.gd (limited to 'Chunk.gd') diff --git a/Chunk.gd b/Chunk.gd new file mode 100644 index 0000000..7c5c1c3 --- /dev/null +++ b/Chunk.gd @@ -0,0 +1,16 @@ +extends Area + +enum LOD {DISTANCE,MID,CLOSE} +var lod = -1 + +func lod_update(): + for obj in $"gen_tree".get_children(): + match lod: + LOD.CLOSE: + obj.lod_close() + LOD.MID: + obj.lod_mid() + LOD.DISTANCE: + obj.lod_distance() + _: + obj.lod_distance() -- cgit v1.2.3