NodeMap returns only two nodes


(Mzz) #1

Hello, I'm currently using Sketchfab API for my university project and look like since last viewer API update I'm having problems with reffering to nodes by it's ID. Before that I was looking at node map by using getNodeMap function and setting node ID as constant for future use. Now all I get are 2 nodes with ID 69 and 70, those, as I understand are root objects, but there are no children nodes, so I can't find node that I want to rotate/translate. Old ID that was used in project causing exceptions https://gist.github.com/anonymous/5b98f6e44e71c2d35f67f358a25f5712

So question is, how can I find ID of some node, since there're none in nodeMap? Thanks.


#2

Hello,

Could you share the model link so I can have a look?

Thanks!


(Mzz) #3

Sure, it's "7w7pAfrCfjovwykkEeRFLGw5SXS" I'm using example from https://sketchfab.com/developers/viewer/functions#api-getNodeMap


#4

I think you have to wait until after the viewerready event fires to get the full node map or scene graph.

https://sketchfab.com/developers/viewer/functions#api-viewerready