pointer size
This commit is contained in:
parent
8d8beea7f1
commit
8f164cdbae
|
@ -193,7 +193,7 @@ const loadModels = async () => {
|
|||
const p = raw_data.min_distance * 0.05
|
||||
|
||||
const point_mesh = new Mesh(
|
||||
new CircleGeometry(p, 32),
|
||||
new CircleGeometry(2, 32),
|
||||
new MeshBasicMaterial({
|
||||
color: new Color(envVars.clear_color),
|
||||
map: pointerTexture.map,
|
||||
|
@ -308,6 +308,14 @@ onAfterRender(() => {
|
|||
clickable_refs.value.map(el => {
|
||||
if (el.value[0] && el.value[0].children) {
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue