onClick for Object3D Line
reinzor opened this issue · comments
Rein Appeldoorn commented
Hi,
I am trying to add support for rendering a line using the Object3D component:
<template>
<object3-d ref="element" />
</template>
const material = new LineBasicMaterial({
color: 0x000000,
linewidth: 2,
});
onMounted(() => {
if (element.value !== null) {
element.value.initObject3D(new Line(someBufferedGeometry, material));
}
});
However, when I try to register an onClick
event on the Object3D
it does not work properly. It returns a lot of objects that are not positioned at the pointer. In a Threejs
example, I see they are setting a parameter raycaster.params.Line.threshold
, is this required?
Could you give some guidance in how to implement a Line as an Object3D? I am happy to send a PR but need some guidance regarding the implementation. Thanks!
Rein Appeldoorn commented
ping @klevron
Rein Appeldoorn commented
No response by author, abandoning issue