This commit is contained in:
Andrey 2025-03-19 15:08:28 +03:00
parent 72189d8158
commit c46fca3c44
5 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ import { degToRad } from 'three/src/math/MathUtils.js'
const { camera, controls } = useTresContext()
const { scene } = await useGLTF('/models/table.glb')
const { scene } = await useGLTF('/models/urna2.glb')
const object = calculateScaleToFit(
scene,
camera,

View File

@ -6,14 +6,14 @@ import { degToRad } from 'three/src/math/MathUtils.js'
const { camera, controls } = useTresContext()
const { scene } = await useGLTF('/models/bench.glb')
const { scene } = await useGLTF('/models/urna1.glb')
const object = calculateScaleToFit(
scene,
camera,
controls,
2,
{
x: Math.sin(degToRad(30)), // Смещение по оси X
x: Math.sin(degToRad(0)), // Смещение по оси X
y: 1, // Нет смещения по оси Y
z: -Math.cos(degToRad(0)) // Смещение по оси Z
}

View File

@ -21,10 +21,10 @@ const controls = ref();
const controlsState = reactive({
minDistance: 0.5,
maxDistance: 5,
maxDistance: 5.0,
enablePan: false,
enableZoom: false,
// maxPolarAngle: Math.PI / 2 - 0.2
//maxPolarAngle: Math.PI / 5 - 0.5
});
const changeDistance = (v = 1) => {

BIN
public/models/urna1.glb Normal file

Binary file not shown.

BIN
public/models/urna2.glb Normal file

Binary file not shown.