lottiefiles / dotlottie-web Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://dotlottie.io
License: MIT License
Home Page: https://dotlottie.io
License: MIT License
I want to use dotLottie web player on a Nuxt 2 project. But it seems there is an issue with the file loader. I haven't found a solution for this case yet (Currently only topic related to Nuxt 3 is opened)
Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
My reproduce repo:
Codesandbox
I used node v20.11.1 and nuxt 2.15.7.
So I would like to know if dotLottie currently support Nuxt 2. Thank you!
hello
adobe after effect movin and lottie json file can work here ?
as some image and text level dynamic template possible and convert to video ?
int his script possible or anyone can help us how to possible make dynamic tempalte so based on user we can process to mp4
currently in adobe we getting png with base64 raw format and other text how to modify dont know
When rendering a simple animation from the same JSON file, the result is different when using dotlottie-web compared to lottie-web. The dotlottie-web rendering produces unexpected opaque center within the rocket:
In the above example, lottie-web uses canvas renderer for fair comparison. Both use the same JSON file as a source. I tried converting JSON to dotlottie format, but it didn't change the result.
I created minimal reproduction that can be observed here: https://stackblitz.com/edit/vitejs-vite-2pieau?file=src%2FApp.svelte
I am using @lottiefiles/dotlottie-react 0.3.1
import myLottie from '@/assets/myLottie.lottie?url'
<DotLottieReact
width={'600'}
height={'400'}
src={myLottie}
autoplay
loop
/>
Canvas width and height getting smaller when I change zoom level. and hits zero eventually.
Type: Bug
label to this issue.dotlottie-web/packages/web/src/dotlottie.ts
Line 543 in 826f791
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
packages/web/Dockerfile
.github/workflows/main.yml
styfle/cancel-workflow-action 0.12.0
actions/checkout v4
pnpm/action-setup v2
actions/setup-node v4
andresz1/size-limit-action v1
actions/checkout v4
pnpm/action-setup v2
actions/setup-node v4
changesets/action v1
actions/setup-node v4
changesets/action v1
.github/workflows/stale.yml
actions/stale v8
apps/dotlottie-web-example/package.json
typescript 5.0.4
vite ^4.4.5
package.json
@changesets/cli 2.26.2
@commitlint/cli 17.6.1
@lottiefiles/commitlint-config 2.0.0
@lottiefiles/eslint-plugin 3.0.0
@lottiefiles/prettier-config 3.0.0
@lottiefiles/remark-preset 1.0.0
@lottiefiles/tsconfig 2.0.0
@size-limit/esbuild ^11.0.0
@size-limit/esbuild-why ^11.0.0
@size-limit/preset-small-lib ^10.0.2
cross-env 7.0.3
eslint 7.32.0
husky 8.0.3
lint-staged 13.2.1
npm-check-updates 16.10.9
prettier 2.8.8
remark-cli 11.0.0
size-limit ^10.0.2
syncpack 9.8.6
turbo 1.10.16
typescript 5.0.4
pnpm 8.10.1
packages/web/package.json
@dotlottie/dotlottie-js ^0.6.0
cross-env 7.0.3
tsup 7.2.0
typescript 5.0.4
node >=18
scripts/package.json
zx 7.0.7
Hey,
so I've added a preloader to my shopify website and used the dotlottie animation. It's only shown once in a session and only on the main page.
Via HTML I preload the .lottie file and the animation plays, after the DOM Content has completely loaded, to ensure, the timer syncs with the animation.
<div id="loader">
<dotlottie-player background="transparent" id="lottie-loader" speed="1" style="width: 50%; height: 50%" direction="1" mode="normal" loop autoplay></dotlottie-player>
</div>
<link rel="preload" fetchpriority="high" href="https://lottie.host/a276f20a-2888-4dc0-a098-2edf62682b4c/WtaeCDO9ti.lottie" type="application/json">
preloader.js
const loader = document.getElementById("loader");
$('#loader').hide();
}
$(document).ready(function() {
if (document.cookie.indexOf("preloaderShown=true") === -1) {
document.cookie = "preloaderShown=true; path=/";
window.onload = function() {
const player = document.querySelector('dotlottie-player');
player.load('https://lottie.host/a276f20a-2888-4dc0-a098-2edf62682b4c/WtaeCDO9ti.lottie');
setTimeout(function() {
hidePreloader();
}, 3100);
};
The animation hides, after the preloader has completely loaded.
} else {
// If the preloader has already been shown in this session, hide it immediately
$('#loader').hide();
}
});
Sometimes the animation skips some frames and lags, especially on mobile devices. It doesn't matter if your connection is slow or fast, since the animation only loads after the page is completely loaded.
How it looks when it bugs:
How it should look like:
This is also reproduceable on desktop. Sometimes it lags, sometimes not. Hope some1 can help me.
<script src="https://unpkg.com/@dotlottie/player-component@latest/dist/dotlottie-player.mjs" type="module"></script>What repo were you working in when this issue occurred?
...
Type: Bug
label to this issue.it seems like this repo is completely based on the canvas renderer, as it requires a canvas
element to function properly. are you planning to integrate the svg renderer as well at some point?
i prefer this repo over the player component, because it is not designed as a web component and does not encapsulate its functionality within a custom <dotlottie-player>
element, which unfortunately creates multiple issues on my side with my bundler and code splitting.
so this new repo seems to be making all my dreams come true. however, some of my animations are being played back filling the whole viewport, which creates performance issues and low frame rates. the svg renderer would eliminate these issues.
type: feature request
label to this issue.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.