|
@@ -15,6 +15,8 @@ var scaleFact:int = 1
|
|
|
var origin:Vector3
|
|
|
var center:Vector3
|
|
|
|
|
|
+var initialized = false
|
|
|
+
|
|
|
func setParams(latMinIN, latMaxIN, lonMinIN, lonMaxIN, resolutionIN, radiusIN:float, scaleFactIN):
|
|
|
latMin = latMinIN
|
|
|
latMax = latMaxIN
|
|
@@ -26,6 +28,10 @@ func setParams(latMinIN, latMaxIN, lonMinIN, lonMaxIN, resolutionIN, radiusIN:fl
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
func _ready():
|
|
|
+ initialize()
|
|
|
+ #.translate(.get_node("Mesh").origin)
|
|
|
+
|
|
|
+func initialize():
|
|
|
print("chunk %s,%s initializing" %[latMin, lonMin])
|
|
|
var initialized = .get_node("Mesh").initialize(latMin, latMax, lonMin, lonMax, resolution, radius, scaleFact)
|
|
|
if not initialized:
|
|
@@ -33,12 +39,10 @@ func _ready():
|
|
|
while not download._file_name == .get_node("Mesh").tl.getFilepath():
|
|
|
print("awaiting file download for %s" %.get_node("Mesh").tl.getFilepath())
|
|
|
download = yield(Messenger, "fileDownloaded")
|
|
|
- print(download)
|
|
|
.get_node("Mesh").genMesh()
|
|
|
.get_node("Origin").transform.origin = .get_node("Mesh").origin
|
|
|
.get_node("Center").transform.origin = .get_node("Mesh").center
|
|
|
print("chunk %s,%s ready" %[latMin, lonMin])
|
|
|
- #.translate(.get_node("Mesh").origin)
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
#func _process(delta):
|