@pixodesk/svg-animator-web 1.0.43 → 1.0.45
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/README.md +2 -2
- package/dist/{PxAnimator-yjuSFhQw.d.cts → PxAnimator-BS-SZULN.d.cts} +10 -0
- package/dist/{PxAnimator-yjuSFhQw.d.ts → PxAnimator-BS-SZULN.d.ts} +10 -0
- package/dist/chunk-QE7KJWAN.js +6532 -0
- package/dist/chunk-QE7KJWAN.js.map +1 -0
- package/dist/chunk-RQ5KZXDT.min.js +1 -0
- package/dist/index.cjs +551 -293
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -28
- package/dist/index.d.ts +58 -28
- package/dist/index.js +299 -6416
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.prerendered-waapi.umd.js +293 -109
- package/dist/index.prerendered-waapi.umd.js.map +1 -1
- package/dist/index.prerendered-waapi.umd.min.js +1 -1
- package/dist/index.prerendered.umd.js +293 -105
- package/dist/index.prerendered.umd.js.map +1 -1
- package/dist/index.prerendered.umd.min.js +1 -1
- package/dist/internal.cjs +1164 -2
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +51 -3
- package/dist/internal.d.ts +51 -3
- package/dist/internal.js +7 -3
- package/dist/internal.min.cjs +1 -1
- package/dist/internal.min.js +1 -1
- package/dist/pixodesk-svg-animator.umd.js +458 -184
- package/dist/pixodesk-svg-animator.umd.js.map +1 -1
- package/dist/pixodesk-svg-animator.umd.min.js +1 -1
- package/mangle-reserved.json +14 -4
- package/package.json +2 -2
- package/dist/chunk-BYDBNKO7.js +0 -42
- package/dist/chunk-BYDBNKO7.js.map +0 -1
- package/dist/chunk-RK3CEIRB.min.js +0 -1
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ animator.destroy(); // cleanup
|
|
|
92
92
|
| `resetTimeline` | `boolean` | ignore the document's own timeline and start from the player's default timeline, with `timeline` on top |
|
|
93
93
|
| `duration` · `delay` | `number` | Shortcuts for `timeline.duration` / `.delay` (ms) | <!-- px names=duration,delay -->
|
|
94
94
|
| `iterations` | `number \| 'infinite'` | Shortcut for `timeline.iterations` |
|
|
95
|
-
| `
|
|
95
|
+
| `start` | `PxTriggerStart` | Shortcut for `timeline.trigger.start` |
|
|
96
96
|
|
|
97
97
|
The document plays the way it was designed with no configuration at all; `timeline` is for when
|
|
98
98
|
one page needs it to play differently — the same file mounted twice at two speeds, or a file
|
|
@@ -102,7 +102,7 @@ that autostarts everywhere except inside your own transport UI:
|
|
|
102
102
|
const animator = createAnimator({
|
|
103
103
|
src: '/animation.json',
|
|
104
104
|
container: '#box',
|
|
105
|
-
timeline: { iterations: 'infinite', trigger: {
|
|
105
|
+
timeline: { iterations: 'infinite', trigger: { start: 'none' } },
|
|
106
106
|
});
|
|
107
107
|
animator.play();
|
|
108
108
|
```
|
|
@@ -38,6 +38,16 @@ interface PxAnimatorOptions extends PxPlaybackOverride, PxAnimatorCallbacks {
|
|
|
38
38
|
interface PxInternalAnimatorOptions extends PxAnimatorOptions {
|
|
39
39
|
/** A custom render target for the frame-loop engine (`PxPlatformAdapter`). */
|
|
40
40
|
adapter?: PxPlatformAdapter;
|
|
41
|
+
/**
|
|
42
|
+
* The root `<svg>` the CALLER rendered, when it renders the document itself (the React and
|
|
43
|
+
* Vue components). Triggers attach to it — pointer listeners, the visibility gate — and
|
|
44
|
+
* without one they are not wired at all, so even a `load` trigger never fires.
|
|
45
|
+
*
|
|
46
|
+
* Otherwise the engines look the root up as `#` + the document's root id, which finds
|
|
47
|
+
* nothing for the common document whose root `<svg>` has no id. The component already holds
|
|
48
|
+
* the element, so it hands it over rather than have it guessed.
|
|
49
|
+
*/
|
|
50
|
+
rootElement?: Element;
|
|
41
51
|
}
|
|
42
52
|
/**
|
|
43
53
|
* Creates an animator instance to control SVG animations.
|
|
@@ -38,6 +38,16 @@ interface PxAnimatorOptions extends PxPlaybackOverride, PxAnimatorCallbacks {
|
|
|
38
38
|
interface PxInternalAnimatorOptions extends PxAnimatorOptions {
|
|
39
39
|
/** A custom render target for the frame-loop engine (`PxPlatformAdapter`). */
|
|
40
40
|
adapter?: PxPlatformAdapter;
|
|
41
|
+
/**
|
|
42
|
+
* The root `<svg>` the CALLER rendered, when it renders the document itself (the React and
|
|
43
|
+
* Vue components). Triggers attach to it — pointer listeners, the visibility gate — and
|
|
44
|
+
* without one they are not wired at all, so even a `load` trigger never fires.
|
|
45
|
+
*
|
|
46
|
+
* Otherwise the engines look the root up as `#` + the document's root id, which finds
|
|
47
|
+
* nothing for the common document whose root `<svg>` has no id. The component already holds
|
|
48
|
+
* the element, so it hands it over rather than have it guessed.
|
|
49
|
+
*/
|
|
50
|
+
rootElement?: Element;
|
|
41
51
|
}
|
|
42
52
|
/**
|
|
43
53
|
* Creates an animator instance to control SVG animations.
|