Class: MaterialSet

MaterialSet(reporter, settings)

Material set Component is not auto-linked and uses the Package to formulate the set of materials from material categories and material references. As "MaterialSet" is loaded after "Material" in the Package, this isn't a problem. Otherwise, building depends on Package change events.

Constructor

new MaterialSet(reporter, settings)

Parameters:
Name Type Description
reporter Reporter
settings Object
Properties
Name Type Attributes Description
id UUID <optional>
name string
thumbnail WrappedImage <optional>
categories Array.<MaterialCategory> <optional>
materials Array.<WrappedMaterial> <optional>
Source:

Members

allMaterials :Array.<WrappedMaterial>

All materials that are in this set. (Available after building)
Type:
Source:

Methods

(async, protected) _build()

Source:

has(material) → {boolean}

Check whether a material is in the set
Parameters:
Name Type Description
material WrappedMaterial
Source:
Returns:
Type
boolean

size() → {number}

Number of materials in set
Source:
Returns:
Type
number