summaryrefslogtreecommitdiffstats
path: root/Chunk.gd
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2022-09-18 08:32:29 -0400
committerdusoleil <howcansocksbereal@gmail.com>2022-09-18 08:32:29 -0400
commitffc92ed12c6e680776d355ff9fcef70e5e28d7c8 (patch)
tree11060de6eee066442dcbca1babcf0f69dac525b2 /Chunk.gd
parent3dfcc3706f5dcb4b8150e027a02d0eb84c929b26 (diff)
downloadgame_jam49-ffc92ed12c6e680776d355ff9fcef70e5e28d7c8.tar.gz
game_jam49-ffc92ed12c6e680776d355ff9fcef70e5e28d7c8.zip
Prototype levels of detail per chunk
Diffstat (limited to 'Chunk.gd')
-rw-r--r--Chunk.gd16
1 files changed, 16 insertions, 0 deletions
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()