chunk.gd 843 B

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