@pixodesk/svg-animator-core 1.0.29 โ 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 +5 -3
- package/dist/index.cjs +324 -101
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6139 -18564
- package/dist/index.d.ts +6139 -18564
- package/dist/index.js +316 -99
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# animator-core
|
|
2
2
|
|
|
3
|
+
> ๐ Full user guide: [docs/format/core-library.md](../../docs/format/README.md#core-library--pixodesksvg-animator-core) ยท [all docs](../../README.md#documentation)
|
|
4
|
+
|
|
3
5
|
[](https://github.com/pixodesk/pixodesk-svg-animator/actions/workflows/ci.yml)
|
|
4
6
|
[](https://opensource.org/licenses/MIT)
|
|
5
7
|
|
|
@@ -56,7 +58,7 @@ runtime crash on a non-browser platform.
|
|
|
56
58
|
| **Text** | `materialiseGlyphText`, `layoutGlyphTextChars`, `extendedPathForBrowser` |
|
|
57
59
|
| **Node helpers** | `getNormalizedProps`, `sanitiseAttributeValue`, `resolveStyle`, `generateNewIds` |
|
|
58
60
|
| **Playback engine** | `createBasicFrameLoopAnimator` + the `PxPlatformAdapter` interface |
|
|
59
|
-
| **Wire enums** | `PxAnimatorMode`, `PxAnimatorEngine`, `PxLoopExtend`, `
|
|
61
|
+
| **Wire enums** | `PxAnimatorMode`, `PxAnimatorEngine`, `PxLoopExtend`, `PxStrokeTrimSubPaths`, `PxMaskType`, `PxCloneType`, `PxUnits`, `PxGradientType`, `PxGradientUnits`, `PxGradientSpreadMethod`, `PxPathOverflow`, `PxLengthAdjust`, `PxTextPathMethod`, `PxTextPathSpacing` โ every two-or-more-way wire selector is a named enum, not a bare string |
|
|
60
62
|
|
|
61
63
|
### Validating a document
|
|
62
64
|
|
|
@@ -69,7 +71,7 @@ import { PxAnimatedSvgDocumentSchema, type PxValidationContext } from '@pixodesk
|
|
|
69
71
|
|
|
70
72
|
const ctx: PxValidationContext = { errors: [], warnings: [], strict: true };
|
|
71
73
|
const ok = PxAnimatedSvgDocumentSchema.isValid(doc, ctx, []);
|
|
72
|
-
if (!ok) console.error(ctx.errors); // ["children[0].effects.
|
|
74
|
+
if (!ok) console.error(ctx.errors); // ["children[0].effects.strokeTrim.range: โฆ", โฆ]
|
|
73
75
|
```
|
|
74
76
|
|
|
75
77
|
**Two modes, two different questions:**
|
|
@@ -90,7 +92,7 @@ in-memory object that produced it.
|
|
|
90
92
|
`materialiseAllInTree(doc, engine)` is the single entry point that turns a
|
|
91
93
|
lightweight editor document into a flat tree any renderer can walk:
|
|
92
94
|
|
|
93
|
-
1. **Effects** โ `node.effects` (transformBy, repeater, maskedBy,
|
|
95
|
+
1. **Effects** โ `node.effects` (transformBy, repeater, maskedBy, strokeTrim,
|
|
94
96
|
clone/retime, gradients, textPath) become real nodes, wrappers and defs.
|
|
95
97
|
2. **Loops** โ each property's `loop` is expanded into explicit keyframes.
|
|
96
98
|
3. **Motion paths** โ tangented `transform` keyframes plus `autoOrient` are
|