sdfsdfs
This commit is contained in:
12
node_modules/pixi.js/lib/scene/text/utils/ensureTextStyle.d.ts
generated
vendored
Normal file
12
node_modules/pixi.js/lib/scene/text/utils/ensureTextStyle.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { HTMLTextStyle } from '../../text-html/HtmlTextStyle';
|
||||
import { TextStyle } from '../TextStyle';
|
||||
import type { HTMLTextStyleOptions } from '../../text-html/HtmlTextStyle';
|
||||
import type { TextStyleOptions } from '../TextStyle';
|
||||
/**
|
||||
* converts the style input into the correct type of TextStyle
|
||||
* either HTMLTextStyle or TextStyle based on the renderMode.
|
||||
* @param renderMode - The render mode to use
|
||||
* @param style - The style to use
|
||||
* @returns - The style class
|
||||
*/
|
||||
export declare function ensureTextStyle(renderMode: string, style: TextStyle | HTMLTextStyle | TextStyleOptions | HTMLTextStyleOptions): TextStyle;
|
15
node_modules/pixi.js/lib/scene/text/utils/ensureTextStyle.js
generated
vendored
Normal file
15
node_modules/pixi.js/lib/scene/text/utils/ensureTextStyle.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
var HtmlTextStyle = require('../../text-html/HtmlTextStyle.js');
|
||||
var TextStyle = require('../TextStyle.js');
|
||||
|
||||
"use strict";
|
||||
function ensureTextStyle(renderMode, style) {
|
||||
if (style instanceof TextStyle.TextStyle || style instanceof HtmlTextStyle.HTMLTextStyle) {
|
||||
return style;
|
||||
}
|
||||
return renderMode === "html" ? new HtmlTextStyle.HTMLTextStyle(style) : new TextStyle.TextStyle(style);
|
||||
}
|
||||
|
||||
exports.ensureTextStyle = ensureTextStyle;
|
||||
//# sourceMappingURL=ensureTextStyle.js.map
|
1
node_modules/pixi.js/lib/scene/text/utils/ensureTextStyle.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/scene/text/utils/ensureTextStyle.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ensureTextStyle.js","sources":["../../../../src/scene/text/utils/ensureTextStyle.ts"],"sourcesContent":["import { HTMLTextStyle } from '../../text-html/HtmlTextStyle';\nimport { TextStyle } from '../TextStyle';\n\nimport type { HTMLTextStyleOptions } from '../../text-html/HtmlTextStyle';\nimport type { TextStyleOptions } from '../TextStyle';\n\n/**\n * converts the style input into the correct type of TextStyle\n * either HTMLTextStyle or TextStyle based on the renderMode.\n * @param renderMode - The render mode to use\n * @param style - The style to use\n * @returns - The style class\n */\nexport function ensureTextStyle(\n renderMode: string,\n style: TextStyle | HTMLTextStyle | TextStyleOptions | HTMLTextStyleOptions\n)\n{\n if (style instanceof TextStyle || style instanceof HTMLTextStyle)\n {\n return style;\n }\n\n return renderMode === 'html'\n ? new HTMLTextStyle(style)\n : new TextStyle(style);\n}\n"],"names":["TextStyle","HTMLTextStyle"],"mappings":";;;;;;AAagB,SAAA,eAAA,CACZ,YACA,KAEJ,EAAA;AACI,EAAI,IAAA,KAAA,YAAiBA,mBAAa,IAAA,KAAA,YAAiBC,2BACnD,EAAA;AACI,IAAO,OAAA,KAAA,CAAA;AAAA,GACX;AAEA,EAAO,OAAA,UAAA,KAAe,SAChB,IAAIA,2BAAA,CAAc,KAAK,CACvB,GAAA,IAAID,oBAAU,KAAK,CAAA,CAAA;AAC7B;;;;"}
|
13
node_modules/pixi.js/lib/scene/text/utils/ensureTextStyle.mjs
generated
vendored
Normal file
13
node_modules/pixi.js/lib/scene/text/utils/ensureTextStyle.mjs
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { HTMLTextStyle } from '../../text-html/HtmlTextStyle.mjs';
|
||||
import { TextStyle } from '../TextStyle.mjs';
|
||||
|
||||
"use strict";
|
||||
function ensureTextStyle(renderMode, style) {
|
||||
if (style instanceof TextStyle || style instanceof HTMLTextStyle) {
|
||||
return style;
|
||||
}
|
||||
return renderMode === "html" ? new HTMLTextStyle(style) : new TextStyle(style);
|
||||
}
|
||||
|
||||
export { ensureTextStyle };
|
||||
//# sourceMappingURL=ensureTextStyle.mjs.map
|
1
node_modules/pixi.js/lib/scene/text/utils/ensureTextStyle.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/scene/text/utils/ensureTextStyle.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ensureTextStyle.mjs","sources":["../../../../src/scene/text/utils/ensureTextStyle.ts"],"sourcesContent":["import { HTMLTextStyle } from '../../text-html/HtmlTextStyle';\nimport { TextStyle } from '../TextStyle';\n\nimport type { HTMLTextStyleOptions } from '../../text-html/HtmlTextStyle';\nimport type { TextStyleOptions } from '../TextStyle';\n\n/**\n * converts the style input into the correct type of TextStyle\n * either HTMLTextStyle or TextStyle based on the renderMode.\n * @param renderMode - The render mode to use\n * @param style - The style to use\n * @returns - The style class\n */\nexport function ensureTextStyle(\n renderMode: string,\n style: TextStyle | HTMLTextStyle | TextStyleOptions | HTMLTextStyleOptions\n)\n{\n if (style instanceof TextStyle || style instanceof HTMLTextStyle)\n {\n return style;\n }\n\n return renderMode === 'html'\n ? new HTMLTextStyle(style)\n : new TextStyle(style);\n}\n"],"names":[],"mappings":";;;;AAagB,SAAA,eAAA,CACZ,YACA,KAEJ,EAAA;AACI,EAAI,IAAA,KAAA,YAAiB,SAAa,IAAA,KAAA,YAAiB,aACnD,EAAA;AACI,IAAO,OAAA,KAAA,CAAA;AAAA,GACX;AAEA,EAAO,OAAA,UAAA,KAAe,SAChB,IAAI,aAAA,CAAc,KAAK,CACvB,GAAA,IAAI,UAAU,KAAK,CAAA,CAAA;AAC7B;;;;"}
|
7
node_modules/pixi.js/lib/scene/text/utils/generateTextStyleKey.d.ts
generated
vendored
Normal file
7
node_modules/pixi.js/lib/scene/text/utils/generateTextStyleKey.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { TextStyle } from '../TextStyle';
|
||||
/**
|
||||
* Generates a unique key for the text style.
|
||||
* @param style - The style to generate a key for.
|
||||
* @returns the key for the style.
|
||||
*/
|
||||
export declare function generateTextStyleKey(style: TextStyle): string;
|
68
node_modules/pixi.js/lib/scene/text/utils/generateTextStyleKey.js
generated
vendored
Normal file
68
node_modules/pixi.js/lib/scene/text/utils/generateTextStyleKey.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
'use strict';
|
||||
|
||||
var Color = require('../../../color/Color.js');
|
||||
|
||||
"use strict";
|
||||
const valuesToIterateForKeys = [
|
||||
"align",
|
||||
"breakWords",
|
||||
"cssOverrides",
|
||||
"fontVariant",
|
||||
"fontWeight",
|
||||
"leading",
|
||||
"letterSpacing",
|
||||
"lineHeight",
|
||||
"padding",
|
||||
"textBaseline",
|
||||
"trim",
|
||||
"whiteSpace",
|
||||
"wordWrap",
|
||||
"wordWrapWidth",
|
||||
"fontFamily",
|
||||
"fontStyle",
|
||||
"fontSize"
|
||||
];
|
||||
function generateTextStyleKey(style) {
|
||||
const key = [];
|
||||
let index = 0;
|
||||
for (let i = 0; i < valuesToIterateForKeys.length; i++) {
|
||||
const prop = `_${valuesToIterateForKeys[i]}`;
|
||||
key[index++] = style[prop];
|
||||
}
|
||||
index = addFillStyleKey(style._fill, key, index);
|
||||
index = addStokeStyleKey(style._stroke, key, index);
|
||||
index = addDropShadowKey(style.dropShadow, key, index);
|
||||
return key.join("-");
|
||||
}
|
||||
function addFillStyleKey(fillStyle, key, index) {
|
||||
if (!fillStyle)
|
||||
return index;
|
||||
key[index++] = fillStyle.color;
|
||||
key[index++] = fillStyle.alpha;
|
||||
key[index++] = fillStyle.fill?.styleKey;
|
||||
return index;
|
||||
}
|
||||
function addStokeStyleKey(strokeStyle, key, index) {
|
||||
if (!strokeStyle)
|
||||
return index;
|
||||
index = addFillStyleKey(strokeStyle, key, index);
|
||||
key[index++] = strokeStyle.width;
|
||||
key[index++] = strokeStyle.alignment;
|
||||
key[index++] = strokeStyle.cap;
|
||||
key[index++] = strokeStyle.join;
|
||||
key[index++] = strokeStyle.miterLimit;
|
||||
return index;
|
||||
}
|
||||
function addDropShadowKey(dropShadow, key, index) {
|
||||
if (!dropShadow)
|
||||
return index;
|
||||
key[index++] = dropShadow.alpha;
|
||||
key[index++] = dropShadow.angle;
|
||||
key[index++] = dropShadow.blur;
|
||||
key[index++] = dropShadow.distance;
|
||||
key[index++] = Color.Color.shared.setValue(dropShadow.color).toNumber();
|
||||
return index;
|
||||
}
|
||||
|
||||
exports.generateTextStyleKey = generateTextStyleKey;
|
||||
//# sourceMappingURL=generateTextStyleKey.js.map
|
1
node_modules/pixi.js/lib/scene/text/utils/generateTextStyleKey.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/scene/text/utils/generateTextStyleKey.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"generateTextStyleKey.js","sources":["../../../../src/scene/text/utils/generateTextStyleKey.ts"],"sourcesContent":["import { Color } from '../../../color/Color';\n\nimport type { ConvertedFillStyle, ConvertedStrokeStyle } from '../../graphics/shared/FillTypes';\nimport type { HTMLTextStyle } from '../../text-html/HtmlTextStyle';\nimport type { TextStyle } from '../TextStyle';\n\nconst valuesToIterateForKeys: Partial<keyof TextStyle | keyof HTMLTextStyle>[] = [\n 'align',\n 'breakWords',\n 'cssOverrides',\n 'fontVariant',\n 'fontWeight',\n 'leading',\n 'letterSpacing',\n 'lineHeight',\n 'padding',\n 'textBaseline',\n 'trim',\n 'whiteSpace',\n 'wordWrap',\n 'wordWrapWidth',\n 'fontFamily',\n 'fontStyle',\n 'fontSize',\n] as const;\n\n/**\n * Generates a unique key for the text style.\n * @param style - The style to generate a key for.\n * @returns the key for the style.\n */\nexport function generateTextStyleKey(style: TextStyle): string\n{\n const key = [];\n\n let index = 0;\n\n for (let i = 0; i < valuesToIterateForKeys.length; i++)\n {\n const prop = `_${valuesToIterateForKeys[i]}`;\n\n key[index++] = style[prop as keyof typeof style];\n }\n\n index = addFillStyleKey(style._fill, key as string[], index);\n index = addStokeStyleKey(style._stroke, key as string[], index);\n index = addDropShadowKey(style.dropShadow, key as string[], index);\n\n return key.join('-');\n}\n\nfunction addFillStyleKey(fillStyle: ConvertedFillStyle, key: (number | string)[], index: number)\n{\n if (!fillStyle) return index;\n\n key[index++] = fillStyle.color;\n key[index++] = fillStyle.alpha;\n key[index++] = fillStyle.fill?.styleKey;\n\n return index;\n}\n\nfunction addStokeStyleKey(strokeStyle: ConvertedStrokeStyle, key: (number | string)[], index: number)\n{\n if (!strokeStyle) return index;\n\n index = addFillStyleKey(strokeStyle, key, index);\n\n key[index++] = strokeStyle.width;\n key[index++] = strokeStyle.alignment;\n key[index++] = strokeStyle.cap;\n key[index++] = strokeStyle.join;\n key[index++] = strokeStyle.miterLimit;\n\n return index;\n}\n\nfunction addDropShadowKey(dropShadow: TextStyle['dropShadow'], key: (number | string)[], index: number)\n{\n if (!dropShadow) return index;\n\n key[index++] = dropShadow.alpha;\n key[index++] = dropShadow.angle;\n key[index++] = dropShadow.blur;\n key[index++] = dropShadow.distance;\n key[index++] = Color.shared.setValue(dropShadow.color).toNumber();\n\n return index;\n}\n"],"names":["Color"],"mappings":";;;;;AAMA,MAAM,sBAA2E,GAAA;AAAA,EAC7E,OAAA;AAAA,EACA,YAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,SAAA;AAAA,EACA,eAAA;AAAA,EACA,YAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AACJ,CAAA,CAAA;AAOO,SAAS,qBAAqB,KACrC,EAAA;AACI,EAAA,MAAM,MAAM,EAAC,CAAA;AAEb,EAAA,IAAI,KAAQ,GAAA,CAAA,CAAA;AAEZ,EAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,sBAAA,CAAuB,QAAQ,CACnD,EAAA,EAAA;AACI,IAAA,MAAM,IAAO,GAAA,CAAA,CAAA,EAAI,sBAA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A,KAAA,EAAO,IAAI,WAAY,CAAA,GAAA,CAAA;AAC3B,EAAI,GAAA,CAAA,KAAA,EAAO,IAAI,WAAY,CAAA,IAAA,CAAA;AAC3B,EAAI,GAAA,CAAA,KAAA,EAAO,IAAI,WAAY,CAAA,UAAA,CAAA;AAE3B,EAAO,OAAA,KAAA,CAAA;AACX,CAAA;AAEA,SAAS,gBAAA,CAAiB,UAAqC,EAAA,GAAA,EAA0B,KACzF,EAAA;AACI,EAAA,IAAI,CAAC,UAAA;AAAY,IAAO,OAAA,KAAA,CAAA;AAExB,EAAI,GAAA,CAAA,KAAA,EAAO,IAAI,UAAW,CAAA,KAAA,CAAA;AAC1B,EAAI,GAAA,CAAA,KAAA,EAAO,IAAI,UAAW,CAAA,KAAA,CAAA;AAC1B,EAAI,GAAA,CAAA,KAAA,EAAO,IAAI,UAAW,CAAA,IAAA,CAAA;AAC1B,EAAI,GAAA,CAAA,KAAA,EAAO,IAAI,UAAW,CAAA,QAAA,CAAA;AAC1B,EAAI,GAAA,CAAA,KAAA,EAAO,IAAIA,WAAM,CAAA,MAAA,CAAO,SAAS,UAAW,CAAA,KAAK,EAAE,QAAS,EAAA,CAAA;AAEhE,EAAO,OAAA,KAAA,CAAA;AACX;;;;"}
|
66
node_modules/pixi.js/lib/scene/text/utils/generateTextStyleKey.mjs
generated
vendored
Normal file
66
node_modules/pixi.js/lib/scene/text/utils/generateTextStyleKey.mjs
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
import { Color } from '../../../color/Color.mjs';
|
||||
|
||||
"use strict";
|
||||
const valuesToIterateForKeys = [
|
||||
"align",
|
||||
"breakWords",
|
||||
"cssOverrides",
|
||||
"fontVariant",
|
||||
"fontWeight",
|
||||
"leading",
|
||||
"letterSpacing",
|
||||
"lineHeight",
|
||||
"padding",
|
||||
"textBaseline",
|
||||
"trim",
|
||||
"whiteSpace",
|
||||
"wordWrap",
|
||||
"wordWrapWidth",
|
||||
"fontFamily",
|
||||
"fontStyle",
|
||||
"fontSize"
|
||||
];
|
||||
function generateTextStyleKey(style) {
|
||||
const key = [];
|
||||
let index = 0;
|
||||
for (let i = 0; i < valuesToIterateForKeys.length; i++) {
|
||||
const prop = `_${valuesToIterateForKeys[i]}`;
|
||||
key[index++] = style[prop];
|
||||
}
|
||||
index = addFillStyleKey(style._fill, key, index);
|
||||
index = addStokeStyleKey(style._stroke, key, index);
|
||||
index = addDropShadowKey(style.dropShadow, key, index);
|
||||
return key.join("-");
|
||||
}
|
||||
function addFillStyleKey(fillStyle, key, index) {
|
||||
if (!fillStyle)
|
||||
return index;
|
||||
key[index++] = fillStyle.color;
|
||||
key[index++] = fillStyle.alpha;
|
||||
key[index++] = fillStyle.fill?.styleKey;
|
||||
return index;
|
||||
}
|
||||
function addStokeStyleKey(strokeStyle, key, index) {
|
||||
if (!strokeStyle)
|
||||
return index;
|
||||
index = addFillStyleKey(strokeStyle, key, index);
|
||||
key[index++] = strokeStyle.width;
|
||||
key[index++] = strokeStyle.alignment;
|
||||
key[index++] = strokeStyle.cap;
|
||||
key[index++] = strokeStyle.join;
|
||||
key[index++] = strokeStyle.miterLimit;
|
||||
return index;
|
||||
}
|
||||
function addDropShadowKey(dropShadow, key, index) {
|
||||
if (!dropShadow)
|
||||
return index;
|
||||
key[index++] = dropShadow.alpha;
|
||||
key[index++] = dropShadow.angle;
|
||||
key[index++] = dropShadow.blur;
|
||||
key[index++] = dropShadow.distance;
|
||||
key[index++] = Color.shared.setValue(dropShadow.color).toNumber();
|
||||
return index;
|
||||
}
|
||||
|
||||
export { generateTextStyleKey };
|
||||
//# sourceMappingURL=generateTextStyleKey.mjs.map
|
1
node_modules/pixi.js/lib/scene/text/utils/generateTextStyleKey.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/scene/text/utils/generateTextStyleKey.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"generateTextStyleKey.mjs","sources":["../../../../src/scene/text/utils/generateTextStyleKey.ts"],"sourcesContent":["import { Color } from '../../../color/Color';\n\nimport type { ConvertedFillStyle, ConvertedStrokeStyle } from '../../graphics/shared/FillTypes';\nimport type { HTMLTextStyle } from '../../text-html/HtmlTextStyle';\nimport type { TextStyle } from '../TextStyle';\n\nconst valuesToIterateForKeys: Partial<keyof TextStyle | keyof HTMLTextStyle>[] = [\n 'align',\n 'breakWords',\n 'cssOverrides',\n 'fontVariant',\n 'fontWeight',\n 'leading',\n 'letterSpacing',\n 'lineHeight',\n 'padding',\n 'textBaseline',\n 'trim',\n 'whiteSpace',\n 'wordWrap',\n 'wordWrapWidth',\n 'fontFamily',\n 'fontStyle',\n 'fontSize',\n] as const;\n\n/**\n * Generates a unique key for the text style.\n * @param style - The style to generate a key for.\n * @returns the key for the style.\n */\nexport function generateTextStyleKey(style: TextStyle): string\n{\n const key = [];\n\n let index = 0;\n\n for (let i = 0; i < valuesToIterateForKeys.length; i++)\n {\n const prop = `_${valuesToIterateForKeys[i]}`;\n\n key[index++] = style[prop as keyof typeof style];\n }\n\n index = addFillStyleKey(style._fill, key as string[], index);\n index = addStokeStyleKey(style._stroke, key as string[], index);\n index = addDropShadowKey(style.dropShadow, key as string[], index);\n\n return key.join('-');\n}\n\nfunction addFillStyleKey(fillStyle: ConvertedFillStyle, key: (number | string)[], index: number)\n{\n if (!fillStyle) return index;\n\n key[index++] = fillStyle.color;\n key[index++] = fillStyle.alpha;\n key[index++] = fillStyle.fill?.styleKey;\n\n return index;\n}\n\nfunction addStokeStyleKey(strokeStyle: ConvertedStrokeStyle, key: (number | string)[], index: number)\n{\n if (!strokeStyle) return index;\n\n index = addFillStyleKey(strokeStyle, key, index);\n\n key[index++] = strokeStyle.width;\n key[index++] = strokeStyle.alignment;\n key[index++] = strokeStyle.cap;\n key[index++] = strokeStyle.join;\n key[index++] = strokeStyle.miterLimit;\n\n return index;\n}\n\nfunction addDropShadowKey(dropShadow: TextStyle['dropShadow'], key: (number | string)[], index: number)\n{\n if (!dropShadow) return index;\n\n key[index++] = dropShadow.alpha;\n key[index++] = dropShadow.angle;\n key[index++] = dropShadow.blur;\n key[index++] = dropShadow.distance;\n key[index++] = Color.shared.setValue(dropShadow.color).toNumber();\n\n return index;\n}\n"],"names":[],"mappings":";;;AAMA,MAAM,sBAA2E,GAAA;AAAA,EAC7E,OAAA;AAAA,EACA,YAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,SAAA;AAAA,EACA,eAAA;AAAA,EACA,YAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AACJ,CAAA,CAAA;AAOO,SAAS,qBAAqB,KACrC,EAAA;AACI,EAAA,MAAM,MAAM,EAAC,CAAA;AAEb,EAAA,IAAI,KAAQ,GAAA,CAAA,CAAA;AAEZ,EAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,sBAAA,CAAuB,QAAQ,CACnD,EAAA,EAAA;AACI,IAAA,MAAM,IAAO,GAAA,CAAA,CAAA,EAAI,sBAAuB,CAAA,CAAC,CAAC,CAAA,CAAA,CAAA;AAE1C,IAAI,GAAA,CAAA,KAAA,EAAO,CAAI,GAAA,KAAA,CAAM,IAA0B,CAAA,CAAA;AAAA,GACnD;AAEA,EAAA,KAAA,GAAQ,eAAgB,CAAA,KAAA,CAAM,KAAO,EAAA,GAAA,EAAiB,KAAK,CAAA,CAAA;AAC3D,EAAA,KAAA,GAAQ,gBAAiB,CAAA,KAAA,CAAM,OAAS,EAAA,GAAA,EAAiB,KAAK,CAAA,CAAA;AAC9D,EAAA,KAAA,GAAQ,gBAAiB,CAAA,KAAA,CAAM,UAAY,EAAA,GAAA,EAAiB,KAAK,CAAA,CAAA;AAEjE,EAAO,OAAA,GAAA,CAAI,KAAK,GAAG,CAAA,CAAA;AACvB,CAAA;AAEA,SA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AA,CAAA,KAAA,EAAO,IAAI,UAAW,CAAA,IAAA,CAAA;AAC1B,EAAI,GAAA,CAAA,KAAA,EAAO,IAAI,UAAW,CAAA,QAAA,CAAA;AAC1B,EAAI,GAAA,CAAA,KAAA,EAAO,IAAI,KAAM,CAAA,MAAA,CAAO,SAAS,UAAW,CAAA,KAAK,EAAE,QAAS,EAAA,CAAA;AAEhE,EAAO,OAAA,KAAA,CAAA;AACX;;;;"}
|
12
node_modules/pixi.js/lib/scene/text/utils/getPo2TextureFromSource.d.ts
generated
vendored
Normal file
12
node_modules/pixi.js/lib/scene/text/utils/getPo2TextureFromSource.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { ICanvas } from '../../../environment/canvas/ICanvas';
|
||||
import type { Texture } from '../../../rendering/renderers/shared/texture/Texture';
|
||||
/**
|
||||
* Takes an image and creates a texture from it, using a power of 2 texture from the texture pool.
|
||||
* Remember to return the texture when you don't need it any more!
|
||||
* @param image - The image to create a texture from
|
||||
* @param width - the frame width of the texture
|
||||
* @param height - the frame height of the texture
|
||||
* @param resolution - The resolution of the texture
|
||||
* @returns - The texture
|
||||
*/
|
||||
export declare function getPo2TextureFromSource(image: HTMLImageElement | HTMLCanvasElement | ICanvas, width: number, height: number, resolution: number): Texture;
|
31
node_modules/pixi.js/lib/scene/text/utils/getPo2TextureFromSource.js
generated
vendored
Normal file
31
node_modules/pixi.js/lib/scene/text/utils/getPo2TextureFromSource.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
|
||||
var TexturePool = require('../../../rendering/renderers/shared/texture/TexturePool.js');
|
||||
var Bounds = require('../../container/bounds/Bounds.js');
|
||||
|
||||
"use strict";
|
||||
const tempBounds = new Bounds.Bounds();
|
||||
function getPo2TextureFromSource(image, width, height, resolution) {
|
||||
const bounds = tempBounds;
|
||||
bounds.minX = 0;
|
||||
bounds.minY = 0;
|
||||
bounds.maxX = image.width / resolution | 0;
|
||||
bounds.maxY = image.height / resolution | 0;
|
||||
const texture = TexturePool.TexturePool.getOptimalTexture(
|
||||
bounds.width,
|
||||
bounds.height,
|
||||
resolution,
|
||||
false
|
||||
);
|
||||
texture.source.uploadMethodId = "image";
|
||||
texture.source.resource = image;
|
||||
texture.source.alphaMode = "premultiply-alpha-on-upload";
|
||||
texture.frame.width = width / resolution;
|
||||
texture.frame.height = height / resolution;
|
||||
texture.source.emit("update", texture.source);
|
||||
texture.updateUvs();
|
||||
return texture;
|
||||
}
|
||||
|
||||
exports.getPo2TextureFromSource = getPo2TextureFromSource;
|
||||
//# sourceMappingURL=getPo2TextureFromSource.js.map
|
1
node_modules/pixi.js/lib/scene/text/utils/getPo2TextureFromSource.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/scene/text/utils/getPo2TextureFromSource.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getPo2TextureFromSource.js","sources":["../../../../src/scene/text/utils/getPo2TextureFromSource.ts"],"sourcesContent":["import { TexturePool } from '../../../rendering/renderers/shared/texture/TexturePool';\nimport { Bounds } from '../../container/bounds/Bounds';\n\nimport type { ICanvas } from '../../../environment/canvas/ICanvas';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\n\nconst tempBounds = new Bounds();\n\n/**\n * Takes an image and creates a texture from it, using a power of 2 texture from the texture pool.\n * Remember to return the texture when you don't need it any more!\n * @param image - The image to create a texture from\n * @param width - the frame width of the texture\n * @param height - the frame height of the texture\n * @param resolution - The resolution of the texture\n * @returns - The texture\n */\nexport function getPo2TextureFromSource(\n image: HTMLImageElement | HTMLCanvasElement | ICanvas,\n width: number,\n height: number,\n resolution: number\n): Texture\n{\n const bounds = tempBounds;\n\n bounds.minX = 0;\n bounds.minY = 0;\n\n bounds.maxX = (image.width / resolution) | 0;\n bounds.maxY = (image.height / resolution) | 0;\n\n const texture = TexturePool.getOptimalTexture(\n bounds.width,\n bounds.height,\n resolution,\n false\n );\n\n texture.source.uploadMethodId = 'image';\n texture.source.resource = image;\n texture.source.alphaMode = 'premultiply-alpha-on-upload';\n\n texture.frame.width = width / resolution;\n texture.frame.height = height / resolution;\n\n // We want to update the resource on the GPU,\n // but we do not want to resize the texture.\n // calling `texture.source.update` will fit the resource to the texture\n // causing a resize of the texture on the GPU.\n // which is not what we want!\n texture.source.emit('update', texture.source);\n\n texture.updateUvs();\n\n return texture;\n}\n"],"names":["Bounds","TexturePool"],"mappings":";;;;;;AAMA,MAAM,UAAA,GAAa,IAAIA,aAAO,EAAA,CAAA;AAWvB,SAAS,uBACZ,CAAA,KAAA,EACA,KACA,EAAA,MAAA,EACA,UAEJ,EAAA;AACI,EAAA,MAAM,MAAS,GAAA,UAAA,CAAA;AAEf,EAAA,MAAA,CAAO,IAAO,GAAA,CAAA,CAAA;AACd,EAAA,MAAA,CAAO,IAAO,GAAA,CAAA,CAAA;AAEd,EAAO,MAAA,CAAA,IAAA,GAAQ,KAAM,CAAA,KAAA,GAAQ,UAAc,GAAA,CAAA,CAAA;AAC3C,EAAO,MAAA,CAAA,IAAA,GAAQ,KAAM,CAAA,MAAA,GAAS,UAAc,GAAA,CAAA,CAAA;AAE5C,EAAA,MAAM,UAAUC,uBAAY,CAAA,iBAAA;AAAA,IACxB,MAAO,CAAA,KAAA;AAAA,IACP,MAAO,CAAA,MAAA;AAAA,IACP,UAAA;AAAA,IACA,KAAA;AAAA,GACJ,CAAA;AAEA,EAAA,OAAA,CAAQ,OAAO,cAAiB,GAAA,OAAA,CAAA;AAChC,EAAA,OAAA,CAAQ,OAAO,QAAW,GAAA,KAAA,CAAA;AAC1B,EAAA,OAAA,CAAQ,OAAO,SAAY,GAAA,6BAAA,CAAA;AAE3B,EAAQ,OAAA,CAAA,KAAA,CAAM,QAAQ,KAAQ,GAAA,UAAA,CAAA;AAC9B,EAAQ,OAAA,CAAA,KAAA,CAAM,SAAS,MAAS,GAAA,UAAA,CAAA;AAOhC,EAAA,OAAA,CAAQ,MAAO,CAAA,IAAA,CAAK,QAAU,EAAA,OAAA,CAAQ,MAAM,CAAA,CAAA;AAE5C,EAAA,OAAA,CAAQ,SAAU,EAAA,CAAA;AAElB,EAAO,OAAA,OAAA,CAAA;AACX;;;;"}
|
29
node_modules/pixi.js/lib/scene/text/utils/getPo2TextureFromSource.mjs
generated
vendored
Normal file
29
node_modules/pixi.js/lib/scene/text/utils/getPo2TextureFromSource.mjs
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import { TexturePool } from '../../../rendering/renderers/shared/texture/TexturePool.mjs';
|
||||
import { Bounds } from '../../container/bounds/Bounds.mjs';
|
||||
|
||||
"use strict";
|
||||
const tempBounds = new Bounds();
|
||||
function getPo2TextureFromSource(image, width, height, resolution) {
|
||||
const bounds = tempBounds;
|
||||
bounds.minX = 0;
|
||||
bounds.minY = 0;
|
||||
bounds.maxX = image.width / resolution | 0;
|
||||
bounds.maxY = image.height / resolution | 0;
|
||||
const texture = TexturePool.getOptimalTexture(
|
||||
bounds.width,
|
||||
bounds.height,
|
||||
resolution,
|
||||
false
|
||||
);
|
||||
texture.source.uploadMethodId = "image";
|
||||
texture.source.resource = image;
|
||||
texture.source.alphaMode = "premultiply-alpha-on-upload";
|
||||
texture.frame.width = width / resolution;
|
||||
texture.frame.height = height / resolution;
|
||||
texture.source.emit("update", texture.source);
|
||||
texture.updateUvs();
|
||||
return texture;
|
||||
}
|
||||
|
||||
export { getPo2TextureFromSource };
|
||||
//# sourceMappingURL=getPo2TextureFromSource.mjs.map
|
1
node_modules/pixi.js/lib/scene/text/utils/getPo2TextureFromSource.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/scene/text/utils/getPo2TextureFromSource.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getPo2TextureFromSource.mjs","sources":["../../../../src/scene/text/utils/getPo2TextureFromSource.ts"],"sourcesContent":["import { TexturePool } from '../../../rendering/renderers/shared/texture/TexturePool';\nimport { Bounds } from '../../container/bounds/Bounds';\n\nimport type { ICanvas } from '../../../environment/canvas/ICanvas';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\n\nconst tempBounds = new Bounds();\n\n/**\n * Takes an image and creates a texture from it, using a power of 2 texture from the texture pool.\n * Remember to return the texture when you don't need it any more!\n * @param image - The image to create a texture from\n * @param width - the frame width of the texture\n * @param height - the frame height of the texture\n * @param resolution - The resolution of the texture\n * @returns - The texture\n */\nexport function getPo2TextureFromSource(\n image: HTMLImageElement | HTMLCanvasElement | ICanvas,\n width: number,\n height: number,\n resolution: number\n): Texture\n{\n const bounds = tempBounds;\n\n bounds.minX = 0;\n bounds.minY = 0;\n\n bounds.maxX = (image.width / resolution) | 0;\n bounds.maxY = (image.height / resolution) | 0;\n\n const texture = TexturePool.getOptimalTexture(\n bounds.width,\n bounds.height,\n resolution,\n false\n );\n\n texture.source.uploadMethodId = 'image';\n texture.source.resource = image;\n texture.source.alphaMode = 'premultiply-alpha-on-upload';\n\n texture.frame.width = width / resolution;\n texture.frame.height = height / resolution;\n\n // We want to update the resource on the GPU,\n // but we do not want to resize the texture.\n // calling `texture.source.update` will fit the resource to the texture\n // causing a resize of the texture on the GPU.\n // which is not what we want!\n texture.source.emit('update', texture.source);\n\n texture.updateUvs();\n\n return texture;\n}\n"],"names":[],"mappings":";;;;AAMA,MAAM,UAAA,GAAa,IAAI,MAAO,EAAA,CAAA;AAWvB,SAAS,uBACZ,CAAA,KAAA,EACA,KACA,EAAA,MAAA,EACA,UAEJ,EAAA;AACI,EAAA,MAAM,MAAS,GAAA,UAAA,CAAA;AAEf,EAAA,MAAA,CAAO,IAAO,GAAA,CAAA,CAAA;AACd,EAAA,MAAA,CAAO,IAAO,GAAA,CAAA,CAAA;AAEd,EAAO,MAAA,CAAA,IAAA,GAAQ,KAAM,CAAA,KAAA,GAAQ,UAAc,GAAA,CAAA,CAAA;AAC3C,EAAO,MAAA,CAAA,IAAA,GAAQ,KAAM,CAAA,MAAA,GAAS,UAAc,GAAA,CAAA,CAAA;AAE5C,EAAA,MAAM,UAAU,WAAY,CAAA,iBAAA;AAAA,IACxB,MAAO,CAAA,KAAA;AAAA,IACP,MAAO,CAAA,MAAA;AAAA,IACP,UAAA;AAAA,IACA,KAAA;AAAA,GACJ,CAAA;AAEA,EAAA,OAAA,CAAQ,OAAO,cAAiB,GAAA,OAAA,CAAA;AAChC,EAAA,OAAA,CAAQ,OAAO,QAAW,GAAA,KAAA,CAAA;AAC1B,EAAA,OAAA,CAAQ,OAAO,SAAY,GAAA,6BAAA,CAAA;AAE3B,EAAQ,OAAA,CAAA,KAAA,CAAM,QAAQ,KAAQ,GAAA,UAAA,CAAA;AAC9B,EAAQ,OAAA,CAAA,KAAA,CAAM,SAAS,MAAS,GAAA,UAAA,CAAA;AAOhC,EAAA,OAAA,CAAQ,MAAO,CAAA,IAAA,CAAK,QAAU,EAAA,OAAA,CAAQ,MAAM,CAAA,CAAA;AAE5C,EAAA,OAAA,CAAQ,SAAU,EAAA,CAAA;AAElB,EAAO,OAAA,OAAA,CAAA;AACX;;;;"}
|
Reference in New Issue
Block a user