Skip to content

Commit

Permalink
Improve documentation of material functions.
Browse files Browse the repository at this point in the history
Update PR #5310 to use "set current material as" instead of "create"
  • Loading branch information
JetStarBlues committed Oct 17, 2021
1 parent beeda4b commit f08bf2c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/webgl/material.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 584,7 @@ p5.prototype.textureWrap = function(wrapX, wrapY = wrapX) {
};

/**
* Creates a normal material.
* Sets the current material as a normal material.
*
* A normal material is not affected by light. It is often used as
* a placeholder material when debugging.
Expand Down Expand Up @@ -628,7 628,7 @@ p5.prototype.normalMaterial = function(...args) {
};

/**
* Creates an ambient material with the given color.
* Sets the current material as an ambient material of the given color.
*
* The ambientMaterial() color is the color the object will reflect
* under **any** lighting.
Expand Down Expand Up @@ -740,7 740,8 @@ p5.prototype.ambientMaterial = function(v1, v2, v3) {
};

/**
* Creates an emissive material with the given color.
* Sets the current material as an emissive material of
* the given color.
*
* An emissive material will display the emissive color at
* full strength regardless of lighting. This can give the
Expand Down Expand Up @@ -812,7 813,7 @@ p5.prototype.emissiveMaterial = function(v1, v2, v3, a) {
};

/**
* Creates a specular material with the given color.
* Sets the current material as a specular material of the given color.
*
* A specular material is reflective (shiny). The shininess can be
* controlled by the <a href="#/p5/shininess">shininess()</a> function.
Expand Down

0 comments on commit f08bf2c

Please sign in to comment.