normalize direction in addLight

This commit is contained in:
Nick Fisher
2024-09-24 14:20:14 +08:00
parent 8e1c611e92
commit 943ca26eae

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,