In my coding project, I have been creating instances of LineSegments
in the following manner:
const geometry = new THREE.BufferGeometry();
geometry.setAttribute('position', new THREE.BufferAttribute(vertices, 3));
const edges = new THREE.EdgesGeometry(geometry);
const line = new THREE.LineSegments(edges2, new THREE.LineBasicMaterial({ color: 0xffffff }));
scene.add(line);
After that, I went ahead and added some custom properties to the lines like this:
line.prop1 = "hello";
line.prop2 = "world";
Now I'm wondering how I can retrieve all objects with a specific property value, for example, finding all objects where prop1
is set to "hello"
?