This commit is contained in:
Akko
2025-08-04 18:57:35 +02:00
parent 8cf6e78a79
commit 9495868c2e
5030 changed files with 518594 additions and 17609 deletions

25
node_modules/pixi.js/lib/scene/text-html/HTMLText.mjs generated vendored Normal file
View File

@@ -0,0 +1,25 @@
import { AbstractText, ensureOptions } from '../text/AbstractText.mjs';
import { HTMLTextStyle } from './HtmlTextStyle.mjs';
import { measureHtmlText } from './utils/measureHtmlText.mjs';
"use strict";
class HTMLText extends AbstractText {
constructor(...args) {
const options = ensureOptions(args, "HtmlText");
super(options, HTMLTextStyle);
this.renderPipeId = "htmlText";
}
_updateBounds() {
const bounds = this._bounds;
const anchor = this._anchor;
const htmlMeasurement = measureHtmlText(this.text, this._style);
const { width, height } = htmlMeasurement;
bounds.minX = -anchor._x * width;
bounds.maxX = bounds.minX + width;
bounds.minY = -anchor._y * height;
bounds.maxY = bounds.minY + height;
}
}
export { HTMLText };
//# sourceMappingURL=HTMLText.mjs.map