Files
il/resources/public/js/cljs-runtime/module$node_modules$pixi_DOT_js$lib$scene$particle_container$shared$utils$generateParticleUpdateFunction.js
2026-07-01 22:38:29 -06:00

25 lines
1.5 KiB
JavaScript

shadow$provide.module$node_modules$pixi_DOT_js$lib$scene$particle_container$shared$utils$generateParticleUpdateFunction = function(global, require, module, exports) {
function generateUpdateFunction(properties, dynamic) {
const funcFragments = [];
funcFragments.push("\n\n var index \x3d 0;\n\n for (let i \x3d 0; i \x3c ps.length; ++i)\n {\n const p \x3d ps[i];\n\n ");
let offset = 0;
for (const i in properties) {
var property = properties[i];
dynamic === property.dynamic && (funcFragments.push(`offset = index + ${offset}`), funcFragments.push(property.code), property = getAttributeInfoFromFormat.getAttributeInfoFromFormat(property.format), offset += property.stride / 4);
}
funcFragments.push("\n index +\x3d stride * 4;\n }\n ");
funcFragments.unshift(`
var stride = ${offset};
`);
properties = funcFragments.join("\n");
return new Function("ps", "f32v", "u32v", properties);
}
var getAttributeInfoFromFormat = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$geometry$utils$getAttributeInfoFromFormat");
"use strict";
exports.generateParticleUpdateFunction = function(properties) {
return {dynamicUpdate:generateUpdateFunction(properties, !0), staticUpdate:generateUpdateFunction(properties, !1)};
};
};
//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$scene$particle_container$shared$utils$generateParticleUpdateFunction.js.map