modern-canvas 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.cjs +45 -72
- package/dist/index.d.cts +14 -58
- package/dist/index.d.mts +14 -58
- package/dist/index.d.ts +14 -58
- package/dist/index.js +40 -40
- package/dist/index.mjs +47 -73
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
const colord = require('colord');
|
|
4
4
|
const namesPlugin = require('colord/plugins/names');
|
|
5
5
|
const earcut = require('earcut');
|
|
6
|
+
const modernIdoc = require('modern-idoc');
|
|
6
7
|
const modernText = require('modern-text');
|
|
7
8
|
|
|
8
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
@@ -6263,61 +6264,22 @@ function getComputedFilterColorMatrix() {
|
|
|
6263
6264
|
return m;
|
|
6264
6265
|
}
|
|
6265
6266
|
|
|
6266
|
-
class Style2DOffsetModule extends Style2DModule {
|
|
6267
|
-
install(Style2D) {
|
|
6268
|
-
defineProperty(Style2D, "offsetPath");
|
|
6269
|
-
defineProperty(Style2D, "offsetAnchor");
|
|
6270
|
-
defineProperty(Style2D, "offsetDistance");
|
|
6271
|
-
defineProperty(Style2D, "offsetPosition");
|
|
6272
|
-
Style2D.prototype.getComputedOffset = getComputedOffset;
|
|
6273
|
-
}
|
|
6274
|
-
}
|
|
6275
|
-
function getComputedOffset() {
|
|
6276
|
-
const offsetPath = this.offsetPath;
|
|
6277
|
-
if (!offsetPath)
|
|
6278
|
-
return;
|
|
6279
|
-
if (offsetPath.startsWith("path")) {
|
|
6280
|
-
const path = offsetPath.match(/path\(["'](.+)["']\)/)?.[1];
|
|
6281
|
-
if (!path)
|
|
6282
|
-
return;
|
|
6283
|
-
path.split(" ").forEach((arg) => {
|
|
6284
|
-
});
|
|
6285
|
-
} else if (offsetPath.startsWith("ray")) ; else if (offsetPath.startsWith("url")) ; else if (offsetPath.startsWith("circle")) ; else if (offsetPath.startsWith("ellipse")) ; else if (offsetPath.startsWith("insett")) ; else if (offsetPath.startsWith("polygon")) ; else if (offsetPath.startsWith("rect")) ; else if (offsetPath.startsWith("xywh")) ;
|
|
6286
|
-
}
|
|
6287
|
-
|
|
6288
6267
|
class Style2DTextModule extends Style2DModule {
|
|
6289
6268
|
install(Style2D) {
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
defineProperty(Style2D, "fontStyle", { default: "normal" });
|
|
6295
|
-
defineProperty(Style2D, "fontKerning", { default: "normal" });
|
|
6296
|
-
defineProperty(Style2D, "textWrap", { default: "wrap" });
|
|
6297
|
-
defineProperty(Style2D, "textAlign", { default: "start" });
|
|
6298
|
-
defineProperty(Style2D, "verticalAlign", { default: "middle" });
|
|
6299
|
-
defineProperty(Style2D, "textTransform", { default: "none" });
|
|
6300
|
-
defineProperty(Style2D, "textDecoration", { default: null });
|
|
6301
|
-
defineProperty(Style2D, "textStrokeWidth", { default: 0 });
|
|
6302
|
-
defineProperty(Style2D, "textStrokeColor", { default: "#000000" });
|
|
6269
|
+
const style = modernIdoc.getDefaultTextStyle();
|
|
6270
|
+
for (const key in style) {
|
|
6271
|
+
defineProperty(Style2D, key, { default: style[key] });
|
|
6272
|
+
}
|
|
6303
6273
|
defineProperty(Style2D, "direction", { default: "inherit" });
|
|
6304
|
-
defineProperty(Style2D, "lineHeight", { default: 1 });
|
|
6305
|
-
defineProperty(Style2D, "letterSpacing", { default: 0 });
|
|
6306
|
-
defineProperty(Style2D, "writingMode", { default: "horizontal-tb" });
|
|
6307
6274
|
}
|
|
6308
6275
|
}
|
|
6309
6276
|
|
|
6310
6277
|
class Style2DTransformModule extends Style2DModule {
|
|
6311
6278
|
install(Style2D) {
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
defineProperty(Style2D, "rotate", { default: 0 });
|
|
6317
|
-
defineProperty(Style2D, "scaleX", { default: 1 });
|
|
6318
|
-
defineProperty(Style2D, "scaleY", { default: 1 });
|
|
6319
|
-
defineProperty(Style2D, "transform");
|
|
6320
|
-
defineProperty(Style2D, "transformOrigin", { default: "center" });
|
|
6279
|
+
const style = modernIdoc.getDefaultTransformStyle();
|
|
6280
|
+
for (const key in style) {
|
|
6281
|
+
defineProperty(Style2D, key, { default: style[key] });
|
|
6282
|
+
}
|
|
6321
6283
|
Style2D.prototype.getComputedTransform = getComputedTransform;
|
|
6322
6284
|
Style2D.prototype.getComputedTransformOrigin = getComputedTransformOrigin;
|
|
6323
6285
|
}
|
|
@@ -6326,7 +6288,11 @@ function getComputedTransform() {
|
|
|
6326
6288
|
const transform = new Transform2D();
|
|
6327
6289
|
const transform3d = new Transform2D(false);
|
|
6328
6290
|
const transform2d = new Transform2D(false).scale(this.scaleX, this.scaleY).translate(this.left, this.top).rotate(this.rotate * DEG_TO_RAD);
|
|
6329
|
-
|
|
6291
|
+
let _transform = this.transform;
|
|
6292
|
+
if (!_transform || _transform === "none") {
|
|
6293
|
+
_transform = "";
|
|
6294
|
+
}
|
|
6295
|
+
parseCssFunctions(_transform, { width: this.width, height: this.height }).forEach(({ name, args }) => {
|
|
6330
6296
|
const values = args.map((arg) => arg.normalizedIntValue);
|
|
6331
6297
|
transform.identity();
|
|
6332
6298
|
switch (name) {
|
|
@@ -6437,15 +6403,6 @@ function getComputedTransformOrigin() {
|
|
|
6437
6403
|
});
|
|
6438
6404
|
}
|
|
6439
6405
|
|
|
6440
|
-
const modules = {
|
|
6441
|
-
__proto__: null,
|
|
6442
|
-
Style2DBackgroundModule: Style2DBackgroundModule,
|
|
6443
|
-
Style2DFilterModule: Style2DFilterModule,
|
|
6444
|
-
Style2DOffsetModule: Style2DOffsetModule,
|
|
6445
|
-
Style2DTextModule: Style2DTextModule,
|
|
6446
|
-
Style2DTransformModule: Style2DTransformModule
|
|
6447
|
-
};
|
|
6448
|
-
|
|
6449
6406
|
var __defProp$r = Object.defineProperty;
|
|
6450
6407
|
var __decorateClass$r = (decorators, target, key, kind) => {
|
|
6451
6408
|
var result = void 0 ;
|
|
@@ -6499,7 +6456,12 @@ __decorateClass$r([
|
|
|
6499
6456
|
__decorateClass$r([
|
|
6500
6457
|
property({ default: "visible" })
|
|
6501
6458
|
], Style2D.prototype, "overflow");
|
|
6502
|
-
|
|
6459
|
+
[
|
|
6460
|
+
Style2DBackgroundModule,
|
|
6461
|
+
Style2DFilterModule,
|
|
6462
|
+
Style2DTextModule,
|
|
6463
|
+
Style2DTransformModule
|
|
6464
|
+
].forEach((Module) => {
|
|
6503
6465
|
new Module().install(Style2D);
|
|
6504
6466
|
});
|
|
6505
6467
|
|
|
@@ -7558,6 +7520,9 @@ var __decorateClass$k = (decorators, target, key, kind) => {
|
|
|
7558
7520
|
const textStyles = new Set(Object.keys(modernText.textDefaultStyle));
|
|
7559
7521
|
exports.Text2D = class Text2D extends exports.Node2D {
|
|
7560
7522
|
effects;
|
|
7523
|
+
measureDom;
|
|
7524
|
+
fonts;
|
|
7525
|
+
text = new modernText.Text();
|
|
7561
7526
|
texture = new Texture(document.createElement("canvas"));
|
|
7562
7527
|
_subTextsCount = 0;
|
|
7563
7528
|
constructor(options) {
|
|
@@ -7568,6 +7533,8 @@ exports.Text2D = class Text2D extends exports.Node2D {
|
|
|
7568
7533
|
super._onUpdateProperty(key, value, oldValue);
|
|
7569
7534
|
switch (key) {
|
|
7570
7535
|
case "content":
|
|
7536
|
+
case "effects":
|
|
7537
|
+
case "fonts":
|
|
7571
7538
|
case "split":
|
|
7572
7539
|
this._updateSplit();
|
|
7573
7540
|
this.requestRedraw();
|
|
@@ -7579,6 +7546,13 @@ exports.Text2D = class Text2D extends exports.Node2D {
|
|
|
7579
7546
|
});
|
|
7580
7547
|
}
|
|
7581
7548
|
}
|
|
7549
|
+
_updateText() {
|
|
7550
|
+
this.text.style = this.style.toJSON();
|
|
7551
|
+
this.text.content = this.content ?? "";
|
|
7552
|
+
this.text.effects = this.effects;
|
|
7553
|
+
this.text.fonts = this.fonts;
|
|
7554
|
+
this.text.measureDom = this.measureDom;
|
|
7555
|
+
}
|
|
7582
7556
|
_onUpdateStyleProperty(key, value, oldValue) {
|
|
7583
7557
|
if (key === "height")
|
|
7584
7558
|
return;
|
|
@@ -7622,13 +7596,8 @@ exports.Text2D = class Text2D extends exports.Node2D {
|
|
|
7622
7596
|
}
|
|
7623
7597
|
}
|
|
7624
7598
|
measure() {
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
style: {
|
|
7628
|
-
...this.style.toJSON(),
|
|
7629
|
-
height: void 0
|
|
7630
|
-
}
|
|
7631
|
-
});
|
|
7599
|
+
this._updateText();
|
|
7600
|
+
const result = this.text.measure();
|
|
7632
7601
|
if (!this.style.width)
|
|
7633
7602
|
this.style.width = result.boundingBox.width;
|
|
7634
7603
|
if (!this.style.height)
|
|
@@ -7672,12 +7641,10 @@ exports.Text2D = class Text2D extends exports.Node2D {
|
|
|
7672
7641
|
if (onText2DRender) {
|
|
7673
7642
|
onText2DRender();
|
|
7674
7643
|
} else {
|
|
7675
|
-
|
|
7676
|
-
|
|
7644
|
+
this._updateText();
|
|
7645
|
+
this.text.render({
|
|
7677
7646
|
pixelRatio: this.pixelRatio,
|
|
7678
|
-
|
|
7679
|
-
effects: this.effects,
|
|
7680
|
-
style: this.style.toJSON()
|
|
7647
|
+
view: this.texture.source
|
|
7681
7648
|
});
|
|
7682
7649
|
}
|
|
7683
7650
|
this.texture.requestUpload();
|
|
@@ -7702,6 +7669,12 @@ __decorateClass$k([
|
|
|
7702
7669
|
__decorateClass$k([
|
|
7703
7670
|
property()
|
|
7704
7671
|
], exports.Text2D.prototype, "effects", 2);
|
|
7672
|
+
__decorateClass$k([
|
|
7673
|
+
protectedProperty()
|
|
7674
|
+
], exports.Text2D.prototype, "measureDom", 2);
|
|
7675
|
+
__decorateClass$k([
|
|
7676
|
+
protectedProperty()
|
|
7677
|
+
], exports.Text2D.prototype, "fonts", 2);
|
|
7705
7678
|
exports.Text2D = __decorateClass$k([
|
|
7706
7679
|
customNode("Text2D")
|
|
7707
7680
|
], exports.Text2D);
|
|
@@ -13725,7 +13698,8 @@ class Engine extends SceneTree {
|
|
|
13725
13698
|
} else {
|
|
13726
13699
|
this.resize(
|
|
13727
13700
|
width || this.gl.drawingBufferWidth || this.view?.clientWidth || 200,
|
|
13728
|
-
height || this.gl.drawingBufferHeight || this.view?.clientHeight || 200
|
|
13701
|
+
height || this.gl.drawingBufferHeight || this.view?.clientHeight || 200,
|
|
13702
|
+
!view
|
|
13729
13703
|
);
|
|
13730
13704
|
}
|
|
13731
13705
|
}
|
|
@@ -13936,7 +13910,6 @@ exports.Style2D = Style2D;
|
|
|
13936
13910
|
exports.Style2DBackgroundModule = Style2DBackgroundModule;
|
|
13937
13911
|
exports.Style2DFilterModule = Style2DFilterModule;
|
|
13938
13912
|
exports.Style2DModule = Style2DModule;
|
|
13939
|
-
exports.Style2DOffsetModule = Style2DOffsetModule;
|
|
13940
13913
|
exports.Style2DTextModule = Style2DTextModule;
|
|
13941
13914
|
exports.Style2DTransformModule = Style2DTransformModule;
|
|
13942
13915
|
exports.TextLoader = TextLoader;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Visibility, Overflow,
|
|
1
|
+
import { Visibility, Overflow, IDOCTextStyleDeclaration, IDOCTransformStyleDeclaration } from 'modern-idoc';
|
|
2
2
|
import { AnyColor, Colord } from 'colord';
|
|
3
3
|
import { AnimationItem } from 'lottie-web';
|
|
4
|
-
import { MeasureResult } from 'modern-text';
|
|
4
|
+
import { TextOptions, Text, MeasureResult } from 'modern-text';
|
|
5
5
|
import { Font } from 'modern-font';
|
|
6
6
|
|
|
7
7
|
interface CssFunctionArg {
|
|
@@ -1846,7 +1846,7 @@ declare class CanvasContext {
|
|
|
1846
1846
|
toBatchables(): CanvasBatchable[];
|
|
1847
1847
|
}
|
|
1848
1848
|
|
|
1849
|
-
interface Style2DOptions extends Partial<Style2DBackgroundProperties>, Partial<Style2DFilterProperties>, Partial<
|
|
1849
|
+
interface Style2DOptions extends Partial<Style2DBackgroundProperties>, Partial<Style2DFilterProperties>, Partial<Style2DTextProperties>, Partial<Style2DTransformProperties> {
|
|
1850
1850
|
shadowColor?: string;
|
|
1851
1851
|
shadowOffsetX?: number;
|
|
1852
1852
|
shadowOffsetY?: number;
|
|
@@ -1855,7 +1855,7 @@ interface Style2DOptions extends Partial<Style2DBackgroundProperties>, Partial<S
|
|
|
1855
1855
|
borderRadius?: number;
|
|
1856
1856
|
overflow?: Overflow;
|
|
1857
1857
|
}
|
|
1858
|
-
interface Style2D extends Style2DBackgroundExtend, Style2DFilterExtend,
|
|
1858
|
+
interface Style2D extends Style2DBackgroundExtend, Style2DFilterExtend, Style2DTextExtend, Style2DTransformExtend {
|
|
1859
1859
|
}
|
|
1860
1860
|
declare class Style2D extends _Object {
|
|
1861
1861
|
shadowColor: string;
|
|
@@ -1900,45 +1900,8 @@ declare class Style2DFilterModule extends Style2DModule {
|
|
|
1900
1900
|
declare function getComputedFilter(this: Style2D): Style2DFilter;
|
|
1901
1901
|
declare function getComputedFilterColorMatrix(this: Style2D): ColorMatrix;
|
|
1902
1902
|
|
|
1903
|
-
interface
|
|
1904
|
-
offsetPath?: string;
|
|
1905
|
-
offsetAnchor?: string | number;
|
|
1906
|
-
offsetDistance?: string | number;
|
|
1907
|
-
offsetPosition?: string | number;
|
|
1908
|
-
}
|
|
1909
|
-
interface Style2DOffsetExtend extends Style2DOffsetProperties {
|
|
1910
|
-
getComputedOffset: typeof getComputedOffset;
|
|
1911
|
-
}
|
|
1912
|
-
declare module '../Style2D' {
|
|
1913
|
-
interface Style2DOptions extends Partial<Style2DOffsetProperties> {
|
|
1914
|
-
}
|
|
1915
|
-
interface Style2D extends Style2DOffsetProperties {
|
|
1916
|
-
getComputedOffset: typeof getComputedOffset;
|
|
1917
|
-
}
|
|
1918
|
-
}
|
|
1919
|
-
declare class Style2DOffsetModule extends Style2DModule {
|
|
1920
|
-
install(Style2D: new () => Style2D): void;
|
|
1921
|
-
}
|
|
1922
|
-
declare function getComputedOffset(this: Style2D): void;
|
|
1923
|
-
|
|
1924
|
-
interface Style2DTextProperties {
|
|
1925
|
-
color: string;
|
|
1926
|
-
fontSize: number;
|
|
1927
|
-
fontWeight: FontWeight;
|
|
1928
|
-
fontFamily: string;
|
|
1929
|
-
fontStyle: FontStyle;
|
|
1930
|
-
fontKerning: FontKerning;
|
|
1931
|
-
textWrap: TextWrap;
|
|
1932
|
-
textAlign: TextAlign;
|
|
1933
|
-
verticalAlign: VerticalAlign;
|
|
1934
|
-
textTransform: TextTransform;
|
|
1935
|
-
textDecoration: TextDecoration | null;
|
|
1936
|
-
textStrokeWidth: number;
|
|
1937
|
-
textStrokeColor: string;
|
|
1903
|
+
interface Style2DTextProperties extends IDOCTextStyleDeclaration {
|
|
1938
1904
|
direction: 'inherit' | 'ltr' | 'rtl';
|
|
1939
|
-
lineHeight: number;
|
|
1940
|
-
letterSpacing: number;
|
|
1941
|
-
writingMode: WritingMode;
|
|
1942
1905
|
}
|
|
1943
1906
|
interface Style2DTextExtend extends Style2DTextProperties {
|
|
1944
1907
|
}
|
|
@@ -1946,16 +1909,7 @@ declare class Style2DTextModule extends Style2DModule {
|
|
|
1946
1909
|
install(Style2D: new () => Style2D): void;
|
|
1947
1910
|
}
|
|
1948
1911
|
|
|
1949
|
-
interface Style2DTransformProperties {
|
|
1950
|
-
left: number;
|
|
1951
|
-
top: number;
|
|
1952
|
-
width: number;
|
|
1953
|
-
height: number;
|
|
1954
|
-
rotate: number;
|
|
1955
|
-
scaleX: number;
|
|
1956
|
-
scaleY: number;
|
|
1957
|
-
transform?: string;
|
|
1958
|
-
transformOrigin: string;
|
|
1912
|
+
interface Style2DTransformProperties extends IDOCTransformStyleDeclaration {
|
|
1959
1913
|
}
|
|
1960
1914
|
interface Style2DTransformExtend extends Style2DTransformProperties {
|
|
1961
1915
|
getComputedTransform: typeof getComputedTransform;
|
|
@@ -2113,11 +2067,9 @@ declare class Lottie2D extends Node2D {
|
|
|
2113
2067
|
protected _drawContent(): void;
|
|
2114
2068
|
}
|
|
2115
2069
|
|
|
2116
|
-
interface Text2DOptions extends Node2DOptions {
|
|
2070
|
+
interface Text2DOptions extends Node2DOptions, Omit<TextOptions, 'style'> {
|
|
2117
2071
|
pixelRatio?: number;
|
|
2118
2072
|
split?: boolean;
|
|
2119
|
-
content?: IDOCTextContent;
|
|
2120
|
-
effects?: Partial<IDOCStyleDeclaration>[];
|
|
2121
2073
|
}
|
|
2122
2074
|
/**
|
|
2123
2075
|
* @example
|
|
@@ -2132,12 +2084,16 @@ interface Text2DOptions extends Node2DOptions {
|
|
|
2132
2084
|
declare class Text2D extends Node2D {
|
|
2133
2085
|
pixelRatio: number;
|
|
2134
2086
|
split: boolean;
|
|
2135
|
-
content:
|
|
2136
|
-
effects?:
|
|
2087
|
+
content: TextOptions['content'];
|
|
2088
|
+
effects?: TextOptions['effects'];
|
|
2089
|
+
measureDom?: TextOptions['measureDom'];
|
|
2090
|
+
fonts?: TextOptions['fonts'];
|
|
2091
|
+
text: Text;
|
|
2137
2092
|
readonly texture: Texture<HTMLCanvasElement>;
|
|
2138
2093
|
protected _subTextsCount: number;
|
|
2139
2094
|
constructor(options?: Text2DOptions);
|
|
2140
2095
|
protected _onUpdateProperty(key: PropertyKey, value: any, oldValue: any): void;
|
|
2096
|
+
protected _updateText(): void;
|
|
2141
2097
|
protected _onUpdateStyleProperty(key: PropertyKey, value: any, oldValue: any): void;
|
|
2142
2098
|
protected _getSubTexts(): Text2D[];
|
|
2143
2099
|
protected _updateSubTexts(): void;
|
|
@@ -3112,4 +3068,4 @@ interface RenderOptions {
|
|
|
3112
3068
|
}
|
|
3113
3069
|
declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
|
|
3114
3070
|
|
|
3115
|
-
export { Animation2D, type AnimationOptions, type AssetHandler, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, type AudioWaveformOptions, type Batchable2D, BlurEffect, Bounds, type BoundsData, type CanvasBatchable, CanvasContext, CanvasItem, type CanvasItemOptions, Circle, Color, ColorAdjustEffect, ColorFilterEffect, type ColorFilterEffectOptions, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, type ColorValue, type CssFunction, type CssFunctionArg, type Cursor, type CustomNodeOptions, DEG_TO_RAD, DEVICE_PIXEL_RATIO, type Easing, Effect, type EffectContext, EffectMaterial, type EffectMode, type EffectOptions, Ellipse, EmbossEffect, Engine, type EngineOptions, EventEmitter, type EventListener, type EventListenerOptions, type EventListenerValue, type FilledGraphics, FontLoader, Geometry, type GeometryOptions, GifLoader, GlitchEffect, GodrayEffect, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, type IAudioContext, type IAudioNode, IN_BROWSER, type IPlayOptions, Image2D, type Image2DOptions, Image2DResource, type ImageFrame, ImageTexture, type ImageTextureOptions, IndexBuffer, type IndexBufferOptions, Input, InternalMode, JsonLoader, KawaseEffect, type Keyframe, LeftEraseEffect, type LineCap, type LineJoin, type LineStyle, Loader, Lottie2D, LottieLoader, type LottieOptions, MainLoop, type MainLoopEventMap, type MaskColor, type MaskData, MaskEffect, type MaskEffectOptions, type MaskObject, type MaskRect, type Maskable, Material, type MaterialOptions, Matrix, Matrix2, Matrix3, Matrix4, type MatrixLike, type MatrixOperateOutput, MouseInputEvent, Node, Node2D, type Node2DOptions, type NodeEventMap, type NodeOptions, type NormalizedKeyframe, PI, PI_2, Path2D, type Path2DCall, type Path2DCallMethod, type Path2DShape, PixelateEffect, PixelsTexture, type PlatformAudio, type PlatformSound, Point, type PointData, type PointLike, PointerInputEvent, Polygon, Projection2D, type PropertyDeclaration, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Rectangle, Reference, type ReferenceEventMap, type RenderCall, type RenderOptions, RenderStack, type Renderable, Renderer, Resource, type ResourceEventMap, RoundedRectangle, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, SVGPath, type SVGPathDefine, type SVGPathDefineCommand, SceneTree, type SceneTreeEventMap, type Shape, type ShapeBuildCommand, Star, type StrokedGraphics, Style2D, type Style2DBackgroundExtend, Style2DBackgroundModule, type Style2DBackgroundProperties, type Style2DFilter, type Style2DFilterExtend, type Style2DFilterKey, Style2DFilterModule, type Style2DFilterProperties, Style2DModule, type
|
|
3071
|
+
export { Animation2D, type AnimationOptions, type AssetHandler, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, type AudioWaveformOptions, type Batchable2D, BlurEffect, Bounds, type BoundsData, type CanvasBatchable, CanvasContext, CanvasItem, type CanvasItemOptions, Circle, Color, ColorAdjustEffect, ColorFilterEffect, type ColorFilterEffectOptions, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, type ColorValue, type CssFunction, type CssFunctionArg, type Cursor, type CustomNodeOptions, DEG_TO_RAD, DEVICE_PIXEL_RATIO, type Easing, Effect, type EffectContext, EffectMaterial, type EffectMode, type EffectOptions, Ellipse, EmbossEffect, Engine, type EngineOptions, EventEmitter, type EventListener, type EventListenerOptions, type EventListenerValue, type FilledGraphics, FontLoader, Geometry, type GeometryOptions, GifLoader, GlitchEffect, GodrayEffect, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, type IAudioContext, type IAudioNode, IN_BROWSER, type IPlayOptions, Image2D, type Image2DOptions, Image2DResource, type ImageFrame, ImageTexture, type ImageTextureOptions, IndexBuffer, type IndexBufferOptions, Input, InternalMode, JsonLoader, KawaseEffect, type Keyframe, LeftEraseEffect, type LineCap, type LineJoin, type LineStyle, Loader, Lottie2D, LottieLoader, type LottieOptions, MainLoop, type MainLoopEventMap, type MaskColor, type MaskData, MaskEffect, type MaskEffectOptions, type MaskObject, type MaskRect, type Maskable, Material, type MaterialOptions, Matrix, Matrix2, Matrix3, Matrix4, type MatrixLike, type MatrixOperateOutput, MouseInputEvent, Node, Node2D, type Node2DOptions, type NodeEventMap, type NodeOptions, type NormalizedKeyframe, PI, PI_2, Path2D, type Path2DCall, type Path2DCallMethod, type Path2DShape, PixelateEffect, PixelsTexture, type PlatformAudio, type PlatformSound, Point, type PointData, type PointLike, PointerInputEvent, Polygon, Projection2D, type PropertyDeclaration, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Rectangle, Reference, type ReferenceEventMap, type RenderCall, type RenderOptions, RenderStack, type Renderable, Renderer, Resource, type ResourceEventMap, RoundedRectangle, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, SVGPath, type SVGPathDefine, type SVGPathDefineCommand, SceneTree, type SceneTreeEventMap, type Shape, type ShapeBuildCommand, Star, type StrokedGraphics, Style2D, type Style2DBackgroundExtend, Style2DBackgroundModule, type Style2DBackgroundProperties, type Style2DFilter, type Style2DFilterExtend, type Style2DFilterKey, Style2DFilterModule, type Style2DFilterProperties, Style2DModule, type Style2DOptions, type Style2DTextExtend, Style2DTextModule, type Style2DTextProperties, type Style2DTransformExtend, Style2DTransformModule, type Style2DTransformProperties, Text2D, type Text2DOptions, TextLoader, Texture, type TextureFilterMode, TextureLoader, type TexturePixelsSource, type TextureSource, type TextureWrapMode, Ticker, TiltShiftEffect, Timer, type TimerEventMap, type TimerOptions, type TimingFunctions, Transform2D, type Transform2DObject, Triangle, TwistEffect, UIInputEvent, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, type VectorLike, type VectorOperateOutput, VertexAttribute, type VertexAttributeOptions, VertexBuffer, type VertexBufferOptions, Video2D, type Video2DOptions, VideoLoader, VideoTexture, type VideoTextureOptions, type VideoTextureSource, Viewport, type ViewportFramebuffer, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, type WebGLBufferMeta, WebGLBufferModule, type WebGLBufferOptions, type WebGLBufferTarget, type WebGLBufferUsage, type WebGLDrawMode, type WebGLDrawOptions, type WebGLExtensions, type WebGLFramebufferMeta, WebGLFramebufferModule, type WebGLFramebufferOptions, WebGLMaskModule, WebGLModule, type WebGLProgramMeta, WebGLProgramModule, type WebGLProgramOptions, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, type WebGLTarget, type WebGLTextureFilterMode, type WebGLTextureLocation, type WebGLTextureMeta, WebGLTextureModule, type WebGLTextureOptions, type WebGLTextureSource, type WebGLTextureTarget, type WebGLTextureWrapMode, WebGLVertexArrayModule, type WebGLVertexArrayObjectMeta, type WebGLVertexArrayObjectOptions, type WebGLVertexAttrib, type WebGLVertexAttribType, type WebGLViewport, WebGLViewportModule, WebSound, WheelInputEvent, ZoomBlurEffect, _Object, type _ObjectEventMap, assets, buildAdaptiveBezier, buildAdaptiveQuadratic, buildArc, buildArcTo, buildArcToSvg, buildCircle, buildLine, buildPolygon, buildRectangle, buildTriangle, clamp, closePointEps, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curveEps, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCssFunctions, parseCssProperty, property, protectedProperty, render, squaredDistanceToLineSegment, timingFunctions, uid };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Visibility, Overflow,
|
|
1
|
+
import { Visibility, Overflow, IDOCTextStyleDeclaration, IDOCTransformStyleDeclaration } from 'modern-idoc';
|
|
2
2
|
import { AnyColor, Colord } from 'colord';
|
|
3
3
|
import { AnimationItem } from 'lottie-web';
|
|
4
|
-
import { MeasureResult } from 'modern-text';
|
|
4
|
+
import { TextOptions, Text, MeasureResult } from 'modern-text';
|
|
5
5
|
import { Font } from 'modern-font';
|
|
6
6
|
|
|
7
7
|
interface CssFunctionArg {
|
|
@@ -1846,7 +1846,7 @@ declare class CanvasContext {
|
|
|
1846
1846
|
toBatchables(): CanvasBatchable[];
|
|
1847
1847
|
}
|
|
1848
1848
|
|
|
1849
|
-
interface Style2DOptions extends Partial<Style2DBackgroundProperties>, Partial<Style2DFilterProperties>, Partial<
|
|
1849
|
+
interface Style2DOptions extends Partial<Style2DBackgroundProperties>, Partial<Style2DFilterProperties>, Partial<Style2DTextProperties>, Partial<Style2DTransformProperties> {
|
|
1850
1850
|
shadowColor?: string;
|
|
1851
1851
|
shadowOffsetX?: number;
|
|
1852
1852
|
shadowOffsetY?: number;
|
|
@@ -1855,7 +1855,7 @@ interface Style2DOptions extends Partial<Style2DBackgroundProperties>, Partial<S
|
|
|
1855
1855
|
borderRadius?: number;
|
|
1856
1856
|
overflow?: Overflow;
|
|
1857
1857
|
}
|
|
1858
|
-
interface Style2D extends Style2DBackgroundExtend, Style2DFilterExtend,
|
|
1858
|
+
interface Style2D extends Style2DBackgroundExtend, Style2DFilterExtend, Style2DTextExtend, Style2DTransformExtend {
|
|
1859
1859
|
}
|
|
1860
1860
|
declare class Style2D extends _Object {
|
|
1861
1861
|
shadowColor: string;
|
|
@@ -1900,45 +1900,8 @@ declare class Style2DFilterModule extends Style2DModule {
|
|
|
1900
1900
|
declare function getComputedFilter(this: Style2D): Style2DFilter;
|
|
1901
1901
|
declare function getComputedFilterColorMatrix(this: Style2D): ColorMatrix;
|
|
1902
1902
|
|
|
1903
|
-
interface
|
|
1904
|
-
offsetPath?: string;
|
|
1905
|
-
offsetAnchor?: string | number;
|
|
1906
|
-
offsetDistance?: string | number;
|
|
1907
|
-
offsetPosition?: string | number;
|
|
1908
|
-
}
|
|
1909
|
-
interface Style2DOffsetExtend extends Style2DOffsetProperties {
|
|
1910
|
-
getComputedOffset: typeof getComputedOffset;
|
|
1911
|
-
}
|
|
1912
|
-
declare module '../Style2D' {
|
|
1913
|
-
interface Style2DOptions extends Partial<Style2DOffsetProperties> {
|
|
1914
|
-
}
|
|
1915
|
-
interface Style2D extends Style2DOffsetProperties {
|
|
1916
|
-
getComputedOffset: typeof getComputedOffset;
|
|
1917
|
-
}
|
|
1918
|
-
}
|
|
1919
|
-
declare class Style2DOffsetModule extends Style2DModule {
|
|
1920
|
-
install(Style2D: new () => Style2D): void;
|
|
1921
|
-
}
|
|
1922
|
-
declare function getComputedOffset(this: Style2D): void;
|
|
1923
|
-
|
|
1924
|
-
interface Style2DTextProperties {
|
|
1925
|
-
color: string;
|
|
1926
|
-
fontSize: number;
|
|
1927
|
-
fontWeight: FontWeight;
|
|
1928
|
-
fontFamily: string;
|
|
1929
|
-
fontStyle: FontStyle;
|
|
1930
|
-
fontKerning: FontKerning;
|
|
1931
|
-
textWrap: TextWrap;
|
|
1932
|
-
textAlign: TextAlign;
|
|
1933
|
-
verticalAlign: VerticalAlign;
|
|
1934
|
-
textTransform: TextTransform;
|
|
1935
|
-
textDecoration: TextDecoration | null;
|
|
1936
|
-
textStrokeWidth: number;
|
|
1937
|
-
textStrokeColor: string;
|
|
1903
|
+
interface Style2DTextProperties extends IDOCTextStyleDeclaration {
|
|
1938
1904
|
direction: 'inherit' | 'ltr' | 'rtl';
|
|
1939
|
-
lineHeight: number;
|
|
1940
|
-
letterSpacing: number;
|
|
1941
|
-
writingMode: WritingMode;
|
|
1942
1905
|
}
|
|
1943
1906
|
interface Style2DTextExtend extends Style2DTextProperties {
|
|
1944
1907
|
}
|
|
@@ -1946,16 +1909,7 @@ declare class Style2DTextModule extends Style2DModule {
|
|
|
1946
1909
|
install(Style2D: new () => Style2D): void;
|
|
1947
1910
|
}
|
|
1948
1911
|
|
|
1949
|
-
interface Style2DTransformProperties {
|
|
1950
|
-
left: number;
|
|
1951
|
-
top: number;
|
|
1952
|
-
width: number;
|
|
1953
|
-
height: number;
|
|
1954
|
-
rotate: number;
|
|
1955
|
-
scaleX: number;
|
|
1956
|
-
scaleY: number;
|
|
1957
|
-
transform?: string;
|
|
1958
|
-
transformOrigin: string;
|
|
1912
|
+
interface Style2DTransformProperties extends IDOCTransformStyleDeclaration {
|
|
1959
1913
|
}
|
|
1960
1914
|
interface Style2DTransformExtend extends Style2DTransformProperties {
|
|
1961
1915
|
getComputedTransform: typeof getComputedTransform;
|
|
@@ -2113,11 +2067,9 @@ declare class Lottie2D extends Node2D {
|
|
|
2113
2067
|
protected _drawContent(): void;
|
|
2114
2068
|
}
|
|
2115
2069
|
|
|
2116
|
-
interface Text2DOptions extends Node2DOptions {
|
|
2070
|
+
interface Text2DOptions extends Node2DOptions, Omit<TextOptions, 'style'> {
|
|
2117
2071
|
pixelRatio?: number;
|
|
2118
2072
|
split?: boolean;
|
|
2119
|
-
content?: IDOCTextContent;
|
|
2120
|
-
effects?: Partial<IDOCStyleDeclaration>[];
|
|
2121
2073
|
}
|
|
2122
2074
|
/**
|
|
2123
2075
|
* @example
|
|
@@ -2132,12 +2084,16 @@ interface Text2DOptions extends Node2DOptions {
|
|
|
2132
2084
|
declare class Text2D extends Node2D {
|
|
2133
2085
|
pixelRatio: number;
|
|
2134
2086
|
split: boolean;
|
|
2135
|
-
content:
|
|
2136
|
-
effects?:
|
|
2087
|
+
content: TextOptions['content'];
|
|
2088
|
+
effects?: TextOptions['effects'];
|
|
2089
|
+
measureDom?: TextOptions['measureDom'];
|
|
2090
|
+
fonts?: TextOptions['fonts'];
|
|
2091
|
+
text: Text;
|
|
2137
2092
|
readonly texture: Texture<HTMLCanvasElement>;
|
|
2138
2093
|
protected _subTextsCount: number;
|
|
2139
2094
|
constructor(options?: Text2DOptions);
|
|
2140
2095
|
protected _onUpdateProperty(key: PropertyKey, value: any, oldValue: any): void;
|
|
2096
|
+
protected _updateText(): void;
|
|
2141
2097
|
protected _onUpdateStyleProperty(key: PropertyKey, value: any, oldValue: any): void;
|
|
2142
2098
|
protected _getSubTexts(): Text2D[];
|
|
2143
2099
|
protected _updateSubTexts(): void;
|
|
@@ -3112,4 +3068,4 @@ interface RenderOptions {
|
|
|
3112
3068
|
}
|
|
3113
3069
|
declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
|
|
3114
3070
|
|
|
3115
|
-
export { Animation2D, type AnimationOptions, type AssetHandler, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, type AudioWaveformOptions, type Batchable2D, BlurEffect, Bounds, type BoundsData, type CanvasBatchable, CanvasContext, CanvasItem, type CanvasItemOptions, Circle, Color, ColorAdjustEffect, ColorFilterEffect, type ColorFilterEffectOptions, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, type ColorValue, type CssFunction, type CssFunctionArg, type Cursor, type CustomNodeOptions, DEG_TO_RAD, DEVICE_PIXEL_RATIO, type Easing, Effect, type EffectContext, EffectMaterial, type EffectMode, type EffectOptions, Ellipse, EmbossEffect, Engine, type EngineOptions, EventEmitter, type EventListener, type EventListenerOptions, type EventListenerValue, type FilledGraphics, FontLoader, Geometry, type GeometryOptions, GifLoader, GlitchEffect, GodrayEffect, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, type IAudioContext, type IAudioNode, IN_BROWSER, type IPlayOptions, Image2D, type Image2DOptions, Image2DResource, type ImageFrame, ImageTexture, type ImageTextureOptions, IndexBuffer, type IndexBufferOptions, Input, InternalMode, JsonLoader, KawaseEffect, type Keyframe, LeftEraseEffect, type LineCap, type LineJoin, type LineStyle, Loader, Lottie2D, LottieLoader, type LottieOptions, MainLoop, type MainLoopEventMap, type MaskColor, type MaskData, MaskEffect, type MaskEffectOptions, type MaskObject, type MaskRect, type Maskable, Material, type MaterialOptions, Matrix, Matrix2, Matrix3, Matrix4, type MatrixLike, type MatrixOperateOutput, MouseInputEvent, Node, Node2D, type Node2DOptions, type NodeEventMap, type NodeOptions, type NormalizedKeyframe, PI, PI_2, Path2D, type Path2DCall, type Path2DCallMethod, type Path2DShape, PixelateEffect, PixelsTexture, type PlatformAudio, type PlatformSound, Point, type PointData, type PointLike, PointerInputEvent, Polygon, Projection2D, type PropertyDeclaration, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Rectangle, Reference, type ReferenceEventMap, type RenderCall, type RenderOptions, RenderStack, type Renderable, Renderer, Resource, type ResourceEventMap, RoundedRectangle, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, SVGPath, type SVGPathDefine, type SVGPathDefineCommand, SceneTree, type SceneTreeEventMap, type Shape, type ShapeBuildCommand, Star, type StrokedGraphics, Style2D, type Style2DBackgroundExtend, Style2DBackgroundModule, type Style2DBackgroundProperties, type Style2DFilter, type Style2DFilterExtend, type Style2DFilterKey, Style2DFilterModule, type Style2DFilterProperties, Style2DModule, type
|
|
3071
|
+
export { Animation2D, type AnimationOptions, type AssetHandler, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, type AudioWaveformOptions, type Batchable2D, BlurEffect, Bounds, type BoundsData, type CanvasBatchable, CanvasContext, CanvasItem, type CanvasItemOptions, Circle, Color, ColorAdjustEffect, ColorFilterEffect, type ColorFilterEffectOptions, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, type ColorValue, type CssFunction, type CssFunctionArg, type Cursor, type CustomNodeOptions, DEG_TO_RAD, DEVICE_PIXEL_RATIO, type Easing, Effect, type EffectContext, EffectMaterial, type EffectMode, type EffectOptions, Ellipse, EmbossEffect, Engine, type EngineOptions, EventEmitter, type EventListener, type EventListenerOptions, type EventListenerValue, type FilledGraphics, FontLoader, Geometry, type GeometryOptions, GifLoader, GlitchEffect, GodrayEffect, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, type IAudioContext, type IAudioNode, IN_BROWSER, type IPlayOptions, Image2D, type Image2DOptions, Image2DResource, type ImageFrame, ImageTexture, type ImageTextureOptions, IndexBuffer, type IndexBufferOptions, Input, InternalMode, JsonLoader, KawaseEffect, type Keyframe, LeftEraseEffect, type LineCap, type LineJoin, type LineStyle, Loader, Lottie2D, LottieLoader, type LottieOptions, MainLoop, type MainLoopEventMap, type MaskColor, type MaskData, MaskEffect, type MaskEffectOptions, type MaskObject, type MaskRect, type Maskable, Material, type MaterialOptions, Matrix, Matrix2, Matrix3, Matrix4, type MatrixLike, type MatrixOperateOutput, MouseInputEvent, Node, Node2D, type Node2DOptions, type NodeEventMap, type NodeOptions, type NormalizedKeyframe, PI, PI_2, Path2D, type Path2DCall, type Path2DCallMethod, type Path2DShape, PixelateEffect, PixelsTexture, type PlatformAudio, type PlatformSound, Point, type PointData, type PointLike, PointerInputEvent, Polygon, Projection2D, type PropertyDeclaration, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Rectangle, Reference, type ReferenceEventMap, type RenderCall, type RenderOptions, RenderStack, type Renderable, Renderer, Resource, type ResourceEventMap, RoundedRectangle, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, SVGPath, type SVGPathDefine, type SVGPathDefineCommand, SceneTree, type SceneTreeEventMap, type Shape, type ShapeBuildCommand, Star, type StrokedGraphics, Style2D, type Style2DBackgroundExtend, Style2DBackgroundModule, type Style2DBackgroundProperties, type Style2DFilter, type Style2DFilterExtend, type Style2DFilterKey, Style2DFilterModule, type Style2DFilterProperties, Style2DModule, type Style2DOptions, type Style2DTextExtend, Style2DTextModule, type Style2DTextProperties, type Style2DTransformExtend, Style2DTransformModule, type Style2DTransformProperties, Text2D, type Text2DOptions, TextLoader, Texture, type TextureFilterMode, TextureLoader, type TexturePixelsSource, type TextureSource, type TextureWrapMode, Ticker, TiltShiftEffect, Timer, type TimerEventMap, type TimerOptions, type TimingFunctions, Transform2D, type Transform2DObject, Triangle, TwistEffect, UIInputEvent, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, type VectorLike, type VectorOperateOutput, VertexAttribute, type VertexAttributeOptions, VertexBuffer, type VertexBufferOptions, Video2D, type Video2DOptions, VideoLoader, VideoTexture, type VideoTextureOptions, type VideoTextureSource, Viewport, type ViewportFramebuffer, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, type WebGLBufferMeta, WebGLBufferModule, type WebGLBufferOptions, type WebGLBufferTarget, type WebGLBufferUsage, type WebGLDrawMode, type WebGLDrawOptions, type WebGLExtensions, type WebGLFramebufferMeta, WebGLFramebufferModule, type WebGLFramebufferOptions, WebGLMaskModule, WebGLModule, type WebGLProgramMeta, WebGLProgramModule, type WebGLProgramOptions, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, type WebGLTarget, type WebGLTextureFilterMode, type WebGLTextureLocation, type WebGLTextureMeta, WebGLTextureModule, type WebGLTextureOptions, type WebGLTextureSource, type WebGLTextureTarget, type WebGLTextureWrapMode, WebGLVertexArrayModule, type WebGLVertexArrayObjectMeta, type WebGLVertexArrayObjectOptions, type WebGLVertexAttrib, type WebGLVertexAttribType, type WebGLViewport, WebGLViewportModule, WebSound, WheelInputEvent, ZoomBlurEffect, _Object, type _ObjectEventMap, assets, buildAdaptiveBezier, buildAdaptiveQuadratic, buildArc, buildArcTo, buildArcToSvg, buildCircle, buildLine, buildPolygon, buildRectangle, buildTriangle, clamp, closePointEps, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curveEps, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCssFunctions, parseCssProperty, property, protectedProperty, render, squaredDistanceToLineSegment, timingFunctions, uid };
|