Syntax
- resetMaterial()
- resetMaterial(target)
Parameters
- target—selector
Selects which material to reset.
- shape — Default. Only reset the material of the shape.
- geometry — Only reset the material of the geometry.
- all — Reset the materials of both the shape and the geometry.
Description
The resetMaterial operation resets the targeted material to the CGA default material (i.e. resets all material attributes). Using resetMaterial() without a parameter resets only the material of the shape. If the target is geometry or all and the geometry consists of multiple materials all of them are reset.
Related
Examples
Example 1
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.
|
Example 2
Using resetMaterial(geometry) to reset the materials of the geometry to the CGA default material.
|