26 lines
1.2 KiB
JavaScript
26 lines
1.2 KiB
JavaScript
shadow$provide.module$node_modules$pixi_DOT_js$lib$rendering$batcher$gpu$getTextureBatchBindGroup = function(global, require, module, exports) {
|
|
var BindGroup = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$gpu$shader$BindGroup"), Texture = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$texture$Texture");
|
|
"use strict";
|
|
const cachedGroups = {};
|
|
exports.getTextureBatchBindGroup = function(textures, size, maxTextures) {
|
|
var uid = 2166136261;
|
|
for (var i$jscomp$0 = 0; i$jscomp$0 < size; i$jscomp$0++) {
|
|
uid ^= textures[i$jscomp$0].uid, uid = Math.imul(uid, 16777619), uid >>>= 0;
|
|
}
|
|
if (!(i$jscomp$0 = cachedGroups[uid])) {
|
|
i$jscomp$0 = {};
|
|
let bindIndex = 0;
|
|
for (let i = 0; i < maxTextures; i++) {
|
|
const texture = i < size ? textures[i] : Texture.Texture.EMPTY.source;
|
|
i$jscomp$0[bindIndex++] = texture.source;
|
|
i$jscomp$0[bindIndex++] = texture.style;
|
|
}
|
|
textures = new BindGroup.BindGroup(i$jscomp$0);
|
|
i$jscomp$0 = cachedGroups[uid] = textures;
|
|
}
|
|
return i$jscomp$0;
|
|
};
|
|
};
|
|
|
|
//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$rendering$batcher$gpu$getTextureBatchBindGroup.js.map
|