@pixodesk/svg-animator-web 1.0.30 โ†’ 1.0.34

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
@@ -1,5 +1,7 @@
1
1
  # animator-web
2
2
 
3
+ > ๐Ÿ“– Full user guide: [docs/library/web-player.md](../../docs/library/web-player.md) ยท [all docs](../../README.md#documentation)
4
+
3
5
  [![CI](https://github.com/pixodesk/pixodesk-svg-animator/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/pixodesk/pixodesk-svg-animator/actions/workflows/ci.yml)
4
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
7
 
@@ -69,7 +71,7 @@ const animator = createAnimator({ data: animationDoc, container: '#container' })
69
71
 
70
72
  animator.play();
71
73
  animator.pause();
72
- animator.setCurrentTime(500); // seek to 500ms
74
+ animator.setCurrentTime(500); // jump to 0.5 s from the start
73
75
  animator.setPlaybackRate(2); // 2x speed (-1 plays in reverse)
74
76
  animator.finish(); // jump to end
75
77
  animator.destroy(); // cleanup
@@ -97,7 +99,7 @@ It returns a `PxAnimatorAPI`:
97
99
  | `finish()` | Jump to the end |
98
100
  | `setPlaybackRate(rate)` | Change speed (1 = normal, 2 = double, -1 = reverse) |
99
101
  | `getCurrentTime()` | Current time in ms |
100
- | `setCurrentTime(ms)` | Seek to a specific time |
102
+ | `setCurrentTime(ms)` | Jump to a point in the animation, in milliseconds from its start |
101
103
  | `isPlaying()` | Whether the animation is currently playing |
102
104
  | `isReady()` | Whether the document has loaded (relevant for URL-based creation) |
103
105
  | `getRootElement()` | The rendered SVG DOM element |
@@ -132,17 +134,17 @@ createAnimator({
132
134
  The `doc` passed to `createAnimator` is a `PxAnimatedSvgDocument` (`type: 'svg'`), the
133
135
  same shape as the JSON export. It comes in two modes:
134
136
 
135
- - **Mode A** โ€” has `children`: the player renders the SVG tree and animates it.
136
- - **Mode B** โ€” no `children`: the player animates a pre-existing SVG DOM, mapping
137
+ - **Self-contained document** โ€” has `children`: the player renders the SVG tree and animates it.
138
+ - **Bind-by-id document** โ€” no `children`: the player animates a pre-existing SVG DOM, mapping
137
139
  element ids to animation specs via `animator.animateById`.
138
140
 
139
141
  Elements may also carry a `node.effects` bucket (structural effects such as
140
142
  `transformBy`, `repeater`, `maskedBy`, `strokeTrim`, `clone`, `fillGradient` /
141
- `strokeGradient`, `textAlongPath`). This player materialises and removes them at
143
+ `strokeGradient`, `textPath`). This player materialises and removes them at
142
144
  runtime before any other normalisation.
143
145
 
144
- See the [file-format reference](../../README.md#file-formats) and the
145
- [Player effects](../../README.md#player-effects-nodeeffects) section in the root
146
- README for the full schema and examples. The wire types live in
147
- [`PxAnimatorTypes.ts`](src/PxAnimatorTypes.ts).
146
+ See the [JSON format reference](../../docs/format/README.md#json-format-reference) and
147
+ [Player effects](../../docs/format/README.md#player-effects) for the full schema and
148
+ examples (compact printable schema: [SCHEMA.md](../../SCHEMA.md)). The wire
149
+ types live in [`PxAnimatorTypes.ts`](../svg-animator-core/src/PxAnimatorTypes.ts).
148
150