Closed willeastcott closed 3 days ago
Just to mention, for efficiency, it is better to iterate once through entities, and get a joint by id. As going through joints and then looking for entity by name (findByName) is O(n*j) instead of O(n). Unless you build an index of entities by name first, and then iterate through joints and get entity from index by name. Which is slightly worse than first option.
It would be useful to be able to query the WebXR spec id of an
XrJoint
. This is because, when a new hand-basedXrInputSource
is added, it has anXrHand
that in turn, has an array ofXrJoint
s. A typical scenario is loading a GLB model of a hand and linkingXrJoint
s to entities in the instantiated hand model. The names of these entities/nodes stored in the GLB are the WebXR ids. So you want to do something like: