diff options
Diffstat (limited to 'scripts/world_tools.gd')
| -rw-r--r-- | scripts/world_tools.gd | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/scripts/world_tools.gd b/scripts/world_tools.gd deleted file mode 100644 index bb3b336..0000000 --- a/scripts/world_tools.gd +++ /dev/null @@ -1,65 +0,0 @@ -tool -extends Node - -export(String) var terrain1path = "" setget t1update -export(String) var terrain2path = "" setget t2update -export(bool) var seam = 0 setget makeseam -export(Vector3) var winddir = Vector3.ZERO - -var terr1 -var terr2 - -func t1update(p): - terrain1path = p - terr1 = get_node(terrain1path) -func t2update(p): - terrain2path = p - terr2 = get_node(terrain2path) - -#makes adjacent terrain (terr2) snap to given terrain (terr1) on their border -func makeseam(_p): -# var t1pos: Vector3 = terr1.transform.origin -# var t2pos: Vector3 = terr2.transform.origin -# var t1data = terr1.get_data() -# var t2data = terr2.get_data() -# var heightmap1: Image = t1data.get_image(t1data.CHANNEL_HEIGHT) -# var heightmap2: Image = t2data.get_image(t2data.CHANNEL_HEIGHT) -# -# if heightmap1.get_height() != heightmap2.get_height(): -# return -# var sidelength = heightmap1.get_height() -# heightmap2.lock() -# heightmap1.lock() - - #if t1pos.distance_squared_to(t2pos) != heightmap1.get_height()*heightmap1.get_height(): - # return - pass -# var side : int = 0 -# var is_x : bool -# if t1pos.x == t2pos.x: -# is_x = false -# if t1pos.z > t2pos.z: -# side = sidelength-1 -# elif t2pos.z == t2pos.z: -# is_x = true -# if t1pos.x > t2pos.x: -# side = sidelength-1 -# else: -# return -# -# var oside = sidelength-1-side -# -# for i in sidelength: -# if is_x: -# heightmap2.set_pixel(side, i, heightmap1.get_pixel(oside, i)) -# else: -# heightmap2.set_pixel(i, side, heightmap1.get_pixel(i, oside)) -# -# heightmap2.unlock() -# heightmap1.unlock() -# -# var modified_region = Rect2(Vector2(), heightmap2.get_size()) -# t2data.notify_region_change(modified_region, t2data.CHANNEL_HEIGHT) -# Called every frame. 'delta' is the elapsed time since the previous frame. -#func _process(delta): -# pass |
