mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
reduce call count
This commit is contained in:
1 parent
8cb15d488d
commit
d7914bb2fb
1 file changed
+2
-7
+2
-7
@@ -1,4 +1,3 @@
|
|||||||
import { blueDark, orangeDark } from "@radix-ui/colors";
|
|
||||||
import { ContactShadows } from "@react-three/drei";
|
import { ContactShadows } from "@react-three/drei";
|
||||||
import { invalidate, useFrame } from "@react-three/fiber";
|
import { invalidate, useFrame } from "@react-three/fiber";
|
||||||
import { clamp, times } from "lodash-es";
|
import { clamp, times } from "lodash-es";
|
||||||
@@ -98,11 +97,7 @@ export function Lighting({ hasPbr }: Props) {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<group ref={wrapper}>
|
<group ref={wrapper}>
|
||||||
<hemisphereLight
|
<hemisphereLight intensity={0} color={"white"} groundColor={"black"} />
|
||||||
intensity={0}
|
|
||||||
color={blueDark.blue12}
|
|
||||||
groundColor={orangeDark.orange8}
|
|
||||||
/>
|
|
||||||
|
|
||||||
{times(LIGHTS_COUNT, (index) => {
|
{times(LIGHTS_COUNT, (index) => {
|
||||||
const x = index / (LIGHTS_COUNT - 1);
|
const x = index / (LIGHTS_COUNT - 1);
|
||||||
@@ -125,7 +120,7 @@ export function Lighting({ hasPbr }: Props) {
|
|||||||
position={position}
|
position={position}
|
||||||
intensity={intensity}
|
intensity={intensity}
|
||||||
penumbra={1}
|
penumbra={1}
|
||||||
castShadow={highGraphics}
|
castShadow={highGraphics && index === 0}
|
||||||
decay={1}
|
decay={1}
|
||||||
color="#ffffff"
|
color="#ffffff"
|
||||||
angle={0}
|
angle={0}
|
||||||
|
|||||||
Reference in new issue
Block a user