MCPcopy Create free account
hub / github.com/melonjs/melonJS / _projectVertices

Method _projectVertices

packages/melonjs/src/renderable/mesh.js:577–591  ·  view source on GitHub ↗

* Project all vertices through projectionMatrix × currentTransform * and store the results in `this.vertices`. * @param {number} [offsetX=0] - x offset added to each projected vertex * @param {number} [offsetY=0] - y offset added to each projected vertex * @param {number} [zScale=0] - scale

(offsetX = 0, offsetY = 0, zScale = 0)

Source from the content-addressed store, hash-verified

575 * @ignore
576 */
577 _projectVertices(offsetX = 0, offsetY = 0, zScale = 0) {
578 _combinedMatrix.copy(this.projectionMatrix);
579 _combinedMatrix.multiply(this.currentTransform);
580 projectVertices(
581 this.originalVertices,
582 this.vertices,
583 this.vertexCount,
584 _combinedMatrix.val,
585 this.width,
586 this.height,
587 offsetX,
588 offsetY,
589 zScale,
590 );
591 }
592
593 /**
594 * Project vertices into **world space** for the Camera3d render path.

Callers 2

drawMethod · 0.95
toCanvasMethod · 0.95

Calls 3

projectVerticesFunction · 0.90
copyMethod · 0.45
multiplyMethod · 0.45

Tested by

no test coverage detected