three object3D finder from partial name
✓ Published0🌍 Public
UUtopiah
Last edited May 3, 2020
Created on May 3, 2020
This example demonstrates how to locate and report three-dimensional objects within an A-Frame scene by matching partial names in their hierarchy. The `objects3DFromPartialName` function traverses the scene graph using `AFRAME.scenes[0].object3D.traverse`, filtering for `Object3D` instances whose `name` property matches a regular expression. It then retrieves each matched object’s world position with `THREE.Vector3` and `getWorldPosition`, logging the names and coordinates to the console. The code relies on Three.js and A-Frame’s WebGL rendering to inspect the live scene structure.
AI-generated description