zimporter-html 1.0.0
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/LICENSE +21 -0
- package/README.md +82 -0
- package/dist/ParticleConverter.d.ts +26 -0
- package/dist/ParticleConverter.d.ts.map +1 -0
- package/dist/ParticleConverter.js +129 -0
- package/dist/ParticleConverter.js.map +1 -0
- package/dist/SceneData.d.ts +189 -0
- package/dist/SceneData.d.ts.map +1 -0
- package/dist/SceneData.js +16 -0
- package/dist/SceneData.js.map +1 -0
- package/dist/ZButton.d.ts +37 -0
- package/dist/ZButton.d.ts.map +1 -0
- package/dist/ZButton.js +258 -0
- package/dist/ZButton.js.map +1 -0
- package/dist/ZContainer.d.ts +154 -0
- package/dist/ZContainer.d.ts.map +1 -0
- package/dist/ZContainer.js +540 -0
- package/dist/ZContainer.js.map +1 -0
- package/dist/ZCuePointsManager.d.ts +8 -0
- package/dist/ZCuePointsManager.d.ts.map +1 -0
- package/dist/ZCuePointsManager.js +26 -0
- package/dist/ZCuePointsManager.js.map +1 -0
- package/dist/ZNineSlice.d.ts +23 -0
- package/dist/ZNineSlice.d.ts.map +1 -0
- package/dist/ZNineSlice.js +72 -0
- package/dist/ZNineSlice.js.map +1 -0
- package/dist/ZPool.d.ts +16 -0
- package/dist/ZPool.d.ts.map +1 -0
- package/dist/ZPool.js +54 -0
- package/dist/ZPool.js.map +1 -0
- package/dist/ZResizeables.d.ts +8 -0
- package/dist/ZResizeables.d.ts.map +1 -0
- package/dist/ZResizeables.js +16 -0
- package/dist/ZResizeables.js.map +1 -0
- package/dist/ZScene.d.ts +82 -0
- package/dist/ZScene.d.ts.map +1 -0
- package/dist/ZScene.js +663 -0
- package/dist/ZScene.js.map +1 -0
- package/dist/ZSceneStack.d.ts +19 -0
- package/dist/ZSceneStack.d.ts.map +1 -0
- package/dist/ZSceneStack.js +47 -0
- package/dist/ZSceneStack.js.map +1 -0
- package/dist/ZScroll.d.ts +72 -0
- package/dist/ZScroll.d.ts.map +1 -0
- package/dist/ZScroll.js +276 -0
- package/dist/ZScroll.js.map +1 -0
- package/dist/ZSlider.d.ts +45 -0
- package/dist/ZSlider.d.ts.map +1 -0
- package/dist/ZSlider.js +176 -0
- package/dist/ZSlider.js.map +1 -0
- package/dist/ZSpine.d.ts +54 -0
- package/dist/ZSpine.d.ts.map +1 -0
- package/dist/ZSpine.js +166 -0
- package/dist/ZSpine.js.map +1 -0
- package/dist/ZState.d.ts +15 -0
- package/dist/ZState.d.ts.map +1 -0
- package/dist/ZState.js +50 -0
- package/dist/ZState.js.map +1 -0
- package/dist/ZTextInput.d.ts +24 -0
- package/dist/ZTextInput.d.ts.map +1 -0
- package/dist/ZTextInput.js +109 -0
- package/dist/ZTextInput.js.map +1 -0
- package/dist/ZTimeline.d.ts +30 -0
- package/dist/ZTimeline.d.ts.map +1 -0
- package/dist/ZTimeline.js +123 -0
- package/dist/ZTimeline.js.map +1 -0
- package/dist/ZToggle.d.ts +19 -0
- package/dist/ZToggle.d.ts.map +1 -0
- package/dist/ZToggle.js +56 -0
- package/dist/ZToggle.js.map +1 -0
- package/dist/ZUpdatables.d.ts +24 -0
- package/dist/ZUpdatables.d.ts.map +1 -0
- package/dist/ZUpdatables.js +50 -0
- package/dist/ZUpdatables.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/zimporter-html.min.js +2 -0
- package/dist/zimporter-html.min.js.map +1 -0
- package/package.json +35 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Yonny Zohar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# zImporter HTML
|
|
2
|
+
|
|
3
|
+
An HTML/CSS div-based renderer for zStudio scenes. Part of the `zImporter` family alongside the [PIXI](https://github.com/yonnyzohar/zImporter_PIXI) and [Phaser](https://github.com/yonnyzohar/zImporter_Phaser) versions.
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
Loads the same `placements.json` format produced by zStudio and constructs the scene as a tree of `<div>` elements using CSS transforms — no canvas, no game engine dependency.
|
|
8
|
+
|
|
9
|
+
### Supported asset types
|
|
10
|
+
|
|
11
|
+
| Type | Status |
|
|
12
|
+
|------|--------|
|
|
13
|
+
| Container (asset) | ✅ |
|
|
14
|
+
| Button (btn) | ✅ |
|
|
15
|
+
| State machine (state) | ✅ |
|
|
16
|
+
| Toggle | ✅ |
|
|
17
|
+
| Timeline / animation | ✅ |
|
|
18
|
+
| Image (img) | ✅ |
|
|
19
|
+
| Nine-slice (9slice) | ✅ via `border-image` |
|
|
20
|
+
| Text / TextField | ✅ via `<span>` |
|
|
21
|
+
| Spine | ❌ not supported |
|
|
22
|
+
| Particles | ❌ not supported |
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install
|
|
28
|
+
npm run build # emit JS + .d.ts to dist/
|
|
29
|
+
npm run package # also bundles with webpack → dist/zimporter-html.min.js
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { ZScene, ZButton, ZToggle, ZTimeline, ZContainer, ZUpdatables } from 'zimporter-html';
|
|
36
|
+
|
|
37
|
+
// 1. Boot the animation ticker (drives ZTimeline)
|
|
38
|
+
ZUpdatables.init(24); // fps
|
|
39
|
+
|
|
40
|
+
// 2. Create and load a scene
|
|
41
|
+
const scene = new ZScene('myScene');
|
|
42
|
+
scene.load('./assets/myScene/', () => {
|
|
43
|
+
|
|
44
|
+
// 3. Build the DOM and attach it to a host element
|
|
45
|
+
scene.loadStage(document.getElementById('app')!);
|
|
46
|
+
|
|
47
|
+
// 4. Access named containers exactly as in the PIXI / Phaser versions
|
|
48
|
+
const btn = scene.sceneStage.get('myButton') as ZButton;
|
|
49
|
+
btn.pressCallback = () => console.log('Button pressed!');
|
|
50
|
+
|
|
51
|
+
// 5. React to resize
|
|
52
|
+
window.addEventListener('resize', () =>
|
|
53
|
+
scene.resize(window.innerWidth, window.innerHeight));
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Transform model
|
|
58
|
+
|
|
59
|
+
CSS transforms replicate PIXI's hierarchical transform 1-to-1:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
T(x, y) · R(rotation) · S(scaleX, scaleY) · T(–pivotX, –pivotY)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Each `ZContainer` is a `position:absolute; width:0; height:0; overflow:visible` div so children are placed in local coordinate space and the parent's transform is applied hierarchically, identical to PIXI containers.
|
|
66
|
+
|
|
67
|
+
The stage div is given explicit `width × height` (scene resolution) and then scaled + centred via CSS transform to fit the viewport.
|
|
68
|
+
|
|
69
|
+
## API surface
|
|
70
|
+
|
|
71
|
+
The public API is identical to `zImporter-PIXI`:
|
|
72
|
+
|
|
73
|
+
- `ZContainer` — base display object (div)
|
|
74
|
+
- `ZButton` — interactive button with up/down/over/disabled states
|
|
75
|
+
- `ZState` — shows one named child state at a time
|
|
76
|
+
- `ZToggle` — flips between `onState` / `offState`
|
|
77
|
+
- `ZTimeline` — frame-based animation driven by `ZUpdatables`
|
|
78
|
+
- `ZScene` — loads `placements.json` and builds the scene graph
|
|
79
|
+
- `ZSceneStack` — stacks multiple ZScene instances
|
|
80
|
+
- `ZUpdatables` — RAF-based animation ticker
|
|
81
|
+
- `ZResizeables` — resize listener registry
|
|
82
|
+
- `ZCuePointsManager` — named cue-point event bus
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts PIXI v5 particle configuration to a simple HTML/CSS-compatible
|
|
3
|
+
* particle description. Identical to the Phaser version — no engine-specific
|
|
4
|
+
* code was required.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* The HTML version does not yet have a particle renderer; this class is
|
|
8
|
+
* provided so that the same scene JSON that works in PIXI / Phaser also
|
|
9
|
+
* compiles and loads cleanly in the HTML build.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ParticleConverter {
|
|
12
|
+
/**
|
|
13
|
+
* Converts a PIXI particles v5 config object to a normalised description
|
|
14
|
+
* that can be consumed by an HTML particle renderer.
|
|
15
|
+
*/
|
|
16
|
+
static pixiToPhaserConfig(pixiConfig: any): any;
|
|
17
|
+
private static processBehavior;
|
|
18
|
+
private static processAlphaBehavior;
|
|
19
|
+
private static processScaleBehavior;
|
|
20
|
+
private static processColorBehavior;
|
|
21
|
+
private static processMoveSpeedBehavior;
|
|
22
|
+
private static processRotationStaticBehavior;
|
|
23
|
+
private static processSpawnBurstBehavior;
|
|
24
|
+
static hexToInt(hex: string): number;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=ParticleConverter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParticleConverter.d.ts","sourceRoot":"","sources":["../src/ParticleConverter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,qBAAa,iBAAiB;IAC1B;;;OAGG;IACH,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,GAAG,GAAG,GAAG;IAoD/C,OAAO,CAAC,MAAM,CAAC,eAAe;IAY9B,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAMnC,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAMnC,OAAO,CAAC,MAAM,CAAC,oBAAoB;IASnC,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAQvC,OAAO,CAAC,MAAM,CAAC,6BAA6B;IAM5C,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAKxC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;CAGvC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts PIXI v5 particle configuration to a simple HTML/CSS-compatible
|
|
3
|
+
* particle description. Identical to the Phaser version — no engine-specific
|
|
4
|
+
* code was required.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* The HTML version does not yet have a particle renderer; this class is
|
|
8
|
+
* provided so that the same scene JSON that works in PIXI / Phaser also
|
|
9
|
+
* compiles and loads cleanly in the HTML build.
|
|
10
|
+
*/
|
|
11
|
+
export class ParticleConverter {
|
|
12
|
+
/**
|
|
13
|
+
* Converts a PIXI particles v5 config object to a normalised description
|
|
14
|
+
* that can be consumed by an HTML particle renderer.
|
|
15
|
+
*/
|
|
16
|
+
static pixiToPhaserConfig(pixiConfig) {
|
|
17
|
+
const cfg = {};
|
|
18
|
+
// Lifetime (PIXI: seconds, output: milliseconds)
|
|
19
|
+
if (pixiConfig.lifetime) {
|
|
20
|
+
cfg.lifespan = {
|
|
21
|
+
min: (pixiConfig.lifetime.min ?? 1) * 1000,
|
|
22
|
+
max: (pixiConfig.lifetime.max ?? 1) * 1000,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
cfg.lifespan = { min: 1000, max: 1000 };
|
|
27
|
+
}
|
|
28
|
+
// Emission frequency (PIXI: seconds → ms)
|
|
29
|
+
if (pixiConfig.frequency !== undefined) {
|
|
30
|
+
const freqMs = pixiConfig.frequency * 1000;
|
|
31
|
+
cfg.frequency = freqMs;
|
|
32
|
+
if (pixiConfig.maxParticles) {
|
|
33
|
+
const lifespanMs = cfg.lifespan.max;
|
|
34
|
+
const maxSimultaneous = Math.ceil(lifespanMs / freqMs) + 1;
|
|
35
|
+
cfg.maxParticles = Math.max(pixiConfig.maxParticles, maxSimultaneous);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
cfg.frequency = 100;
|
|
40
|
+
}
|
|
41
|
+
// Max particles
|
|
42
|
+
if (pixiConfig.maxParticles) {
|
|
43
|
+
cfg.maxParticles = pixiConfig.maxParticles;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
cfg.maxParticles = 100;
|
|
47
|
+
}
|
|
48
|
+
// Emitter lifetime
|
|
49
|
+
if (pixiConfig.emitterLifetime === -1) {
|
|
50
|
+
cfg.duration = -1; // infinite
|
|
51
|
+
}
|
|
52
|
+
else if (pixiConfig.emitterLifetime > 0) {
|
|
53
|
+
cfg.duration = pixiConfig.emitterLifetime * 1000;
|
|
54
|
+
}
|
|
55
|
+
cfg.quantity = 1;
|
|
56
|
+
// Process behaviours
|
|
57
|
+
if (Array.isArray(pixiConfig.behaviors)) {
|
|
58
|
+
for (const behavior of pixiConfig.behaviors) {
|
|
59
|
+
ParticleConverter.processBehavior(behavior, cfg);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return cfg;
|
|
63
|
+
}
|
|
64
|
+
static processBehavior(behavior, cfg) {
|
|
65
|
+
switch (behavior.type) {
|
|
66
|
+
case 'alpha':
|
|
67
|
+
ParticleConverter.processAlphaBehavior(behavior.config, cfg);
|
|
68
|
+
break;
|
|
69
|
+
case 'scale':
|
|
70
|
+
ParticleConverter.processScaleBehavior(behavior.config, cfg);
|
|
71
|
+
break;
|
|
72
|
+
case 'color':
|
|
73
|
+
ParticleConverter.processColorBehavior(behavior.config, cfg);
|
|
74
|
+
break;
|
|
75
|
+
case 'moveSpeed':
|
|
76
|
+
ParticleConverter.processMoveSpeedBehavior(behavior.config, cfg);
|
|
77
|
+
break;
|
|
78
|
+
case 'rotationStatic':
|
|
79
|
+
ParticleConverter.processRotationStaticBehavior(behavior.config, cfg);
|
|
80
|
+
break;
|
|
81
|
+
case 'spawnBurst':
|
|
82
|
+
ParticleConverter.processSpawnBurstBehavior(behavior.config, cfg);
|
|
83
|
+
break;
|
|
84
|
+
default: break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
static processAlphaBehavior(config, cfg) {
|
|
88
|
+
if (config?.alpha?.list?.length >= 2) {
|
|
89
|
+
cfg.alpha = { start: config.alpha.list[0].value, end: config.alpha.list[config.alpha.list.length - 1].value };
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
static processScaleBehavior(config, cfg) {
|
|
93
|
+
if (config?.scale?.list?.length >= 2) {
|
|
94
|
+
cfg.scale = { start: config.scale.list[0].value, end: config.scale.list[config.scale.list.length - 1].value };
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
static processColorBehavior(config, cfg) {
|
|
98
|
+
if (config?.color?.list?.length >= 2) {
|
|
99
|
+
cfg.tint = {
|
|
100
|
+
start: ParticleConverter.hexToInt(config.color.list[0].value),
|
|
101
|
+
end: ParticleConverter.hexToInt(config.color.list[config.color.list.length - 1].value),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
static processMoveSpeedBehavior(config, cfg) {
|
|
106
|
+
if (config?.speed?.list?.length >= 2) {
|
|
107
|
+
cfg.speed = { start: config.speed.list[0].value, end: config.speed.list[config.speed.list.length - 1].value };
|
|
108
|
+
}
|
|
109
|
+
if (config?.minMult !== undefined)
|
|
110
|
+
cfg.speedMult = { min: config.minMult, max: 1 };
|
|
111
|
+
if (config?.acceleration)
|
|
112
|
+
cfg.gravityY = config.acceleration.y ?? 0;
|
|
113
|
+
}
|
|
114
|
+
static processRotationStaticBehavior(config, cfg) {
|
|
115
|
+
if (config?.min !== undefined && config?.max !== undefined) {
|
|
116
|
+
cfg.rotate = { min: config.min, max: config.max };
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
static processSpawnBurstBehavior(config, cfg) {
|
|
120
|
+
if (config?.particlesPerWave)
|
|
121
|
+
cfg.quantity = config.particlesPerWave;
|
|
122
|
+
if (config?.angle)
|
|
123
|
+
cfg.angle = { min: config.angle.min ?? 0, max: config.angle.max ?? 360 };
|
|
124
|
+
}
|
|
125
|
+
static hexToInt(hex) {
|
|
126
|
+
return parseInt(hex.replace('#', ''), 16);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=ParticleConverter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParticleConverter.js","sourceRoot":"","sources":["../src/ParticleConverter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,OAAO,iBAAiB;IAC1B;;;OAGG;IACH,MAAM,CAAC,kBAAkB,CAAC,UAAe;QACrC,MAAM,GAAG,GAAQ,EAAE,CAAC;QAEpB,iDAAiD;QACjD,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,GAAG,CAAC,QAAQ,GAAG;gBACX,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI;gBAC1C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;IAED,MAAM,CAAC,QAAQ,CAAC,GAAW;QACvB,OAAO,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9C,CAAC;CACJ"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
export interface BoxStroke {
|
|
2
|
+
color?: number;
|
|
3
|
+
width?: number;
|
|
4
|
+
alpha?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface InputBoxStyle {
|
|
7
|
+
fill: number;
|
|
8
|
+
rounded?: number;
|
|
9
|
+
stroke?: BoxStroke;
|
|
10
|
+
}
|
|
11
|
+
export interface InputParams {
|
|
12
|
+
fontFamily: string;
|
|
13
|
+
fontSize: string;
|
|
14
|
+
padding: string;
|
|
15
|
+
width: string;
|
|
16
|
+
color: string | number;
|
|
17
|
+
fontWeight?: string;
|
|
18
|
+
textAlign: string;
|
|
19
|
+
textIndent?: string;
|
|
20
|
+
lineHeight?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface TextInputObj {
|
|
23
|
+
input: InputParams;
|
|
24
|
+
box: {
|
|
25
|
+
default: InputBoxStyle;
|
|
26
|
+
focused: InputBoxStyle;
|
|
27
|
+
disabled: InputBoxStyle;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface TextInputData extends BaseAssetData {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
text: string;
|
|
34
|
+
props: TextInputObj;
|
|
35
|
+
}
|
|
36
|
+
export interface SpineData extends BaseAssetData {
|
|
37
|
+
name: string;
|
|
38
|
+
spineJson: string;
|
|
39
|
+
spineAtlas: string;
|
|
40
|
+
pngFiles: string[];
|
|
41
|
+
animations: string[];
|
|
42
|
+
skin?: string;
|
|
43
|
+
playOnStart?: {
|
|
44
|
+
value: boolean;
|
|
45
|
+
animation: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export interface ParticleData extends BaseAssetData {
|
|
49
|
+
jsonPath: string;
|
|
50
|
+
pngPaths: string[];
|
|
51
|
+
name: string;
|
|
52
|
+
emitterConfig: any;
|
|
53
|
+
}
|
|
54
|
+
export declare enum AnchorConsts {
|
|
55
|
+
NONE = "none",
|
|
56
|
+
TOP_LEFT = "topLeft",
|
|
57
|
+
TOP_RIGHT = "topRight",
|
|
58
|
+
BOTTOM_LEFT = "btmLeft",
|
|
59
|
+
BOTTOM_RIGHT = "btmRight",
|
|
60
|
+
LEFT = "left",
|
|
61
|
+
RIGHT = "right",
|
|
62
|
+
TOP = "top",
|
|
63
|
+
BOTTOM = "btm",
|
|
64
|
+
CENTER = "center"
|
|
65
|
+
}
|
|
66
|
+
export interface ResolutionData {
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
}
|
|
70
|
+
export interface OrientationData {
|
|
71
|
+
x: number;
|
|
72
|
+
y: number;
|
|
73
|
+
rotation: number;
|
|
74
|
+
scaleX: number;
|
|
75
|
+
scaleY: number;
|
|
76
|
+
alpha: number;
|
|
77
|
+
pivotX: number;
|
|
78
|
+
pivotY: number;
|
|
79
|
+
visible: boolean;
|
|
80
|
+
isAnchored: boolean;
|
|
81
|
+
anchorType?: AnchorConsts;
|
|
82
|
+
anchorPercentage?: {
|
|
83
|
+
x: number;
|
|
84
|
+
y: number;
|
|
85
|
+
};
|
|
86
|
+
width: number;
|
|
87
|
+
height: number;
|
|
88
|
+
}
|
|
89
|
+
export interface BaseAssetData {
|
|
90
|
+
type: string;
|
|
91
|
+
name: string;
|
|
92
|
+
filters: any;
|
|
93
|
+
}
|
|
94
|
+
export interface InstanceAttributes {
|
|
95
|
+
fitToScreen?: boolean;
|
|
96
|
+
}
|
|
97
|
+
export interface InstanceData extends BaseAssetData {
|
|
98
|
+
template: boolean;
|
|
99
|
+
instanceName: string;
|
|
100
|
+
guide: boolean;
|
|
101
|
+
portrait: OrientationData;
|
|
102
|
+
landscape: OrientationData;
|
|
103
|
+
attrs?: InstanceAttributes;
|
|
104
|
+
}
|
|
105
|
+
export interface SpriteData extends BaseAssetData {
|
|
106
|
+
name: string;
|
|
107
|
+
type: string;
|
|
108
|
+
width: number;
|
|
109
|
+
height: number;
|
|
110
|
+
filePath: string;
|
|
111
|
+
x: number;
|
|
112
|
+
y: number;
|
|
113
|
+
pivotX: number;
|
|
114
|
+
pivotY: number;
|
|
115
|
+
}
|
|
116
|
+
export interface NineSliceData extends SpriteData {
|
|
117
|
+
top: number;
|
|
118
|
+
bottom: number;
|
|
119
|
+
left: number;
|
|
120
|
+
right: number;
|
|
121
|
+
origWidth: number;
|
|
122
|
+
origHeight: number;
|
|
123
|
+
portrait: OrientationData;
|
|
124
|
+
landscape: OrientationData;
|
|
125
|
+
}
|
|
126
|
+
export interface GradientData {
|
|
127
|
+
colors: number[];
|
|
128
|
+
percentages: number[];
|
|
129
|
+
fillGradientType: number;
|
|
130
|
+
}
|
|
131
|
+
export interface TextData extends BaseAssetData {
|
|
132
|
+
x: number;
|
|
133
|
+
y: number;
|
|
134
|
+
rotation: number;
|
|
135
|
+
width: number;
|
|
136
|
+
height: number;
|
|
137
|
+
alpha: number;
|
|
138
|
+
size: number | string;
|
|
139
|
+
color?: string | number;
|
|
140
|
+
align: string;
|
|
141
|
+
text: string;
|
|
142
|
+
fontName: string | string[];
|
|
143
|
+
lineHeight?: number;
|
|
144
|
+
stroke?: string | number;
|
|
145
|
+
strokeThickness?: number;
|
|
146
|
+
wordWrap?: boolean;
|
|
147
|
+
wordWrapWidth?: number;
|
|
148
|
+
letterSpacing?: number;
|
|
149
|
+
fontWeight?: string;
|
|
150
|
+
textAnchorX: number;
|
|
151
|
+
textAnchorY: number;
|
|
152
|
+
pivotX: number;
|
|
153
|
+
pivotY: number;
|
|
154
|
+
/** Key used to look up the .fnt / .png bitmap font files. */
|
|
155
|
+
uniqueFontName?: string;
|
|
156
|
+
/** 'gradient' | 'solid' */
|
|
157
|
+
fillType?: string;
|
|
158
|
+
gradientData?: GradientData;
|
|
159
|
+
}
|
|
160
|
+
export interface AnimTrackData {
|
|
161
|
+
x?: number;
|
|
162
|
+
y?: number;
|
|
163
|
+
scaleX?: number;
|
|
164
|
+
scaleY?: number;
|
|
165
|
+
rotation?: number;
|
|
166
|
+
alpha?: number;
|
|
167
|
+
pivotX?: number;
|
|
168
|
+
pivotY?: number;
|
|
169
|
+
}
|
|
170
|
+
export interface TemplateData {
|
|
171
|
+
type: string;
|
|
172
|
+
name: string;
|
|
173
|
+
children: BaseAssetData[];
|
|
174
|
+
}
|
|
175
|
+
export interface StageData {
|
|
176
|
+
children: InstanceData[];
|
|
177
|
+
type: string;
|
|
178
|
+
name: string;
|
|
179
|
+
}
|
|
180
|
+
export interface SceneData {
|
|
181
|
+
resolution: ResolutionData;
|
|
182
|
+
animTracks?: Record<string, AnimTrackData[]>;
|
|
183
|
+
cuePoints?: Record<string, Record<number, string>>;
|
|
184
|
+
stage: StageData;
|
|
185
|
+
templates: Record<string, TemplateData>;
|
|
186
|
+
fonts: string[];
|
|
187
|
+
atlas?: boolean;
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=SceneData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SceneData.d.ts","sourceRoot":"","sources":["../src/SceneData.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,C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AM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAED,MAAM,WAAW,aAAa;IAC1B,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,SAAS;IACtB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACtB,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnD,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACxC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// ── Input field types ─────────────────────────────────────────────────────────
|
|
2
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
3
|
+
export var AnchorConsts;
|
|
4
|
+
(function (AnchorConsts) {
|
|
5
|
+
AnchorConsts["NONE"] = "none";
|
|
6
|
+
AnchorConsts["TOP_LEFT"] = "topLeft";
|
|
7
|
+
AnchorConsts["TOP_RIGHT"] = "topRight";
|
|
8
|
+
AnchorConsts["BOTTOM_LEFT"] = "btmLeft";
|
|
9
|
+
AnchorConsts["BOTTOM_RIGHT"] = "btmRight";
|
|
10
|
+
AnchorConsts["LEFT"] = "left";
|
|
11
|
+
AnchorConsts["RIGHT"] = "right";
|
|
12
|
+
AnchorConsts["TOP"] = "top";
|
|
13
|
+
AnchorConsts["BOTTOM"] = "btm";
|
|
14
|
+
AnchorConsts["CENTER"] = "center";
|
|
15
|
+
})(AnchorConsts || (AnchorConsts = {}));
|
|
16
|
+
//# sourceMappingURL=SceneData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SceneData.js","sourceRoot":"","sources":["../src/SceneData.ts"],"names":[],"mappings":"AACA,iFAAiF;AAgEjF,gFAAgF;AAEhF,MAAM,CAAN,IAAY,YAWX;AAXD,WAAY,YAAY;IACpB,6BAAa,CAAA;IACb,oCAAoB,CAAA;IACpB,sCAAsB,CAAA;IACtB,uCAAuB,CAAA;IACvB,yCAAyB,CAAA;IACzB,6BAAa,CAAA;IACb,+BAAe,CAAA;IACf,2BAAW,CAAA;IACX,8BAAc,CAAA;IACd,iCAAiB,CAAA;AACrB,CAAC,EAXW,YAAY,KAAZ,YAAY,QAWvB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ZContainer } from './ZContainer';
|
|
2
|
+
export declare const RemoveClickListener: (container: ZContainer) => void;
|
|
3
|
+
export declare const AttachClickListener: (container: ZContainer, pressCallback?: () => void, longPressCallback?: () => void) => void;
|
|
4
|
+
export declare const AddHoverListener: (container: ZContainer, hoverCallback: (...args: any[]) => void, outCallback: (...args: any[]) => void) => void;
|
|
5
|
+
export declare const RemoveHoverListener: (container: ZContainer) => void;
|
|
6
|
+
export declare class ZButton extends ZContainer {
|
|
7
|
+
topLabelContainer: ZContainer;
|
|
8
|
+
topLabelContainer2: ZContainer;
|
|
9
|
+
overState: ZContainer;
|
|
10
|
+
overLabelContainer: ZContainer;
|
|
11
|
+
overLabelContainer2: ZContainer;
|
|
12
|
+
downState: ZContainer;
|
|
13
|
+
downLabelContainer: ZContainer;
|
|
14
|
+
downLabelContainer2: ZContainer;
|
|
15
|
+
upState: ZContainer;
|
|
16
|
+
upLabelContainer: ZContainer;
|
|
17
|
+
upLabelContainer2: ZContainer;
|
|
18
|
+
disabledState: ZContainer;
|
|
19
|
+
disabledLabelContainer: ZContainer;
|
|
20
|
+
disabledLabelContainer2: ZContainer;
|
|
21
|
+
pressCallback?: () => void;
|
|
22
|
+
longPressCallback?: () => void;
|
|
23
|
+
private labelState;
|
|
24
|
+
getType(): string;
|
|
25
|
+
init(_labelStr?: string): void;
|
|
26
|
+
setLabel(name: string): void;
|
|
27
|
+
setLabel2(name: string): void;
|
|
28
|
+
setFixedTextSize(fixed: boolean): void;
|
|
29
|
+
makeSingleLine(): void;
|
|
30
|
+
getLabel(): HTMLElement | null;
|
|
31
|
+
private _showState;
|
|
32
|
+
enable(): void;
|
|
33
|
+
disable(): void;
|
|
34
|
+
private _interactionsAttached;
|
|
35
|
+
private _attachInteractions;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=ZButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ZButton.d.ts","sourceRoot":"","sources":["../src/ZButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,eAAO,MAAM,mBAAmB,GAAI,WAAW,UAAU,KAAG,IAO3D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC5B,WAAW,UAAU,EACrB,gBAAgB,MAAM,IAAI,EAC1B,oBAAoB,MAAM,I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