resetMaterial

Syntax

  • resetMaterial()

Description

The resetMaterial operation resets the current shape’s material to the initial shape’s state, namely resets all material attributes.

Examples

Using resetMaterial() to get rid of previous changes to the shape material. This guarantees all the material attributes (e.g. the texture) of the inserted asset are used.
Lot --> primitiveQuad()
texture("stones.jpg")
set(material.reflectivity, 0.75)
set(material.specular.r, 1)
set(material.specular.g, 1)
set(material.specular.b, 1) Stones.
i("plant.glb")
resetMaterial() Flowers.
resetMaterial example

Was this article helpful?