MCPcopy Index your code
hub / github.com/processing/p5.js / transformNormals

Method transformNormals

src/webgl/GeometryBuilder.js:43–49  ·  view source on GitHub ↗

* @private * Applies the current normal matrix to each normal.

(normals)

Source from the content-addressed store, hash-verified

41 * Applies the current normal matrix to each normal.
42 */
43 transformNormals(normals) {
44 if (!this.hasTransform) return normals;
45
46 return normals.map(
47 v => this.renderer.scratchMat3.multiplyVec(v) // this is a vec3
48 );
49 }
50
51 /**
52 * @private

Callers 1

addGeometryMethod · 0.95

Calls 1

multiplyVecMethod · 0.80

Tested by

no test coverage detected