new Node(variableCollection)

Parameter

Name Type Optional Description

variableCollection

 

 

This node belongs to this collection.

Fires
module:meteoJS/modelviewer/node#append:child

Properties

children  Array of module:meteoJS/modelviewer/node.Node

Child nodes.

parents  Array of module:meteoJS/modelviewer/node.Node

Parent nodes.

package

resources  Array of module:meteoJS/modelviewer/resource.Resource

All contained resources.

variableCollection  module:meteoJS/modelviewer/variableCollection.VariableCollection

VariableCollection correspondent to this node.

Methods

package

_addParent(node)

Adds a parent node.

Parameter

Name Type Optional Description

node

module:meteoJS/modelviewer/node.Node

 

Node to add.

package

append(...resources) → integer

Append resources.

Parameter

Name Type Optional Description

resources

module:meteoJS/modelviewer/resource.Resource

 

Resources.

Value can be repeated.

Returns

integer Count of really added resources.

appendChild(...nodes) → module:meteoJS/modelviewer/node.Node

Appends a node as a child.

Parameter

Name Type Optional Description

nodes

module:meteoJS/modelviewer/node.Node

 

Node to append.

Value can be repeated.

Fires
module:meteoJS/modelviewer/node#append:child
Returns

module:meteoJS/modelviewer/node.Node This.

getResourcesByVariables([exactlyMatch], ...variables) → Array of module:meteoJS/modelviewer/resource.Resource

Returns all or a part of the resources contained in this node. The returned resources are defined by all of the passed variables.

Parameters

Name Type Optional Description

exactlyMatch

boolean

Yes

Only return resources, which are defined exactly by the passed variables.

Defaults to false.

variables

module:meteoJS/modelviewer/variable.Variable

 

Variables.

Value can be repeated.

Returns

Array of module:meteoJS/modelviewer/resource.Resource Resources.

hasResourcesByVariables([exactlyMatch], ...variables) → boolean

Returns if there exists resources which are defined by all of the passed variables.

Parameters

Name Type Optional Description

exactlyMatch

boolean

Yes

Only returns true, if there exists at least one resource, which is defined exactly by the passed variables.

Defaults to false.

variables

module:meteoJS/modelviewer/variable.Variable

 

Variables.

Value can be repeated.

Returns

boolean Exists at least one resource.

package

remove(...resources) → integer

Removes resources.

Parameter

Name Type Optional Description

resources

module:meteoJS/modelviewer/resource.Resource

 

Resources.

Value can be repeated.

Returns

integer Count of really removed resources.