Constructor
new ComponentTree(reporter, settings, instructions)
Parameters:
| Name |
Type |
Description |
reporter |
Reporter
|
|
settings |
Object
|
|
instructions |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
externalTrees |
Array.<ComponentTree>
|
<optional>
|
|
|
loader |
ComponentLoader
|
<optional>
|
|
|
import |
Array.<Object.<string, ComponentClass>>
|
<optional>
|
|
|
autoLinkDependencies |
Boolean
|
<optional>
|
true
|
|
renderer |
WebGLRenderer
|
<optional>
|
|
|
|
- Source:
Extends
Members
(protected) _allDependencies :Array.<Component>
All "lower" components on which this component depends, either directly or indirectly
Type:
- Overrides:
- Source:
(protected) _applicableMaterialVariantGroups :Array.<MaterialSet>
The distinct material variant groups of this components and its dependencies
Type:
- Overrides:
- Source:
Dependencies that can be assigned a material (does not necessarily affect the component itself)
Type:
- Overrides:
- Source:
(protected) _dependencies :Object
Type:
Properties:
- Overrides:
- Source:
(protected) _directDependencies :Array.<Component>
All "lower" components on which this component depends directly
Type:
- Overrides:
- Source:
(protected) _externalTrees :Array.<ComponentTree>
External trees that components in this tree can depend on
Type:
- Source:
(protected) _importInlined :Object.<string, ComponentClass>
The classes (constructors) that need to be imported inline,
documented as any, bc of jsdoc/typescript incompatibility
Type:
- Source:
(protected) _materializableDependencies :Array.<Component>
Dependencies that have a variable material (not necessarily directly assignable)
Type:
- Overrides:
- Source:
dependencies :Object
Type:
Properties:
- Overrides:
- Source:
Type:
- Source:
partSettings :Array.<string>
Known UI settings (right now only thumbnail)
Type:
- Overrides:
- Source:
pmremGenerator :PMREMGenerator
Type:
- Source:
renderer :WebGLRenderer
Renderer from project
Type:
- Source:
Methods
(static) linkJSONObj(tree, obj) → {Object}
Parameters:
| Name |
Type |
Description |
tree |
ComponentTree
|
|
obj |
Object
|
Object to link |
- Source:
Returns:
-
Type
-
Object
(static) linkSetting(tree, prop, val) → {any}
Converts a JSON/text settings object to an object with built objects
that can be used to instantiate new Components
Parameters:
- Source:
Returns:
-
Type
-
any
(protected) _addComponent(component, …moreComponents)
Parameters:
| Name |
Type |
Attributes |
Description |
component |
Component
|
|
|
moreComponents |
Component
|
<repeatable>
|
|
- Source:
(async, protected) _build(quality, dependencies) → {Promise.<Component>}
Parameters:
| Name |
Type |
Description |
quality |
LoadingQuality
|
|
dependencies |
Object.<string, Component>
|
Dependencies that are loaded with the corresponding quality |
- Overrides:
- Source:
Returns:
-
Type
-
Promise.<Component>
(protected) _throwIfDependingComponents(component)
Parameters:
- Source:
(protected) addComponent(component, …moreComponents)
Parameters:
| Name |
Type |
Attributes |
Description |
component |
Component
|
|
|
moreComponents |
Component
|
<repeatable>
|
|
- Source:
(async) autoUpdateStatus()
Updates the component's status according to the status of
its dependencies
- Overrides:
- Source:
(async) build(instructionsopt) → {Promise.<BuildableComponent>}
Parameters:
| Name |
Type |
Attributes |
Description |
instructions |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
componentLoader |
ComponentLoader
|
<optional>
|
defaultLoader
|
|
part |
ComponentPart
|
<optional>
|
'main'
|
|
quality |
LoadingQuality
|
<optional>
|
'medium'
|
|
highPriority |
Boolean
|
<optional>
|
false
|
|
|
- Overrides:
- Source:
Returns:
-
Type
-
Promise.<BuildableComponent>
dependsDirectlyOn() → {Boolean}
- Overrides:
- Source:
Returns:
-
Type
-
Boolean
dependsOn() → {Boolean}
- Overrides:
- Source:
Returns:
-
Type
-
Boolean
findComponentById(id) → {Component|undefined}
Find a Component by Id in this class or its external trees
Parameters:
| Name |
Type |
Description |
id |
UUID
|
|
- Source:
Returns:
-
Type
-
Component
|
undefined
findDependingComponents(component) → {Array.<Component>}
Parameters:
- Source:
Returns:
-
Type
-
Array.<Component>
importJSON(JSONObject) → {Array.<Component>}
Import from JSON
Parameters:
| Name |
Type |
Description |
JSONObject |
Object
|
|
- Source:
Returns:
-
Type
-
Array.<Component>
removeComponent(component, includeDependenciesopt)
Parameters:
| Name |
Type |
Attributes |
Description |
component |
Component
|
|
|
includeDependencies |
Boolean
|
<optional>
|
|
- Source: