From 943ca26eaebe42f996606252a6ebcd420bf7574c Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Tue, 24 Sep 2024 14:20:14 +0800 Subject: [PATCH] normalize direction in addLight --- .../lib/thermion_dart/viewer/ffi/thermion_viewer_ffi.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thermion_dart/lib/thermion_dart/viewer/ffi/thermion_viewer_ffi.dart b/thermion_dart/lib/thermion_dart/viewer/ffi/thermion_viewer_ffi.dart index 8eb359fc..25f173c5 100644 --- a/thermion_dart/lib/thermion_dart/viewer/ffi/thermion_viewer_ffi.dart +++ b/thermion_dart/lib/thermion_dart/viewer/ffi/thermion_viewer_ffi.dart @@ -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,