chunk.gd 668 B

12345678910111213141516171819202122232425262728
  1. extends Spatial
  2. # Declare member variables here. Examples:
  3. # var a = 2
  4. # var b = "text"
  5. var latMin:float = 0
  6. var latMax:float = 1
  7. var lonMin:float = 0.0
  8. var lonMax:float = 1.0
  9. var resolution:int = 512
  10. func setParams(latMinIN, latMaxIN, lonMinIN, lonMaxIN, resolutionIN):
  11. latMin = latMinIN
  12. latMax = latMaxIN
  13. lonMin = lonMinIN
  14. lonMax = lonMaxIN
  15. resolution = resolutionIN
  16. # Called when the node enters the scene tree for the first time.
  17. func _ready():
  18. .get_node("Mesh").setParams(latMin, latMax, lonMin, lonMax, resolution)
  19. .get_node("Mesh").genMesh()
  20. # Called every frame. 'delta' is the elapsed time since the previous frame.
  21. #func _process(delta):
  22. # pass