@pixodesk/svg-animator-web 1.0.16 → 1.0.18

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 CHANGED
@@ -102,3 +102,30 @@ createAnimator(doc, undefined, {
102
102
  }, '#container');
103
103
  ```
104
104
 
105
+ ### Engine modes
106
+
107
+ `animator.mode` selects the playback engine:
108
+
109
+ - `'auto'` (default) — try the Web Animations API, fall back to `requestAnimationFrame`.
110
+ - `'webapi'` — Web Animations API only.
111
+ - `'frames'` — `requestAnimationFrame` only; honours `animator.frameRate`. Required for path morphing.
112
+
113
+ ### Document format & effects
114
+
115
+ The `doc` passed to `createAnimator` is a `PxAnimatedSvgDocument` (`type: 'svg'`), the
116
+ same shape as the JSON export. It comes in two modes:
117
+
118
+ - **Mode A** — has `children`: the player renders the SVG tree and animates it.
119
+ - **Mode B** — no `children`: the player animates a pre-existing SVG DOM, mapping
120
+ element ids to animation specs via `animator.animate`.
121
+
122
+ Elements may also carry a `node.effects` bucket (structural effects such as
123
+ `transformation`, `repeater`, `maskedBy`, `trimPath`, `clone`, `fillGradient` /
124
+ `strokeGradient`, `textAlongPath`). This player materialises and removes them at
125
+ runtime before any other normalisation.
126
+
127
+ See the [file-format reference](../../README.md#file-formats) and the
128
+ [Player effects](../../README.md#player-effects-nodeeffects) section in the root
129
+ README for the full schema and examples. The wire types live in
130
+ [`PxAnimatorTypes.ts`](src/PxAnimatorTypes.ts).
131
+