mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-22 05:15:32 +01:00
feat: non-pbr tank lighting and model cache
This commit is contained in:
1 parent
ea480aa365
commit
a32ee2a344
7 files changed
+47
-13
No files matched your search
@@ -1,15 +1,24 @@
|
||||
export function Lighting() {
|
||||
import { useModel } from '../../../../../hooks/useModel';
|
||||
import { Duel } from '../page';
|
||||
|
||||
interface LightingProps {
|
||||
duel: Duel;
|
||||
}
|
||||
|
||||
export function Lighting({ duel }: LightingProps) {
|
||||
const { hasPbr } = useModel(duel.protagonist.tank.id);
|
||||
|
||||
return (
|
||||
<>
|
||||
<directionalLight
|
||||
position={[1, 1, -1]}
|
||||
intensity={3}
|
||||
intensity={hasPbr ? 3 : 5}
|
||||
castShadow
|
||||
color={'rgb(225, 225, 255)'}
|
||||
/>
|
||||
<directionalLight
|
||||
position={[-1, 1, 1]}
|
||||
intensity={2}
|
||||
intensity={hasPbr ? 2 : 4}
|
||||
castShadow
|
||||
color={'rgb(240, 255, 240)'}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user