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

60 lines
2.2 KiB
JavaScript

shadow$provide.module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$BatchableGraphics = function(global, require, module, exports) {
global = require("module$node_modules$pixi_DOT_js$lib$maths$matrix$Matrix");
var multiplyHexColors = require("module$node_modules$pixi_DOT_js$lib$scene$container$utils$multiplyHexColors");
"use strict";
const identityMatrix = new global.Matrix();
class BatchableGraphics {
constructor() {
this.packAsQuad = !1;
this.batcherName = "default";
this.topology = "triangle-list";
this.applyTransform = !0;
this.roundPixels = 0;
this._batch = this._batcher = null;
}
get uvs() {
return this.geometryData.uvs;
}
get positions() {
return this.geometryData.vertices;
}
get indices() {
return this.geometryData.indices;
}
get blendMode() {
return this.renderable && this.applyTransform ? this.renderable.groupBlendMode : "normal";
}
get color() {
var rgb = this.baseColor;
rgb = rgb >> 16 | rgb & 65280 | (rgb & 255) << 16;
const renderable = this.renderable;
return renderable ? multiplyHexColors.multiplyHexColors(rgb, renderable.groupColor) + (this.alpha * renderable.groupAlpha * 255 << 24) : rgb + (255 * this.alpha << 24);
}
get transform() {
return this.renderable?.groupTransform || identityMatrix;
}
copyTo(gpuBuffer) {
gpuBuffer.indexOffset = this.indexOffset;
gpuBuffer.indexSize = this.indexSize;
gpuBuffer.attributeOffset = this.attributeOffset;
gpuBuffer.attributeSize = this.attributeSize;
gpuBuffer.baseColor = this.baseColor;
gpuBuffer.alpha = this.alpha;
gpuBuffer.texture = this.texture;
gpuBuffer.geometryData = this.geometryData;
gpuBuffer.topology = this.topology;
}
reset() {
this.applyTransform = !0;
this.renderable = null;
this.topology = "triangle-list";
}
destroy() {
this._batch = this._batcher = this.geometryData = this.texture = this.renderable = null;
}
}
exports.BatchableGraphics = BatchableGraphics;
};
//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$BatchableGraphics.js.map