bx-865-apps #1
|
@ -19,14 +19,13 @@ const onChange = (e: any) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const cameraPosition = [-6, 4, 25] as unknown as Vector3
|
const cameraPosition = [-6, 4, 25] as unknown as Vector3
|
||||||
const lightPosition = [3, 3, 3] as unknown as Vector3
|
|
||||||
|
|
||||||
const controlsState = reactive({
|
const controlsState = reactive({
|
||||||
minDistance: 1,
|
minDistance: 5,
|
||||||
maxDistance: 30,
|
maxDistance: 30,
|
||||||
maxPolarAngle: (Math.PI / 2) - 0.02,
|
maxPolarAngle: (Math.PI / 2) - 0.02,
|
||||||
maxZoom: 1,
|
maxZoom: 1,
|
||||||
minZoom: 0.2,
|
minZoom: 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
const { hasFinishLoading, progress } = await useProgress()
|
const { hasFinishLoading, progress } = await useProgress()
|
||||||
|
@ -37,6 +36,8 @@ const target = new Object3D()
|
||||||
target.translateX(2)
|
target.translateX(2)
|
||||||
target.translateY(-50)
|
target.translateY(-50)
|
||||||
console.log(target)
|
console.log(target)
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div :class="[{ 'invisible': !!hasFinishLoading }, 'loader']">
|
<div :class="[{ 'invisible': !!hasFinishLoading }, 'loader']">
|
||||||
|
@ -53,7 +54,7 @@ console.log(target)
|
||||||
</Suspense>
|
</Suspense>
|
||||||
<TresSpotLight :position="spot_light_item.position" color="pink"
|
<TresSpotLight :position="spot_light_item.position" color="pink"
|
||||||
:angle="spot_light_item.angle" :penumbra="spot_light_item.penumbra" :target="target"
|
:angle="spot_light_item.angle" :penumbra="spot_light_item.penumbra" :target="target"
|
||||||
:intensity="300" cast-shadow v-light-helper />
|
:intensity="400" cast-shadow v-light-helper />
|
||||||
<!-- <TresDirectionalLight :position="lightPosition" :intensity="10" cast-shadow /> -->
|
<!-- <TresDirectionalLight :position="lightPosition" :intensity="10" cast-shadow /> -->
|
||||||
<TresAmbientLight :intensity="1" />
|
<TresAmbientLight :intensity="1" />
|
||||||
</TresCanvas>
|
</TresCanvas>
|
||||||
|
|
|
@ -27,7 +27,7 @@ const { map, normalMap } = await useTexture({
|
||||||
const { renderer } = useTresContext()
|
const { renderer } = useTresContext()
|
||||||
|
|
||||||
renderer.value.toneMapping = ACESFilmicToneMapping
|
renderer.value.toneMapping = ACESFilmicToneMapping
|
||||||
renderer.value.toneMappingExposure = 0.25
|
renderer.value.toneMappingExposure = 0.15
|
||||||
renderer.value.shadowMap.enabled = true
|
renderer.value.shadowMap.enabled = true
|
||||||
|
|
||||||
const repeat = 20
|
const repeat = 20
|
||||||
|
|
Loading…
Reference in New Issue