modern-canvas 0.7.13 → 0.7.14

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.cjs CHANGED
@@ -1763,7 +1763,17 @@ class Matrix3 extends Matrix {
1763
1763
  const t13 = n23 * n12 - n22 * n13;
1764
1764
  const det = n11 * t11 + n21 * t12 + n31 * t13;
1765
1765
  if (det === 0) {
1766
- return this.set([0, 0, 0, 0, 0, 0, 0, 0, 0]);
1766
+ return this.set([
1767
+ 0,
1768
+ 0,
1769
+ 0,
1770
+ 0,
1771
+ 0,
1772
+ 0,
1773
+ 0,
1774
+ 0,
1775
+ 0
1776
+ ]);
1767
1777
  }
1768
1778
  const detInv = 1 / det;
1769
1779
  return this.set([
@@ -1956,8 +1966,8 @@ class Rect2 {
1956
1966
  position.set(arg.position);
1957
1967
  size.set(arg.size);
1958
1968
  } else {
1959
- const xx = arg.map((p) => p[0]);
1960
- const yy = arg.map((p) => p[1]);
1969
+ const xx = arg.map((p) => p.x);
1970
+ const yy = arg.map((p) => p.y);
1961
1971
  const minX = Math.min(...xx);
1962
1972
  const maxX = Math.max(...xx);
1963
1973
  const minY = Math.min(...yy);
@@ -2155,13 +2165,6 @@ class Transform2D extends Matrix3 {
2155
2165
  ]);
2156
2166
  return this;
2157
2167
  }
2158
- applyToPoint(x, y) {
2159
- const { a, c, tx, b, d, ty } = this.toObject();
2160
- return [
2161
- a * x + c * y + tx,
2162
- b * x + d * y + ty
2163
- ];
2164
- }
2165
2168
  decompose(pivot = { x: 0, y: 0 }, output = {
2166
2169
  position: { x: 0, y: 0 },
2167
2170
  scale: { x: 0, y: 0 },
@@ -2186,9 +2189,28 @@ class Transform2D extends Matrix3 {
2186
2189
  output.position.y = ty + (pivot.x * b + pivot.y * d);
2187
2190
  return output;
2188
2191
  }
2192
+ apply(pos, newPos) {
2193
+ newPos = newPos || new Vector2();
2194
+ const { a, c, tx, b, d, ty } = this.toObject();
2195
+ const x = pos.x;
2196
+ const y = pos.y;
2197
+ newPos.x = a * x + c * y + tx;
2198
+ newPos.y = b * x + d * y + ty;
2199
+ return newPos;
2200
+ }
2189
2201
  inverse() {
2190
2202
  return this.clone().invert();
2191
2203
  }
2204
+ applyInverse(pos, newPos) {
2205
+ newPos = newPos || new Vector2();
2206
+ const { a, b, c, d, tx, ty } = this.toObject();
2207
+ const id = 1 / (a * d + c * -b);
2208
+ const x = pos.x;
2209
+ const y = pos.y;
2210
+ newPos.x = d * id * x + -c * id * y + (ty * c - tx * d) * id;
2211
+ newPos.y = a * id * y + -b * id * x + (-ty * a + tx * b) * id;
2212
+ return newPos;
2213
+ }
2192
2214
  isIdentity() {
2193
2215
  const { a, b, c, d, tx, ty } = this.toObject();
2194
2216
  return a === 1 && b === 0 && c === 0 && d === 1 && tx === 0 && ty === 0;
@@ -5636,7 +5658,7 @@ class CanvasContext extends modernPath2d.Path2D {
5636
5658
  }
5637
5659
  buildUvs(start, vertices, uvs, texture, uvTransform) {
5638
5660
  if (texture) {
5639
- const _uvTransform = uvTransform ? typeof uvTransform === "function" ? uvTransform : (x, y) => uvTransform.applyToPoint(x, y) : uvTransform;
5661
+ const _uvTransform = uvTransform ? typeof uvTransform === "function" ? uvTransform : (x, y) => uvTransform.apply({ x, y }).toArray() : uvTransform;
5640
5662
  const w = texture.width;
5641
5663
  const h = texture.height;
5642
5664
  for (let len = vertices.length, i = start; i < len; i += 2) {
@@ -6543,7 +6565,7 @@ exports.Viewport = class Viewport extends exports.Node {
6543
6565
  this.projection.flipY(flipY);
6544
6566
  }
6545
6567
  projection = new Projection2D();
6546
- canvasTransform = new Transform2D();
6568
+ worldTransform = new Transform2D();
6547
6569
  _framebufferIndex = 0;
6548
6570
  _framebuffers = [
6549
6571
  { texture: new ViewportTexture(), needsUpload: false },
@@ -6658,7 +6680,7 @@ exports.Viewport = class Viewport extends exports.Node {
6658
6680
  render(renderer, next) {
6659
6681
  const oldViewport = this._tree?.getCurrentViewport();
6660
6682
  renderer.program.uniforms.projectionMatrix = this.projection.toArray(true);
6661
- renderer.program.uniforms.worldTransformMatrix = this.canvasTransform.toArray(true);
6683
+ renderer.program.uniforms.worldTransformMatrix = this.worldTransform.toArray(true);
6662
6684
  this.activate(renderer);
6663
6685
  renderer.clear();
6664
6686
  super.render(renderer, next);
@@ -6673,6 +6695,12 @@ exports.Viewport = class Viewport extends exports.Node {
6673
6695
  getRect() {
6674
6696
  return new Rect2(this.x, this.y, this.width, this.height);
6675
6697
  }
6698
+ toGlobal(worldPos, newPos) {
6699
+ return this.worldTransform.applyInverse(worldPos, newPos);
6700
+ }
6701
+ toWorld(globalPos, newPos) {
6702
+ return this.worldTransform.apply(globalPos, newPos);
6703
+ }
6676
6704
  };
6677
6705
  __decorateClass$P([
6678
6706
  modernIdoc.property({ fallback: 0 })
@@ -7285,6 +7313,12 @@ exports.Node2D = class Node2D extends exports.CanvasItem {
7285
7313
  this.requestRelayout();
7286
7314
  }
7287
7315
  }
7316
+ toLocal(globalPos, newPos) {
7317
+ return this.globalTransform.applyInverse(globalPos, newPos);
7318
+ }
7319
+ toGlobal(localPos, newPos) {
7320
+ return this.globalTransform.apply(localPos, newPos);
7321
+ }
7288
7322
  };
7289
7323
  __decorateClass$J([
7290
7324
  modernIdoc.property({ protected: true, fallback: 0 })
@@ -7307,7 +7341,7 @@ var __decorateClass$I = (decorators, target, key, kind) => {
7307
7341
  return result;
7308
7342
  };
7309
7343
  exports.Camera2D = class Camera2D extends exports.Node2D {
7310
- zoom = new Vector2(1, 1).on("update", () => this.updateCanvasTransform());
7344
+ zoom = new Vector2(1, 1).on("update", () => this.updateWorldTransform());
7311
7345
  maxZoom = new Vector2(6, 6);
7312
7346
  minZoom = new Vector2(0.1, 0.1);
7313
7347
  _screenOffset = { x: 0, y: 0 };
@@ -7394,14 +7428,14 @@ exports.Camera2D = class Camera2D extends exports.Node2D {
7394
7428
  }
7395
7429
  updateTransform() {
7396
7430
  super.updateTransform();
7397
- this.updateCanvasTransform();
7431
+ this.updateWorldTransform();
7398
7432
  }
7399
- updateCanvasTransform() {
7433
+ updateWorldTransform() {
7400
7434
  const viewport = this.getViewport();
7401
7435
  if (!viewport)
7402
7436
  return;
7403
- viewport.canvasTransform.identity().scale(this.zoom.x, this.zoom.y).translate(this.position.x, this.position.y);
7404
- this.emit("updateCanvasTransform");
7437
+ viewport.worldTransform.identity().scale(this.zoom.x, this.zoom.y).translate(this.position.x, this.position.y);
7438
+ this.emit("updateWorldTransform");
7405
7439
  }
7406
7440
  };
7407
7441
  __decorateClass$I([
@@ -9763,7 +9797,10 @@ class BaseElement2DText extends CoreObject {
9763
9797
  break;
9764
9798
  }
9765
9799
  }
9766
- _updateText() {
9800
+ setContent(content) {
9801
+ this.content = modernIdoc.normalizeTextContent(content);
9802
+ }
9803
+ measure() {
9767
9804
  this.base.style = {
9768
9805
  justifyContent: "center",
9769
9806
  alignItems: "center",
@@ -9771,12 +9808,6 @@ class BaseElement2DText extends CoreObject {
9771
9808
  ...this.parent.style.toJSON()
9772
9809
  };
9773
9810
  this.base.requestUpdate();
9774
- }
9775
- setContent(content) {
9776
- this.content = modernIdoc.normalizeTextContent(content);
9777
- }
9778
- measure() {
9779
- this._updateText();
9780
9811
  return this.base.measure();
9781
9812
  }
9782
9813
  updateMeasure() {
@@ -10028,37 +10059,35 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
10028
10059
  const x2 = x1 + width;
10029
10060
  const y2 = y1 + height;
10030
10061
  return [
10031
- [x1, y1],
10032
- [x1, y2],
10033
- [x2, y1],
10034
- [x2, y2]
10062
+ { x: x1, y: y1 },
10063
+ { x: x1, y: y2 },
10064
+ { x: x2, y: y1 },
10065
+ { x: x2, y: y2 }
10035
10066
  ];
10036
10067
  }
10037
10068
  getAabb() {
10038
10069
  return new Rect2(
10039
10070
  this._getPointArray().map((p) => {
10040
- return this.transform.applyToPoint(p[0], p[1]);
10071
+ return this.transform.apply(p);
10041
10072
  })
10042
10073
  );
10043
10074
  }
10044
10075
  getGlobalAabb() {
10045
10076
  return new Rect2(
10046
10077
  this._getPointArray().map((p) => {
10047
- return this.globalTransform.applyToPoint(p[0], p[1]);
10078
+ return this.globalTransform.apply(p);
10048
10079
  })
10049
10080
  );
10050
10081
  }
10051
10082
  getObb() {
10052
10083
  const origin = this.getTransformOrigin();
10053
- const _origin = this.transform.applyToPoint(origin.x, origin.y);
10054
- const offset = [_origin[0] - origin.x, _origin[1] - origin.y];
10084
+ const _origin = this.transform.apply(origin).sub(origin);
10055
10085
  return {
10056
10086
  rect: new Rect2(
10057
10087
  this._getPointArray().map((p) => {
10058
- return [
10059
- p[0] + offset[0],
10060
- p[1] + offset[1]
10061
- ];
10088
+ p.x += _origin.x;
10089
+ p.y += _origin.y;
10090
+ return p;
10062
10091
  })
10063
10092
  ),
10064
10093
  rotation: this.rotation
@@ -10066,15 +10095,13 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
10066
10095
  }
10067
10096
  getGlobalObb() {
10068
10097
  const origin = this.getTransformOrigin();
10069
- const _origin = this.globalTransform.applyToPoint(origin.x, origin.y);
10070
- const offset = [_origin[0] - origin.x, _origin[1] - origin.y];
10098
+ const _origin = this.globalTransform.apply(origin).sub(origin);
10071
10099
  return {
10072
10100
  rect: new Rect2(
10073
10101
  this._getPointArray().map((p) => {
10074
- return [
10075
- p[0] + offset[0],
10076
- p[1] + offset[1]
10077
- ];
10102
+ p.x += _origin.x;
10103
+ p.y += _origin.y;
10104
+ return p;
10078
10105
  })
10079
10106
  ),
10080
10107
  rotation: this.globalRotation
@@ -10092,12 +10119,12 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
10092
10119
  // override isVisibleInTree(): boolean {
10093
10120
  // if (this._tree) {
10094
10121
  // const root = this._tree.root
10095
- // const camera = root.canvasTransform.inverse()
10122
+ // const camera = root.worldTransform.inverse()
10096
10123
  // const { x, y, width, height } = root
10097
- // const p1 = camera.applyToPoint(x, y)
10098
- // const p2 = camera.applyToPoint(x + width, y)
10099
- // const p3 = camera.applyToPoint(x + width, y + height)
10100
- // const p4 = camera.applyToPoint(x, y + height)
10124
+ // const p1 = camera.apply(x, y)
10125
+ // const p2 = camera.apply(x + width, y)
10126
+ // const p3 = camera.apply(x + width, y + height)
10127
+ // const p4 = camera.apply(x, y + height)
10101
10128
  // const pts = [p1, p2, p3, p4]
10102
10129
  // const xs = pts.map(p => p[0])
10103
10130
  // const ys = pts.map(p => p[1])
@@ -10187,9 +10214,9 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
10187
10214
  }
10188
10215
  }
10189
10216
  // eslint-disable-next-line unused-imports/no-unused-vars
10190
- _pointerInput(point, key) {
10217
+ _positionInput(localPos, key) {
10191
10218
  const { width, height } = this.size;
10192
- return point.x >= 0 && point.x < width && point.y >= 0 && point.y < height;
10219
+ return localPos.x >= 0 && localPos.x < width && localPos.y >= 0 && localPos.y < height;
10193
10220
  }
10194
10221
  _input(event, key) {
10195
10222
  switch (key) {
@@ -10197,14 +10224,15 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
10197
10224
  case "pointermove":
10198
10225
  case "pointerup": {
10199
10226
  if (this.canPointerEvents()) {
10200
- let { screenX, screenY } = event;
10227
+ const { screenX, screenY } = event;
10201
10228
  if (screenX && screenY) {
10229
+ const pos = new Vector2(screenX, screenY);
10202
10230
  const viewport = this.getViewport();
10203
10231
  if (viewport) {
10204
- [screenX, screenY] = viewport.canvasTransform.inverse().applyToPoint(screenX, screenY);
10232
+ viewport.toGlobal(pos, pos);
10205
10233
  }
10206
- [screenX, screenY] = this.globalTransform.inverse().applyToPoint(screenX, screenY);
10207
- if (this._pointerInput({ x: screenX, y: screenY }, key)) {
10234
+ this.toLocal(pos, pos);
10235
+ if (this._positionInput(pos, key)) {
10208
10236
  if (!event.target) {
10209
10237
  event.target = this;
10210
10238
  }
package/dist/index.d.cts CHANGED
@@ -460,6 +460,10 @@ declare class Projection2D extends Matrix3 {
460
460
  protected _performUpdateArray(): void;
461
461
  }
462
462
 
463
+ interface Vector2Data {
464
+ x: number;
465
+ y: number;
466
+ }
463
467
  /**
464
468
  * Vector2
465
469
  */
@@ -480,7 +484,7 @@ declare class Vector2 extends Vector {
480
484
  update(x: number, y: number): this;
481
485
  getLength(): number;
482
486
  getAngle(): number;
483
- distanceTo(point: Vector2): number;
487
+ distanceTo(point: Vector2Data): number;
484
488
  normalize(): this;
485
489
  static lerp(a: VectorLike, b: VectorLike, t: number): Vector2;
486
490
  }
@@ -498,8 +502,8 @@ declare class Rect2 {
498
502
  readonly position: Vector2;
499
503
  readonly size: Vector2;
500
504
  constructor(from: Rect2);
501
- constructor(pointArray: [number, number][]);
502
- constructor(position: Vector2, size: Vector2);
505
+ constructor(pointArray: Vector2Data[]);
506
+ constructor(position: Vector2Data, size: Vector2Data);
503
507
  constructor(x: number, y: number, width: number, height: number);
504
508
  update(): this;
505
509
  toMinmax(): {
@@ -574,12 +578,13 @@ declare class Transform2D extends Matrix3 {
574
578
  protected _rotateToScale(rad: number): number;
575
579
  protected _rotate3d(x: number, y: number, z: number, rad: number): number[];
576
580
  makeRotation(theta: number): this;
577
- applyToPoint(x: number, y: number): [number, number];
578
581
  decompose(pivot?: {
579
582
  x: number;
580
583
  y: number;
581
584
  }, output?: TransformableObject): TransformableObject;
585
+ apply<P extends Vector2Data = Vector2>(pos: Vector2Data, newPos?: P): P;
582
586
  inverse(): this;
587
+ applyInverse<P extends Vector2Data = Vector2>(pos: Vector2Data, newPos?: P): P;
583
588
  isIdentity(): boolean;
584
589
  toObject(): TransformObject;
585
590
  }
@@ -1457,7 +1462,7 @@ declare class VideoTexture extends Texture2D<HTMLVideoElement> {
1457
1462
  declare class ViewportTexture extends PixelsTexture {
1458
1463
  }
1459
1464
 
1460
- type UVTransform = Transform2D | ((x: number, y: number) => [number, number]);
1465
+ type UvTransform = Transform2D | ((x: number, y: number) => [number, number]);
1461
1466
  type VertTransform = Transform2D | (() => Transform2D);
1462
1467
  interface CanvasBatchable extends Batchable2D {
1463
1468
  type: 'stroke' | 'fill';
@@ -1468,12 +1473,12 @@ interface StrokeDraw extends Partial<CanvasBatchable> {
1468
1473
  type: 'stroke';
1469
1474
  path: Path2D;
1470
1475
  style: LineStyle;
1471
- uvTransform?: UVTransform;
1476
+ uvTransform?: UvTransform;
1472
1477
  }
1473
1478
  interface FillDraw extends Partial<CanvasBatchable> {
1474
1479
  type: 'fill';
1475
1480
  path: Path2D;
1476
- uvTransform?: UVTransform;
1481
+ uvTransform?: UvTransform;
1477
1482
  }
1478
1483
  declare class CanvasContext extends Path2D {
1479
1484
  fillStyle?: Color$1 | Texture2D;
@@ -1483,7 +1488,7 @@ declare class CanvasContext extends Path2D {
1483
1488
  lineJoin?: LineJoin;
1484
1489
  lineWidth?: number;
1485
1490
  miterLimit?: number;
1486
- uvTransform?: UVTransform;
1491
+ uvTransform?: UvTransform;
1487
1492
  vertTransform?: VertTransform;
1488
1493
  protected _defaultStyle: Texture2D<Texture2DSource>;
1489
1494
  protected _draws: (StrokeDraw | FillDraw)[];
@@ -1495,7 +1500,7 @@ declare class CanvasContext extends Path2D {
1495
1500
  copy(source: CanvasContext): this;
1496
1501
  resetStatus(): void;
1497
1502
  reset(): this;
1498
- buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D, uvTransform?: UVTransform): void;
1503
+ buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D, uvTransform?: UvTransform): void;
1499
1504
  toBatchables(): CanvasBatchable[];
1500
1505
  }
1501
1506
 
@@ -1527,7 +1532,7 @@ interface Viewport {
1527
1532
  declare class Viewport extends Node implements Rectangulable {
1528
1533
  flipY: boolean;
1529
1534
  readonly projection: Projection2D;
1530
- readonly canvasTransform: Transform2D;
1535
+ readonly worldTransform: Transform2D;
1531
1536
  protected _framebufferIndex: number;
1532
1537
  protected _framebuffers: ViewportFramebuffer[];
1533
1538
  x: number;
@@ -1552,6 +1557,8 @@ declare class Viewport extends Node implements Rectangulable {
1552
1557
  activateWithCopy(renderer: WebGLRenderer, target: Viewport): void;
1553
1558
  render(renderer: WebGLRenderer, next?: () => void): void;
1554
1559
  getRect(): Rect2;
1560
+ toGlobal<P extends Vector2Data = Vector2>(worldPos: Vector2Data, newPos?: P): P;
1561
+ toWorld<P extends Vector2Data = Vector2>(globalPos: Vector2Data, newPos?: P): P;
1555
1562
  }
1556
1563
 
1557
1564
  interface RenderCall {
@@ -1947,12 +1954,14 @@ declare class Node2D extends CanvasItem {
1947
1954
  protected _transformVertices(vertices: Float32Array, vertTransform?: VertTransform): Float32Array;
1948
1955
  protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
1949
1956
  protected _process(delta: number): void;
1957
+ toLocal<P extends Vector2Data = Vector2>(globalPos: Vector2Data, newPos?: P): P;
1958
+ toGlobal<P extends Vector2Data = Vector2>(localPos: Vector2Data, newPos?: P): P;
1950
1959
  }
1951
1960
 
1952
1961
  interface Camera2DProperties extends Node2DProperties {
1953
1962
  }
1954
1963
  interface Camera2DEventMap extends Node2DEventMap {
1955
- updateCanvasTransform: () => void;
1964
+ updateWorldTransform: () => void;
1956
1965
  }
1957
1966
  interface Camera2D {
1958
1967
  on: (<K extends keyof Camera2DEventMap>(type: K, listener: Camera2DEventMap[K], options?: EventListenerOptions) => this) & ((type: string, listener: EventListenerValue, options?: EventListenerOptions) => this);
@@ -1976,7 +1985,7 @@ declare class Camera2D extends Node2D {
1976
1985
  protected _input(event: InputEvent, key: InputEventKey): void;
1977
1986
  protected _onWheel(e: WheelInputEvent): void;
1978
1987
  updateTransform(): void;
1979
- updateCanvasTransform(): void;
1988
+ updateWorldTransform(): void;
1980
1989
  }
1981
1990
 
1982
1991
  interface BaseElement2DFill extends NormalizedFill {
@@ -2088,7 +2097,6 @@ declare class BaseElement2DText extends CoreObject {
2088
2097
  constructor(parent: BaseElement2D);
2089
2098
  setProperties(properties?: Text$1): this;
2090
2099
  protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
2091
- protected _updateText(): void;
2092
2100
  setContent(content: TextContent): void;
2093
2101
  measure(): MeasureResult;
2094
2102
  updateMeasure(): this;
@@ -2151,7 +2159,7 @@ declare class BaseElement2D extends Node2D implements Rectangulable {
2151
2159
  getTransform(cb?: (transform: Transform2D) => void): Transform2D;
2152
2160
  updateGlobalTransform(): void;
2153
2161
  getRect(): Rect2;
2154
- protected _getPointArray(): [number, number][];
2162
+ protected _getPointArray(): Vector2Data[];
2155
2163
  getAabb(): Rect2;
2156
2164
  getGlobalAabb(): Rect2;
2157
2165
  getObb(): {
@@ -2168,10 +2176,7 @@ declare class BaseElement2D extends Node2D implements Rectangulable {
2168
2176
  protected _repaint(batchables: CanvasBatchable[]): CanvasBatchable[];
2169
2177
  canPointerEvents(): boolean;
2170
2178
  input(event: InputEvent, key: InputEventKey): void;
2171
- protected _pointerInput(point: {
2172
- x: number;
2173
- y: number;
2174
- }, key: InputEventKey): boolean;
2179
+ protected _positionInput(localPos: Vector2Data, key: InputEventKey): boolean;
2175
2180
  protected _input(event: InputEvent, key: InputEventKey): void;
2176
2181
  toJSON(): Record<string, any>;
2177
2182
  }
@@ -3306,4 +3311,4 @@ interface RenderOptions {
3306
3311
  declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
3307
3312
 
3308
3313
  export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, Camera2D, 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, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, KeyboardInputEvent, 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, 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, Window, 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, render, timingFunctions, uid };
3309
- export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEventMap, Camera2DProperties, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, CustomPropertyAccessor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, 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, Node2DEventMap, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, 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 };
3314
+ export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEventMap, Camera2DProperties, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, CustomPropertyAccessor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, 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, Node2DEventMap, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, UvTransform, Vector2Data, 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
@@ -460,6 +460,10 @@ declare class Projection2D extends Matrix3 {
460
460
  protected _performUpdateArray(): void;
461
461
  }
462
462
 
463
+ interface Vector2Data {
464
+ x: number;
465
+ y: number;
466
+ }
463
467
  /**
464
468
  * Vector2
465
469
  */
@@ -480,7 +484,7 @@ declare class Vector2 extends Vector {
480
484
  update(x: number, y: number): this;
481
485
  getLength(): number;
482
486
  getAngle(): number;
483
- distanceTo(point: Vector2): number;
487
+ distanceTo(point: Vector2Data): number;
484
488
  normalize(): this;
485
489
  static lerp(a: VectorLike, b: VectorLike, t: number): Vector2;
486
490
  }
@@ -498,8 +502,8 @@ declare class Rect2 {
498
502
  readonly position: Vector2;
499
503
  readonly size: Vector2;
500
504
  constructor(from: Rect2);
501
- constructor(pointArray: [number, number][]);
502
- constructor(position: Vector2, size: Vector2);
505
+ constructor(pointArray: Vector2Data[]);
506
+ constructor(position: Vector2Data, size: Vector2Data);
503
507
  constructor(x: number, y: number, width: number, height: number);
504
508
  update(): this;
505
509
  toMinmax(): {
@@ -574,12 +578,13 @@ declare class Transform2D extends Matrix3 {
574
578
  protected _rotateToScale(rad: number): number;
575
579
  protected _rotate3d(x: number, y: number, z: number, rad: number): number[];
576
580
  makeRotation(theta: number): this;
577
- applyToPoint(x: number, y: number): [number, number];
578
581
  decompose(pivot?: {
579
582
  x: number;
580
583
  y: number;
581
584
  }, output?: TransformableObject): TransformableObject;
585
+ apply<P extends Vector2Data = Vector2>(pos: Vector2Data, newPos?: P): P;
582
586
  inverse(): this;
587
+ applyInverse<P extends Vector2Data = Vector2>(pos: Vector2Data, newPos?: P): P;
583
588
  isIdentity(): boolean;
584
589
  toObject(): TransformObject;
585
590
  }
@@ -1457,7 +1462,7 @@ declare class VideoTexture extends Texture2D<HTMLVideoElement> {
1457
1462
  declare class ViewportTexture extends PixelsTexture {
1458
1463
  }
1459
1464
 
1460
- type UVTransform = Transform2D | ((x: number, y: number) => [number, number]);
1465
+ type UvTransform = Transform2D | ((x: number, y: number) => [number, number]);
1461
1466
  type VertTransform = Transform2D | (() => Transform2D);
1462
1467
  interface CanvasBatchable extends Batchable2D {
1463
1468
  type: 'stroke' | 'fill';
@@ -1468,12 +1473,12 @@ interface StrokeDraw extends Partial<CanvasBatchable> {
1468
1473
  type: 'stroke';
1469
1474
  path: Path2D;
1470
1475
  style: LineStyle;
1471
- uvTransform?: UVTransform;
1476
+ uvTransform?: UvTransform;
1472
1477
  }
1473
1478
  interface FillDraw extends Partial<CanvasBatchable> {
1474
1479
  type: 'fill';
1475
1480
  path: Path2D;
1476
- uvTransform?: UVTransform;
1481
+ uvTransform?: UvTransform;
1477
1482
  }
1478
1483
  declare class CanvasContext extends Path2D {
1479
1484
  fillStyle?: Color$1 | Texture2D;
@@ -1483,7 +1488,7 @@ declare class CanvasContext extends Path2D {
1483
1488
  lineJoin?: LineJoin;
1484
1489
  lineWidth?: number;
1485
1490
  miterLimit?: number;
1486
- uvTransform?: UVTransform;
1491
+ uvTransform?: UvTransform;
1487
1492
  vertTransform?: VertTransform;
1488
1493
  protected _defaultStyle: Texture2D<Texture2DSource>;
1489
1494
  protected _draws: (StrokeDraw | FillDraw)[];
@@ -1495,7 +1500,7 @@ declare class CanvasContext extends Path2D {
1495
1500
  copy(source: CanvasContext): this;
1496
1501
  resetStatus(): void;
1497
1502
  reset(): this;
1498
- buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D, uvTransform?: UVTransform): void;
1503
+ buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D, uvTransform?: UvTransform): void;
1499
1504
  toBatchables(): CanvasBatchable[];
1500
1505
  }
1501
1506
 
@@ -1527,7 +1532,7 @@ interface Viewport {
1527
1532
  declare class Viewport extends Node implements Rectangulable {
1528
1533
  flipY: boolean;
1529
1534
  readonly projection: Projection2D;
1530
- readonly canvasTransform: Transform2D;
1535
+ readonly worldTransform: Transform2D;
1531
1536
  protected _framebufferIndex: number;
1532
1537
  protected _framebuffers: ViewportFramebuffer[];
1533
1538
  x: number;
@@ -1552,6 +1557,8 @@ declare class Viewport extends Node implements Rectangulable {
1552
1557
  activateWithCopy(renderer: WebGLRenderer, target: Viewport): void;
1553
1558
  render(renderer: WebGLRenderer, next?: () => void): void;
1554
1559
  getRect(): Rect2;
1560
+ toGlobal<P extends Vector2Data = Vector2>(worldPos: Vector2Data, newPos?: P): P;
1561
+ toWorld<P extends Vector2Data = Vector2>(globalPos: Vector2Data, newPos?: P): P;
1555
1562
  }
1556
1563
 
1557
1564
  interface RenderCall {
@@ -1947,12 +1954,14 @@ declare class Node2D extends CanvasItem {
1947
1954
  protected _transformVertices(vertices: Float32Array, vertTransform?: VertTransform): Float32Array;
1948
1955
  protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
1949
1956
  protected _process(delta: number): void;
1957
+ toLocal<P extends Vector2Data = Vector2>(globalPos: Vector2Data, newPos?: P): P;
1958
+ toGlobal<P extends Vector2Data = Vector2>(localPos: Vector2Data, newPos?: P): P;
1950
1959
  }
1951
1960
 
1952
1961
  interface Camera2DProperties extends Node2DProperties {
1953
1962
  }
1954
1963
  interface Camera2DEventMap extends Node2DEventMap {
1955
- updateCanvasTransform: () => void;
1964
+ updateWorldTransform: () => void;
1956
1965
  }
1957
1966
  interface Camera2D {
1958
1967
  on: (<K extends keyof Camera2DEventMap>(type: K, listener: Camera2DEventMap[K], options?: EventListenerOptions) => this) & ((type: string, listener: EventListenerValue, options?: EventListenerOptions) => this);
@@ -1976,7 +1985,7 @@ declare class Camera2D extends Node2D {
1976
1985
  protected _input(event: InputEvent, key: InputEventKey): void;
1977
1986
  protected _onWheel(e: WheelInputEvent): void;
1978
1987
  updateTransform(): void;
1979
- updateCanvasTransform(): void;
1988
+ updateWorldTransform(): void;
1980
1989
  }
1981
1990
 
1982
1991
  interface BaseElement2DFill extends NormalizedFill {
@@ -2088,7 +2097,6 @@ declare class BaseElement2DText extends CoreObject {
2088
2097
  constructor(parent: BaseElement2D);
2089
2098
  setProperties(properties?: Text$1): this;
2090
2099
  protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
2091
- protected _updateText(): void;
2092
2100
  setContent(content: TextContent): void;
2093
2101
  measure(): MeasureResult;
2094
2102
  updateMeasure(): this;
@@ -2151,7 +2159,7 @@ declare class BaseElement2D extends Node2D implements Rectangulable {
2151
2159
  getTransform(cb?: (transform: Transform2D) => void): Transform2D;
2152
2160
  updateGlobalTransform(): void;
2153
2161
  getRect(): Rect2;
2154
- protected _getPointArray(): [number, number][];
2162
+ protected _getPointArray(): Vector2Data[];
2155
2163
  getAabb(): Rect2;
2156
2164
  getGlobalAabb(): Rect2;
2157
2165
  getObb(): {
@@ -2168,10 +2176,7 @@ declare class BaseElement2D extends Node2D implements Rectangulable {
2168
2176
  protected _repaint(batchables: CanvasBatchable[]): CanvasBatchable[];
2169
2177
  canPointerEvents(): boolean;
2170
2178
  input(event: InputEvent, key: InputEventKey): void;
2171
- protected _pointerInput(point: {
2172
- x: number;
2173
- y: number;
2174
- }, key: InputEventKey): boolean;
2179
+ protected _positionInput(localPos: Vector2Data, key: InputEventKey): boolean;
2175
2180
  protected _input(event: InputEvent, key: InputEventKey): void;
2176
2181
  toJSON(): Record<string, any>;
2177
2182
  }
@@ -3306,4 +3311,4 @@ interface RenderOptions {
3306
3311
  declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
3307
3312
 
3308
3313
  export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, Camera2D, 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, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, KeyboardInputEvent, 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, 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, Window, 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, render, timingFunctions, uid };
3309
- export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEventMap, Camera2DProperties, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, CustomPropertyAccessor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, 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, Node2DEventMap, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, 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 };
3314
+ export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEventMap, Camera2DProperties, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, CustomPropertyAccessor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, 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, Node2DEventMap, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, UvTransform, Vector2Data, 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 };