modern-canvas 0.3.2 → 0.3.3

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
@@ -1330,6 +1330,18 @@ declare class Texture2D<T extends Texture2DSource = Texture2DSource> extends Res
1330
1330
  destroy(): void;
1331
1331
  }
1332
1332
 
1333
+ interface ImageFrame {
1334
+ texture: Texture2D;
1335
+ duration: number;
1336
+ }
1337
+ declare class AnimatedTexture extends Resource {
1338
+ frames: ImageFrame[];
1339
+ duration: number;
1340
+ constructor(source: Texture2D | ImageFrame[]);
1341
+ updateDuration(): this;
1342
+ destroy(): void;
1343
+ }
1344
+
1333
1345
  declare class CanvasTexture extends Texture2D<HTMLCanvasElement> {
1334
1346
  pixelRatio: number;
1335
1347
  constructor(source?: HTMLCanvasElement);
@@ -1494,8 +1506,8 @@ declare class CanvasContext extends Path2D {
1494
1506
  lineWidth?: number;
1495
1507
  miterLimit?: number;
1496
1508
  _defaultStyle: Texture2D<Texture2DSource>;
1497
- _stroke: StrokedGraphics[];
1498
- _fille: FilledGraphics[];
1509
+ _strokes: StrokedGraphics[];
1510
+ _fills: FilledGraphics[];
1499
1511
  stroke(): void;
1500
1512
  fillRect(x: number, y: number, width: number, height: number): void;
1501
1513
  strokeRect(x: number, y: number, width: number, height: number): void;
@@ -1913,7 +1925,7 @@ declare class Node2D extends CanvasItem {
1913
1925
  transform: Transform2D;
1914
1926
  protected _parentTransformDirtyId?: number;
1915
1927
  constructor(properties?: Partial<Node2DProperties>, children?: Node[]);
1916
- protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any): void;
1928
+ protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
1917
1929
  protected _updateTransform(): void;
1918
1930
  getRect(): Rect2;
1919
1931
  protected _updateOverflow(): void;
@@ -1948,24 +1960,12 @@ declare class Graphics2D extends Node2D {
1948
1960
  drawEllipse(x: number, y: number, width: number, height: number): this;
1949
1961
  }
1950
1962
 
1951
- interface ImageFrame {
1952
- texture: Texture2D;
1953
- duration: number;
1954
- }
1955
- declare class Image2DResource extends Resource {
1956
- frames: ImageFrame[];
1957
- duration: number;
1958
- constructor(source: Texture2D | ImageFrame[]);
1959
- updateDuration(): this;
1960
- destroy(): void;
1961
- }
1962
-
1963
1963
  interface Image2DProperties extends Node2DProperties {
1964
1964
  src: string;
1965
1965
  gif: boolean;
1966
1966
  }
1967
1967
  declare class Image2D extends Node2D {
1968
- resource?: Image2DResource;
1968
+ resource?: AnimatedTexture;
1969
1969
  gif: boolean;
1970
1970
  src: string;
1971
1971
  get currentTexture(): Texture2D | undefined;
@@ -1979,7 +1979,7 @@ declare class Image2D extends Node2D {
1979
1979
  constructor(properties?: Partial<Image2DProperties>, children?: Node[]);
1980
1980
  protected _updateProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
1981
1981
  decode(): Promise<void>;
1982
- setResource(source: Texture2D | ImageFrame[] | Image2DResource): this;
1982
+ setResource(source: Texture2D | ImageFrame[] | AnimatedTexture): this;
1983
1983
  protected _load(src: string): Promise<void>;
1984
1984
  protected _getFrameCurrentTime(): number;
1985
1985
  protected _updateFrameIndex(): this;
@@ -2041,6 +2041,16 @@ declare class Text2D extends TextureRect2D<CanvasTexture> {
2041
2041
  protected _drawContent(): void;
2042
2042
  }
2043
2043
 
2044
+ interface TransformRect2DProperties extends Node2DProperties {
2045
+ }
2046
+ declare class TransformRect2D extends Node2D implements Rectangulable {
2047
+ size: number;
2048
+ protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
2049
+ protected _drawCircle(x: number, y: number): void;
2050
+ protected _drawEllipse(x: number, y: number): void;
2051
+ protected _draw(): void;
2052
+ }
2053
+
2044
2054
  interface Video2DProperties extends TextureRect2DProperties {
2045
2055
  src: string;
2046
2056
  }
@@ -2925,12 +2935,12 @@ declare class TwistTransition extends Transition {
2925
2935
  apply(renderer: WebGLRenderer, source: Viewport): void;
2926
2936
  }
2927
2937
 
2928
- declare class GifLoader extends Loader {
2929
- load: (url: string) => Promise<Image2DResource>;
2938
+ declare class GIFLoader extends Loader {
2939
+ load: (url: string) => Promise<AnimatedTexture>;
2930
2940
  install(assets: Assets): this;
2931
2941
  }
2932
2942
 
2933
- declare class JsonLoader extends Loader {
2943
+ declare class JSONLoader extends Loader {
2934
2944
  load: (url: string) => Promise<Record<string, any>>;
2935
2945
  install(assets: Assets): this;
2936
2946
  }
@@ -2958,8 +2968,8 @@ declare class VideoLoader extends Loader {
2958
2968
  type AssetHandler = (url: string, options?: any) => any | Promise<any>;
2959
2969
  interface Assets {
2960
2970
  font: FontLoader;
2961
- gif: GifLoader;
2962
- json: JsonLoader;
2971
+ gif: GIFLoader;
2972
+ json: JSONLoader;
2963
2973
  lottie: LottieLoader;
2964
2974
  text: TextLoader;
2965
2975
  texture: TextureLoader;
@@ -2987,27 +2997,29 @@ declare class Assets {
2987
2997
  declare const assets: Assets;
2988
2998
 
2989
2999
  declare class CanvasItemEditor extends Control {
2990
- hover: Node2D;
2991
- selectionRect: Node2D;
2992
- selector: Node2D;
2993
- scaler: Scaler;
2994
- xScrollBar: XScrollBar;
2995
- yScrollBar: YScrollBar;
2996
- drawboard: Node2D;
2997
- ruler: Ruler;
2998
3000
  protected _pointerStart?: CanvasItemStyle;
2999
3001
  protected _pointerOffset?: {
3000
3002
  x: number;
3001
3003
  y: number;
3002
3004
  };
3003
3005
  selected?: CanvasItem;
3006
+ dragging?: CanvasItem;
3007
+ hovered?: CanvasItem;
3008
+ hover: Node2D;
3009
+ transformRect: TransformRect2D;
3010
+ scaler: Scaler;
3011
+ xScrollBar: XScrollBar;
3012
+ yScrollBar: YScrollBar;
3013
+ drawboard: Node2D;
3014
+ ruler: Ruler;
3004
3015
  constructor();
3005
3016
  protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
3006
3017
  protected _guiInput(event: InputEvent, key: InputEventKey): void;
3007
3018
  protected _onPointerdown(e: PointerInputEvent): void;
3008
3019
  protected _onPointermove(e: PointerInputEvent): void;
3009
3020
  protected _onPointerup(): void;
3010
- protected _onHover(): void;
3021
+ protected _updateHover(): void;
3022
+ protected _updateSelectionRect(): void;
3011
3023
  protected _updateScrollbars(): void;
3012
3024
  }
3013
3025
 
@@ -3079,4 +3091,4 @@ interface RenderOptions {
3079
3091
  }
3080
3092
  declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
3081
3093
 
3082
- export { Animation, type AnimationEffectMode, type AnimationProperties, type AssetHandler, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, type AudioWaveformProperties, type Batchable2D, BlurEffect, type CanvasBatchable, CanvasContext, CanvasItem, CanvasItemEditor, type CanvasItemEventMap, type CanvasItemProperties, CanvasItemStyle, type CanvasItemStyleFilter, type CanvasItemStyleFilterKey, type CanvasItemStyleProperties, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, type ColorFilterEffectProperties, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, type ColorValue, Control, type ControlEventMap, type ControlProperties, CoreObject, type CoreObjectEventMap, type CssFunction, type CssFunctionArg, type Cursor, DEG_TO_RAD, DEVICE_PIXEL_RATIO, type Easing, Effect, type EffectContext, EffectMaterial, type EffectMode, type EffectProperties, Element$1 as Element, type ElementProperties, ElementStyle, type ElementStyleFilter, type ElementStyleFilterKey, type ElementStyleProperties, 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, type IDOCLayoutStyleDeclaration, IN_BROWSER, type IPlayOptions, Image2D, type Image2DProperties, Image2DResource, type ImageFrame, ImageTexture, type ImageTextureOptions, IndexBuffer, type IndexBufferOptions, Input, InputEvent, type InputEventKey, type InputEventMap, type InternalMode, JsonLoader, KawaseTransition, type Keyframe, LeftEraseTransition, Loader, Lottie2D, type Lottie2DProperties, LottieLoader, MainLoop, type MainLoopEventMap, type MaskColor, type MaskData, MaskEffect, type MaskEffectProperties, type MaskObject, type MaskRect, type Maskable, Material, type MaterialOptions, Matrix, Matrix2, Matrix3, Matrix4, type MatrixLike, type MatrixOperateOutput, MouseInputEvent, Node, Node2D, type Node2DProperties, type NodeEventMap, type NodeProperties, type NormalizedKeyframe, PI, PI_2, PixelateEffect, PixelsTexture, type PlatformAudio, type PlatformSound, type PointerEvents$1 as PointerEvents, PointerInputEvent, type ProcessMode, Projection2D, type PropertyDeclaration, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, type RangeProperties, RawWeakMap, Rect2, RefCounted, type RefCountedEventMap, type RenderMode, type RenderOptions, type Renderable, Renderer, Resource, type ResourceEventMap, Ruler, type RulerProperties, 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, type ScalerEventMap, type ScalerProperties, SceneTree, type SceneTreeEventMap, ScrollBar, type ScrollBarProperties, ShadowEffect, type StrokedGraphics, Text2D, type Text2DProperties, TextLoader, Texture2D, type Texture2DFilterMode, type Texture2DPixelsSource, type Texture2DSource, type Texture2DWrapMode, TextureLoader, TextureRect2D, type TextureRect2DProperties, Ticker, TiltShiftTransition, Timeline, type TimelineEventMap, TimelineNode, type TimelineNodeEventMap, type TimelineNodeProperties, type TimelineProperties, type TimingFunctions, Transform2D, type Transform2DObject, Transition, type TransitionProperties, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, type VectorLike, type VectorOperateOutput, VertexAttribute, type VertexAttributeOptions, VertexBuffer, type VertexBufferOptions, Video2D, type Video2DProperties, VideoLoader, VideoTexture, type VideoTextureOptions, type VideoTextureSource, Viewport, type ViewportEventMap, 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, XScrollBar, type XScrollBarProperties, YScrollBar, type YScrollBarProperties, ZoomBlurEffect, assets, clamp, createHTMLCanvas, createNode, crossOrigin, cubicBezier, 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, timingFunctions, uid };
3094
+ export { AnimatedTexture, Animation, type AnimationEffectMode, type AnimationProperties, type AssetHandler, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, type AudioWaveformProperties, type Batchable2D, BlurEffect, type CanvasBatchable, CanvasContext, CanvasItem, CanvasItemEditor, type CanvasItemEventMap, type CanvasItemProperties, CanvasItemStyle, type CanvasItemStyleFilter, type CanvasItemStyleFilterKey, type CanvasItemStyleProperties, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, type ColorFilterEffectProperties, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, type ColorValue, Control, type ControlEventMap, type ControlProperties, CoreObject, type CoreObjectEventMap, type CssFunction, type CssFunctionArg, type Cursor, DEG_TO_RAD, DEVICE_PIXEL_RATIO, type Easing, Effect, type EffectContext, EffectMaterial, type EffectMode, type EffectProperties, Element$1 as Element, type ElementProperties, ElementStyle, type ElementStyleFilter, type ElementStyleFilterKey, type ElementStyleProperties, EmbossEffect, Engine, type EngineOptions, EventEmitter, type EventListener, type EventListenerOptions, type EventListenerValue, type FilledGraphics, FontLoader, GIFLoader, Geometry, type GeometryOptions, GlitchEffect, GodrayEffect, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, type IAudioContext, type IAudioNode, type IDOCLayoutStyleDeclaration, IN_BROWSER, type IPlayOptions, Image2D, type Image2DProperties, type ImageFrame, ImageTexture, type ImageTextureOptions, IndexBuffer, type IndexBufferOptions, Input, InputEvent, type InputEventKey, type InputEventMap, type InternalMode, JSONLoader, KawaseTransition, type Keyframe, LeftEraseTransition, Loader, Lottie2D, type Lottie2DProperties, LottieLoader, MainLoop, type MainLoopEventMap, type MaskColor, type MaskData, MaskEffect, type MaskEffectProperties, type MaskObject, type MaskRect, type Maskable, Material, type MaterialOptions, Matrix, Matrix2, Matrix3, Matrix4, type MatrixLike, type MatrixOperateOutput, MouseInputEvent, Node, Node2D, type Node2DProperties, type NodeEventMap, type NodeProperties, type NormalizedKeyframe, PI, PI_2, PixelateEffect, PixelsTexture, type PlatformAudio, type PlatformSound, type PointerEvents$1 as PointerEvents, PointerInputEvent, type ProcessMode, Projection2D, type PropertyDeclaration, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, type RangeProperties, RawWeakMap, Rect2, RefCounted, type RefCountedEventMap, type RenderMode, type RenderOptions, type Renderable, Renderer, Resource, type ResourceEventMap, Ruler, type RulerProperties, 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, type ScalerEventMap, type ScalerProperties, SceneTree, type SceneTreeEventMap, ScrollBar, type ScrollBarProperties, ShadowEffect, type StrokedGraphics, Text2D, type Text2DProperties, TextLoader, Texture2D, type Texture2DFilterMode, type Texture2DPixelsSource, type Texture2DSource, type Texture2DWrapMode, TextureLoader, TextureRect2D, type TextureRect2DProperties, Ticker, TiltShiftTransition, Timeline, type TimelineEventMap, TimelineNode, type TimelineNodeEventMap, type TimelineNodeProperties, type TimelineProperties, type TimingFunctions, Transform2D, type Transform2DObject, TransformRect2D, type TransformRect2DProperties, Transition, type TransitionProperties, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, type VectorLike, type VectorOperateOutput, VertexAttribute, type VertexAttributeOptions, VertexBuffer, type VertexBufferOptions, Video2D, type Video2DProperties, VideoLoader, VideoTexture, type VideoTextureOptions, type VideoTextureSource, Viewport, type ViewportEventMap, 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, XScrollBar, type XScrollBarProperties, YScrollBar, type YScrollBarProperties, ZoomBlurEffect, assets, clamp, createHTMLCanvas, createNode, crossOrigin, cubicBezier, 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, timingFunctions, uid };
package/dist/index.d.mts CHANGED
@@ -1330,6 +1330,18 @@ declare class Texture2D<T extends Texture2DSource = Texture2DSource> extends Res
1330
1330
  destroy(): void;
1331
1331
  }
1332
1332
 
1333
+ interface ImageFrame {
1334
+ texture: Texture2D;
1335
+ duration: number;
1336
+ }
1337
+ declare class AnimatedTexture extends Resource {
1338
+ frames: ImageFrame[];
1339
+ duration: number;
1340
+ constructor(source: Texture2D | ImageFrame[]);
1341
+ updateDuration(): this;
1342
+ destroy(): void;
1343
+ }
1344
+
1333
1345
  declare class CanvasTexture extends Texture2D<HTMLCanvasElement> {
1334
1346
  pixelRatio: number;
1335
1347
  constructor(source?: HTMLCanvasElement);
@@ -1494,8 +1506,8 @@ declare class CanvasContext extends Path2D {
1494
1506
  lineWidth?: number;
1495
1507
  miterLimit?: number;
1496
1508
  _defaultStyle: Texture2D<Texture2DSource>;
1497
- _stroke: StrokedGraphics[];
1498
- _fille: FilledGraphics[];
1509
+ _strokes: StrokedGraphics[];
1510
+ _fills: FilledGraphics[];
1499
1511
  stroke(): void;
1500
1512
  fillRect(x: number, y: number, width: number, height: number): void;
1501
1513
  strokeRect(x: number, y: number, width: number, height: number): void;
@@ -1913,7 +1925,7 @@ declare class Node2D extends CanvasItem {
1913
1925
  transform: Transform2D;
1914
1926
  protected _parentTransformDirtyId?: number;
1915
1927
  constructor(properties?: Partial<Node2DProperties>, children?: Node[]);
1916
- protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any): void;
1928
+ protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
1917
1929
  protected _updateTransform(): void;
1918
1930
  getRect(): Rect2;
1919
1931
  protected _updateOverflow(): void;
@@ -1948,24 +1960,12 @@ declare class Graphics2D extends Node2D {
1948
1960
  drawEllipse(x: number, y: number, width: number, height: number): this;
1949
1961
  }
1950
1962
 
1951
- interface ImageFrame {
1952
- texture: Texture2D;
1953
- duration: number;
1954
- }
1955
- declare class Image2DResource extends Resource {
1956
- frames: ImageFrame[];
1957
- duration: number;
1958
- constructor(source: Texture2D | ImageFrame[]);
1959
- updateDuration(): this;
1960
- destroy(): void;
1961
- }
1962
-
1963
1963
  interface Image2DProperties extends Node2DProperties {
1964
1964
  src: string;
1965
1965
  gif: boolean;
1966
1966
  }
1967
1967
  declare class Image2D extends Node2D {
1968
- resource?: Image2DResource;
1968
+ resource?: AnimatedTexture;
1969
1969
  gif: boolean;
1970
1970
  src: string;
1971
1971
  get currentTexture(): Texture2D | undefined;
@@ -1979,7 +1979,7 @@ declare class Image2D extends Node2D {
1979
1979
  constructor(properties?: Partial<Image2DProperties>, children?: Node[]);
1980
1980
  protected _updateProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
1981
1981
  decode(): Promise<void>;
1982
- setResource(source: Texture2D | ImageFrame[] | Image2DResource): this;
1982
+ setResource(source: Texture2D | ImageFrame[] | AnimatedTexture): this;
1983
1983
  protected _load(src: string): Promise<void>;
1984
1984
  protected _getFrameCurrentTime(): number;
1985
1985
  protected _updateFrameIndex(): this;
@@ -2041,6 +2041,16 @@ declare class Text2D extends TextureRect2D<CanvasTexture> {
2041
2041
  protected _drawContent(): void;
2042
2042
  }
2043
2043
 
2044
+ interface TransformRect2DProperties extends Node2DProperties {
2045
+ }
2046
+ declare class TransformRect2D extends Node2D implements Rectangulable {
2047
+ size: number;
2048
+ protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
2049
+ protected _drawCircle(x: number, y: number): void;
2050
+ protected _drawEllipse(x: number, y: number): void;
2051
+ protected _draw(): void;
2052
+ }
2053
+
2044
2054
  interface Video2DProperties extends TextureRect2DProperties {
2045
2055
  src: string;
2046
2056
  }
@@ -2925,12 +2935,12 @@ declare class TwistTransition extends Transition {
2925
2935
  apply(renderer: WebGLRenderer, source: Viewport): void;
2926
2936
  }
2927
2937
 
2928
- declare class GifLoader extends Loader {
2929
- load: (url: string) => Promise<Image2DResource>;
2938
+ declare class GIFLoader extends Loader {
2939
+ load: (url: string) => Promise<AnimatedTexture>;
2930
2940
  install(assets: Assets): this;
2931
2941
  }
2932
2942
 
2933
- declare class JsonLoader extends Loader {
2943
+ declare class JSONLoader extends Loader {
2934
2944
  load: (url: string) => Promise<Record<string, any>>;
2935
2945
  install(assets: Assets): this;
2936
2946
  }
@@ -2958,8 +2968,8 @@ declare class VideoLoader extends Loader {
2958
2968
  type AssetHandler = (url: string, options?: any) => any | Promise<any>;
2959
2969
  interface Assets {
2960
2970
  font: FontLoader;
2961
- gif: GifLoader;
2962
- json: JsonLoader;
2971
+ gif: GIFLoader;
2972
+ json: JSONLoader;
2963
2973
  lottie: LottieLoader;
2964
2974
  text: TextLoader;
2965
2975
  texture: TextureLoader;
@@ -2987,27 +2997,29 @@ declare class Assets {
2987
2997
  declare const assets: Assets;
2988
2998
 
2989
2999
  declare class CanvasItemEditor extends Control {
2990
- hover: Node2D;
2991
- selectionRect: Node2D;
2992
- selector: Node2D;
2993
- scaler: Scaler;
2994
- xScrollBar: XScrollBar;
2995
- yScrollBar: YScrollBar;
2996
- drawboard: Node2D;
2997
- ruler: Ruler;
2998
3000
  protected _pointerStart?: CanvasItemStyle;
2999
3001
  protected _pointerOffset?: {
3000
3002
  x: number;
3001
3003
  y: number;
3002
3004
  };
3003
3005
  selected?: CanvasItem;
3006
+ dragging?: CanvasItem;
3007
+ hovered?: CanvasItem;
3008
+ hover: Node2D;
3009
+ transformRect: TransformRect2D;
3010
+ scaler: Scaler;
3011
+ xScrollBar: XScrollBar;
3012
+ yScrollBar: YScrollBar;
3013
+ drawboard: Node2D;
3014
+ ruler: Ruler;
3004
3015
  constructor();
3005
3016
  protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
3006
3017
  protected _guiInput(event: InputEvent, key: InputEventKey): void;
3007
3018
  protected _onPointerdown(e: PointerInputEvent): void;
3008
3019
  protected _onPointermove(e: PointerInputEvent): void;
3009
3020
  protected _onPointerup(): void;
3010
- protected _onHover(): void;
3021
+ protected _updateHover(): void;
3022
+ protected _updateSelectionRect(): void;
3011
3023
  protected _updateScrollbars(): void;
3012
3024
  }
3013
3025
 
@@ -3079,4 +3091,4 @@ interface RenderOptions {
3079
3091
  }
3080
3092
  declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
3081
3093
 
3082
- export { Animation, type AnimationEffectMode, type AnimationProperties, type AssetHandler, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, type AudioWaveformProperties, type Batchable2D, BlurEffect, type CanvasBatchable, CanvasContext, CanvasItem, CanvasItemEditor, type CanvasItemEventMap, type CanvasItemProperties, CanvasItemStyle, type CanvasItemStyleFilter, type CanvasItemStyleFilterKey, type CanvasItemStyleProperties, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, type ColorFilterEffectProperties, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, type ColorValue, Control, type ControlEventMap, type ControlProperties, CoreObject, type CoreObjectEventMap, type CssFunction, type CssFunctionArg, type Cursor, DEG_TO_RAD, DEVICE_PIXEL_RATIO, type Easing, Effect, type EffectContext, EffectMaterial, type EffectMode, type EffectProperties, Element$1 as Element, type ElementProperties, ElementStyle, type ElementStyleFilter, type ElementStyleFilterKey, type ElementStyleProperties, 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, type IDOCLayoutStyleDeclaration, IN_BROWSER, type IPlayOptions, Image2D, type Image2DProperties, Image2DResource, type ImageFrame, ImageTexture, type ImageTextureOptions, IndexBuffer, type IndexBufferOptions, Input, InputEvent, type InputEventKey, type InputEventMap, type InternalMode, JsonLoader, KawaseTransition, type Keyframe, LeftEraseTransition, Loader, Lottie2D, type Lottie2DProperties, LottieLoader, MainLoop, type MainLoopEventMap, type MaskColor, type MaskData, MaskEffect, type MaskEffectProperties, type MaskObject, type MaskRect, type Maskable, Material, type MaterialOptions, Matrix, Matrix2, Matrix3, Matrix4, type MatrixLike, type MatrixOperateOutput, MouseInputEvent, Node, Node2D, type Node2DProperties, type NodeEventMap, type NodeProperties, type NormalizedKeyframe, PI, PI_2, PixelateEffect, PixelsTexture, type PlatformAudio, type PlatformSound, type PointerEvents$1 as PointerEvents, PointerInputEvent, type ProcessMode, Projection2D, type PropertyDeclaration, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, type RangeProperties, RawWeakMap, Rect2, RefCounted, type RefCountedEventMap, type RenderMode, type RenderOptions, type Renderable, Renderer, Resource, type ResourceEventMap, Ruler, type RulerProperties, 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, type ScalerEventMap, type ScalerProperties, SceneTree, type SceneTreeEventMap, ScrollBar, type ScrollBarProperties, ShadowEffect, type StrokedGraphics, Text2D, type Text2DProperties, TextLoader, Texture2D, type Texture2DFilterMode, type Texture2DPixelsSource, type Texture2DSource, type Texture2DWrapMode, TextureLoader, TextureRect2D, type TextureRect2DProperties, Ticker, TiltShiftTransition, Timeline, type TimelineEventMap, TimelineNode, type TimelineNodeEventMap, type TimelineNodeProperties, type TimelineProperties, type TimingFunctions, Transform2D, type Transform2DObject, Transition, type TransitionProperties, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, type VectorLike, type VectorOperateOutput, VertexAttribute, type VertexAttributeOptions, VertexBuffer, type VertexBufferOptions, Video2D, type Video2DProperties, VideoLoader, VideoTexture, type VideoTextureOptions, type VideoTextureSource, Viewport, type ViewportEventMap, 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, XScrollBar, type XScrollBarProperties, YScrollBar, type YScrollBarProperties, ZoomBlurEffect, assets, clamp, createHTMLCanvas, createNode, crossOrigin, cubicBezier, 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, timingFunctions, uid };
3094
+ export { AnimatedTexture, Animation, type AnimationEffectMode, type AnimationProperties, type AssetHandler, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, type AudioWaveformProperties, type Batchable2D, BlurEffect, type CanvasBatchable, CanvasContext, CanvasItem, CanvasItemEditor, type CanvasItemEventMap, type CanvasItemProperties, CanvasItemStyle, type CanvasItemStyleFilter, type CanvasItemStyleFilterKey, type CanvasItemStyleProperties, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, type ColorFilterEffectProperties, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, type ColorValue, Control, type ControlEventMap, type ControlProperties, CoreObject, type CoreObjectEventMap, type CssFunction, type CssFunctionArg, type Cursor, DEG_TO_RAD, DEVICE_PIXEL_RATIO, type Easing, Effect, type EffectContext, EffectMaterial, type EffectMode, type EffectProperties, Element$1 as Element, type ElementProperties, ElementStyle, type ElementStyleFilter, type ElementStyleFilterKey, type ElementStyleProperties, EmbossEffect, Engine, type EngineOptions, EventEmitter, type EventListener, type EventListenerOptions, type EventListenerValue, type FilledGraphics, FontLoader, GIFLoader, Geometry, type GeometryOptions, GlitchEffect, GodrayEffect, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, type IAudioContext, type IAudioNode, type IDOCLayoutStyleDeclaration, IN_BROWSER, type IPlayOptions, Image2D, type Image2DProperties, type ImageFrame, ImageTexture, type ImageTextureOptions, IndexBuffer, type IndexBufferOptions, Input, InputEvent, type InputEventKey, type InputEventMap, type InternalMode, JSONLoader, KawaseTransition, type Keyframe, LeftEraseTransition, Loader, Lottie2D, type Lottie2DProperties, LottieLoader, MainLoop, type MainLoopEventMap, type MaskColor, type MaskData, MaskEffect, type MaskEffectProperties, type MaskObject, type MaskRect, type Maskable, Material, type MaterialOptions, Matrix, Matrix2, Matrix3, Matrix4, type MatrixLike, type MatrixOperateOutput, MouseInputEvent, Node, Node2D, type Node2DProperties, type NodeEventMap, type NodeProperties, type NormalizedKeyframe, PI, PI_2, PixelateEffect, PixelsTexture, type PlatformAudio, type PlatformSound, type PointerEvents$1 as PointerEvents, PointerInputEvent, type ProcessMode, Projection2D, type PropertyDeclaration, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, type RangeProperties, RawWeakMap, Rect2, RefCounted, type RefCountedEventMap, type RenderMode, type RenderOptions, type Renderable, Renderer, Resource, type ResourceEventMap, Ruler, type RulerProperties, 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, type ScalerEventMap, type ScalerProperties, SceneTree, type SceneTreeEventMap, ScrollBar, type ScrollBarProperties, ShadowEffect, type StrokedGraphics, Text2D, type Text2DProperties, TextLoader, Texture2D, type Texture2DFilterMode, type Texture2DPixelsSource, type Texture2DSource, type Texture2DWrapMode, TextureLoader, TextureRect2D, type TextureRect2DProperties, Ticker, TiltShiftTransition, Timeline, type TimelineEventMap, TimelineNode, type TimelineNodeEventMap, type TimelineNodeProperties, type TimelineProperties, type TimingFunctions, Transform2D, type Transform2DObject, TransformRect2D, type TransformRect2DProperties, Transition, type TransitionProperties, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, type VectorLike, type VectorOperateOutput, VertexAttribute, type VertexAttributeOptions, VertexBuffer, type VertexBufferOptions, Video2D, type Video2DProperties, VideoLoader, VideoTexture, type VideoTextureOptions, type VideoTextureSource, Viewport, type ViewportEventMap, 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, XScrollBar, type XScrollBarProperties, YScrollBar, type YScrollBarProperties, ZoomBlurEffect, assets, clamp, createHTMLCanvas, createNode, crossOrigin, cubicBezier, 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, timingFunctions, uid };
package/dist/index.d.ts CHANGED
@@ -1330,6 +1330,18 @@ declare class Texture2D<T extends Texture2DSource = Texture2DSource> extends Res
1330
1330
  destroy(): void;
1331
1331
  }
1332
1332
 
1333
+ interface ImageFrame {
1334
+ texture: Texture2D;
1335
+ duration: number;
1336
+ }
1337
+ declare class AnimatedTexture extends Resource {
1338
+ frames: ImageFrame[];
1339
+ duration: number;
1340
+ constructor(source: Texture2D | ImageFrame[]);
1341
+ updateDuration(): this;
1342
+ destroy(): void;
1343
+ }
1344
+
1333
1345
  declare class CanvasTexture extends Texture2D<HTMLCanvasElement> {
1334
1346
  pixelRatio: number;
1335
1347
  constructor(source?: HTMLCanvasElement);
@@ -1494,8 +1506,8 @@ declare class CanvasContext extends Path2D {
1494
1506
  lineWidth?: number;
1495
1507
  miterLimit?: number;
1496
1508
  _defaultStyle: Texture2D<Texture2DSource>;
1497
- _stroke: StrokedGraphics[];
1498
- _fille: FilledGraphics[];
1509
+ _strokes: StrokedGraphics[];
1510
+ _fills: FilledGraphics[];
1499
1511
  stroke(): void;
1500
1512
  fillRect(x: number, y: number, width: number, height: number): void;
1501
1513
  strokeRect(x: number, y: number, width: number, height: number): void;
@@ -1913,7 +1925,7 @@ declare class Node2D extends CanvasItem {
1913
1925
  transform: Transform2D;
1914
1926
  protected _parentTransformDirtyId?: number;
1915
1927
  constructor(properties?: Partial<Node2DProperties>, children?: Node[]);
1916
- protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any): void;
1928
+ protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
1917
1929
  protected _updateTransform(): void;
1918
1930
  getRect(): Rect2;
1919
1931
  protected _updateOverflow(): void;
@@ -1948,24 +1960,12 @@ declare class Graphics2D extends Node2D {
1948
1960
  drawEllipse(x: number, y: number, width: number, height: number): this;
1949
1961
  }
1950
1962
 
1951
- interface ImageFrame {
1952
- texture: Texture2D;
1953
- duration: number;
1954
- }
1955
- declare class Image2DResource extends Resource {
1956
- frames: ImageFrame[];
1957
- duration: number;
1958
- constructor(source: Texture2D | ImageFrame[]);
1959
- updateDuration(): this;
1960
- destroy(): void;
1961
- }
1962
-
1963
1963
  interface Image2DProperties extends Node2DProperties {
1964
1964
  src: string;
1965
1965
  gif: boolean;
1966
1966
  }
1967
1967
  declare class Image2D extends Node2D {
1968
- resource?: Image2DResource;
1968
+ resource?: AnimatedTexture;
1969
1969
  gif: boolean;
1970
1970
  src: string;
1971
1971
  get currentTexture(): Texture2D | undefined;
@@ -1979,7 +1979,7 @@ declare class Image2D extends Node2D {
1979
1979
  constructor(properties?: Partial<Image2DProperties>, children?: Node[]);
1980
1980
  protected _updateProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
1981
1981
  decode(): Promise<void>;
1982
- setResource(source: Texture2D | ImageFrame[] | Image2DResource): this;
1982
+ setResource(source: Texture2D | ImageFrame[] | AnimatedTexture): this;
1983
1983
  protected _load(src: string): Promise<void>;
1984
1984
  protected _getFrameCurrentTime(): number;
1985
1985
  protected _updateFrameIndex(): this;
@@ -2041,6 +2041,16 @@ declare class Text2D extends TextureRect2D<CanvasTexture> {
2041
2041
  protected _drawContent(): void;
2042
2042
  }
2043
2043
 
2044
+ interface TransformRect2DProperties extends Node2DProperties {
2045
+ }
2046
+ declare class TransformRect2D extends Node2D implements Rectangulable {
2047
+ size: number;
2048
+ protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
2049
+ protected _drawCircle(x: number, y: number): void;
2050
+ protected _drawEllipse(x: number, y: number): void;
2051
+ protected _draw(): void;
2052
+ }
2053
+
2044
2054
  interface Video2DProperties extends TextureRect2DProperties {
2045
2055
  src: string;
2046
2056
  }
@@ -2925,12 +2935,12 @@ declare class TwistTransition extends Transition {
2925
2935
  apply(renderer: WebGLRenderer, source: Viewport): void;
2926
2936
  }
2927
2937
 
2928
- declare class GifLoader extends Loader {
2929
- load: (url: string) => Promise<Image2DResource>;
2938
+ declare class GIFLoader extends Loader {
2939
+ load: (url: string) => Promise<AnimatedTexture>;
2930
2940
  install(assets: Assets): this;
2931
2941
  }
2932
2942
 
2933
- declare class JsonLoader extends Loader {
2943
+ declare class JSONLoader extends Loader {
2934
2944
  load: (url: string) => Promise<Record<string, any>>;
2935
2945
  install(assets: Assets): this;
2936
2946
  }
@@ -2958,8 +2968,8 @@ declare class VideoLoader extends Loader {
2958
2968
  type AssetHandler = (url: string, options?: any) => any | Promise<any>;
2959
2969
  interface Assets {
2960
2970
  font: FontLoader;
2961
- gif: GifLoader;
2962
- json: JsonLoader;
2971
+ gif: GIFLoader;
2972
+ json: JSONLoader;
2963
2973
  lottie: LottieLoader;
2964
2974
  text: TextLoader;
2965
2975
  texture: TextureLoader;
@@ -2987,27 +2997,29 @@ declare class Assets {
2987
2997
  declare const assets: Assets;
2988
2998
 
2989
2999
  declare class CanvasItemEditor extends Control {
2990
- hover: Node2D;
2991
- selectionRect: Node2D;
2992
- selector: Node2D;
2993
- scaler: Scaler;
2994
- xScrollBar: XScrollBar;
2995
- yScrollBar: YScrollBar;
2996
- drawboard: Node2D;
2997
- ruler: Ruler;
2998
3000
  protected _pointerStart?: CanvasItemStyle;
2999
3001
  protected _pointerOffset?: {
3000
3002
  x: number;
3001
3003
  y: number;
3002
3004
  };
3003
3005
  selected?: CanvasItem;
3006
+ dragging?: CanvasItem;
3007
+ hovered?: CanvasItem;
3008
+ hover: Node2D;
3009
+ transformRect: TransformRect2D;
3010
+ scaler: Scaler;
3011
+ xScrollBar: XScrollBar;
3012
+ yScrollBar: YScrollBar;
3013
+ drawboard: Node2D;
3014
+ ruler: Ruler;
3004
3015
  constructor();
3005
3016
  protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
3006
3017
  protected _guiInput(event: InputEvent, key: InputEventKey): void;
3007
3018
  protected _onPointerdown(e: PointerInputEvent): void;
3008
3019
  protected _onPointermove(e: PointerInputEvent): void;
3009
3020
  protected _onPointerup(): void;
3010
- protected _onHover(): void;
3021
+ protected _updateHover(): void;
3022
+ protected _updateSelectionRect(): void;
3011
3023
  protected _updateScrollbars(): void;
3012
3024
  }
3013
3025
 
@@ -3079,4 +3091,4 @@ interface RenderOptions {
3079
3091
  }
3080
3092
  declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
3081
3093
 
3082
- export { Animation, type AnimationEffectMode, type AnimationProperties, type AssetHandler, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, type AudioWaveformProperties, type Batchable2D, BlurEffect, type CanvasBatchable, CanvasContext, CanvasItem, CanvasItemEditor, type CanvasItemEventMap, type CanvasItemProperties, CanvasItemStyle, type CanvasItemStyleFilter, type CanvasItemStyleFilterKey, type CanvasItemStyleProperties, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, type ColorFilterEffectProperties, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, type ColorValue, Control, type ControlEventMap, type ControlProperties, CoreObject, type CoreObjectEventMap, type CssFunction, type CssFunctionArg, type Cursor, DEG_TO_RAD, DEVICE_PIXEL_RATIO, type Easing, Effect, type EffectContext, EffectMaterial, type EffectMode, type EffectProperties, Element$1 as Element, type ElementProperties, ElementStyle, type ElementStyleFilter, type ElementStyleFilterKey, type ElementStyleProperties, 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, type IDOCLayoutStyleDeclaration, IN_BROWSER, type IPlayOptions, Image2D, type Image2DProperties, Image2DResource, type ImageFrame, ImageTexture, type ImageTextureOptions, IndexBuffer, type IndexBufferOptions, Input, InputEvent, type InputEventKey, type InputEventMap, type InternalMode, JsonLoader, KawaseTransition, type Keyframe, LeftEraseTransition, Loader, Lottie2D, type Lottie2DProperties, LottieLoader, MainLoop, type MainLoopEventMap, type MaskColor, type MaskData, MaskEffect, type MaskEffectProperties, type MaskObject, type MaskRect, type Maskable, Material, type MaterialOptions, Matrix, Matrix2, Matrix3, Matrix4, type MatrixLike, type MatrixOperateOutput, MouseInputEvent, Node, Node2D, type Node2DProperties, type NodeEventMap, type NodeProperties, type NormalizedKeyframe, PI, PI_2, PixelateEffect, PixelsTexture, type PlatformAudio, type PlatformSound, type PointerEvents$1 as PointerEvents, PointerInputEvent, type ProcessMode, Projection2D, type PropertyDeclaration, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, type RangeProperties, RawWeakMap, Rect2, RefCounted, type RefCountedEventMap, type RenderMode, type RenderOptions, type Renderable, Renderer, Resource, type ResourceEventMap, Ruler, type RulerProperties, 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, type ScalerEventMap, type ScalerProperties, SceneTree, type SceneTreeEventMap, ScrollBar, type ScrollBarProperties, ShadowEffect, type StrokedGraphics, Text2D, type Text2DProperties, TextLoader, Texture2D, type Texture2DFilterMode, type Texture2DPixelsSource, type Texture2DSource, type Texture2DWrapMode, TextureLoader, TextureRect2D, type TextureRect2DProperties, Ticker, TiltShiftTransition, Timeline, type TimelineEventMap, TimelineNode, type TimelineNodeEventMap, type TimelineNodeProperties, type TimelineProperties, type TimingFunctions, Transform2D, type Transform2DObject, Transition, type TransitionProperties, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, type VectorLike, type VectorOperateOutput, VertexAttribute, type VertexAttributeOptions, VertexBuffer, type VertexBufferOptions, Video2D, type Video2DProperties, VideoLoader, VideoTexture, type VideoTextureOptions, type VideoTextureSource, Viewport, type ViewportEventMap, 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, XScrollBar, type XScrollBarProperties, YScrollBar, type YScrollBarProperties, ZoomBlurEffect, assets, clamp, createHTMLCanvas, createNode, crossOrigin, cubicBezier, 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, timingFunctions, uid };
3094
+ export { AnimatedTexture, Animation, type AnimationEffectMode, type AnimationProperties, type AssetHandler, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, type AudioWaveformProperties, type Batchable2D, BlurEffect, type CanvasBatchable, CanvasContext, CanvasItem, CanvasItemEditor, type CanvasItemEventMap, type CanvasItemProperties, CanvasItemStyle, type CanvasItemStyleFilter, type CanvasItemStyleFilterKey, type CanvasItemStyleProperties, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, type ColorFilterEffectProperties, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, type ColorValue, Control, type ControlEventMap, type ControlProperties, CoreObject, type CoreObjectEventMap, type CssFunction, type CssFunctionArg, type Cursor, DEG_TO_RAD, DEVICE_PIXEL_RATIO, type Easing, Effect, type EffectContext, EffectMaterial, type EffectMode, type EffectProperties, Element$1 as Element, type ElementProperties, ElementStyle, type ElementStyleFilter, type ElementStyleFilterKey, type ElementStyleProperties, EmbossEffect, Engine, type EngineOptions, EventEmitter, type EventListener, type EventListenerOptions, type EventListenerValue, type FilledGraphics, FontLoader, GIFLoader, Geometry, type GeometryOptions, GlitchEffect, GodrayEffect, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, type IAudioContext, type IAudioNode, type IDOCLayoutStyleDeclaration, IN_BROWSER, type IPlayOptions, Image2D, type Image2DProperties, type ImageFrame, ImageTexture, type ImageTextureOptions, IndexBuffer, type IndexBufferOptions, Input, InputEvent, type InputEventKey, type InputEventMap, type InternalMode, JSONLoader, KawaseTransition, type Keyframe, LeftEraseTransition, Loader, Lottie2D, type Lottie2DProperties, LottieLoader, MainLoop, type MainLoopEventMap, type MaskColor, type MaskData, MaskEffect, type MaskEffectProperties, type MaskObject, type MaskRect, type Maskable, Material, type MaterialOptions, Matrix, Matrix2, Matrix3, Matrix4, type MatrixLike, type MatrixOperateOutput, MouseInputEvent, Node, Node2D, type Node2DProperties, type NodeEventMap, type NodeProperties, type NormalizedKeyframe, PI, PI_2, PixelateEffect, PixelsTexture, type PlatformAudio, type PlatformSound, type PointerEvents$1 as PointerEvents, PointerInputEvent, type ProcessMode, Projection2D, type PropertyDeclaration, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, type RangeProperties, RawWeakMap, Rect2, RefCounted, type RefCountedEventMap, type RenderMode, type RenderOptions, type Renderable, Renderer, Resource, type ResourceEventMap, Ruler, type RulerProperties, 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, type ScalerEventMap, type ScalerProperties, SceneTree, type SceneTreeEventMap, ScrollBar, type ScrollBarProperties, ShadowEffect, type StrokedGraphics, Text2D, type Text2DProperties, TextLoader, Texture2D, type Texture2DFilterMode, type Texture2DPixelsSource, type Texture2DSource, type Texture2DWrapMode, TextureLoader, TextureRect2D, type TextureRect2DProperties, Ticker, TiltShiftTransition, Timeline, type TimelineEventMap, TimelineNode, type TimelineNodeEventMap, type TimelineNodeProperties, type TimelineProperties, type TimingFunctions, Transform2D, type Transform2DObject, TransformRect2D, type TransformRect2DProperties, Transition, type TransitionProperties, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, type VectorLike, type VectorOperateOutput, VertexAttribute, type VertexAttributeOptions, VertexBuffer, type VertexBufferOptions, Video2D, type Video2DProperties, VideoLoader, VideoTexture, type VideoTextureOptions, type VideoTextureSource, Viewport, type ViewportEventMap, 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, XScrollBar, type XScrollBarProperties, YScrollBar, type YScrollBarProperties, ZoomBlurEffect, assets, clamp, createHTMLCanvas, createNode, crossOrigin, cubicBezier, 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, timingFunctions, uid };