Glowy.gd 394 B

123456789101112131415161718192021
  1. extends Spatial
  2. class_name Glowy
  3. var mat
  4. export var color = Color8(100,100,100)
  5. export var power = 6.0
  6. func _ready():
  7. prepare_material()
  8. #print ("Glowy ready")
  9. func prepare_material():
  10. mat = SpatialMaterial.new()
  11. mat.emission_enabled=true
  12. mat.emission_energy = power
  13. mat.emission = color
  14. mat.albedo_color = ColorN("black")
  15. mat.albedo_texture = load("res://neon_test_texture0.png")