fix: shadows
This commit is contained in:
@@ -39,7 +39,7 @@ class BatchSkinRenderer {
|
||||
|
||||
const ambientLight = new THREE.AmbientLight(0xffffff, 2)
|
||||
const directionalLight = new THREE.DirectionalLight(0xffffff, 1.2)
|
||||
directionalLight.castShadow = false
|
||||
directionalLight.castShadow = true
|
||||
directionalLight.position.set(2, 4, 3)
|
||||
this.scene.add(ambientLight)
|
||||
this.scene.add(directionalLight)
|
||||
|
||||
@@ -52,8 +52,7 @@ function onImageLoad(type: 'forward' | 'backward') {
|
||||
<span
|
||||
v-show="imagesLoaded.forward && imagesLoaded.backward"
|
||||
:class="[
|
||||
'skin-button__image-parent pointer-events-none w-full h-full grid [transform-style:preserve-3d] transition-transform duration-500 group-hover:[transform:rotateY(180deg)] place-items-stretch',
|
||||
selected ? 'with-shadow' : '',
|
||||
'skin-button__image-parent pointer-events-none w-full h-full grid [transform-style:preserve-3d] transition-transform duration-500 group-hover:[transform:rotateY(180deg)] place-items-stretch with-shadow',
|
||||
]"
|
||||
>
|
||||
<img
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
/>
|
||||
|
||||
<TresAmbientLight :intensity="2" />
|
||||
<TresDirectionalLight :position="[2, 4, 3]" :intensity="1.2" :cast-shadow="false" />
|
||||
<TresDirectionalLight :position="[2, 4, 3]" :intensity="1.2" :cast-shadow="true" />
|
||||
</TresCanvas>
|
||||
|
||||
<div v-if="!isReady" class="w-full h-full flex items-center justify-center">
|
||||
|
||||
Reference in New Issue
Block a user