UNPKG

pixi.js

Version:

<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">

36 lines (32 loc) 869 B
'use strict'; var addMaskBounds = require('../utils/addMaskBounds.js'); var addMaskLocalBounds = require('../utils/addMaskLocalBounds.js'); "use strict"; class ScissorMask { constructor(mask) { this.priority = 0; this.pipe = "scissorMask"; this.mask = mask; this.mask.renderable = false; this.mask.measurable = false; } addBounds(bounds, skipUpdateTransform) { addMaskBounds.addMaskBounds(this.mask, bounds, skipUpdateTransform); } addLocalBounds(bounds, localRoot) { addMaskLocalBounds.addMaskLocalBounds(this.mask, bounds, localRoot); } containsPoint(point, hitTestFn) { const mask = this.mask; return hitTestFn(mask, point); } reset() { this.mask.measurable = true; this.mask = null; } destroy() { this.reset(); } } exports.ScissorMask = ScissorMask; //# sourceMappingURL=ScissorMask.js.map