Skip to content

Documentation / @sw-file-lib/three / createSwMaterials

Function: createSwMaterials() ​

ts
function createSwMaterials(options?: CreateSwMaterialsOptions): SwMaterialSet;

Defined in: material/materials.ts:63

Create the default materials used by Stormworks object helpers.

A new material set has independent uniform stores, making it suitable for object-local color and shader state. Share the returned set only when objects should intentionally share uniform updates.

Parameters ​

ParameterType
optionsCreateSwMaterialsOptions

Returns ​

SwMaterialSet