stage-js 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stage.d.ts CHANGED
@@ -205,11 +205,11 @@ export interface SetPinType {
205
205
  skewX?: number;
206
206
  skewY?: number;
207
207
  rotation?: number;
208
- /** Center of scale/skew/rotate */
208
+ /** Center of scale/skew/rotate, 0 is start, 1 is end */
209
209
  pivot?: number;
210
- /** Center of scale/skew/rotate */
210
+ /** Center of scale/skew/rotate, 0 is start, 1 is end */
211
211
  pivotX?: number;
212
- /** Center of scale/skew/rotate */
212
+ /** Center of scale/skew/rotate, 0 is start, 1 is end */
213
213
  pivotY?: number;
214
214
  /** Offset in parent coordination */
215
215
  offset?: number;
@@ -217,17 +217,17 @@ export interface SetPinType {
217
217
  offsetX?: number;
218
218
  /** Offset in parent coordination */
219
219
  offsetY?: number;
220
- /** A point on parent where this component is offset from, 0 is top/left, 1 is bottom/right */
220
+ /** A point on parent where this component is offset from, 0 is start, 1 is end */
221
221
  align?: number;
222
- /** A point on parent where this component is offset from, 0 is top/left, 1 is bottom/right */
222
+ /** A point on parent where this component is offset from, 0 is start, 1 is end */
223
223
  alignX?: number;
224
- /** A point on parent where this component is offset from, 0 is top/left, 1 is bottom/right */
224
+ /** A point on parent where this component is offset from, 0 is start, 1 is end */
225
225
  alignY?: number;
226
- /** A point on this component which is offset from parent, 0 is top/left, 1 is bottom/right */
226
+ /** A point on this component which is offset from parent, 0 is start, 1 is end */
227
227
  handle?: number;
228
- /** A point on this component which is offset from parent, 0 is top/left, 1 is bottom/right */
228
+ /** A point on this component which is offset from parent, 0 is start, 1 is end */
229
229
  handleX?: number;
230
- /** A point on this component which is offset from parent, 0 is top/left, 1 is bottom/right */
230
+ /** A point on this component which is offset from parent, 0 is start, 1 is end */
231
231
  handleY?: number;
232
232
  /** @hidden @deprecated Use component.fit() */
233
233
  resizeMode?: FitMode;
@@ -333,13 +333,23 @@ export declare function minimize(): Component;
333
333
  export declare function maximize(): Component;
334
334
  export declare class Component {
335
335
  MAX_ELAPSE: number;
336
+ /** @hidden Set to true to enable debug rendering */
337
+ _debug: boolean;
336
338
  constructor();
337
339
  matrix(relative?: boolean): Matrix;
338
- /** @hidden @deprecated */
340
+ /** @hidden @deprecated Use getLogicalPixelRatio */
339
341
  getPixelRatio(): number;
340
- /** @hidden This is not accurate before first tick */
342
+ /**
343
+ * @hidden
344
+ * Physical-pixel per unit of parent component.
345
+ * This is not accurate before first tick.
346
+ */
341
347
  getDevicePixelRatio(): number;
342
- /** @hidden This is not accurate before first tick */
348
+ /**
349
+ * @hidden
350
+ * Logical-pixel per unit of parent component.
351
+ * This is not accurate before first tick.
352
+ */
343
353
  getLogicalPixelRatio(): number;
344
354
  pin(key: GetPinKeys): any;
345
355
  pin(key: SetPinKeys, value: any): this;
@@ -442,6 +452,7 @@ export declare class Component {
442
452
  * Set cell spacing for row and column layout.
443
453
  */
444
454
  spacing(space: number): this;
455
+ renderDebug(ctx: CanvasRenderingContext2D, xf: Matrix): void;
445
456
  }
446
457
  export declare function sprite(frame?: TextureSelectionInput): Sprite;
447
458
  export declare class Sprite extends Component {
@@ -519,6 +530,11 @@ export declare const POINTER_CANCEL = "touchcancel mousecancel";
519
530
  export declare const POINTER_START = "touchstart mousedown";
520
531
  /** @hidden @deprecated */
521
532
  export declare const POINTER_END = "touchend mouseup";
533
+ interface PointerEvent$1 {
534
+ x: number;
535
+ y: number;
536
+ raw: UIEvent;
537
+ }
522
538
  export declare function pause(): void;
523
539
  export declare function resume(): void;
524
540
  export declare function mount(configs?: RootConfig): Root;
@@ -552,9 +568,8 @@ export declare class Root extends Component {
552
568
  sleep: boolean;
553
569
  constructor();
554
570
  mount: (configs?: RootConfig) => void;
555
- /** @hidden */
556
- debugDrawAxis: number;
557
- private renderDebug;
571
+ resizeCanvas(): void;
572
+ renderDebug(ctx: CanvasRenderingContext2D, m: Matrix): void;
558
573
  resume(): this;
559
574
  pause(): this;
560
575
  unmount(): this;
@@ -573,6 +588,7 @@ export declare class Root extends Component {
573
588
  */
574
589
  viewbox(viewbox: Viewbox): this;
575
590
  viewbox(width?: number, height?: number, mode?: FitMode): this;
591
+ /** @hidden */
576
592
  camera(matrix: Matrix): this;
577
593
  /** @hidden */
578
594
  flipX(x: boolean): this;
@@ -611,6 +627,7 @@ export declare class Monotype extends Component {
611
627
  export {
612
628
  Component as Node,
613
629
  Monotype as Str,
630
+ PointerEvent$1 as PointerEvent,
614
631
  Sprite as Image,
615
632
  monotype as string,
616
633
  sprite as image,