Custom func_godot entities

This commit is contained in:
Marco 2025-06-12 11:50:22 +02:00
commit 929d993f99
360 changed files with 4983 additions and 3944 deletions

View file

@ -0,0 +1,11 @@
## Special Light base class that contains static helper functions for LightOmni and LightSpot entities.
class_name LightBase
extends Light3D
static func _func_godot_apply_properties(node: Light3D, props: Dictionary) -> void:
node.light_energy = props["energy"] as float
node.light_indirect_energy = props["indirect_energy"] as float
node.shadow_bias = props["shadow_bias"] as float
node.shadow_enabled = props["shadows"] as bool
node.light_color = props["color"] as Color
node.light_bake_mode = Light3D.BAKE_DYNAMIC

View file

@ -0,0 +1 @@
uid://d2pcteabi8kb0

View file

@ -0,0 +1,7 @@
@tool
class_name LightOmni
extends OmniLight3D
func _func_godot_apply_properties(props: Dictionary) -> void:
LightBase._func_godot_apply_properties(self, props)
omni_range = (props["range"] as float) * TbManager.INVERSE_SCALE

View file

@ -0,0 +1 @@
uid://cpyxccm5gwv84

View file

@ -0,0 +1,8 @@
@tool
class_name LightSpot
extends SpotLight3D
func _func_godot_apply_properties(props: Dictionary) -> void:
LightBase._func_godot_apply_properties(self, props)
spot_angle = props["angle"] as float
spot_range = (props["range"] as float) * TbManager.INVERSE_SCALE

View file

@ -0,0 +1 @@
uid://crjplbs250g75