chunk.gd 771 B

12345678910111213141516171819202122232425262728293031
  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. var radius:float = 10
  11. func setParams(latMinIN, latMaxIN, lonMinIN, lonMaxIN, resolutionIN, radiusIN:float):
  12. latMin = latMinIN
  13. latMax = latMaxIN
  14. lonMin = lonMinIN
  15. lonMax = lonMaxIN
  16. resolution = resolutionIN
  17. radius = radiusIN
  18. # Called when the node enters the scene tree for the first time.
  19. func _ready():
  20. .get_node("Mesh").setParams(latMin, latMax, lonMin, lonMax, resolution, radius)
  21. .get_node("Mesh").genMesh()
  22. .translate(.get_node("Mesh").origin)
  23. # Called every frame. 'delta' is the elapsed time since the previous frame.
  24. #func _process(delta):
  25. # pass