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.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
indx | integer | Which material slot to set. |
val | string, Z.Texture, or Z.Material | The material to set in the specified slot. If val is a string then a Z.ImageTexture is allocated and set. |
Returns
Section titled “Returns”this