Skip to content

material(... , ...)

Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.

material(indx: number, val: string): this;

material(indx: number, val: Texture): this;

material(indx: number, val: Material): this;

Sets a material to the specified slot.

ParameterTypeDescription
indxintegerWhich material slot to set.
valstring, Z.Texture, or Z.MaterialThe material to set in the specified slot. If val is a string then a Z.ImageTexture is allocated and set.

this