extends Node3D

enum EnumWorld {CUBIC_WORLD, SMOOTH_WORLD}

@export var wanted_world: EnumWorld

var enabled_world: EnumWorld = EnumWorld.SMOOTH_WORLD

var smooth_world = preload("res://SurfaceNetsWorld/smooth_world.tscn")
var cubic_world = preload("res://cubic_world.tscn")

func _init() -> void:
	add_child(smooth_world.instantiate())

	
func change_world():
	match wanted_world:
		EnumWorld.CUBIC_WORLD:
			remove_child(smooth_world)
			add_child(cubic_world.instantiate())
		EnumWorld.SMOOTH_WORLD:
			remove_child(cubic_world)
			add_child(smooth_world.instantiate())
	enabled_world = wanted_world
