modern-canvas 0.4.51 → 0.4.53

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/dist/index.d.cts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Font } from 'modern-font';
2
+ import { PropertyDeclaration, Color as Color$1, RawWeakMap as RawWeakMap$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
3
+ export { Color as ColorValue } from 'modern-idoc';
2
4
  import { AnimationItem } from 'lottie-web';
3
5
  import { Colord, RgbaColor, HslaColor, HsvaColor } from 'colord';
4
- import { Color as Color$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
5
- export { Color as ColorValue } from 'modern-idoc';
6
6
  import { Path2D, LineCap, LineJoin, LineStyle, Path2DSet } from 'modern-path2d';
7
- import { TextOptions, Text, MeasureResult } from 'modern-text';
7
+ import { Text, MeasureResult, TextOptions } from 'modern-text';
8
8
  import { Node as Node$1, Direction } from 'yoga-layout/load';
9
9
 
10
10
  declare abstract class Loader {
@@ -19,15 +19,6 @@ declare class FontLoader extends Loader {
19
19
  declare const customNodes: Map<string, any>;
20
20
  declare function customNode<T = Record<string, any>>(tag: string, defaultProperties?: Partial<T>): ClassDecorator;
21
21
 
22
- interface PropertyDeclaration {
23
- readonly default?: any | (() => any);
24
- readonly protected?: boolean;
25
- readonly alias?: string;
26
- }
27
- declare function getDeclarations(constructor: any): Map<PropertyKey, PropertyDeclaration>;
28
- declare function defineProperty(constructor: any, name: PropertyKey, declaration?: PropertyDeclaration): void;
29
- declare function property(options?: PropertyDeclaration): PropertyDecorator;
30
-
31
22
  declare function protectedProperty(options?: Omit<PropertyDeclaration, 'protected'>): PropertyDecorator;
32
23
 
33
24
  declare function createNode<T = any>(tag?: string, options?: Record<string, any>): T;
@@ -106,7 +97,7 @@ declare class CoreObject extends EventEmitter {
106
97
  getProperties(keys?: PropertyKey[]): Record<PropertyKey, any>;
107
98
  setProperties(properties?: any): this;
108
99
  resetProperties(): this;
109
- requestUpdate(key?: PropertyKey, oldValue?: unknown, declaration?: PropertyDeclaration): void;
100
+ requestUpdate(key?: PropertyKey, newValue?: unknown, oldValue?: unknown, declaration?: PropertyDeclaration): void;
110
101
  toJSON(): Record<string, any>;
111
102
  clone(): this;
112
103
  free(): void;
@@ -753,7 +744,7 @@ interface WebGLProgramMeta {
753
744
  name: string;
754
745
  location: WebGLUniformLocation | null;
755
746
  }>;
756
- boundUniforms: RawWeakMap<object, any>;
747
+ boundUniforms: RawWeakMap$1<object, any>;
757
748
  }
758
749
  interface WebGLProgramOptions {
759
750
  vert: string;
@@ -1419,33 +1410,35 @@ declare class VideoTexture extends Texture2D<HTMLVideoElement> {
1419
1410
  declare class ViewportTexture extends PixelsTexture {
1420
1411
  }
1421
1412
 
1413
+ type UVTransform = Transform2D | ((x: number, y: number) => [number, number]);
1414
+ type VertTransform = Transform2D | (() => Transform2D);
1422
1415
  interface CanvasBatchable extends Batchable2D {
1423
1416
  type: 'stroke' | 'fill';
1424
1417
  texture?: Texture2D;
1418
+ vertTransform?: VertTransform;
1425
1419
  }
1426
1420
  interface StrokeDraw extends Partial<CanvasBatchable> {
1427
1421
  type: 'stroke';
1428
1422
  path: Path2D;
1429
- texture?: Texture2D;
1430
- textureTransform?: Transform2D;
1431
1423
  style: LineStyle;
1424
+ uvTransform?: UVTransform;
1432
1425
  }
1433
1426
  interface FillDraw extends Partial<CanvasBatchable> {
1434
1427
  type: 'fill';
1435
1428
  path: Path2D;
1436
- texture?: Texture2D;
1437
- textureTransform?: Transform2D;
1429
+ uvTransform?: UVTransform;
1438
1430
  }
1439
1431
  declare class CanvasContext extends Path2D {
1440
- textureTransform?: Transform2D;
1441
1432
  fillStyle?: Color$1 | Texture2D;
1442
1433
  strokeStyle?: Color$1 | Texture2D;
1443
1434
  lineCap?: LineCap;
1444
1435
  lineJoin?: LineJoin;
1445
1436
  lineWidth?: number;
1446
1437
  miterLimit?: number;
1447
- _defaultStyle: Texture2D<Texture2DSource>;
1448
- _draws: (StrokeDraw | FillDraw)[];
1438
+ uvTransform?: UVTransform;
1439
+ vertTransform?: VertTransform;
1440
+ protected _defaultStyle: Texture2D<Texture2DSource>;
1441
+ protected _draws: (StrokeDraw | FillDraw)[];
1449
1442
  protected _toTexture(source: Color$1 | Texture2D): Texture2D;
1450
1443
  stroke(options?: Partial<StrokeDraw>): void;
1451
1444
  fillRect(x: number, y: number, width: number, height: number): void;
@@ -1453,7 +1446,7 @@ declare class CanvasContext extends Path2D {
1453
1446
  fill(options?: Partial<FillDraw>): void;
1454
1447
  copy(source: CanvasContext): this;
1455
1448
  reset(): this;
1456
- buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D, textureTransform?: Transform2D): void;
1449
+ buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D, uvTransform?: UVTransform): void;
1457
1450
  toBatchables(): CanvasBatchable[];
1458
1451
  }
1459
1452
 
@@ -1809,7 +1802,7 @@ declare class CanvasItem extends TimelineNode {
1809
1802
  protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
1810
1803
  protected _repaint(batchables: CanvasBatchable[]): CanvasBatchable[];
1811
1804
  protected _process(delta: number): void;
1812
- protected _update(): void;
1805
+ protected _update(changed: Map<PropertyKey, any>): void;
1813
1806
  protected _render(renderer: WebGLRenderer): void;
1814
1807
  }
1815
1808
 
@@ -1882,9 +1875,11 @@ declare class Node2D extends CanvasItem {
1882
1875
  globalTransform: Transform2D;
1883
1876
  protected _parentTransformDirtyId?: number;
1884
1877
  constructor(properties?: Partial<Node2DProperties>, nodes?: Node[]);
1878
+ getTransformOrigin(): Vector2;
1879
+ getTransform(cb?: (transform: Transform2D) => void): Transform2D;
1885
1880
  protected _updateTransform(): void;
1886
1881
  protected _updateGlobalTransform(): void;
1887
- protected _transformVertices(vertices: number[]): number[];
1882
+ protected _transformVertices(vertices: number[], vertTransform?: VertTransform): number[];
1888
1883
  protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
1889
1884
  protected _process(delta: number): void;
1890
1885
  }
@@ -1913,7 +1908,7 @@ declare class BaseElement2DFill extends CoreObject {
1913
1908
  canDraw(): boolean;
1914
1909
  protected _getDrawOptions(): {
1915
1910
  disableWrapMode: boolean;
1916
- textureTransform: Transform2D;
1911
+ uvTransform: Transform2D;
1917
1912
  };
1918
1913
  draw(): void;
1919
1914
  }
@@ -1983,13 +1978,13 @@ declare class BaseElement2DStyle extends Resource {
1983
1978
 
1984
1979
  declare class BaseElement2DText extends CoreObject {
1985
1980
  parent: BaseElement2D;
1986
- content: TextOptions['content'];
1987
- effects?: TextOptions['effects'];
1988
- measureDom?: TextOptions['measureDom'];
1989
- fonts?: TextOptions['fonts'];
1981
+ content: Text['content'];
1982
+ effects?: Text['effects'];
1983
+ measureDOM?: Text['measureDOM'];
1984
+ fonts?: Text['fonts'];
1990
1985
  constructor(parent: BaseElement2D);
1986
+ base: Text;
1991
1987
  texture: CanvasTexture;
1992
- baseText: Text;
1993
1988
  measureResult?: MeasureResult;
1994
1989
  setProperties(properties?: Text$1): this;
1995
1990
  protected _updateProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
@@ -2051,7 +2046,8 @@ declare class BaseElement2D extends Node2D implements Rectangulable {
2051
2046
  setProperties(properties?: Record<PropertyKey, any>): this;
2052
2047
  protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
2053
2048
  protected _updateMaskImage(): void;
2054
- protected _updateTransform(): void;
2049
+ getTransformOrigin(): Vector2;
2050
+ getTransform(cb?: (transform: Transform2D) => void): Transform2D;
2055
2051
  protected _updateGlobalTransform(): void;
2056
2052
  getRect(): Rect2;
2057
2053
  protected _updateOverflow(): void;
@@ -2260,10 +2256,10 @@ interface Text2D {
2260
2256
  */
2261
2257
  declare class Text2D extends TextureRect2D<CanvasTexture> {
2262
2258
  split: boolean;
2263
- content: TextOptions['content'];
2264
- effects?: TextOptions['effects'];
2265
- measureDom?: TextOptions['measureDom'];
2266
- fonts?: TextOptions['fonts'];
2259
+ content: Text['content'];
2260
+ effects?: Text['effects'];
2261
+ measureDOM?: Text['measureDOM'];
2262
+ fonts?: Text['fonts'];
2267
2263
  texture: CanvasTexture;
2268
2264
  base: Text;
2269
2265
  measureResult?: MeasureResult;
@@ -2345,7 +2341,7 @@ declare class Animation extends TimelineNode {
2345
2341
  easing?: Easing;
2346
2342
  protected _keyframes: NormalizedKeyframe[];
2347
2343
  protected _isFirstUpdatePosition: boolean;
2348
- protected _cachedProps: RawWeakMap<any, Map<string, any>>;
2344
+ protected _cachedProps: RawWeakMap$1<any, Map<string, any>>;
2349
2345
  protected _stoped: boolean;
2350
2346
  constructor(properties?: Partial<AnimationProperties>, children?: Node[]);
2351
2347
  protected _parented(parent: Node): void;
@@ -3266,5 +3262,5 @@ interface RenderOptions {
3266
3262
  }
3267
3263
  declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
3268
3264
 
3269
- export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, 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, Scaler, SceneTree, ScrollBar, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, property, protectedProperty, render, timingFunctions, uid };
3270
- export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, PropertyDeclaration, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
3265
+ export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, 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, Scaler, SceneTree, ScrollBar, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, protectedProperty, render, timingFunctions, uid };
3266
+ export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, UVTransform, VectorLike, VectorOperateOutput, VertTransform, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Font } from 'modern-font';
2
+ import { PropertyDeclaration, Color as Color$1, RawWeakMap as RawWeakMap$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
3
+ export { Color as ColorValue } from 'modern-idoc';
2
4
  import { AnimationItem } from 'lottie-web';
3
5
  import { Colord, RgbaColor, HslaColor, HsvaColor } from 'colord';
4
- import { Color as Color$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
5
- export { Color as ColorValue } from 'modern-idoc';
6
6
  import { Path2D, LineCap, LineJoin, LineStyle, Path2DSet } from 'modern-path2d';
7
- import { TextOptions, Text, MeasureResult } from 'modern-text';
7
+ import { Text, MeasureResult, TextOptions } from 'modern-text';
8
8
  import { Node as Node$1, Direction } from 'yoga-layout/load';
9
9
 
10
10
  declare abstract class Loader {
@@ -19,15 +19,6 @@ declare class FontLoader extends Loader {
19
19
  declare const customNodes: Map<string, any>;
20
20
  declare function customNode<T = Record<string, any>>(tag: string, defaultProperties?: Partial<T>): ClassDecorator;
21
21
 
22
- interface PropertyDeclaration {
23
- readonly default?: any | (() => any);
24
- readonly protected?: boolean;
25
- readonly alias?: string;
26
- }
27
- declare function getDeclarations(constructor: any): Map<PropertyKey, PropertyDeclaration>;
28
- declare function defineProperty(constructor: any, name: PropertyKey, declaration?: PropertyDeclaration): void;
29
- declare function property(options?: PropertyDeclaration): PropertyDecorator;
30
-
31
22
  declare function protectedProperty(options?: Omit<PropertyDeclaration, 'protected'>): PropertyDecorator;
32
23
 
33
24
  declare function createNode<T = any>(tag?: string, options?: Record<string, any>): T;
@@ -106,7 +97,7 @@ declare class CoreObject extends EventEmitter {
106
97
  getProperties(keys?: PropertyKey[]): Record<PropertyKey, any>;
107
98
  setProperties(properties?: any): this;
108
99
  resetProperties(): this;
109
- requestUpdate(key?: PropertyKey, oldValue?: unknown, declaration?: PropertyDeclaration): void;
100
+ requestUpdate(key?: PropertyKey, newValue?: unknown, oldValue?: unknown, declaration?: PropertyDeclaration): void;
110
101
  toJSON(): Record<string, any>;
111
102
  clone(): this;
112
103
  free(): void;
@@ -753,7 +744,7 @@ interface WebGLProgramMeta {
753
744
  name: string;
754
745
  location: WebGLUniformLocation | null;
755
746
  }>;
756
- boundUniforms: RawWeakMap<object, any>;
747
+ boundUniforms: RawWeakMap$1<object, any>;
757
748
  }
758
749
  interface WebGLProgramOptions {
759
750
  vert: string;
@@ -1419,33 +1410,35 @@ declare class VideoTexture extends Texture2D<HTMLVideoElement> {
1419
1410
  declare class ViewportTexture extends PixelsTexture {
1420
1411
  }
1421
1412
 
1413
+ type UVTransform = Transform2D | ((x: number, y: number) => [number, number]);
1414
+ type VertTransform = Transform2D | (() => Transform2D);
1422
1415
  interface CanvasBatchable extends Batchable2D {
1423
1416
  type: 'stroke' | 'fill';
1424
1417
  texture?: Texture2D;
1418
+ vertTransform?: VertTransform;
1425
1419
  }
1426
1420
  interface StrokeDraw extends Partial<CanvasBatchable> {
1427
1421
  type: 'stroke';
1428
1422
  path: Path2D;
1429
- texture?: Texture2D;
1430
- textureTransform?: Transform2D;
1431
1423
  style: LineStyle;
1424
+ uvTransform?: UVTransform;
1432
1425
  }
1433
1426
  interface FillDraw extends Partial<CanvasBatchable> {
1434
1427
  type: 'fill';
1435
1428
  path: Path2D;
1436
- texture?: Texture2D;
1437
- textureTransform?: Transform2D;
1429
+ uvTransform?: UVTransform;
1438
1430
  }
1439
1431
  declare class CanvasContext extends Path2D {
1440
- textureTransform?: Transform2D;
1441
1432
  fillStyle?: Color$1 | Texture2D;
1442
1433
  strokeStyle?: Color$1 | Texture2D;
1443
1434
  lineCap?: LineCap;
1444
1435
  lineJoin?: LineJoin;
1445
1436
  lineWidth?: number;
1446
1437
  miterLimit?: number;
1447
- _defaultStyle: Texture2D<Texture2DSource>;
1448
- _draws: (StrokeDraw | FillDraw)[];
1438
+ uvTransform?: UVTransform;
1439
+ vertTransform?: VertTransform;
1440
+ protected _defaultStyle: Texture2D<Texture2DSource>;
1441
+ protected _draws: (StrokeDraw | FillDraw)[];
1449
1442
  protected _toTexture(source: Color$1 | Texture2D): Texture2D;
1450
1443
  stroke(options?: Partial<StrokeDraw>): void;
1451
1444
  fillRect(x: number, y: number, width: number, height: number): void;
@@ -1453,7 +1446,7 @@ declare class CanvasContext extends Path2D {
1453
1446
  fill(options?: Partial<FillDraw>): void;
1454
1447
  copy(source: CanvasContext): this;
1455
1448
  reset(): this;
1456
- buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D, textureTransform?: Transform2D): void;
1449
+ buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D, uvTransform?: UVTransform): void;
1457
1450
  toBatchables(): CanvasBatchable[];
1458
1451
  }
1459
1452
 
@@ -1809,7 +1802,7 @@ declare class CanvasItem extends TimelineNode {
1809
1802
  protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
1810
1803
  protected _repaint(batchables: CanvasBatchable[]): CanvasBatchable[];
1811
1804
  protected _process(delta: number): void;
1812
- protected _update(): void;
1805
+ protected _update(changed: Map<PropertyKey, any>): void;
1813
1806
  protected _render(renderer: WebGLRenderer): void;
1814
1807
  }
1815
1808
 
@@ -1882,9 +1875,11 @@ declare class Node2D extends CanvasItem {
1882
1875
  globalTransform: Transform2D;
1883
1876
  protected _parentTransformDirtyId?: number;
1884
1877
  constructor(properties?: Partial<Node2DProperties>, nodes?: Node[]);
1878
+ getTransformOrigin(): Vector2;
1879
+ getTransform(cb?: (transform: Transform2D) => void): Transform2D;
1885
1880
  protected _updateTransform(): void;
1886
1881
  protected _updateGlobalTransform(): void;
1887
- protected _transformVertices(vertices: number[]): number[];
1882
+ protected _transformVertices(vertices: number[], vertTransform?: VertTransform): number[];
1888
1883
  protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
1889
1884
  protected _process(delta: number): void;
1890
1885
  }
@@ -1913,7 +1908,7 @@ declare class BaseElement2DFill extends CoreObject {
1913
1908
  canDraw(): boolean;
1914
1909
  protected _getDrawOptions(): {
1915
1910
  disableWrapMode: boolean;
1916
- textureTransform: Transform2D;
1911
+ uvTransform: Transform2D;
1917
1912
  };
1918
1913
  draw(): void;
1919
1914
  }
@@ -1983,13 +1978,13 @@ declare class BaseElement2DStyle extends Resource {
1983
1978
 
1984
1979
  declare class BaseElement2DText extends CoreObject {
1985
1980
  parent: BaseElement2D;
1986
- content: TextOptions['content'];
1987
- effects?: TextOptions['effects'];
1988
- measureDom?: TextOptions['measureDom'];
1989
- fonts?: TextOptions['fonts'];
1981
+ content: Text['content'];
1982
+ effects?: Text['effects'];
1983
+ measureDOM?: Text['measureDOM'];
1984
+ fonts?: Text['fonts'];
1990
1985
  constructor(parent: BaseElement2D);
1986
+ base: Text;
1991
1987
  texture: CanvasTexture;
1992
- baseText: Text;
1993
1988
  measureResult?: MeasureResult;
1994
1989
  setProperties(properties?: Text$1): this;
1995
1990
  protected _updateProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
@@ -2051,7 +2046,8 @@ declare class BaseElement2D extends Node2D implements Rectangulable {
2051
2046
  setProperties(properties?: Record<PropertyKey, any>): this;
2052
2047
  protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
2053
2048
  protected _updateMaskImage(): void;
2054
- protected _updateTransform(): void;
2049
+ getTransformOrigin(): Vector2;
2050
+ getTransform(cb?: (transform: Transform2D) => void): Transform2D;
2055
2051
  protected _updateGlobalTransform(): void;
2056
2052
  getRect(): Rect2;
2057
2053
  protected _updateOverflow(): void;
@@ -2260,10 +2256,10 @@ interface Text2D {
2260
2256
  */
2261
2257
  declare class Text2D extends TextureRect2D<CanvasTexture> {
2262
2258
  split: boolean;
2263
- content: TextOptions['content'];
2264
- effects?: TextOptions['effects'];
2265
- measureDom?: TextOptions['measureDom'];
2266
- fonts?: TextOptions['fonts'];
2259
+ content: Text['content'];
2260
+ effects?: Text['effects'];
2261
+ measureDOM?: Text['measureDOM'];
2262
+ fonts?: Text['fonts'];
2267
2263
  texture: CanvasTexture;
2268
2264
  base: Text;
2269
2265
  measureResult?: MeasureResult;
@@ -2345,7 +2341,7 @@ declare class Animation extends TimelineNode {
2345
2341
  easing?: Easing;
2346
2342
  protected _keyframes: NormalizedKeyframe[];
2347
2343
  protected _isFirstUpdatePosition: boolean;
2348
- protected _cachedProps: RawWeakMap<any, Map<string, any>>;
2344
+ protected _cachedProps: RawWeakMap$1<any, Map<string, any>>;
2349
2345
  protected _stoped: boolean;
2350
2346
  constructor(properties?: Partial<AnimationProperties>, children?: Node[]);
2351
2347
  protected _parented(parent: Node): void;
@@ -3266,5 +3262,5 @@ interface RenderOptions {
3266
3262
  }
3267
3263
  declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
3268
3264
 
3269
- export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, 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, Scaler, SceneTree, ScrollBar, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, property, protectedProperty, render, timingFunctions, uid };
3270
- export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, PropertyDeclaration, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
3265
+ export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, 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, Scaler, SceneTree, ScrollBar, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, protectedProperty, render, timingFunctions, uid };
3266
+ export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, UVTransform, VectorLike, VectorOperateOutput, VertTransform, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Font } from 'modern-font';
2
+ import { PropertyDeclaration, Color as Color$1, RawWeakMap as RawWeakMap$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
3
+ export { Color as ColorValue } from 'modern-idoc';
2
4
  import { AnimationItem } from 'lottie-web';
3
5
  import { Colord, RgbaColor, HslaColor, HsvaColor } from 'colord';
4
- import { Color as Color$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
5
- export { Color as ColorValue } from 'modern-idoc';
6
6
  import { Path2D, LineCap, LineJoin, LineStyle, Path2DSet } from 'modern-path2d';
7
- import { TextOptions, Text, MeasureResult } from 'modern-text';
7
+ import { Text, MeasureResult, TextOptions } from 'modern-text';
8
8
  import { Node as Node$1, Direction } from 'yoga-layout/load';
9
9
 
10
10
  declare abstract class Loader {
@@ -19,15 +19,6 @@ declare class FontLoader extends Loader {
19
19
  declare const customNodes: Map<string, any>;
20
20
  declare function customNode<T = Record<string, any>>(tag: string, defaultProperties?: Partial<T>): ClassDecorator;
21
21
 
22
- interface PropertyDeclaration {
23
- readonly default?: any | (() => any);
24
- readonly protected?: boolean;
25
- readonly alias?: string;
26
- }
27
- declare function getDeclarations(constructor: any): Map<PropertyKey, PropertyDeclaration>;
28
- declare function defineProperty(constructor: any, name: PropertyKey, declaration?: PropertyDeclaration): void;
29
- declare function property(options?: PropertyDeclaration): PropertyDecorator;
30
-
31
22
  declare function protectedProperty(options?: Omit<PropertyDeclaration, 'protected'>): PropertyDecorator;
32
23
 
33
24
  declare function createNode<T = any>(tag?: string, options?: Record<string, any>): T;
@@ -106,7 +97,7 @@ declare class CoreObject extends EventEmitter {
106
97
  getProperties(keys?: PropertyKey[]): Record<PropertyKey, any>;
107
98
  setProperties(properties?: any): this;
108
99
  resetProperties(): this;
109
- requestUpdate(key?: PropertyKey, oldValue?: unknown, declaration?: PropertyDeclaration): void;
100
+ requestUpdate(key?: PropertyKey, newValue?: unknown, oldValue?: unknown, declaration?: PropertyDeclaration): void;
110
101
  toJSON(): Record<string, any>;
111
102
  clone(): this;
112
103
  free(): void;
@@ -753,7 +744,7 @@ interface WebGLProgramMeta {
753
744
  name: string;
754
745
  location: WebGLUniformLocation | null;
755
746
  }>;
756
- boundUniforms: RawWeakMap<object, any>;
747
+ boundUniforms: RawWeakMap$1<object, any>;
757
748
  }
758
749
  interface WebGLProgramOptions {
759
750
  vert: string;
@@ -1419,33 +1410,35 @@ declare class VideoTexture extends Texture2D<HTMLVideoElement> {
1419
1410
  declare class ViewportTexture extends PixelsTexture {
1420
1411
  }
1421
1412
 
1413
+ type UVTransform = Transform2D | ((x: number, y: number) => [number, number]);
1414
+ type VertTransform = Transform2D | (() => Transform2D);
1422
1415
  interface CanvasBatchable extends Batchable2D {
1423
1416
  type: 'stroke' | 'fill';
1424
1417
  texture?: Texture2D;
1418
+ vertTransform?: VertTransform;
1425
1419
  }
1426
1420
  interface StrokeDraw extends Partial<CanvasBatchable> {
1427
1421
  type: 'stroke';
1428
1422
  path: Path2D;
1429
- texture?: Texture2D;
1430
- textureTransform?: Transform2D;
1431
1423
  style: LineStyle;
1424
+ uvTransform?: UVTransform;
1432
1425
  }
1433
1426
  interface FillDraw extends Partial<CanvasBatchable> {
1434
1427
  type: 'fill';
1435
1428
  path: Path2D;
1436
- texture?: Texture2D;
1437
- textureTransform?: Transform2D;
1429
+ uvTransform?: UVTransform;
1438
1430
  }
1439
1431
  declare class CanvasContext extends Path2D {
1440
- textureTransform?: Transform2D;
1441
1432
  fillStyle?: Color$1 | Texture2D;
1442
1433
  strokeStyle?: Color$1 | Texture2D;
1443
1434
  lineCap?: LineCap;
1444
1435
  lineJoin?: LineJoin;
1445
1436
  lineWidth?: number;
1446
1437
  miterLimit?: number;
1447
- _defaultStyle: Texture2D<Texture2DSource>;
1448
- _draws: (StrokeDraw | FillDraw)[];
1438
+ uvTransform?: UVTransform;
1439
+ vertTransform?: VertTransform;
1440
+ protected _defaultStyle: Texture2D<Texture2DSource>;
1441
+ protected _draws: (StrokeDraw | FillDraw)[];
1449
1442
  protected _toTexture(source: Color$1 | Texture2D): Texture2D;
1450
1443
  stroke(options?: Partial<StrokeDraw>): void;
1451
1444
  fillRect(x: number, y: number, width: number, height: number): void;
@@ -1453,7 +1446,7 @@ declare class CanvasContext extends Path2D {
1453
1446
  fill(options?: Partial<FillDraw>): void;
1454
1447
  copy(source: CanvasContext): this;
1455
1448
  reset(): this;
1456
- buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D, textureTransform?: Transform2D): void;
1449
+ buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D, uvTransform?: UVTransform): void;
1457
1450
  toBatchables(): CanvasBatchable[];
1458
1451
  }
1459
1452
 
@@ -1809,7 +1802,7 @@ declare class CanvasItem extends TimelineNode {
1809
1802
  protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
1810
1803
  protected _repaint(batchables: CanvasBatchable[]): CanvasBatchable[];
1811
1804
  protected _process(delta: number): void;
1812
- protected _update(): void;
1805
+ protected _update(changed: Map<PropertyKey, any>): void;
1813
1806
  protected _render(renderer: WebGLRenderer): void;
1814
1807
  }
1815
1808
 
@@ -1882,9 +1875,11 @@ declare class Node2D extends CanvasItem {
1882
1875
  globalTransform: Transform2D;
1883
1876
  protected _parentTransformDirtyId?: number;
1884
1877
  constructor(properties?: Partial<Node2DProperties>, nodes?: Node[]);
1878
+ getTransformOrigin(): Vector2;
1879
+ getTransform(cb?: (transform: Transform2D) => void): Transform2D;
1885
1880
  protected _updateTransform(): void;
1886
1881
  protected _updateGlobalTransform(): void;
1887
- protected _transformVertices(vertices: number[]): number[];
1882
+ protected _transformVertices(vertices: number[], vertTransform?: VertTransform): number[];
1888
1883
  protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
1889
1884
  protected _process(delta: number): void;
1890
1885
  }
@@ -1913,7 +1908,7 @@ declare class BaseElement2DFill extends CoreObject {
1913
1908
  canDraw(): boolean;
1914
1909
  protected _getDrawOptions(): {
1915
1910
  disableWrapMode: boolean;
1916
- textureTransform: Transform2D;
1911
+ uvTransform: Transform2D;
1917
1912
  };
1918
1913
  draw(): void;
1919
1914
  }
@@ -1983,13 +1978,13 @@ declare class BaseElement2DStyle extends Resource {
1983
1978
 
1984
1979
  declare class BaseElement2DText extends CoreObject {
1985
1980
  parent: BaseElement2D;
1986
- content: TextOptions['content'];
1987
- effects?: TextOptions['effects'];
1988
- measureDom?: TextOptions['measureDom'];
1989
- fonts?: TextOptions['fonts'];
1981
+ content: Text['content'];
1982
+ effects?: Text['effects'];
1983
+ measureDOM?: Text['measureDOM'];
1984
+ fonts?: Text['fonts'];
1990
1985
  constructor(parent: BaseElement2D);
1986
+ base: Text;
1991
1987
  texture: CanvasTexture;
1992
- baseText: Text;
1993
1988
  measureResult?: MeasureResult;
1994
1989
  setProperties(properties?: Text$1): this;
1995
1990
  protected _updateProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
@@ -2051,7 +2046,8 @@ declare class BaseElement2D extends Node2D implements Rectangulable {
2051
2046
  setProperties(properties?: Record<PropertyKey, any>): this;
2052
2047
  protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
2053
2048
  protected _updateMaskImage(): void;
2054
- protected _updateTransform(): void;
2049
+ getTransformOrigin(): Vector2;
2050
+ getTransform(cb?: (transform: Transform2D) => void): Transform2D;
2055
2051
  protected _updateGlobalTransform(): void;
2056
2052
  getRect(): Rect2;
2057
2053
  protected _updateOverflow(): void;
@@ -2260,10 +2256,10 @@ interface Text2D {
2260
2256
  */
2261
2257
  declare class Text2D extends TextureRect2D<CanvasTexture> {
2262
2258
  split: boolean;
2263
- content: TextOptions['content'];
2264
- effects?: TextOptions['effects'];
2265
- measureDom?: TextOptions['measureDom'];
2266
- fonts?: TextOptions['fonts'];
2259
+ content: Text['content'];
2260
+ effects?: Text['effects'];
2261
+ measureDOM?: Text['measureDOM'];
2262
+ fonts?: Text['fonts'];
2267
2263
  texture: CanvasTexture;
2268
2264
  base: Text;
2269
2265
  measureResult?: MeasureResult;
@@ -2345,7 +2341,7 @@ declare class Animation extends TimelineNode {
2345
2341
  easing?: Easing;
2346
2342
  protected _keyframes: NormalizedKeyframe[];
2347
2343
  protected _isFirstUpdatePosition: boolean;
2348
- protected _cachedProps: RawWeakMap<any, Map<string, any>>;
2344
+ protected _cachedProps: RawWeakMap$1<any, Map<string, any>>;
2349
2345
  protected _stoped: boolean;
2350
2346
  constructor(properties?: Partial<AnimationProperties>, children?: Node[]);
2351
2347
  protected _parented(parent: Node): void;
@@ -3266,5 +3262,5 @@ interface RenderOptions {
3266
3262
  }
3267
3263
  declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
3268
3264
 
3269
- export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, 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, Scaler, SceneTree, ScrollBar, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, property, protectedProperty, render, timingFunctions, uid };
3270
- export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, PropertyDeclaration, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
3265
+ export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, 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, Scaler, SceneTree, ScrollBar, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, protectedProperty, render, timingFunctions, uid };
3266
+ export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, UVTransform, VectorLike, VectorOperateOutput, VertTransform, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };