@aarsteinmedia/dotlottie-player 5.1.8 → 5.1.9
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/CHANGELOG.md +2 -2
- package/README.md +23 -20
- package/dist/unpkg.js +7 -7
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
Changelog was only added since [3.2.3], so it's not exhaustive. [Please report any missing noteable changes to us](https://github.com/aarsteinmedia/dotlottie-player/issues), and we'll add them promptly.
|
|
9
9
|
|
|
10
|
-
## [5.1.
|
|
10
|
+
## [5.1.9] - 05-06-2025
|
|
11
11
|
|
|
12
12
|
### Changed
|
|
13
13
|
|
|
@@ -252,7 +252,7 @@ Changelog was only added since [3.2.3], so it's not exhaustive. [Please report a
|
|
|
252
252
|
- Removed dependencies
|
|
253
253
|
- `@lit`
|
|
254
254
|
|
|
255
|
-
[5.1.
|
|
255
|
+
[5.1.9]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.1.9
|
|
256
256
|
[5.1.4]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.1.4
|
|
257
257
|
[5.1.3]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.1.3
|
|
258
258
|
[5.1.0]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.1.0
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ PS: If you only need to render animations as SVG, and don't need to convert or c
|
|
|
8
8
|
|
|
9
9
|
## Demo
|
|
10
10
|
|
|
11
|
-
Here is [a demo](https://www.aarstein.media/en/dotlottie-player), running on Next.js
|
|
11
|
+
Here is [a demo](https://www.aarstein.media/en/dotlottie-player), running on Next.js 15 using TypeScript.
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
@@ -42,15 +42,15 @@ import '@aarsteinmedia/dotlottie-player'
|
|
|
42
42
|
|
|
43
43
|
## Usage
|
|
44
44
|
|
|
45
|
-
Add the element `dotlottie-player` to your markup and point `src` to a Lottie animation of your choice.
|
|
45
|
+
Add the element `dotlottie-player` to your markup and point `src` to a Lottie animation of your choice.
|
|
46
46
|
|
|
47
|
-
```
|
|
47
|
+
```html
|
|
48
48
|
<dotlottie-player
|
|
49
49
|
id="find-me"
|
|
50
|
-
autoplay
|
|
51
|
-
controls
|
|
52
|
-
subframe
|
|
53
|
-
loop
|
|
50
|
+
autoplay
|
|
51
|
+
controls
|
|
52
|
+
subframe
|
|
53
|
+
loop
|
|
54
54
|
src="https://storage.googleapis.com/aarsteinmedia/am.lottie"
|
|
55
55
|
style="width: 320px; margin: auto;"
|
|
56
56
|
>
|
|
@@ -65,7 +65,10 @@ player?.load('https://storage.googleapis.com/aarsteinmedia/am.lottie')
|
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
### Convert to dotLottie
|
|
68
|
-
If you have a Lottie JSON animation and want to convert it to a dotLottie – to leverage compression, combine multiple animations in one file and keep your file library tidy with a discrete file extension – you can do so with the `convert()` method. This will trigger a download in the browser. If you have `controls` set to visible there's a convert button
|
|
68
|
+
If you have a Lottie JSON animation and want to convert it to a dotLottie – to leverage compression, combine multiple animations in one file and keep your file library tidy with a discrete file extension – you can do so with the `convert()` method. This will trigger a download in the browser. If you have `controls` set to visible there's a convert button in the context menu on the right hand side.
|
|
69
|
+
|
|
70
|
+
### Convert to JSON
|
|
71
|
+
If you're debugging a dotLottie animation – for instance if expressions aren't working as expected, you can convert it to JSON, either by usin the `convert()` method, or — if `controls` are set to visible – a button in the context menu on the right hand side.
|
|
69
72
|
|
|
70
73
|
### Combine animations
|
|
71
74
|
If you want to combine multiple animations in one single dotLottie file you can use the `addAnimation` method. This will trigger a download in the browser. The source files can be either dotLottie or JSON, and the output file will will always be a dotLottie.
|
|
@@ -95,10 +98,10 @@ The new file wil automatically load the first animation when initialized. You ca
|
|
|
95
98
|
|
|
96
99
|
Control the playback of multiple animations in a single file. In the example below the first animation will play once, and then the next animation will loop:
|
|
97
100
|
|
|
98
|
-
```
|
|
101
|
+
```html
|
|
99
102
|
<dotlottie-player
|
|
100
103
|
id="find-me"
|
|
101
|
-
subframe
|
|
104
|
+
subframe
|
|
102
105
|
src="/path/to/combined-animations.lottie"
|
|
103
106
|
>
|
|
104
107
|
</dotlottie-player>
|
|
@@ -151,9 +154,9 @@ function App() {
|
|
|
151
154
|
<dotlottie-player
|
|
152
155
|
class="your-class-name"
|
|
153
156
|
src="https://storage.googleapis.com/aarsteinmedia/am.lottie"
|
|
154
|
-
autoplay
|
|
155
|
-
controls
|
|
156
|
-
loop
|
|
157
|
+
autoplay
|
|
158
|
+
controls
|
|
159
|
+
loop
|
|
157
160
|
style={{
|
|
158
161
|
width: '320px',
|
|
159
162
|
margin: 'auto'
|
|
@@ -177,7 +180,7 @@ function App() {
|
|
|
177
180
|
return (
|
|
178
181
|
<dotlottie-player
|
|
179
182
|
ref={animation}
|
|
180
|
-
subframe
|
|
183
|
+
subframe
|
|
181
184
|
src="https://storage.googleapis.com/aarsteinmedia/am.lottie"
|
|
182
185
|
/>
|
|
183
186
|
)
|
|
@@ -256,10 +259,10 @@ export default defineNuxtPlugin(({ vueApp }) => {
|
|
|
256
259
|
<template>
|
|
257
260
|
<dotlottie-player
|
|
258
261
|
src="https://storage.googleapis.com/aarsteinmedia/am.lottie"
|
|
259
|
-
autoplay
|
|
260
|
-
controls
|
|
261
|
-
subframe
|
|
262
|
-
loop
|
|
262
|
+
autoplay
|
|
263
|
+
controls
|
|
264
|
+
subframe
|
|
265
|
+
loop
|
|
263
266
|
style="width: 320px; margin: auto;"
|
|
264
267
|
/>
|
|
265
268
|
</template>
|
|
@@ -330,13 +333,13 @@ The following events are exposed and can be listened to via `addEventListener` c
|
|
|
330
333
|
| `stop` | Animation has stopped |
|
|
331
334
|
|
|
332
335
|
## WordPress Plugins
|
|
333
|
-
<img align="left" width="110" height="110" src="/.github/wpIcon.svg" />
|
|
336
|
+
<img align="left" width="110" height="110" src="/.github/wpIcon.svg" style="margin-right:1em" />
|
|
334
337
|
|
|
335
338
|
We've made a free WordPress plugin that works with Gutenberg Blocks, Elementor, Divi Builder and Flatsome UX Builder: [AM LottiePlayer](https://www.aarstein.media/en/am-lottieplayer). It has all the functionality of this package, with a helpful user interface.
|
|
336
339
|
|
|
337
340
|
It's super lightweight – and only loads on pages where animations are used.
|
|
338
341
|
|
|
339
|
-
We've also made a premium WordPress plugin for purchase: [AM
|
|
342
|
+
We've also made a premium WordPress plugin for purchase: [AM LottiePlayer PRO](https://www.aarstein.media/en/am-lottieplayer/pro). It has an easy-to-use GUI for combining and controlling multiple Lottie animations in a single file, converting JSON to dotLottie with drag-and-drop, and many more exclusive features.
|
|
340
343
|
|
|
341
344
|
## License
|
|
342
345
|
|