Created
December 5, 2022 18:50
-
-
Save GK-GreyGhost/85ed2daf851114ba9abd41eb718bce06 to your computer and use it in GitHub Desktop.
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
func _process(delta:float) -> void: | |
#we = WorldEnvironment | |
var current:Environment = environments[environment] | |
var d:float = delta * lerp_speed | |
for data in we.get_property_list(): | |
var key = data.name | |
var value = we.get(data.name) | |
match data.type: | |
TYPE_COLOR: | |
we.set(key,lerp(value,current.get(key),d)) | |
TYPE_VECTOR2: | |
we.set(key,lerp(value,current.get(key).value,d)) | |
TYPE_VECTOR3: | |
we.set(key,lerp(value,current.get(key),d)) | |
TYPE_BOOL: | |
we.set(key,current.get(key)) | |
TYPE_REAL: | |
we.set(key,lerp(value,current.get(key),d)) | |
TYPE_INT: | |
we.set(key,current.get(key)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment