dev #10
File diff suppressed because it is too large
Load Diff
|
@ -14,13 +14,8 @@ const props = defineProps(['source', 'loaded', 'loaded_pan'])
|
||||||
|
|
||||||
function shadows_and_pos(scene: any) {
|
function shadows_and_pos(scene: any) {
|
||||||
scene.children.forEach((el: any) => {
|
scene.children.forEach((el: any) => {
|
||||||
el.receiveShadow = true
|
// el.receiveShadow = true
|
||||||
el.castShadow = true
|
// el.castShadow = true
|
||||||
if (el.isPointLight) {
|
|
||||||
el.shadow.bias = -0.01
|
|
||||||
const k = 6
|
|
||||||
el.shadow.mapSize = new Vector2(512 * k, 512 * k)
|
|
||||||
}
|
|
||||||
shadows_and_pos(el)
|
shadows_and_pos(el)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ watch(() => route.params.target, () => {
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div :class="[{ 'loading': !models_loading }, 'canvas-wrapper']">
|
<div :class="[{ 'loading': !models_loading }, 'canvas-wrapper']">
|
||||||
<TresCanvas window-size shadows :alpha="false" power-preference="high-performance">
|
<TresCanvas window-size :alpha="false" power-preference="high-performance">
|
||||||
<TresPerspectiveCamera :position="cameraPosition" ref="camera" />
|
<TresPerspectiveCamera :position="cameraPosition" ref="camera" />
|
||||||
<OrbitControls v-bind="controlsState" @change="onChange" make-default />
|
<OrbitControls v-bind="controlsState" @change="onChange" make-default />
|
||||||
<Suspense>
|
<Suspense>
|
||||||
|
@ -76,7 +76,6 @@ watch(() => route.params.target, () => {
|
||||||
<TresPointLight :intensity="2000" :position-x="0" :position-y="20" cast-shadow
|
<TresPointLight :intensity="2000" :position-x="0" :position-y="20" cast-shadow
|
||||||
color="rgb(0,255,0)" />
|
color="rgb(0,255,0)" />
|
||||||
</TresGroup>
|
</TresGroup>
|
||||||
<BakeShadows v-if="models_loading" />
|
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<Stats />
|
<Stats />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
|
|
Loading…
Reference in New Issue