bx-1379-redesign #15
|
@ -193,7 +193,7 @@ const loadModels = async () => {
|
||||||
const p = raw_data.min_distance * 0.05
|
const p = raw_data.min_distance * 0.05
|
||||||
|
|
||||||
const point_mesh = new Mesh(
|
const point_mesh = new Mesh(
|
||||||
new CircleGeometry(p, 32),
|
new CircleGeometry(2, 32),
|
||||||
new MeshBasicMaterial({
|
new MeshBasicMaterial({
|
||||||
color: new Color(envVars.clear_color),
|
color: new Color(envVars.clear_color),
|
||||||
map: pointerTexture.map,
|
map: pointerTexture.map,
|
||||||
|
@ -308,6 +308,14 @@ onAfterRender(() => {
|
||||||
clickable_refs.value.map(el => {
|
clickable_refs.value.map(el => {
|
||||||
if (el.value[0] && el.value[0].children) {
|
if (el.value[0] && el.value[0].children) {
|
||||||
el.value[0].children[0].lookAt(camera.value?.position)
|
el.value[0].children[0].lookAt(camera.value?.position)
|
||||||
|
|
||||||
|
const dis_to_cam = camera.value?.position.distanceTo(el.value[0].position);
|
||||||
|
if (dis_to_cam) {
|
||||||
|
// console.log(dis_to_cam)
|
||||||
|
const scaling = (1 * dis_to_cam) / 100
|
||||||
|
el.value[0].children[0].scale.set(scaling, scaling, scaling);
|
||||||
|
el.value[0].updateMatrixWorld()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (controls.value) {
|
if (controls.value) {
|
||||||
|
|
Loading…
Reference in New Issue