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

Method constructor

packages/melonjs/src/renderable/colorlayer.js:22–33  ·  view source on GitHub ↗

* @param {string} name - Layer name * @param {Color|string} color - CSS color * @param {number} [z = 0] - z-index position

(name, color, z)

Source from the content-addressed store, hash-verified

20 * @param {number} [z = 0] - z-index position
21 */
22 constructor(name, color, z) {
23 // parent constructor
24 super(0, 0, Infinity, Infinity);
25
26 /**
27 * the layer color component
28 * @type {Color}
29 */
30 this.color = colorPool.get().parseCSS(color);
31
32 this.onResetEvent(name, color, z);
33 }
34
35 onResetEvent(name, color, z = 0) {
36 // apply given parameters

Callers

nothing calls this directly

Calls 3

onResetEventMethod · 0.95
parseCSSMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected