-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
111 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
extends Node | ||
|
||
@export var speed : float = 2.0 | ||
var set = 0 | ||
var cam = 0 | ||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
set = 0 | ||
cam = 0 | ||
$AtmoMesh/Camera.speed = speed | ||
|
||
func _process(_delta): | ||
# get the time of the animation, wrapping every 10 seconds | ||
var time = ((Time.get_ticks_msec() * speed) / 100000.0) | ||
|
||
# leave the default colors | ||
if time > 1 and set == 0: | ||
if time > 1 and cam == 0: | ||
$AtmoMesh.mesh.get_material().set_shader_parameter("beta_ray", Vector3(4, 1, 1)) | ||
set = 1 | ||
elif time > 1.1 and set == 1: | ||
cam = 1 | ||
elif time > 1.1 and cam == 1: | ||
$AtmoMesh.mesh.get_material().set_shader_parameter("beta_ray", Vector3(1, 4, 2)) | ||
set = 2 | ||
elif time > 1.2 * PI + 2 and set == 2: | ||
cam = 2 | ||
elif time > 1.2 * PI + 2 and cam == 2: | ||
$AtmoMesh.mesh.get_material().set_shader_parameter("beta_ray", Vector3(4, 1, 2)) | ||
$AtmoMesh.mesh.get_material().set_shader_parameter("intensity", 10.0) | ||
set = 3 | ||
elif time > 1.3 * PI + 3 and set == 3: | ||
cam = 3 | ||
elif time > 1.3 * PI + 3 and cam == 3: | ||
$AtmoMesh.mesh.get_material().set_shader_parameter("beta_ray", Vector3(4, 2, 1)) | ||
$AtmoMesh.mesh.get_material().set_shader_parameter("beta_mie", Vector3(1, 4, 1)) | ||
$AtmoMesh.mesh.get_material().set_shader_parameter("mie_g", 0.6) | ||
set = 4 | ||
elif time > 1.4 and set == 4: | ||
cam = 4 | ||
elif time > 1.4 and cam == 4: | ||
$AtmoMesh.mesh.get_material().set_shader_parameter("beta_ray", Vector3(1, 1, 3)) | ||
$AtmoMesh.mesh.get_material().set_shader_parameter("beta_mie", Vector3(4, 1, 1)) | ||
$AtmoMesh.mesh.get_material().set_shader_parameter("mie_g", 0.8) | ||
$AtmoMesh.mesh.get_material().set_shader_parameter("intensity", 6.0) | ||
set = 5 | ||
cam = 5 |
Oops, something went wrong.