lotio 1.1.58 → 1.1.60
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 +12 -11
- package/browser/lotio.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,29 +35,30 @@ xcode-select --install
|
|
|
35
35
|
### Command Line
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
lotio [--stream] [--debug] [--layer-overrides <config.json>] [--text-padding <0.0-1.0>] [--text-measurement-mode <fast|accurate|pixel-perfect>] <
|
|
38
|
+
lotio --data <input.json> [--stream] [--debug] [--layer-overrides <config.json>] [--text-padding <0.0-1.0>] [--text-measurement-mode <fast|accurate|pixel-perfect>] [--fps <fps>] <output_dir>
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
**Options:**
|
|
42
|
+
- `--data <input.json>` - Path to input Lottie animation JSON file (required)
|
|
42
43
|
- `--stream` - Stream frames to stdout as PNG (for piping to ffmpeg)
|
|
43
44
|
- `--debug` - Enable debug output
|
|
44
|
-
- `--layer-overrides
|
|
45
|
-
- `--text-padding
|
|
46
|
-
- `--text-measurement-mode
|
|
45
|
+
- `--layer-overrides <config.json>` - Path to layer overrides JSON (for text auto-fit, dynamic text values, and image path overrides)
|
|
46
|
+
- `--text-padding <0.0-1.0>` - Text padding factor (0.0-1.0, default: 0.97 = 3% padding)
|
|
47
|
+
- `--text-measurement-mode <fast|accurate|pixel-perfect>` - Text measurement mode: `fast` | `accurate` | `pixel-perfect` (default: `accurate`)
|
|
48
|
+
- `--fps <fps>` - Frames per second for output (optional, default: animation fps or 30)
|
|
47
49
|
- `--version` - Print version information and exit
|
|
48
50
|
- `--help, -h` - Show help message
|
|
49
|
-
- `fps` - Frames per second for output (default: 25)
|
|
50
51
|
|
|
51
52
|
**Examples:**
|
|
52
53
|
```bash
|
|
53
54
|
# Render to PNG frames
|
|
54
|
-
lotio animation.json frames/
|
|
55
|
+
lotio --data animation.json --fps 30 frames/
|
|
55
56
|
|
|
56
57
|
# Stream to ffmpeg
|
|
57
|
-
lotio --
|
|
58
|
+
lotio --data animation.json --stream --fps 30 - | ffmpeg -f image2pipe -i - output.mp4
|
|
58
59
|
|
|
59
60
|
# With layer overrides
|
|
60
|
-
lotio --layer-overrides layer-overrides.json
|
|
61
|
+
lotio --data animation.json --layer-overrides layer-overrides.json --fps 30 frames/
|
|
61
62
|
```
|
|
62
63
|
|
|
63
64
|
### Docker (Recommended for Video Output)
|
|
@@ -65,7 +66,7 @@ lotio --layer-overrides layer-overrides.json animation.json frames/
|
|
|
65
66
|
**Quick start with automatic video encoding:**
|
|
66
67
|
```bash
|
|
67
68
|
docker run --rm -v $(pwd):/workspace matrunchyk/lotio-ffmpeg:latest \
|
|
68
|
-
data.json
|
|
69
|
+
--data data.json --fps 30 --layer-overrides layer-overrides.json --output video.mov
|
|
69
70
|
```
|
|
70
71
|
|
|
71
72
|
**Available images:**
|
|
@@ -230,11 +231,11 @@ The `samples/` directory contains example Lottie animations and configurations:
|
|
|
230
231
|
```bash
|
|
231
232
|
# Sample 1: Basic animation with text customization
|
|
232
233
|
cd samples/sample1
|
|
233
|
-
lotio --layer-overrides layer-overrides.json
|
|
234
|
+
lotio --data data.json --layer-overrides layer-overrides.json --fps 30 output/
|
|
234
235
|
|
|
235
236
|
# Sample 2: Animation with external images
|
|
236
237
|
cd samples/sample2
|
|
237
|
-
lotio data.json output/
|
|
238
|
+
lotio --data data.json --fps 30 output/
|
|
238
239
|
```
|
|
239
240
|
|
|
240
241
|
## Using as a Library
|
package/browser/lotio.wasm
CHANGED
|
Binary file
|