resetMaterial operation

Syntax

resetMaterial()

Description

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

Related

See the following related links:

Examples

Use resetMaterial() to get rid of previous changes to the shape material. This guarantees all the material attributes (for example, 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


In this topic