pointer
This commit is contained in:
parent
82efcd8782
commit
47627410b7
Binary file not shown.
|
@ -183,7 +183,8 @@ const loadModels = async () => {
|
||||||
const p = raw_data.min_distance * 0.05
|
const p = raw_data.min_distance * 0.05
|
||||||
|
|
||||||
const point = pointer_pin.clone()
|
const point = pointer_pin.clone()
|
||||||
point.position.set(world_position.x, p * 3, world_position.z)
|
point.rotateX(-0.5 * Math.PI)
|
||||||
|
point.position.set(world_position.x, p * 3, world_position.z * 2)
|
||||||
point.name = `${element.id}_clickable`
|
point.name = `${element.id}_clickable`
|
||||||
point.scale.set(p * 2, p * 2, p * 2)
|
point.scale.set(p * 2, p * 2, p * 2)
|
||||||
point.updateMatrixWorld()
|
point.updateMatrixWorld()
|
||||||
|
@ -212,8 +213,8 @@ const loadModels = async () => {
|
||||||
const box_size = new Vector3();
|
const box_size = new Vector3();
|
||||||
box.getSize(box_size)
|
box.getSize(box_size)
|
||||||
props.loaded_pan(
|
props.loaded_pan(
|
||||||
new Vector3(box_size.x * 0.5, box_size.y * 0.5, box_size.z * 0.5),
|
new Vector3(box_size.x * 0.25, box_size.y * 0.25, box_size.z * 0.25),
|
||||||
new Vector3(box_size.x * -0.5, box_size.y * -0.25, box_size.z * -0.5),
|
new Vector3(box_size.x * -0.25, box_size.y * -0.25, box_size.z * -0.25),
|
||||||
)
|
)
|
||||||
controls.value.enabled = true;
|
controls.value.enabled = true;
|
||||||
props.loaded(false)
|
props.loaded(false)
|
||||||
|
@ -229,7 +230,7 @@ const lookAtCamera = (obj) => {
|
||||||
}
|
}
|
||||||
obj.children.forEach(element => {
|
obj.children.forEach(element => {
|
||||||
if (element && typeof element.lookAt == 'function') {
|
if (element && typeof element.lookAt == 'function') {
|
||||||
element.lookAt(camera.value?.position)
|
element.lookAt(obj.position.x, obj.position.y * Math.PI * -0.5, camera.value?.position.z)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -258,8 +259,6 @@ const passShader = (obj: Mesh | Group) => {
|
||||||
}
|
}
|
||||||
const openSidebar = (id: number) => {
|
const openSidebar = (id: number) => {
|
||||||
sidebar.open(id)
|
sidebar.open(id)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadModels()
|
loadModels()
|
||||||
|
|
Loading…
Reference in New Issue