Skip to content

Accessing world coordinates of models loaded into spoke scene #2939

Discussion options

You must be logged in to vote

Hey @11, Hubs uses Aframe which is based on top of Three.js. You can access any object in the scene graph by traversing the scene, or by using one of the built in methods like Object3D.getObjectByName(). So if you name one of your objects in your Spoke scene Model12345, you can then call AFRAME.scenes[0].object3D.getObjectByName("Model12345") and it will return the Object3D representing that object.

One thing to note is that some objects are combined when you export. If models share the same material, shadow properties, etc. they could be combined. Non-model elements are not currently combined.

Another way to identify an object or add additional data to an object would be to add a new glT…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by robertlong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants