COMMENT
This commit is contained in:
parent
72189d8158
commit
c46fca3c44
|
@ -6,7 +6,7 @@ import { degToRad } from 'three/src/math/MathUtils.js'
|
||||||
|
|
||||||
const { camera, controls } = useTresContext()
|
const { camera, controls } = useTresContext()
|
||||||
|
|
||||||
const { scene } = await useGLTF('/models/table.glb')
|
const { scene } = await useGLTF('/models/urna2.glb')
|
||||||
const object = calculateScaleToFit(
|
const object = calculateScaleToFit(
|
||||||
scene,
|
scene,
|
||||||
camera,
|
camera,
|
||||||
|
|
|
@ -6,14 +6,14 @@ import { degToRad } from 'three/src/math/MathUtils.js'
|
||||||
|
|
||||||
const { camera, controls } = useTresContext()
|
const { camera, controls } = useTresContext()
|
||||||
|
|
||||||
const { scene } = await useGLTF('/models/bench.glb')
|
const { scene } = await useGLTF('/models/urna1.glb')
|
||||||
const object = calculateScaleToFit(
|
const object = calculateScaleToFit(
|
||||||
scene,
|
scene,
|
||||||
camera,
|
camera,
|
||||||
controls,
|
controls,
|
||||||
2,
|
2,
|
||||||
{
|
{
|
||||||
x: Math.sin(degToRad(30)), // Смещение по оси X
|
x: Math.sin(degToRad(0)), // Смещение по оси X
|
||||||
y: 1, // Нет смещения по оси Y
|
y: 1, // Нет смещения по оси Y
|
||||||
z: -Math.cos(degToRad(0)) // Смещение по оси Z
|
z: -Math.cos(degToRad(0)) // Смещение по оси Z
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,10 @@ const controls = ref();
|
||||||
|
|
||||||
const controlsState = reactive({
|
const controlsState = reactive({
|
||||||
minDistance: 0.5,
|
minDistance: 0.5,
|
||||||
maxDistance: 5,
|
maxDistance: 5.0,
|
||||||
enablePan: false,
|
enablePan: false,
|
||||||
enableZoom: false,
|
enableZoom: false,
|
||||||
// maxPolarAngle: Math.PI / 2 - 0.2
|
//maxPolarAngle: Math.PI / 5 - 0.5
|
||||||
});
|
});
|
||||||
|
|
||||||
const changeDistance = (v = 1) => {
|
const changeDistance = (v = 1) => {
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue