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

Method setDepth

packages/melonjs/src/video/renderer.js:1069–1071  ·  view source on GitHub ↗

* Set the current per-renderable depth value. GPU batchers (WebGL * today, WebGPU once it lands) push it into the vertex stream as the * `z` component of each vertex — a no-op under the default * orthographic projection, used by perspective (Camera3d) to scale * and parallax sprites by dista

(depth)

Source from the content-addressed store, hash-verified

1067 * @see Renderable#depth
1068 */
1069 setDepth(depth) {
1070 this.currentDepth = depth;
1071 }
1072
1073 /**
1074 * creates a Blob object representing the last rendered frame

Callers 3

preDrawMethod · 0.80
depth.spec.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected