Files
il/resources/public/js/cljs-runtime/module$node_modules$pixi_DOT_js$lib$rendering$mask$utils$addMaskLocalBounds.js
2026-07-01 22:38:29 -06:00

25 lines
1.4 KiB
JavaScript

shadow$provide.module$node_modules$pixi_DOT_js$lib$rendering$mask$utils$addMaskLocalBounds = function(global, require, module, exports) {
function getMatrixRelativeToParent(target, root, matrix) {
if (!target) {
return warn.warn("Mask bounds, renderable is not inside the root container"), matrix;
}
target !== root && (getMatrixRelativeToParent(target.parent, root, matrix), target.updateLocalTransform(), matrix.append(target.localTransform));
return matrix;
}
var getLocalBounds = require("module$node_modules$pixi_DOT_js$lib$scene$container$bounds$getLocalBounds"), matrixAndBoundsPool = require("module$node_modules$pixi_DOT_js$lib$scene$container$bounds$utils$matrixAndBoundsPool"), warn = require("module$node_modules$pixi_DOT_js$lib$utils$logging$warn");
"use strict";
exports.addMaskLocalBounds = function(mask, bounds, localRoot) {
const boundsToMask = matrixAndBoundsPool.boundsPool.get();
mask.measurable = !0;
const tempMatrix = matrixAndBoundsPool.matrixPool.get().identity();
localRoot = getMatrixRelativeToParent(mask, localRoot, tempMatrix);
getLocalBounds.getLocalBounds(mask, boundsToMask, localRoot);
mask.measurable = !1;
bounds.addBoundsMask(boundsToMask);
matrixAndBoundsPool.matrixPool.return(tempMatrix);
matrixAndBoundsPool.boundsPool.return(boundsToMask);
};
};
//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$rendering$mask$utils$addMaskLocalBounds.js.map