Skip to content

Home > @unseenco/backstage-threejs > autoAddMaterial

autoAddMaterial() function ​

Register a Three.js material on a Backstage sheet with auto-parsed material properties (colors, scalars, vectors, textures, shader uniforms).

Use this instead of autoAddObject() when you only want material props and do not need transform binding or Object3D selection sync.

Signature:

typescript
export declare function autoAddMaterial(material: Material | Material[], sheet: ISheet, options?: AutoAddMaterialOptions): ISheetObject;

Parameters ​

ParameterTypeDescription
materialMaterial | Material[]
sheetISheet
optionsAutoAddMaterialOptions

Returns:

ISheetObject