The normalMaterial() function in p5.js is used to create a normal material for an object. A normal material is not affected by any light and also does not reflect any light. The surface facing the x-axis becomes red, the surface facing the y-axis becomes green and the surface facing the z-axis becomes blue. It is usually used as a placeholder material for debugging.
Parameters: This function does not accept any parameters.
Below example illustrates the normalMaterial() function in p5.js:
Example 1: This example shows that the normal material is not affected by light.
Please Login to comment...