normalize direction in addLight

This commit is contained in:
Nick Fisher
2024-09-24 14:20:14 +08:00
parent 65e99b9212
commit 3ea4062e33

View File

@@ -384,7 +384,7 @@ class ThermionViewerFFI extends ThermionViewer {
color: colour,
intensity: intensity,
position: Vector3(posX, posY, posZ),
direction: Vector3(dirX, dirY, dirZ),
direction: Vector3(dirX, dirY, dirZ)..normalize(),
falloffRadius: falloffRadius,
spotLightConeInner: spotLightConeInner,
spotLightConeOuter: spotLightConeOuter,