Skip to content

Commit be11374

Browse files
committed
lottie vs svg compare the SVG version oof the anim
1 parent 209e24a commit be11374

2 files changed

Lines changed: 438 additions & 8 deletions

File tree

src/routes/developmentthiswillgetdeleted/testlottie1/+page.svelte

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,44 @@
66
<h2>@lottiefiles/dotlottie-svelte</h2>
77

88
<h3>hoverdevice</h3>
9-
<p>{"/asset/penguin/animated/lottie/hoverdevice.json"}</p>
10-
<div>
11-
<DotLottieSvelte
12-
src="/asset/penguin/animated/lottie/hoverdevice.json"
13-
autoplay={true}
14-
loop={true}
15-
/>
9+
<p>
10+
<span><b>{"/asset/penguin/animated/lottie/hoverdevice.json"}</b></span>
11+
<span>vs.</span>
12+
<span><b>{"/asset/penguin/animated/svg/hoverdevice.svg"}</b></span>
13+
</p>
14+
<div class="row">
15+
<div class="card">
16+
<DotLottieSvelte
17+
src="/asset/penguin/animated/lottie/hoverdevice.json"
18+
autoplay={true}
19+
loop={true}
20+
/>
21+
</div>
22+
<div class="card">
23+
<img
24+
src="/asset/penguin/animated/svg/hoverdevice.svg"
25+
alt="Penguin"
26+
/>
27+
</div>
1628
</div>
1729

1830
<style>
19-
div {
31+
.row {
32+
width: 100%;
33+
height: 480px;
34+
35+
display: flex;
36+
flex-direction: row;
37+
}
38+
.card {
2039
width: 480px;
2140
height: 480px;
2241
}
42+
43+
img {
44+
width: 100%;
45+
height: 100%;
46+
47+
object-fit: contain;
48+
}
2349
</style>

0 commit comments

Comments
 (0)