Class ThreeMfMaterialBuilder
Constructors
constructor
-
Creates a new base materials builder.
Parameters
- id: number
The unique resource id of the base materials group within the model.
Returns ThreeMfMaterialBuilder
- id: number
Methods
build
-
Returns the base materials group that has been built.
Returns I3mfBaseMaterials
The built base materials resource.
with Color
-
Adds a named color to the group, or updates it when the name already exists.
Parameters
- name: string
The name of the material. The lookup is case insensitive.
- color: I3mfRGBAColor
The linear RGBA color, converted to an sRGB hexadecimal string.
Returns ThreeMfMaterialBuilder
This builder, to allow chaining.
- name: string
Fluent builder for a 3MF base materials resource. Colors are stored as sRGB hexadecimal strings as required by the 3MF specification.