pixi-watchface-engine 0.1.0 → 0.1.1

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.
@@ -0,0 +1,39 @@
1
+ import { Viewport } from 'pixi-viewport';
2
+ import type { Plugin } from './Plugin.ts';
3
+ import type { WatchfaceEngine } from '../WatchfaceEngine.ts';
4
+ export interface ViewportPluginOptions {
5
+ /** World width — defaults to engine canvas width */
6
+ worldWidth?: number;
7
+ /** World height — defaults to engine canvas height */
8
+ worldHeight?: number;
9
+ /** Minimum scale (zoom out limit). Default: 0.1 */
10
+ minScale?: number;
11
+ /** Maximum scale (zoom in limit). Default: 10 */
12
+ maxScale?: number;
13
+ /** Enable drag panning. Default: true */
14
+ drag?: boolean;
15
+ /** Enable pinch-to-zoom. Default: true */
16
+ pinch?: boolean;
17
+ /** Enable mouse-wheel zoom. Default: true */
18
+ wheel?: boolean;
19
+ /** Enable deceleration after drag. Default: true */
20
+ decelerate?: boolean;
21
+ }
22
+ export declare class ViewportPlugin implements Plugin {
23
+ readonly name = "viewport";
24
+ private options;
25
+ private engine;
26
+ private _viewport;
27
+ constructor(options?: ViewportPluginOptions);
28
+ /** Direct access to the pixi-viewport Viewport instance */
29
+ get viewport(): Viewport;
30
+ get zoom(): number;
31
+ set zoom(value: number);
32
+ get drag(): boolean;
33
+ set drag(value: boolean);
34
+ get wheel(): boolean;
35
+ set wheel(value: boolean);
36
+ init(engine: WatchfaceEngine): void;
37
+ destroy(): void;
38
+ }
39
+ //# sourceMappingURL=ViewportPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewportPlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/ViewportPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,qBAAqB;IACpC,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0CAA0C;IAC1C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oDAAoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAaD,qBAAa,cAAe,YAAW,MAAM;IAC3C,QAAQ,CAAC,IAAI,cAAc;IAE3B,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,SAAS,CAAY;gBAEjB,OAAO,CAAC,EAAE,qBAAqB;IAI3C,2DAA2D;IAC3D,IAAI,QAAQ,IAAI,QAAQ,CAEvB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAKrB;IAED,IAAI,IAAI,IAAI,OAAO,CAA8B;IACjD,IAAI,IAAI,CAAC,KAAK,EAAE,OAAO,EAQtB;IAED,IAAI,KAAK,IAAI,OAAO,CAA+B;IACnD,IAAI,KAAK,CAAC,KAAK,EAAE,OAAO,EAQvB;IAED,IAAI,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;IA4DnC,OAAO,IAAI,IAAI;CAoBhB"}
@@ -7,4 +7,6 @@ export type { AutosavePluginOptions } from './AutosavePlugin.ts';
7
7
  export { UndoRedoPlugin } from './UndoRedoPlugin.ts';
8
8
  export type { UndoRedoPluginOptions } from './UndoRedoPlugin.ts';
9
9
  export { KeyboardShortcutsPlugin } from './KeyboardShortcutsPlugin.ts';
10
+ export { ViewportPlugin } from './ViewportPlugin.ts';
11
+ export type { ViewportPluginOptions } from './ViewportPlugin.ts';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixi-watchface-engine",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A PixiJS v8 watchface editor engine with visual editor, plugin system, and intuitive API",
5
5
  "author": "Eric Schmar (ericschmar@gmail.com)",
6
6
  "type": "module",
@@ -65,6 +65,7 @@
65
65
  "typescript": "^5.9.3"
66
66
  },
67
67
  "dependencies": {
68
+ "pixi-viewport": "^6.0.3",
68
69
  "pixi.js": "^8.16.0"
69
70
  }
70
71
  }