Compare commits

..

No commits in common. "9acfdcb16ba34770bca2b629525ea2a435f97ed5" and "5c4ff2b4caa835460a1cdaf0191f901109546568" have entirely different histories.

3 changed files with 8 additions and 20 deletions

BIN
editor.scn (Stored with Git LFS)

Binary file not shown.

View File

@ -53,15 +53,6 @@ window/size/viewport_height=800
window/stretch/mode="canvas_items"
window/stretch/aspect="keep_height"
[editor]
version_control/plugin_name="GitPlugin"
version_control/autoload_on_startup=true
[editor_plugins]
enabled=PackedStringArray()
[input]
player_controller_left={

View File

@ -14,22 +14,18 @@ var size: Vector2i = Vector2i.ZERO:
return size
set(value):
var width := maxi(value.x, 0)
var height := maxi(value.y, 0)
var width := value.x
var height := value.y
if (width != size.x) or (height != size.y):
if (width == 0) and (height == 0):
RenderingServer.instance_set_base(self.get_instance(), RID())
else:
if (width != 0) and (height != 0):
if (width != size.x) or (height != size.y):
self._mesh.subdivide_width = width
self._mesh.subdivide_depth = height
self._mesh.size = value
self._material.set_shader_parameter("SIZE", Vector2(value))
RenderingServer.instance_set_base(self.get_instance(), self._mesh)
size = Vector2i(width, height)
size = value
##
##
@ -165,3 +161,4 @@ func _init() -> void:
self._material.shader = preload("res://terrain_shader.gdshader")
self._mesh.surface_set_material(0, self._material)
RenderingServer.instance_set_base(self.get_instance(), self._mesh)