mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-03 16:00:36 +01:00
fix 1 pixel lights
This commit is contained in:
1 parent
c535811c1d
commit
e216b4cd6b
1 file changed
+6
+6
@@ -165,6 +165,7 @@ export function Lighting({ hasPbr }: Props) {
|
|||||||
key={index}
|
key={index}
|
||||||
position={position}
|
position={position}
|
||||||
intensity={intensity}
|
intensity={intensity}
|
||||||
|
userData={{ intensity }}
|
||||||
penumbra={1}
|
penumbra={1}
|
||||||
castShadow={highGraphics}
|
castShadow={highGraphics}
|
||||||
decay={1}
|
decay={1}
|
||||||
@@ -215,6 +216,11 @@ function Animator({
|
|||||||
for (const child of wrapper.current.children) {
|
for (const child of wrapper.current.children) {
|
||||||
if (child instanceof SpotLight) {
|
if (child instanceof SpotLight) {
|
||||||
child.angle = ANGLE * t * factor;
|
child.angle = ANGLE * t * factor;
|
||||||
|
child.intensity = child.userData.intensity;
|
||||||
|
|
||||||
|
if (child.angle === 0) {
|
||||||
|
child.intensity = 0;
|
||||||
|
}
|
||||||
} else if (child instanceof HemisphereLight) {
|
} else if (child instanceof HemisphereLight) {
|
||||||
child.intensity = HEMISPHERE_INTENSITY * t * factor;
|
child.intensity = HEMISPHERE_INTENSITY * t * factor;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user