Methods
findByGuid(guid)
Returns first node from the bubble matching a GUID.
Note that some GUIDs in the bubble are not unique, you have to be sure you are looking for a GUID that is unique if you want correct result from this function. Otherwise use the generic search.
Returns
| Type | Description |
| BubbleNode |
Matching bubble node, or null. |
findPropertyDbPath()
Finds shared property DB if there is one.
Returns
| Type | Description |
| string |
Shared property DB path, or null. |
getLodNode()
Returns
| Type | Description |
| boolean |
Is this an LOD node. |
getNamedViews()
Returns all the named views in the viewable. Named views are obtained from the document’s manifest which contains camera information and a string identifier.
Available from version 2.15
Returns
| Type | Description |
| array |
All named views. Returns empty array if none are found. |
getTag(tag)
Retrieves value of a node tag.
Returns
| Type | Description |
| * |
Tag value. |
getViewableRootPath()
Looks for the viewable root path in this node and all its children.
Returns
| Type | Description |
| string |
Viewable root path, or null. |
guid()
Returns
| Type | Description |
| string |
Node GUID. |
is2D()
Returns
| Type | Description |
| boolean |
Is this a 2D node. |
is2DGeom()
Returns
| Type | Description |
| boolean |
Is this a 2D geometry node. |
is3D()
Returns
| Type | Description |
| boolean |
Is this a 3D node. |
is3DGeom()
Returns
| Type | Description |
| boolean |
Is this a 3D geometry node. |
isGeometry()
Returns
| Type | Description |
| boolean |
Is this a geometry node. |
isGeomLeaf()
Returns
| Type | Description |
| boolean |
Is this a geometry leaf node. |
isViewable()
Returns
| Type | Description |
| boolean |
Is this a viewable node. |
name()
Returns
| Type | Description |
| string |
Node name. |
search(propsToMatch)
Finds nodes from the bubble matching one or more properties.
Parameters
| propsToMatch* object | Filter criteria - matching nodes must
have the same properties and values. |
* Required
Returns
| Type | Description |
| Array.<BubbleNode> |
Matching nodes, or null. |
setTag(tag,value)
Sets node tag value.
Parameters
| tag* string | Tag name. |
| value* * | Tag value. |
* Required
traverse(cb)
Recursively traverses the bubble, calling a callback function for each node, for as long as the callback function keeps returning false.
Parameters
| cb* function | Callback function, accepts a bubble node
as an argument, and returns true if the
traversal should be terminated. |
* Required
Returns
| Type | Description |
| boolean |
Result of the last callback invokation. |
urn(searchParent)
Retrieves the URN of the node or its closest ancestor.
Parameters
| searchParent* boolean | If URN is not available for this node,
search through its ancestors, too. |
* Required
Returns
| Type | Description |
| string |
Viewable URN. |