Class: Configuration

Configuration(reporter, settings)

Immutable data structure with methods to produce a new configuration

Constructor

new Configuration(reporter, settings)

Parameters:
Name Type Description
reporter Reporter
settings Object
Properties
Name Type Attributes Default Description
id UUID <optional>
step number <optional>
0
lastAssignedMaterials Object.<UUID, WrappedMaterial> <optional>
last assigned material per material variant group
defaultMaterials Object.<UUID, WrappedMaterial> <optional>
default material per material variant group
creationDate string <optional>
author string <optional>
pkg Package
connections Array.<Connection> <optional>
themes Object.<string, Theme> <optional>
blockInstances Array.<BlockInstance>
materialAssignments Array.<MaterialAssignment> <optional>
Source:

Members

allMeshes :Array.<WrappedMesh>

All (wrapped) meshes that are present (at least once) in this configuration
Type:
Source:

applicableMaterials :Array.<Material>

All materials that are applicable on (at least one mesh in) this configuration
Type:
  • Array.<Material>
Source:

applicableMatVarGroups :Array.<MaterialSet>

All material variant groups that are applicable on (at least one mesh in) this configuration
Type:
Source:

blockInstances :Array.<BlockInstance>

Type:
Source:

blockInstances :Array.<BlockInstance>

Type:
Source:

connections :Array.<Connection>

Type:
Source:

connectors :Array.<Object.<Connectable, Connector>>

Connectors in this configuration Array of objects the have the connectable and the connector, as that is the unique combination, a connector on its own is not unique.
Type:
Source:

extendOptions :Array.<ExtendOption>

Type:
Source:

insertOptions :Array.<InsertOption>

Type:
Source:

instructions :Object

List of how-to-use instructions per component
Type:
  • Object
Source:

materialAssignments :Array.<MaterialAssignment>

Type:
Source:

options :Object

List of components that can be used "on" this configuration
Type:
  • Object
Source:

Methods

(async) _build(part, quality, dependencies) → {Promise.<Component>}

Parameters:
Name Type Description
part ComponentPart
quality LoadingQuality
dependencies Object.<string, Component>
Source:
Returns:
Type
Promise.<Component>

_createClonedComponentConnection(newConnectionData, blockInstanceClones, newBlockInstanceopt)

Parameters:
Name Type Attributes Description
newConnectionData Object
blockInstanceClones Object.<UUID, BlockInstance>
newBlockInstance BlockInstance <optional>
Source:

extend(option)

Parameters:
Name Type Description
option ExtendOption
Source:

merge(myBlockInstance, myConnector, otherBlockInstance, otherConnector)

Copies another Configuration and links it to this one
Parameters:
Name Type Description
myBlockInstance BlockInstance
myConnector Connector
otherBlockInstance BlockInstance
otherConnector Connector
Source: