All Projects → kbroulik → Lottie Qml

kbroulik / Lottie Qml

Licence: lgpl-2.1
QML Item for rendering Lottie Web animations in a QtQuick Canvas

Projects that are alternatives of or similar to Lottie Qml

Materialdialog Android
📱Android Library to implement animated, 😍beautiful, 🎨stylish Material Dialog in android apps easily.
Stars: ✭ 602 (+1405%)
Mutual labels:  animation-library, lottie
qtlottie
QtLottie is a tiny C++ library that can render Adobe® After Effects™ animations exported as JSON with Bodymovin.
Stars: ✭ 23 (-42.5%)
Mutual labels:  qml, lottie
Tap water
【声明:未发布前,勿使用,勿star,预计2020年11月底发布】Flutter tab_bar组件,支持中间带加号按钮的TabBar,支持Lottie动画。iTeaTime(技术清谈)团队出品。Highly customizable tabBar and tabBarController for Flutter
Stars: ✭ 52 (+30%)
Mutual labels:  animation-library, lottie
Cyltabbarcontroller
[EN]It is an iOS UI module library for adding animation to iOS tabbar items and icons with Lottie, and adding a bigger center UITabBar Item. [CN]【中国特色 TabBar】一行代码实现 Lottie 动画TabBar,支持中间带+号的TabBar样式,自带红点角标,支持动态刷新。【iOS13 & Dark Mode & iPhone XS MAX supported】
Stars: ✭ 6,605 (+16412.5%)
Mutual labels:  animation-library, lottie
Torquegui
A GUI wallet for Torque
Stars: ✭ 28 (-30%)
Mutual labels:  qml
Workspace
🚀 Base applications and settings for Liri OS
Stars: ✭ 9 (-77.5%)
Mutual labels:  qml
Camera App
Moved to GitLab
Stars: ✭ 9 (-77.5%)
Mutual labels:  qml
Harbour Searchnemo
Text search tool for Sailfish OS
Stars: ✭ 8 (-80%)
Mutual labels:  qml
Machineface
User interface for Machinekit optimized for 3D printers and mobile devices
Stars: ✭ 39 (-2.5%)
Mutual labels:  qml
Plasma tweaks
Stars: ✭ 34 (-15%)
Mutual labels:  qml
Sailfish Utilities
Sailfish Utilities
Stars: ✭ 21 (-47.5%)
Mutual labels:  qml
Qt Virt Keyboard
Simple virtual keyboard in QML for Qt applications
Stars: ✭ 11 (-72.5%)
Mutual labels:  qml
Katsudo
Katsudö is an animation library for LÖVE
Stars: ✭ 32 (-20%)
Mutual labels:  animation-library
Qml Snippet
some qml snippet.
Stars: ✭ 9 (-77.5%)
Mutual labels:  qml
Darkswitch
A dark theme switch written entirely in Qt Quick codes.
Stars: ✭ 34 (-15%)
Mutual labels:  qml
Latte Dock
Latte is a dock based on plasma frameworks that provides an elegant and intuitive experience for your tasks and plasmoids
Stars: ✭ 847 (+2017.5%)
Mutual labels:  qml
Progressbarcollection
I create this application to show up the demonstration for the collection of progress bars
Stars: ✭ 21 (-47.5%)
Mutual labels:  qml
Aaviewanimator
AAViewAnimator is a set of animations designed for UIView, UIButton, UIImageView with options in iOS, written in Swift.
Stars: ✭ 33 (-17.5%)
Mutual labels:  animation-library
Learning Guides
Stars: ✭ 15 (-62.5%)
Mutual labels:  qml
Webchimeraplayer
[deprecated] Open Source Player for WebChimera NPAPI -
Stars: ✭ 13 (-67.5%)
Mutual labels:  qml

Lottie QML

This provides a QML Item to render Adobe® After Effects™ animations exported as JSON with Bodymovin using the Lottie Web library.

See http://airbnb.io/lottie/

How to use

You can use the LottieAnimation item just like any other QtQuick element, such as an Image and place it in your scene any way you please.

import org.kde.lottie 1.0

LottieAnimation {
    id: fancyAnimation
    anchors.fill: parent
    source: Qt.resolvedUrl("animations/fancy_animation.json")
    loops: Animation.Infinite
    fillMode: Image.PreserveAspectFit
    running: true
}

There is a testing application provided in this repository:

qmlscene tester.qml

Just drag a Lottie JSON animation file into it and tweak the settings provided in the toolbar. You can also add multiple files and switch between them using the ComboBox in the top left or Ctrl+(Shift)+Tab shortcuts.

Property documentation

  • source can be an absolute URL to an animation JSON file (including qrc:/), a JSON data string, or a JavaScript object.
    • Relative URLs are currently not supported, use Qt.resolvedUrl, if neccessary
  • status can be Image.Null, Image.Ready, Image.Loading, or Image.Error. In the latter case errorString may contain error messages explaining the failure to load.
  • loops (default 0) can be an integer number of loops, or Animation.Infinite to repeat the animation indefinitely
  • running whether the animation is and should be running (you can also call start(), pause(), and stop())
  • speed (default 1.0) modifies the animation speed, e.g. 0.5x, 2.0x, …
  • reverse runs the animation in reverse
  • clearBeforeRendering (default true) Whether to clear the canvas before each frame, might improve performance on full-screen scenes but also cause unwanted rendering artefacts when disabled
  • fillMode can be Image.Stretch (default), Image.PreserveAspectFit, Image.PreserveAspectCrop, or Image.Pad
  • renderStrategy and renderTarget aliased to the internal Canvas

Notes

  • The item's implicitWidth and implicitHeight will be set to the animation's native canvas size.

How to install

mkdir build
cd build
cmake ..
make
make install

Known issues

  • QTBUG-68278: requestAnimationFrame passes seconds to its callback causing the animations to not advance properly. There is currently a workaround in place that uses the current time to advance the animations.
  • QTBUG-71524: You cannot use the non-minified lottie.js as Qt chokes on reserved keywords used as function names and arguments inside.

License

This library is licensed under either version 2.1 of the GNU Lesser General Public License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), see COPYING.LGPL-2.1, except for:

src/qml/3rdparty/lottie.min.js

The MIT License (MIT)

Copyright (c) 2015 Bodymovin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].