NodeIDs are generated during runtime. There is no guarantee, that the nodeIDs of a loaded model
are the same, if the 3D Space was reloaded in the browser.
The NodePathAPI allows the user to handle nodes with static identifiers, which are not
changed during runtime. This holds, if the model resource is not changed.
Example
// Get an instance of the ContextAPI constmyContext : ContextAPI = webvis.getContext( "example" )
// add some Model myContext.add(someModelURI);
// the model is currently loading in the browser and we know, that the part which is of interest has the nodeID 170 // we execute the following code in the console to get a string that can be used to refer to the part everytime consthandle = awaitwebvis.createNodePathHandles([170]); constnodePathString = awaitwebvis.requestNodePathStrings(handle);
// Afterwards the nodePathString can be used to retrieve the runtime nodeID by script constcurrentNodeID = (awaitmyContext.requestNodePathHandleMap([ nodePathString ]))[nodePathString].nodeID;
NodeIDs are generated during runtime. There is no guarantee, that the nodeIDs of a loaded model are the same, if the 3D Space was reloaded in the browser.
The NodePathAPI allows the user to handle nodes with static identifiers, which are not changed during runtime. This holds, if the model resource is not changed.
Example