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

Method setMask

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

* A mask limits rendering elements to the shape and position of the given mask object. * So, if the renderable is larger than the mask, only the intersecting part of the renderable will be visible. * Mask are not preserved through renderer context save and restore. * @param {Rect|RoundRect|Pol

()

Source from the content-addressed store, hash-verified

1023 * @param {boolean} [invert=false] - either the given shape should define what is visible (default) or the opposite
1024 */
1025 setMask() {}
1026
1027 /**
1028 * disable (remove) the rendering mask set through setMask.

Callers 8

drawRegionMethod · 0.45
drawTriangleMethod · 0.45
drawMethod · 0.45
drawLightingMethod · 0.45
preDrawMethod · 0.45
drawMethod · 0.45
paintWithMasksFunction · 0.45
drawMethod · 0.45

Calls

no outgoing calls

Tested by 1

paintWithMasksFunction · 0.36