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">
25 lines (22 loc) • 666 B
JavaScript
;
;
function updateWorldTransform(local, parent, world) {
const lta = local.a;
const ltb = local.b;
const ltc = local.c;
const ltd = local.d;
const lttx = local.tx;
const ltty = local.ty;
const pta = parent.a;
const ptb = parent.b;
const ptc = parent.c;
const ptd = parent.d;
world.a = lta * pta + ltb * ptc;
world.b = lta * ptb + ltb * ptd;
world.c = ltc * pta + ltd * ptc;
world.d = ltc * ptb + ltd * ptd;
world.tx = lttx * pta + ltty * ptc + parent.tx;
world.ty = lttx * ptb + ltty * ptd + parent.ty;
}
exports.updateWorldTransform = updateWorldTransform;
//# sourceMappingURL=updateWorldTransform.js.map