Compare commits
53 Commits
expression
...
v1.4.3
Author | SHA1 | Date | |
---|---|---|---|
fc450a88f4 | |||
c0bc257f4f | |||
0e7499d82e | |||
4cd9ec759a | |||
d8f5b872ef | |||
bc3eb4621b | |||
08d7da747a | |||
b2ebd2058d | |||
2979b62dc0 | |||
340f0d2f27 | |||
34fef26eb2 | |||
89c62122bf | |||
56157b52af | |||
a52977f2b3 | |||
cb929e791d | |||
50495f24e2 | |||
9471029b0a | |||
a8f853437b | |||
a570e3f580 | |||
9584834956 | |||
d0edd1b3ee | |||
6831f475d4 | |||
bbfe04f00d | |||
5b7fde198a | |||
fe8847a5ba | |||
2360f643b7 | |||
1146e1f01d | |||
ba0bfcd126 | |||
cb8006d362 | |||
bf7d0ebf05 | |||
57faea6f5e | |||
548c77dc45 | |||
45a4c0b981 | |||
32b1181dad | |||
fcfe54686d | |||
b9aba4dce2 | |||
2cb1aefb2a | |||
478bd27e89 | |||
ef06d63040 | |||
0715f6a402 | |||
7e81ec3f69 | |||
f9f093a8a2 | |||
7c137ee55f | |||
8f4952a23a | |||
8bad4f96c0 | |||
bb73626c46 | |||
47e47f5cb8 | |||
954ec05598 | |||
66e644d043 | |||
3dab382b76 | |||
078e661fd4 | |||
336890cafe | |||
35ca2dc972 |
23
.github/workflows/analyze-and-test.yaml
vendored
@ -10,11 +10,11 @@ jobs:
|
||||
name: Flutter analyze
|
||||
strategy:
|
||||
matrix:
|
||||
flutter: ['stable', 'dev']
|
||||
flutter: ['stable']
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: subosito/flutter-action@v1
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: ${{ matrix.flutter }}
|
||||
- run: flutter doctor
|
||||
@ -22,8 +22,8 @@ jobs:
|
||||
- run: flutter pub get
|
||||
working-directory: example
|
||||
- run: flutter analyze
|
||||
- run: flutter test test # https://github.com/flutter/flutter/issues/20907
|
||||
- run: flutter test test
|
||||
- run: flutter test
|
||||
- run: flutter test
|
||||
working-directory: example
|
||||
- run: flutter pub run tool/prepare_submit.dart
|
||||
- name: "check for uncommitted changes"
|
||||
@ -32,4 +32,17 @@ jobs:
|
||||
|| (echo "##[error] found changed files after build. please run 'dart tool/prepare_submit.dart'" \
|
||||
"and check in all changes" \
|
||||
&& exit 1)
|
||||
shell: bash
|
||||
shell: bash
|
||||
build_web_version:
|
||||
name: Check that the web version compile
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
- run: flutter precache web
|
||||
- run: flutter pub get
|
||||
working-directory: example
|
||||
- run: flutter build web
|
||||
working-directory: example
|
||||
|
8
.github/workflows/publish-on-pub.yaml
vendored
@ -8,18 +8,16 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: subosito/flutter-action@v1
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
- run: flutter pub get
|
||||
- run: flutter pub run tool/publish/comment_dependency_overrides.dart
|
||||
- run: flutter pub get
|
||||
- run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF}
|
||||
- run: flutter pub run tool/publish/check_version.dart ${{ env.RELEASE_VERSION }}
|
||||
- run: flutter pub run tool/publish/check_version.dart ${GITHUB_REF}
|
||||
- name: Setup credentials
|
||||
run: |
|
||||
mkdir -p $FLUTTER_HOME/.pub-cache
|
||||
cat <<EOF > $FLUTTER_HOME/.pub-cache/credentials.json
|
||||
cat <<EOF > $PUB_CACHE/credentials.json
|
||||
{
|
||||
"accessToken":"${{ secrets.OAUTH_ACCESS_TOKEN }}",
|
||||
"refreshToken":"${{ secrets.OAUTH_REFRESH_TOKEN }}",
|
||||
|
1
.gitignore
vendored
@ -3,6 +3,7 @@ _*
|
||||
|
||||
!.gitignore
|
||||
!.github
|
||||
!.pubignore
|
||||
|
||||
**/failures/*.png
|
||||
|
||||
|
15
.pubignore
Normal file
@ -0,0 +1,15 @@
|
||||
.dart_tool/
|
||||
.packages
|
||||
build/
|
||||
doc/api/
|
||||
*.iml
|
||||
_*
|
||||
.*
|
||||
**/failures/*.png
|
||||
test/golden/
|
||||
test/goldens/
|
||||
example/assets/
|
||||
example/android/
|
||||
example/ios/
|
||||
example/macos/
|
||||
example/web/
|
192
CHANGELOG.md
@ -1,47 +1,213 @@
|
||||
## [0.3.2] - 2020-03-16
|
||||
## [1.4.3]
|
||||
- Fixed some lints with Flutter 3.3.
|
||||
|
||||
## [1.4.2]
|
||||
- Use `FilterQuality.low` as default to draw image layers.
|
||||
|
||||
## [1.4.1]
|
||||
- Allow `AlignmentGeometry` for `alignment`.
|
||||
|
||||
## [1.4.0]
|
||||
- Added `filterQuality` property to control the performance vs quality trade-off to use when drawing images
|
||||
|
||||
## [1.3.0]
|
||||
- Added support for rounded corners on shapes and rects
|
||||
- Add support for text in dynamic properties (`ValueDelegate`)
|
||||
|
||||
Example:
|
||||
|
||||
```dart
|
||||
Lottie.asset(
|
||||
'assets/DynamicText.json',
|
||||
delegates: LottieDelegates(values: [
|
||||
ValueDelegate.text(
|
||||
['Text layer'], // The path to the text element to change
|
||||
value: 'The new text',
|
||||
),
|
||||
]),
|
||||
)
|
||||
```
|
||||
|
||||
- Improve stroke with offset
|
||||
- Add support for reversed polystar paths
|
||||
- Enforce order of operations to avoid rounding errors
|
||||
|
||||
## [1.2.2]
|
||||
- Internal maintenance: fix lints for Flutter 2.10
|
||||
|
||||
## [1.2.1]
|
||||
- Fix: Revert Cubic to `PathInterpolator.cubic`
|
||||
|
||||
## [1.2.0]
|
||||
- Add support for gaussian blurs.
|
||||
|
||||
Example to blur some elements dynamically:
|
||||
|
||||
```dart
|
||||
Lottie.asset(
|
||||
'assets/AndroidWave.json',
|
||||
delegates: LottieDelegates(values: [
|
||||
ValueDelegate.blurRadius(
|
||||
['**'], // The path to the element to blur
|
||||
value: 20,
|
||||
),
|
||||
]),
|
||||
)
|
||||
```
|
||||
|
||||
- Add support for drop shadows.
|
||||
|
||||
Example to add a shadow dynamically:
|
||||
```dart
|
||||
Lottie.asset(
|
||||
'assets/animation.json',
|
||||
delegates: LottieDelegates(values: [
|
||||
ValueDelegate.dropShadow(
|
||||
['**'], // The path to the elements with shadow
|
||||
value: const DropShadow(
|
||||
color: Colors.blue,
|
||||
direction: 140,
|
||||
distance: 60,
|
||||
radius: 10,
|
||||
),
|
||||
),
|
||||
]),
|
||||
)
|
||||
```
|
||||
|
||||
## [1.1.0]
|
||||
- Add `errorBuilder` callback to provide an alternative widget in case an error occurs during loading.
|
||||
```dart
|
||||
Lottie.network(
|
||||
'https://example.does.not.exist/lottie.json',
|
||||
errorBuilder: (context, exception, stackTrace) {
|
||||
return const Text('😢');
|
||||
},
|
||||
);
|
||||
```
|
||||
|
||||
- Add `onWarning` to be notified when a warning occurs during the animation parsing or painting.
|
||||
Previously the warnings where written in an internal `logger`.
|
||||
```dart
|
||||
Lottie.asset('animation.json'
|
||||
onWarning: (warning) {
|
||||
_logger.info(warning);
|
||||
},
|
||||
);
|
||||
```
|
||||
- Various bug fixes
|
||||
|
||||
## [1.0.1]
|
||||
- Implement `RenderBox.computeDryLayout`
|
||||
|
||||
## [1.0.0]
|
||||
- Migrate to null safety
|
||||
- Fix some rendering bugs
|
||||
- Add an image delegate to dynamically change images
|
||||
- Allow to use an imageProviderFactory with a zip file
|
||||
|
||||
## [0.7.1]
|
||||
- Fix a crash for some lottie file with empty paths.
|
||||
|
||||
## [0.7.0+1]
|
||||
- Fix Flutter Web compilation error
|
||||
|
||||
## [0.7.0]
|
||||
- Performance improvement for complex animations.
|
||||
|
||||
## [0.6.0]
|
||||
- Runs the animation at the frame rate specified in the json file (ie. An animation encoded with a 20 FPS will only
|
||||
be paint 20 times per seconds even though the AnimationController will invalidate the widget 60 times per seconds).
|
||||
A new property `frameRate` allows to opt-out this behavior and have the widget to repaint at the device frame rate
|
||||
(`FrameRate.max`).
|
||||
- Automatically add a `RepaintBoundary` around the widget. Since `Lottie` animations are generally complex to paint, a
|
||||
`RepaintBoundary` will separate the animation with the rest of the app and improve performance. A new property `addRepaintBoundary`
|
||||
allows to opt-out this behavior.
|
||||
- Fix a bug where we would call `markNeedPaint` when the animation was not changing. This removes unnecessary paints in
|
||||
animations with static periods.
|
||||
|
||||
## [0.5.1]
|
||||
- Remove direct dependencies on dart:io to support Flutter Web
|
||||
|
||||
## [0.5.0]
|
||||
- Support loading animation from network in a web app
|
||||
- Fix a couple of bugs with the web dev compiler
|
||||
|
||||
## [0.4.1]
|
||||
- Support color value stored as RGB, not RGBA
|
||||
|
||||
## [0.4.0+1]
|
||||
- Support latest version of the `characters` package
|
||||
|
||||
## [0.4.0]
|
||||
- Disable "Merge paths" by default and provide an option to enable them.
|
||||
This is the same behavior as in Lottie-android.
|
||||
Merge paths currently don't work if the the operand shape is entirely contained within the
|
||||
first shape. If you need to cut out one shape from another shape, use an even-odd fill type
|
||||
instead of using merge paths.
|
||||
|
||||
Merge paths can be enabled with:
|
||||
```dart
|
||||
Lottie.asset('file.json', options: LottieOptions(enableMergePaths: true));
|
||||
```
|
||||
|
||||
|
||||
## [0.3.6]
|
||||
- Export the `Marker` class
|
||||
|
||||
## [0.3.5]
|
||||
- Fix a bug with a wrongly clipped rectangle.
|
||||
|
||||
## [0.3.4]
|
||||
- Fix a bug with dashed path
|
||||
|
||||
## [0.3.3]
|
||||
- Fix a bug with rounded rectangle shape
|
||||
|
||||
## [0.3.2]
|
||||
- Fix a bug with "repeater" content
|
||||
|
||||
## [0.3.1] - 2020-03-05
|
||||
## [0.3.1]
|
||||
- Support dashed path
|
||||
|
||||
## [0.3.0+1] - 2020-03-05
|
||||
## [0.3.0+1]
|
||||
- Specify a version range for the dependency on `characters`.
|
||||
|
||||
## [0.3.0] - 2020-03-05
|
||||
## [0.3.0]
|
||||
- Add `LottieDelegates` a group of options to customize the lottie animation at runtime.
|
||||
ie: Dynamically modify color, position, size, text... of every elements of the animation.
|
||||
- Correctly display Linear and Radial Gradients
|
||||
- Integrate latest changes from Lottie-android
|
||||
|
||||
## [0.2.2] - 2020-02-21
|
||||
## [0.2.2]
|
||||
- Add a [repeat] parameter to specify if the automatic animation should loop.
|
||||
- Add the [animate], [reverse], [repeat] properties on `LottieBuilder`
|
||||
- Fix bug with `onLoaded` callback when the `LottieProvider` is changed
|
||||
|
||||
## [0.2.1] - 2020-02-11
|
||||
## [0.2.1]
|
||||
- Fix a big bug in the path transformation code. A lot more animations look correct now.
|
||||
|
||||
## [0.2.0+1] - 2020-02-04
|
||||
## [0.2.0+1]
|
||||
- Improve readme
|
||||
- (internal) Add golden tests
|
||||
|
||||
## [0.2.0] - 2020-02-02
|
||||
## [0.2.0]
|
||||
- Support loading the animation and its images from a zip file
|
||||
- Breaking: `LottieComposition.fromBytes` and `fromByteData` are now asynchronous.
|
||||
|
||||
## [0.1.4] - 2020-02-02
|
||||
## [0.1.4]
|
||||
- Support images in animation
|
||||
- Basic support for text in animation (work in progress)
|
||||
|
||||
## [0.1.3] - 2020-02-01
|
||||
## [0.1.3]
|
||||
- Support Polystar shape
|
||||
- Reorganize examples.
|
||||
|
||||
## [0.1.2] - 2020-01-31
|
||||
## [0.1.2]
|
||||
- Implement `Lottie.network`, `Lottie.file` and `Lottie.memory`
|
||||
|
||||
## [0.1.1] - 2020-01-31
|
||||
## [0.1.1]
|
||||
- Fix analysis lints
|
||||
|
||||
## [0.1.0] - 2020-01-31
|
||||
## [0.1.0]
|
||||
- Initial conversion of [lottie-android](https://github.com/airbnb/lottie-android) to Dart/Flutter
|
||||
|
98
README.md
@ -3,12 +3,12 @@
|
||||
[](https://github.com/xvrh/lottie-flutter)
|
||||
[](https://pub.dev/packages/lottie)
|
||||
|
||||
Lottie is a mobile library for Android and iOS that parses [Adobe After Effects](http://www.adobe.com/products/aftereffects.html)
|
||||
Lottie is a mobile library for Android and iOS that parses [Adobe After Effects](https://www.adobe.com/products/aftereffects.html)
|
||||
animations exported as json with [Bodymovin](https://github.com/airbnb/lottie-web) and renders them natively on mobile!
|
||||
|
||||
This repository is a unofficial conversion of the [Lottie-android](https://github.com/airbnb/lottie-android) library in pure Dart.
|
||||
This repository is an unofficial conversion of the [Lottie-android](https://github.com/airbnb/lottie-android) library in pure Dart.
|
||||
|
||||
It works on Android, iOS and macOS. ([Web support is coming](https://github.com/xvrh/lottie-flutter#flutter-web))
|
||||
It works on Android, iOS, macOS, linux, windows and web.
|
||||
|
||||
## Usage
|
||||
|
||||
@ -20,9 +20,11 @@ The `Lottie` widget will load the json file and run the animation indefinitely.
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() => runApp(MyApp());
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
@ -49,19 +51,24 @@ class MyApp extends StatelessWidget {
|
||||
### Specify a custom `AnimationController`
|
||||
This example shows how to take full control over the animation by providing your own `AnimationController`.
|
||||
|
||||
With a custom `AnimationController` you have a rich API to play the animation in various ways: start and stop the animation when you want,
|
||||
play forward or backward, loop between specifics points...
|
||||
|
||||
```dart
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() => runApp(MyApp());
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_MyAppState createState() => _MyAppState();
|
||||
State<MyApp> createState() => _MyAppState();
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
|
||||
AnimationController _controller;
|
||||
late final AnimationController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -82,8 +89,8 @@ class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
|
||||
home: Scaffold(
|
||||
body: ListView(
|
||||
children: [
|
||||
Lottie.network(
|
||||
'https://raw.githubusercontent.com/xvrh/lottie-flutter/master/example/assets/Mobilo/C.json',
|
||||
Lottie.asset(
|
||||
'assets/LottieLogo1.json',
|
||||
controller: _controller,
|
||||
onLoaded: (composition) {
|
||||
// Configure the AnimationController with the duration of the
|
||||
@ -101,6 +108,8 @@ class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
|
||||
}
|
||||
```
|
||||
|
||||
[See this file](https://github.com/xvrh/lottie-flutter/blob/master/example/lib/examples/animation_full_control.dart) for a more comprehensive example.
|
||||
|
||||
### Control the size of the Widget
|
||||
The `Lottie` widget takes the same arguments and have the same behavior as the `Image` widget
|
||||
in term of controlling its size.
|
||||
@ -117,21 +126,24 @@ Lottie.asset(
|
||||
animation.
|
||||
|
||||
### Custom loading
|
||||
This example shows how to load and parse a Lottie composition from a json file.
|
||||
|
||||
The `Lottie` widget has several convenient constructors (`Lottie.asset`, `Lottie.network`, `Lottie.memory`) to load, parse and
|
||||
cache automatically the json file.
|
||||
|
||||
Sometime you may prefer to have full control over the loading of the file. Use `LottieComposition.fromByteData` to
|
||||
parse the file from a list of bytes.
|
||||
|
||||
This example shows how to load and parse a Lottie composition from a json file.
|
||||
|
||||
```dart
|
||||
class MyWidget extends StatefulWidget {
|
||||
const MyWidget({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_MyWidgetState createState() => _MyWidgetState();
|
||||
State<MyWidget> createState() => _MyWidgetState();
|
||||
}
|
||||
|
||||
class _MyWidgetState extends State<MyWidget> {
|
||||
Future<LottieComposition> _composition;
|
||||
late final Future<LottieComposition> _composition;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -154,7 +166,7 @@ class _MyWidgetState extends State<MyWidget> {
|
||||
if (composition != null) {
|
||||
return Lottie(composition: composition);
|
||||
} else {
|
||||
return Center(child: CircularProgressIndicator());
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
},
|
||||
);
|
||||
@ -170,26 +182,25 @@ a specific position and size.
|
||||
class CustomDrawer extends StatelessWidget {
|
||||
final LottieComposition composition;
|
||||
|
||||
const CustomDrawer(this.composition, {Key key}) : super(key: key);
|
||||
const CustomDrawer(this.composition, {Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomPaint(
|
||||
painter: _Painter(composition),
|
||||
size: Size(400, 400),
|
||||
size: const Size(400, 400),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _Painter extends CustomPainter {
|
||||
final LottieComposition composition;
|
||||
final LottieDrawable drawable;
|
||||
|
||||
_Painter(this.composition);
|
||||
_Painter(LottieComposition composition)
|
||||
: drawable = LottieDrawable(composition);
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
var drawable = LottieDrawable(composition);
|
||||
|
||||
var frameCount = 40;
|
||||
var columns = 10;
|
||||
for (var i = 0; i < frameCount; i++) {
|
||||
@ -219,39 +230,34 @@ class _Animation extends StatelessWidget {
|
||||
return Lottie.asset(
|
||||
'assets/Tests/Shapes.json',
|
||||
delegates: LottieDelegates(
|
||||
text: (initialText) => translate(initialText),
|
||||
values: [
|
||||
ValueDelegate.color(
|
||||
const ['Shape Layer 1', 'Rectangle', 'Fill 1'],
|
||||
value: Colors.red,
|
||||
),
|
||||
ValueDelegate.opacity(
|
||||
const ['Shape Layer 1', 'Rectangle'],
|
||||
callback: (frameInfo) =>
|
||||
(frameInfo.overallProgress * 100).round(),
|
||||
),
|
||||
ValueDelegate.position(
|
||||
const ['Shape Layer 1', 'Rectangle'],
|
||||
relative: Offset(100, 200),
|
||||
),
|
||||
]),
|
||||
text: (initialText) => '**$initialText**',
|
||||
values: [
|
||||
ValueDelegate.color(
|
||||
const ['Shape Layer 1', 'Rectangle', 'Fill 1'],
|
||||
value: Colors.red,
|
||||
),
|
||||
ValueDelegate.opacity(
|
||||
const ['Shape Layer 1', 'Rectangle'],
|
||||
callback: (frameInfo) => (frameInfo.overallProgress * 100).round(),
|
||||
),
|
||||
ValueDelegate.position(
|
||||
const ['Shape Layer 1', 'Rectangle', '**'],
|
||||
relative: const Offset(100, 200),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
````
|
||||
|
||||
## Limitations
|
||||
This is a new library so usability, documentation and performance are still work in progress.
|
||||
|
||||
Only the [supported features of Lottie Android](https://airbnb.io/lottie/#/supported-features)
|
||||
are supported in this port.
|
||||
This port supports the same [feature set as Lottie Android](https://airbnb.io/lottie/#/supported-features).
|
||||
|
||||
## Flutter Web
|
||||
Run the app with `flutter run -d Chrome --dart-define=FLUTTER_WEB_USE_SKIA=true --release`
|
||||
Run the app with `flutter run -d chrome --web-renderer canvaskit`
|
||||
|
||||
The performance are not great and some features are missing.
|
||||
See a preview here: https://xvrh.github.io/lottie-flutter-web/
|
||||
|
||||
See a preview here: https://xvrh.github.io/lottie-flutter/index.html
|
||||
|
||||
## Complete example
|
||||
See the Sample app (in the `example` folder) for a complete example of the various possibilities.
|
||||
## More examples
|
||||
See the `example` folder for more code samples of the various possibilities.
|
||||
|
@ -3,12 +3,12 @@
|
||||
[](https://github.com/xvrh/lottie-flutter)
|
||||
[](https://pub.dev/packages/lottie)
|
||||
|
||||
Lottie is a mobile library for Android and iOS that parses [Adobe After Effects](http://www.adobe.com/products/aftereffects.html)
|
||||
Lottie is a mobile library for Android and iOS that parses [Adobe After Effects](https://www.adobe.com/products/aftereffects.html)
|
||||
animations exported as json with [Bodymovin](https://github.com/airbnb/lottie-web) and renders them natively on mobile!
|
||||
|
||||
This repository is a unofficial conversion of the [Lottie-android](https://github.com/airbnb/lottie-android) library in pure Dart.
|
||||
This repository is an unofficial conversion of the [Lottie-android](https://github.com/airbnb/lottie-android) library in pure Dart.
|
||||
|
||||
It works on Android, iOS and macOS. ([Web support is coming](https://github.com/xvrh/lottie-flutter#flutter-web))
|
||||
It works on Android, iOS, macOS, linux, windows and web.
|
||||
|
||||
## Usage
|
||||
|
||||
@ -17,16 +17,21 @@ This example shows how to display a Lottie animation in the simplest way.
|
||||
The `Lottie` widget will load the json file and run the animation indefinitely.
|
||||
|
||||
```dart
|
||||
import 'example/lib/examples/main.dart';
|
||||
import 'example/lib/main.dart';
|
||||
```
|
||||
|
||||
### Specify a custom `AnimationController`
|
||||
This example shows how to take full control over the animation by providing your own `AnimationController`.
|
||||
|
||||
With a custom `AnimationController` you have a rich API to play the animation in various ways: start and stop the animation when you want,
|
||||
play forward or backward, loop between specifics points...
|
||||
|
||||
```dart
|
||||
import 'example/lib/examples/animation_controller.dart';
|
||||
```
|
||||
|
||||
[See this file](https://github.com/xvrh/lottie-flutter/blob/master/example/lib/examples/animation_full_control.dart) for a more comprehensive example.
|
||||
|
||||
### Control the size of the Widget
|
||||
The `Lottie` widget takes the same arguments and have the same behavior as the `Image` widget
|
||||
in term of controlling its size.
|
||||
@ -43,13 +48,14 @@ Lottie.asset(
|
||||
animation.
|
||||
|
||||
### Custom loading
|
||||
This example shows how to load and parse a Lottie composition from a json file.
|
||||
|
||||
The `Lottie` widget has several convenient constructors (`Lottie.asset`, `Lottie.network`, `Lottie.memory`) to load, parse and
|
||||
cache automatically the json file.
|
||||
|
||||
Sometime you may prefer to have full control over the loading of the file. Use `LottieComposition.fromByteData` to
|
||||
parse the file from a list of bytes.
|
||||
|
||||
This example shows how to load and parse a Lottie composition from a json file.
|
||||
|
||||
```dart
|
||||
import 'example/lib/examples/custom_load.dart#example';
|
||||
```
|
||||
@ -72,17 +78,12 @@ import 'example/lib/examples/simple_dynamic_properties.dart#example';
|
||||
````
|
||||
|
||||
## Limitations
|
||||
This is a new library so usability, documentation and performance are still work in progress.
|
||||
|
||||
Only the [supported features of Lottie Android](https://airbnb.io/lottie/#/supported-features)
|
||||
are supported in this port.
|
||||
This port supports the same [feature set as Lottie Android](https://airbnb.io/lottie/#/supported-features).
|
||||
|
||||
## Flutter Web
|
||||
Run the app with `flutter run -d Chrome --dart-define=FLUTTER_WEB_USE_SKIA=true --release`
|
||||
Run the app with `flutter run -d chrome --web-renderer canvaskit`
|
||||
|
||||
The performance are not great and some features are missing.
|
||||
See a preview here: https://xvrh.github.io/lottie-flutter-web/
|
||||
|
||||
See a preview here: https://xvrh.github.io/lottie-flutter/index.html
|
||||
|
||||
## Complete example
|
||||
See the Sample app (in the `example` folder) for a complete example of the various possibilities.
|
||||
## More examples
|
||||
See the `example` folder for more code samples of the various possibilities.
|
||||
|
@ -1,39 +1,29 @@
|
||||
include: package:pedantic/analysis_options.yaml
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
analyzer:
|
||||
errors:
|
||||
strong-mode:
|
||||
implicit-casts: false
|
||||
implicit-dynamic: false
|
||||
linter:
|
||||
rules:
|
||||
avoid_renaming_method_parameters: true
|
||||
avoid_returning_null_for_future: true
|
||||
avoid_returning_null_for_void: true
|
||||
avoid_returning_this: true
|
||||
avoid_print: false
|
||||
|
||||
always_declare_return_types: true
|
||||
avoid_dynamic_calls: true
|
||||
avoid_escaping_inner_quotes: true
|
||||
avoid_setters_without_getters: true
|
||||
await_only_futures: true
|
||||
camel_case_types: true
|
||||
cancel_subscriptions: true
|
||||
cast_nullable_to_non_nullable: true
|
||||
close_sinks: true
|
||||
constant_identifier_names: true
|
||||
empty_statements: true
|
||||
hash_and_equals: true
|
||||
iterable_contains_unrelated_type: true
|
||||
list_remove_unrelated_type: true
|
||||
no_adjacent_strings_in_list: true
|
||||
non_constant_identifier_names: true
|
||||
no_default_cases: true
|
||||
omit_local_variable_types: true
|
||||
only_throw_errors: true
|
||||
overridden_fields: true
|
||||
prefer_inlined_adds: true
|
||||
prefer_interpolation_to_compose_strings: true
|
||||
prefer_null_aware_operators: true
|
||||
prefer_relative_imports: true
|
||||
prefer_typing_uninitialized_variables: true
|
||||
prefer_single_quotes: true
|
||||
sort_child_properties_last: true
|
||||
sort_pub_dependencies: true
|
||||
test_types_in_equals: true
|
||||
unnecessary_brace_in_string_interps: true
|
||||
unnecessary_getters_setters: true
|
||||
unawaited_futures: true
|
||||
unnecessary_parenthesis: true
|
||||
unnecessary_statements: true
|
||||
use_function_type_syntax_for_parameters: true
|
||||
void_checks: true
|
||||
unsafe_html: true
|
||||
use_raw_strings: true
|
||||
|
@ -6,9 +6,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() => runApp(MyApp());
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
|
6
example/android/.gitignore
vendored
@ -5,3 +5,9 @@ gradle-wrapper.jar
|
||||
/gradlew.bat
|
||||
/local.properties
|
||||
GeneratedPluginRegistrant.java
|
||||
|
||||
# Remember to never publicly share your keystore.
|
||||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||
key.properties
|
||||
**/*.keystore
|
||||
**/*.jks
|
||||
|
@ -8,7 +8,7 @@ if (localPropertiesFile.exists()) {
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new Exception("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
@ -26,23 +26,28 @@ apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
compileSdkVersion flutter.compileSdkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
disable 'InvalidPackage'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.github.xvrh.lottie.sample"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.github.xvrh.lottie.example"
|
||||
minSdkVersion flutter.minSdkVersion
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@ -60,7 +65,4 @@ flutter {
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.github.xvrh.lottie.sample">
|
||||
package="com.github.xvrh.lottie.example">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
|
@ -1,21 +1,25 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.github.xvrh.lottie.sample">
|
||||
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
||||
calls FlutterMain.startInitialization(this); in its onCreate method.
|
||||
In most cases you can leave this as-is, but you if you want to provide
|
||||
additional functionality it is fine to subclass or reimplement
|
||||
FlutterApplication and put your custom class here. -->
|
||||
<application
|
||||
android:name="io.flutter.app.FlutterApplication"
|
||||
package="com.github.xvrh.lottie.example">
|
||||
<application
|
||||
android:label="example"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
|
@ -0,0 +1,6 @@
|
||||
package com.github.xvrh.lottie.example
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package com.github.xvrh.lottie.sample
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.plugins.GeneratedPluginRegistrant
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
|
||||
GeneratedPluginRegistrant.registerWith(flutterEngine);
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
18
example/android/app/src/main/res/values-night/styles.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
@ -1,8 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.github.xvrh.lottie.sample">
|
||||
package="com.github.xvrh.lottie.example">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
|
@ -1,12 +1,12 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.50'
|
||||
ext.kotlin_version = '1.6.10'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.0'
|
||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
@ -14,7 +14,7 @@ buildscript {
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.enableR8=true
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
||||
|
@ -1,15 +1,11 @@
|
||||
include ':app'
|
||||
|
||||
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
|
||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
||||
def properties = new Properties()
|
||||
|
||||
def plugins = new Properties()
|
||||
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
|
||||
if (pluginsFile.exists()) {
|
||||
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
|
||||
}
|
||||
assert localPropertiesFile.exists()
|
||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
||||
|
||||
plugins.each { name, path ->
|
||||
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
|
||||
include ":$name"
|
||||
project(":$name").projectDir = pluginDirectory
|
||||
}
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
||||
|
1
example/assets/Tests/AnimatedShadow.json
Normal file
@ -0,0 +1 @@
|
||||
{"v":"5.7.7","fr":29.9700012207031,"ip":0,"op":181.000007372281,"w":375,"h":375,"nm":"Square","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[187.5,187.5,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":25,"nm":"Drop Shadow2","np":8,"mn":"ADBE Drop Shadow","ix":1,"en":1,"ef":[{"ty":2,"nm":"Shadow Color","mn":"ADBE Drop Shadow-0001","ix":1,"v":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0,0,0,1]},{"t":151.000006150356,"s":[0,0.371857702732,1,1]}],"ix":1}},{"ty":0,"nm":"Opacity","mn":"ADBE Drop Shadow-0002","ix":2,"v":{"a":1,"k":[{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":0,"s":[127.5]},{"t":151.000006150356,"s":[127.5]}],"ix":2}},{"ty":0,"nm":"Direction","mn":"ADBE Drop Shadow-0003","ix":3,"v":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":151.000006150356,"s":[360]}],"ix":3}},{"ty":0,"nm":"Distance","mn":"ADBE Drop Shadow-0004","ix":4,"v":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[10]},{"t":151.000006150356,"s":[15]}],"ix":4}},{"ty":0,"nm":"Softness","mn":"ADBE Drop Shadow-0005","ix":5,"v":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[20]},{"t":151.000006150356,"s":[50]}],"ix":5}},{"ty":7,"nm":"Shadow Only","mn":"ADBE Drop Shadow-0006","ix":6,"v":{"a":0,"k":0,"ix":6}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[217.641,217.641],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-4.68,-1.68],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":184.000007494474,"st":0,"bm":0}],"markers":[]}
|
17675
example/assets/Tests/EditedColor.json
Normal file
1
example/assets/Tests/FillBlur.json
Normal file
@ -0,0 +1 @@
|
||||
{"v":"5.7.7","fr":29.9700012207031,"ip":0,"op":121.000004928431,"w":400,"h":400,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[200,200,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":29,"nm":"Gaussian Blur2","np":5,"mn":"ADBE Gaussian Blur 2","ix":1,"en":1,"ef":[{"ty":0,"nm":"Blurriness","mn":"ADBE Gaussian Blur 2-0001","ix":1,"v":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":24.00000097754,"s":[120.7]}],"ix":1}},{"ty":7,"nm":"Blur Dimensions","mn":"ADBE Gaussian Blur 2-0002","ix":2,"v":{"a":0,"k":1,"ix":2}},{"ty":7,"nm":"Repeat Edge Pixels","mn":"ADBE Gaussian Blur 2-0003","ix":3,"v":{"a":0,"k":0,"ix":3}}]},{"ty":5,"nm":"Bulge","np":9,"mn":"ADBE Bulge","ix":2,"en":1,"ef":[{"ty":0,"nm":"Horizontal Radius","mn":"ADBE Bulge-0001","ix":1,"v":{"a":0,"k":50,"ix":1}},{"ty":0,"nm":"Vertical Radius","mn":"ADBE Bulge-0002","ix":2,"v":{"a":0,"k":50,"ix":2}},{"ty":3,"nm":"Bulge Center","mn":"ADBE Bulge-0003","ix":3,"v":{"a":0,"k":[200,200],"ix":3}},{"ty":0,"nm":"Bulge Height","mn":"ADBE Bulge-0004","ix":4,"v":{"a":0,"k":1,"ix":4}},{"ty":0,"nm":"Taper Radius","mn":"ADBE Bulge-0005","ix":5,"v":{"a":0,"k":0,"ix":5}},{"ty":7,"nm":"Antialiasing (Best Qual Only)","mn":"ADBE Bulge-0006","ix":6,"v":{"a":0,"k":1,"ix":6}},{"ty":7,"nm":"Pinning","mn":"ADBE Bulge-0007","ix":7,"v":{"a":0,"k":0,"ix":7}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[274.975,274.975],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"tr","p":{"a":0,"k":[-4.513,7.487],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":1,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":121.000004928431,"st":0,"bm":0}],"markers":[]}
|
1
example/assets/Tests/GradientFillBlur.json
Normal file
@ -0,0 +1 @@
|
||||
{"v":"5.7.7","fr":29.9700012207031,"ip":0,"op":121.000004928431,"w":400,"h":400,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[200,200,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":29,"nm":"Gaussian Blur2","np":5,"mn":"ADBE Gaussian Blur 2","ix":1,"en":1,"ef":[{"ty":0,"nm":"Blurriness","mn":"ADBE Gaussian Blur 2-0001","ix":1,"v":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":24.00000097754,"s":[120.7]}],"ix":1}},{"ty":7,"nm":"Blur Dimensions","mn":"ADBE Gaussian Blur 2-0002","ix":2,"v":{"a":0,"k":1,"ix":2}},{"ty":7,"nm":"Repeat Edge Pixels","mn":"ADBE Gaussian Blur 2-0003","ix":3,"v":{"a":0,"k":0,"ix":3}}]},{"ty":5,"nm":"Bulge","np":9,"mn":"ADBE Bulge","ix":2,"en":1,"ef":[{"ty":0,"nm":"Horizontal Radius","mn":"ADBE Bulge-0001","ix":1,"v":{"a":0,"k":50,"ix":1}},{"ty":0,"nm":"Vertical Radius","mn":"ADBE Bulge-0002","ix":2,"v":{"a":0,"k":50,"ix":2}},{"ty":3,"nm":"Bulge Center","mn":"ADBE Bulge-0003","ix":3,"v":{"a":0,"k":[200,200],"ix":3}},{"ty":0,"nm":"Bulge Height","mn":"ADBE Bulge-0004","ix":4,"v":{"a":0,"k":1,"ix":4}},{"ty":0,"nm":"Taper Radius","mn":"ADBE Bulge-0005","ix":5,"v":{"a":0,"k":0,"ix":5}},{"ty":7,"nm":"Antialiasing (Best Qual Only)","mn":"ADBE Bulge-0006","ix":6,"v":{"a":0,"k":1,"ix":6}},{"ty":7,"nm":"Pinning","mn":"ADBE Bulge-0007","ix":7,"v":{"a":0,"k":0,"ix":7}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[274.975,274.975],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"tr","p":{"a":0,"k":[-4.513,7.487],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":1,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gf","o":{"a":0,"k":100,"ix":10},"r":1,"bm":0,"g":{"p":3,"k":{"a":0,"k":[0,1,0,0,0.5,0.505,0,0.5,1,0.009,0,1],"ix":9}},"s":{"a":0,"k":[-125,0],"ix":5},"e":{"a":0,"k":[100,0],"ix":6},"t":1,"nm":"Gradient Fill 1","mn":"ADBE Vector Graphic - G-Fill","hd":false}],"ip":0,"op":121.000004928431,"st":0,"bm":0}],"markers":[]}
|
3512
example/assets/Tests/GradientOneColor.json
Normal file
87
example/assets/Tests/GradientOpacityInterpolation.json
Normal file
@ -0,0 +1,87 @@
|
||||
{
|
||||
"v": "5.7.1",
|
||||
"fr": 60,
|
||||
"ip": 0,
|
||||
"op": 65,
|
||||
"w": 1056,
|
||||
"h": 1056,
|
||||
"nm": "Animation",
|
||||
"ddd": 0,
|
||||
"assets": [],
|
||||
"layers": [
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 1,
|
||||
"ty": 4,
|
||||
"nm": "Shape Layer 3",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": { "a": 0, "k": 100, "ix": 11 },
|
||||
"r": { "a": 0, "k": 0, "ix": 10 },
|
||||
"p": { "a": 0, "k": [528, 531, 0], "ix": 2 },
|
||||
"a": { "a": 0, "k": [0, 0, 0], "ix": 1 },
|
||||
"s": { "a": 0, "k": [147.368, 147.368, 100], "ix": 6 }
|
||||
},
|
||||
"ao": 0,
|
||||
"shapes": [
|
||||
{
|
||||
"ty": "gr",
|
||||
"it": [
|
||||
{
|
||||
"d": 1,
|
||||
"ty": "el",
|
||||
"s": { "a": 0, "k": [415, 415], "ix": 2 },
|
||||
"p": { "a": 0, "k": [0, 0], "ix": 3 },
|
||||
"nm": "Ellipse Path 1",
|
||||
"mn": "ADBE Vector Shape - Ellipse",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "gf",
|
||||
"o": { "a": 0, "k": 55, "ix": 10 },
|
||||
"r": 1,
|
||||
"bm": 0,
|
||||
"g": {
|
||||
"p": 3,
|
||||
"k": {
|
||||
"a": 0,
|
||||
"k": [0, 0.969, 0.514, 0.745, 0.116, 0.984, 0.537, 0.373, 1, 1, 0.559, 0, 0.607, 0, 0.776, 0.5, 0.945, 1],
|
||||
"ix": 9
|
||||
}
|
||||
},
|
||||
"s": { "a": 0, "k": [-206.344, -144.451], "ix": 5 },
|
||||
"e": { "a": 0, "k": [173.147, 192.356], "ix": 6 },
|
||||
"t": 1,
|
||||
"nm": "Gradient Fill 9",
|
||||
"mn": "ADBE Vector Graphic - G-Fill",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "tr",
|
||||
"p": { "a": 0, "k": [1.141, 0.406], "ix": 2 },
|
||||
"a": { "a": 0, "k": [-5, -39], "ix": 1 },
|
||||
"s": { "a": 0, "k": [105.082, 105.082], "ix": 3 },
|
||||
"r": { "a": 0, "k": -5.052, "ix": 6 },
|
||||
"o": { "a": 0, "k": 100, "ix": 7 },
|
||||
"sk": { "a": 0, "k": 0, "ix": 4 },
|
||||
"sa": { "a": 0, "k": 0, "ix": 5 },
|
||||
"nm": "Transform"
|
||||
}
|
||||
],
|
||||
"nm": "Group 1",
|
||||
"np": 9,
|
||||
"cix": 2,
|
||||
"bm": 0,
|
||||
"ix": 1,
|
||||
"mn": "ADBE Vector Group",
|
||||
"hd": false
|
||||
}
|
||||
],
|
||||
"ip": -6,
|
||||
"op": 69,
|
||||
"st": 1.2,
|
||||
"bm": 0
|
||||
}
|
||||
],
|
||||
"markers": []
|
||||
}
|
1
example/assets/Tests/GradientStrokeBlur.json
Normal file
@ -0,0 +1 @@
|
||||
{"v":"5.7.7","fr":29.9700012207031,"ip":0,"op":121.000004928431,"w":400,"h":400,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[200,200,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":29,"nm":"Gaussian Blur2","np":5,"mn":"ADBE Gaussian Blur 2","ix":1,"en":1,"ef":[{"ty":0,"nm":"Blurriness","mn":"ADBE Gaussian Blur 2-0001","ix":1,"v":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":24.00000097754,"s":[120.7]}],"ix":1}},{"ty":7,"nm":"Blur Dimensions","mn":"ADBE Gaussian Blur 2-0002","ix":2,"v":{"a":0,"k":1,"ix":2}},{"ty":7,"nm":"Repeat Edge Pixels","mn":"ADBE Gaussian Blur 2-0003","ix":3,"v":{"a":0,"k":0,"ix":3}}]},{"ty":5,"nm":"Bulge","np":9,"mn":"ADBE Bulge","ix":2,"en":1,"ef":[{"ty":0,"nm":"Horizontal Radius","mn":"ADBE Bulge-0001","ix":1,"v":{"a":0,"k":50,"ix":1}},{"ty":0,"nm":"Vertical Radius","mn":"ADBE Bulge-0002","ix":2,"v":{"a":0,"k":50,"ix":2}},{"ty":3,"nm":"Bulge Center","mn":"ADBE Bulge-0003","ix":3,"v":{"a":0,"k":[200,200],"ix":3}},{"ty":0,"nm":"Bulge Height","mn":"ADBE Bulge-0004","ix":4,"v":{"a":0,"k":1,"ix":4}},{"ty":0,"nm":"Taper Radius","mn":"ADBE Bulge-0005","ix":5,"v":{"a":0,"k":0,"ix":5}},{"ty":7,"nm":"Antialiasing (Best Qual Only)","mn":"ADBE Bulge-0006","ix":6,"v":{"a":0,"k":1,"ix":6}},{"ty":7,"nm":"Pinning","mn":"ADBE Bulge-0007","ix":7,"v":{"a":0,"k":0,"ix":7}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[274.975,274.975],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"tr","p":{"a":0,"k":[-4.513,7.487],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":1,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gs","o":{"a":0,"k":100,"ix":9},"w":{"a":0,"k":41,"ix":10},"g":{"p":3,"k":{"a":0,"k":[0,0.01,0,1,0.5,0.496,0,0.5,1,0.982,0,0],"ix":8}},"s":{"a":0,"k":[-45,0],"ix":4},"e":{"a":0,"k":[100,0],"ix":5},"t":1,"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":13},"bm":0,"nm":"Gradient Stroke 1","mn":"ADBE Vector Graphic - G-Stroke","hd":false}],"ip":0,"op":121.000004928431,"st":0,"bm":0}],"markers":[]}
|
1
example/assets/Tests/PrecompBlur.json
Normal file
1
example/assets/Tests/Rect1.json
Normal file
@ -0,0 +1 @@
|
||||
{"assets":[],"layers":[{"ddd":0,"ind":0,"ty":4,"nm":"Shape Layer 1","parent":1,"ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[100,100,0]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":0,"s":[85.714,85.714],"e":[52.714,52.714]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":16,"s":[52.714,52.714],"e":[85.714,85.714]},{"t":35}]},"p":{"k":[0,0]},"r":{"k":0},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect"},{"ty":"st","c":{"k":[0,0,0,1]},"o":{"k":100},"w":{"k":14},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[3.198,1.099],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":2,"mn":"ADBE Vector Group"}],"ip":0,"op":36,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":1,"nm":"White Solid 1","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[45,45,0]},"a":{"k":[100,100,0]},"s":{"k":[45,45,100]}},"ao":0,"sw":200,"sh":200,"sc":"#ffffff","ip":0,"op":36,"st":0,"bm":0,"sr":1}],"v":"4.5.4","ddd":0,"ip":0,"op":36,"fr":60,"w":90,"h":90}
|
1
example/assets/Tests/Rect3.json
Normal file
@ -0,0 +1 @@
|
||||
{"assets":[],"layers":[{"ddd":0,"ind":0,"ty":4,"nm":"Shape Layer 1","parent":1,"ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[100,100,0]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"k":[{"i":{"x":[0.1,0.1],"y":[1,1]},"o":{"x":[0.9,0.9],"y":[0,0]},"n":["0p1_1_0p9_0","0p1_1_0p9_0"],"t":0,"s":[85.714,85.714],"e":[52.714,52.714]},{"i":{"x":[0.1,0.1],"y":[1,1]},"o":{"x":[0.9,0.9],"y":[0,0]},"n":["0p1_1_0p9_0","0p1_1_0p9_0"],"t":16,"s":[52.714,52.714],"e":[85.714,85.714]},{"t":35}]},"p":{"k":[0,0]},"r":{"k":0},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect"},{"ty":"st","c":{"k":[0,0,0,1]},"o":{"k":100},"w":{"k":14},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[2.198,1.099],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":2,"mn":"ADBE Vector Group"}],"ip":0,"op":273,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":1,"nm":"White Solid 1","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[45,45,0]},"a":{"k":[100,100,0]},"s":{"k":[45,45,100]}},"ao":0,"sw":200,"sh":200,"sc":"#ffffff","ip":0,"op":36,"st":0,"bm":0,"sr":1}],"v":"4.5.4","ddd":0,"ip":0,"op":36,"fr":60,"w":90,"h":90}
|
1
example/assets/Tests/Rect4.json
Normal file
@ -0,0 +1 @@
|
||||
{ "assets": [], "layers": [ { "ddd": 0, "ind": 0, "ty": 4, "nm": "Shape Layer 1", "ks": { "o": { "k": 100 }, "r": { "k": 0 }, "p": { "k": [ 100, 100, 0 ] }, "a": { "k": [ 0, 0, 0 ] }, "s": { "k": [ 100, 100, 100 ] } }, "ao": 0, "shapes": [ { "ty": "gr", "it": [ { "ty": "rc", "d": 1, "s": { "k": [ { "i": { "x": [ 0.12, 0.12 ], "y": [ 0.12, 1 ] }, "o": { "x": [ 0.88, 0.88 ], "y": [ 0.88, 0 ] }, "n": [ "0p12_0p12_0p88_0p88", "0p12_1_0p88_0" ], "t": 0, "s": [ 85.714, 85.714 ], "e": [ 85.714, 154.714 ] }, { "i": { "x": [ 0.12, 0.12 ], "y": [ 0.12, 1 ] }, "o": { "x": [ 0.88, 0.88 ], "y": [ 0.88, 0 ] }, "n": [ "0p12_0p12_0p88_0p88", "0p12_1_0p88_0" ], "t": 16, "s": [ 85.714, 154.714 ], "e": [ 85.714, 85.714 ] }, { "t": 35 } ] }, "p": { "k": [ 0, 0 ] }, "r": { "k": 0 }, "nm": "Rectangle Path 1", "mn": "ADBE Vector Shape - Rect" }, { "ty": "st", "c": { "k": [ 0, 0, 0, 1 ] }, "o": { "k": 100 }, "w": { "k": 14 }, "lc": 1, "lj": 1, "ml": 4, "nm": "Stroke 1", "mn": "ADBE Vector Graphic - Stroke" }, { "ty": "tr", "p": { "k": [ 2.198, 1.099 ], "ix": 2 }, "a": { "k": [ 0, 0 ], "ix": 1 }, "s": { "k": [ 100, 100 ], "ix": 3 }, "r": { "k": 0, "ix": 6 }, "o": { "k": 100, "ix": 7 }, "sk": { "k": 0, "ix": 4 }, "sa": { "k": 0, "ix": 5 }, "nm": "Transform" } ], "nm": "Rectangle 1", "np": 2, "mn": "ADBE Vector Group" } ], "ip": 0, "op": 36, "st": 0, "bm": 0, "sr": 1 } ], "v": "4.5.4", "ddd": 0, "ip": 0, "op": 36, "fr": 60, "w": 200, "h": 200 }
|
1
example/assets/Tests/Rect5.json
Normal file
@ -0,0 +1 @@
|
||||
{"assets":[],"layers":[{"ddd":0,"ind":0,"ty":4,"nm":"Shape Layer 1","parent":1,"ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[100,100,0]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"k":[{"i":{"x":[0.27,0.27],"y":[1,0.27]},"o":{"x":[0.73,0.73],"y":[0,0.73]},"n":["0p27_1_0p73_0","0p27_0p27_0p73_0p73"],"t":0,"s":[85.714,85.714],"e":[172.714,85.714]},{"i":{"x":[0.27,0.27],"y":[1,0.27]},"o":{"x":[0.73,0.73],"y":[0,0.73]},"n":["0p27_1_0p73_0","0p27_0p27_0p73_0p73"],"t":16,"s":[172.714,85.714],"e":[85.714,85.714]},{"t":35}]},"p":{"k":[0,0]},"r":{"k":0},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect"},{"ty":"st","c":{"k":[0,0,0,1]},"o":{"k":100},"w":{"k":14},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[2.198,1.099],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":2,"mn":"ADBE Vector Group"}],"ip":0,"op":36,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":1,"nm":"White Solid 1","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[45,45,0]},"a":{"k":[100,100,0]},"s":{"k":[45,45,100]}},"ao":0,"sw":200,"sh":200,"sc":"#ffffff","ip":0,"op":36,"st":0,"bm":0,"sr":1}],"v":"4.5.4","ddd":0,"ip":0,"op":36,"fr":60,"w":90,"h":90}
|
1
example/assets/Tests/Rect6.json
Normal file
@ -0,0 +1 @@
|
||||
{"assets":[],"layers":[{"ddd":0,"ind":0,"ty":4,"nm":"Shape Layer 1","parent":1,"ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[100,100,0]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"k":[{"i":{"x":[0.27,0.27],"y":[1,0.27]},"o":{"x":[0.73,0.73],"y":[0,0.73]},"n":["0p27_1_0p73_0","0p27_0p27_0p73_0p73"],"t":0,"s":[85.714,85.714],"e":[172.714,85.714]},{"i":{"x":[0.27,0.27],"y":[0.27,1]},"o":{"x":[0.73,0.73],"y":[0.73,0]},"n":["0p27_0p27_0p73_0p73","0p27_1_0p73_0"],"t":16,"s":[172.714,85.714],"e":[172.714,163.714]},{"i":{"x":[0.27,0.27],"y":[1,1]},"o":{"x":[0.73,0.73],"y":[0,0]},"n":["0p27_1_0p73_0","0p27_1_0p73_0"],"t":35,"s":[172.714,163.714],"e":[85.714,85.714]},{"t":62}]},"p":{"k":[0,0]},"r":{"k":0},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect"},{"ty":"st","c":{"k":[0,0,0,1]},"o":{"k":100},"w":{"k":14},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[2.198,1.099],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":2,"mn":"ADBE Vector Group"}],"ip":0,"op":63,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":1,"nm":"White Solid 1","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[45,45,0]},"a":{"k":[100,100,0]},"s":{"k":[45,45,100]}},"ao":0,"sw":200,"sh":200,"sc":"#ffffff","ip":0,"op":64,"st":0,"bm":0,"sr":1}],"v":"4.5.4","ddd":0,"ip":0,"op":63,"fr":60,"w":90,"h":90}
|
1
example/assets/Tests/Rect7.json
Normal file
@ -0,0 +1 @@
|
||||
{ "assets": [], "layers": [ { "ddd": 0, "ind": 0, "ty": 4, "nm": "Shape Layer 4", "parent": 3, "ks": { "o": { "k": 100 }, "r": { "k": 0 }, "p": { "k": [ { "i": { "x": 0, "y": 1 }, "o": { "x": 0.167, "y": 0.167 }, "n": "0_1_0p167_0p167", "t": 35, "s": [ 111.714, 91, 0 ], "e": [ 99.714, 100, 0 ], "to": [ 0, 0, 0 ], "ti": [ 0, 0, 0 ] }, { "t": 62 } ] }, "a": { "k": [ 0, 0, 0 ] }, "s": { "k": [ 100, 100, 100 ] } }, "ao": 0, "shapes": [ { "ty": "gr", "it": [ { "ty": "rc", "d": 1, "s": { "k": [ { "i": { "x": [ 0, 0 ], "y": [ 1, 1 ] }, "o": { "x": [ 0.167, 0.167 ], "y": [ 0.167, 0.167 ] }, "n": [ "0_1_0p167_0p167", "0_1_0p167_0p167" ], "t": 35, "s": [ 109.714, 103.714 ], "e": [ 85.714, 85.714 ] }, { "t": 62 } ] }, "p": { "k": [ 0, 0 ] }, "r": { "k": 0 }, "nm": "Rectangle Path 1", "mn": "ADBE Vector Shape - Rect" }, { "ty": "st", "c": { "k": [ 0, 0, 0, 1 ] }, "o": { "k": 100 }, "w": { "k": 14 }, "lc": 1, "lj": 1, "ml": 4, "nm": "Stroke 1", "mn": "ADBE Vector Graphic - Stroke" }, { "ty": "tr", "p": { "k": [ 0.198, 1.099 ], "ix": 2 }, "a": { "k": [ 0, 0 ], "ix": 1 }, "s": { "k": [ 100, 100 ], "ix": 3 }, "r": { "k": 0, "ix": 6 }, "o": { "k": 100, "ix": 7 }, "sk": { "k": 0, "ix": 4 }, "sa": { "k": 0, "ix": 5 }, "nm": "Transform" } ], "nm": "Rectangle 1", "np": 2, "mn": "ADBE Vector Group" } ], "ip": 35, "op": 63, "st": 0, "bm": 0, "sr": 1 }, { "ddd": 0, "ind": 1, "ty": 4, "nm": "Shape Layer 3", "parent": 3, "ks": { "o": { "k": 100 }, "r": { "k": 0 }, "p": { "k": [ { "i": { "x": 0, "y": 1 }, "o": { "x": 0.167, "y": 0.167 }, "n": "0_1_0p167_0p167", "t": 16, "s": [ 111.714, 100, 0 ], "e": [ 111.714, 91, 0 ], "to": [ 0, 0, 0 ], "ti": [ 0, 0, 0 ] }, { "t": 35 } ] }, "a": { "k": [ 0, 0, 0 ] }, "s": { "k": [ 100, 100, 100 ] } }, "ao": 0, "shapes": [ { "ty": "gr", "it": [ { "ty": "rc", "d": 1, "s": { "k": [ { "i": { "x": [ 0, 0 ], "y": [ 0, 1 ] }, "o": { "x": [ 0.167, 0.167 ], "y": [ 0.167, 0.167 ] }, "n": [ "0_0_0p167_0p167", "0_1_0p167_0p167" ], "t": 16, "s": [ 109.714, 85.714 ], "e": [ 109.714, 103.714 ] }, { "t": 35 } ] }, "p": { "k": [ 0, 0 ] }, "r": { "k": 0 }, "nm": "Rectangle Path 1", "mn": "ADBE Vector Shape - Rect" }, { "ty": "st", "c": { "k": [ 0, 0, 0, 1 ] }, "o": { "k": 100 }, "w": { "k": 14 }, "lc": 1, "lj": 1, "ml": 4, "nm": "Stroke 1", "mn": "ADBE Vector Graphic - Stroke" }, { "ty": "tr", "p": { "k": [ 0.198, 1.099 ], "ix": 2 }, "a": { "k": [ 0, 0 ], "ix": 1 }, "s": { "k": [ 100, 100 ], "ix": 3 }, "r": { "k": 0, "ix": 6 }, "o": { "k": 100, "ix": 7 }, "sk": { "k": 0, "ix": 4 }, "sa": { "k": 0, "ix": 5 }, "nm": "Transform" } ], "nm": "Rectangle 1", "np": 2, "mn": "ADBE Vector Group" } ], "ip": 16, "op": 35, "st": 0, "bm": 0, "sr": 1 }, { "ddd": 0, "ind": 2, "ty": 4, "nm": "Shape Layer 2", "parent": 3, "ks": { "o": { "k": 100 }, "r": { "k": 0 }, "p": { "k": [ { "i": { "x": 0, "y": 1 }, "o": { "x": 0.167, "y": 0.167 }, "n": "0_1_0p167_0p167", "t": 0, "s": [ 99.714, 100, 0 ], "e": [ 111.714, 100, 0 ], "to": [ 0, 0, 0 ], "ti": [ 0, 0, 0 ] }, { "t": 16 } ] }, "a": { "k": [ 0, 0, 0 ] }, "s": { "k": [ 100, 100, 100 ] } }, "ao": 0, "shapes": [ { "ty": "gr", "it": [ { "ty": "rc", "d": 1, "s": { "k": [ { "i": { "x": [ 0, 0 ], "y": [ 1, 0 ] }, "o": { "x": [ 0.167, 0.167 ], "y": [ 0.167, 0.167 ] }, "n": [ "0_1_0p167_0p167", "0_0_0p167_0p167" ], "t": 0, "s": [ 85.714, 85.714 ], "e": [ 109.714, 85.714 ] }, { "t": 16 } ] }, "p": { "k": [ 0, 0 ] }, "r": { "k": 0 }, "nm": "Rectangle Path 1", "mn": "ADBE Vector Shape - Rect" }, { "ty": "st", "c": { "k": [ 0, 0, 0, 1 ] }, "o": { "k": 100 }, "w": { "k": 14 }, "lc": 1, "lj": 1, "ml": 4, "nm": "Stroke 1", "mn": "ADBE Vector Graphic - Stroke" }, { "ty": "tr", "p": { "k": [ 0.198, 1.099 ], "ix": 2 }, "a": { "k": [ 0, 0 ], "ix": 1 }, "s": { "k": [ 100, 100 ], "ix": 3 }, "r": { "k": 0, "ix": 6 }, "o": { "k": 100, "ix": 7 }, "sk": { "k": 0, "ix": 4 }, "sa": { "k": 0, "ix": 5 }, "nm": "Transform" } ], "nm": "Rectangle 1", "np": 2, "mn": "ADBE Vector Group" } ], "ip": 0, "op": 16, "st": 0, "bm": 0, "sr": 1 }, { "ddd": 0, "ind": 3, "ty": 1, "nm": "White Solid 1", "ks": { "o": { "k": 100 }, "r": { "k": 0 }, "p": { "k": [ 45, 45, 0 ] }, "a": { "k": [ 100, 100, 0 ] }, "s": { "k": [ 45, 45, 100 ] } }, "ao": 0, "sw": 200, "sh": 200, "sc": "#ffffff", "ip": 0, "op": 63, "st": 0, "bm": 0, "sr": 1 } ], "v": "4.5.4", "ddd": 0, "ip": 0, "op": 63, "fr": 60, "w": 90, "h": 90 }
|
1
example/assets/Tests/Rect8.json
Normal file
1
example/assets/Tests/Rect9.json
Normal file
@ -0,0 +1 @@
|
||||
{"assets":[],"layers":[{"ddd":0,"ind":0,"ty":4,"nm":"Shape Layer 2","parent":1,"ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[100,100,0]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":[{"i":{"x":0,"y":1},"o":{"x":1,"y":0},"n":"0_1_1_0","t":0,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[42.857,-42.857],[42.857,42.857],[-42.857,42.857],[-42.857,-42.857]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[42.857,-75],[42.857,75],[-42.857,75],[-42.857,-75]],"c":true}]},{"i":{"x":0,"y":1},"o":{"x":1,"y":0},"n":"0_1_1_0","t":16,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[42.857,-75],[42.857,75],[-42.857,75],[-42.857,-75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[74,-75],[74,75],[-74,75],[-74,-75]],"c":true}]},{"i":{"x":0,"y":1},"o":{"x":1,"y":0},"n":"0_1_1_0","t":35,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[74,-75],[74,75],[-74,75],[-74,-75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[42.857,-42.857],[42.857,42.857],[-42.857,42.857],[-42.857,-42.857]],"c":true}]},{"t":48}]},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"st","c":{"k":[0,0,0,1]},"o":{"k":100},"w":{"k":14},"lc":1,"lj":1,"ml":4,"nm":"Stroke 2","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[0,0],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":2,"mn":"ADBE Vector Group"}],"ip":0,"op":49,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":1,"nm":"White Solid 3","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[45,45,0]},"a":{"k":[100,100,0]},"s":{"k":[45,45,100]}},"ao":0,"sw":200,"sh":200,"sc":"#ffffff","ip":0,"op":49,"st":0,"bm":0,"sr":1}],"v":"4.5.4","ddd":0,"ip":0,"op":49,"fr":60,"w":90,"h":90}
|
288
example/assets/Tests/ReversedStar.json
Normal file
@ -0,0 +1,288 @@
|
||||
{
|
||||
"v": "5.8.2",
|
||||
"fr": 24,
|
||||
"ip": 0,
|
||||
"op": 94,
|
||||
"w": 150,
|
||||
"h": 150,
|
||||
"nm": "Anim_load",
|
||||
"ddd": 0,
|
||||
"assets": [],
|
||||
"layers": [
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 1,
|
||||
"ty": 4,
|
||||
"nm": "LF03",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": -19,
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
75,
|
||||
76.005,
|
||||
0
|
||||
],
|
||||
"ix": 2,
|
||||
"l": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 1,
|
||||
"l": 2
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
19.986,
|
||||
19.986,
|
||||
100
|
||||
],
|
||||
"ix": 6,
|
||||
"l": 2
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"shapes": [
|
||||
{
|
||||
"ty": "gr",
|
||||
"it": [
|
||||
{
|
||||
"ty": "sr",
|
||||
"sy": 1,
|
||||
"d": 3,
|
||||
"pt": {
|
||||
"a": 0,
|
||||
"k": 14,
|
||||
"ix": 3
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 4
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 5
|
||||
},
|
||||
"ir": {
|
||||
"a": 0,
|
||||
"k": 91.612,
|
||||
"ix": 6
|
||||
},
|
||||
"is": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 8
|
||||
},
|
||||
"or": {
|
||||
"a": 0,
|
||||
"k": 113.225,
|
||||
"ix": 7
|
||||
},
|
||||
"os": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 9
|
||||
},
|
||||
"ix": 1,
|
||||
"nm": "Polystar Path 1",
|
||||
"mn": "ADBE Vector Shape - Star",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "st",
|
||||
"c": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0.937254905701,
|
||||
0.89411765337,
|
||||
0.850980401039,
|
||||
1
|
||||
],
|
||||
"ix": 3
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 4
|
||||
},
|
||||
"w": {
|
||||
"a": 0,
|
||||
"k": 30,
|
||||
"ix": 5
|
||||
},
|
||||
"lc": 1,
|
||||
"lj": 1,
|
||||
"ml": 4,
|
||||
"bm": 0,
|
||||
"nm": "Stroke 1",
|
||||
"mn": "ADBE Vector Graphic - Stroke",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "tr",
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
-1.979,
|
||||
-0.604
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 3
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 6
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 7
|
||||
},
|
||||
"sk": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 4
|
||||
},
|
||||
"sa": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 5
|
||||
},
|
||||
"nm": "Transform"
|
||||
}
|
||||
],
|
||||
"nm": "Polystar 1",
|
||||
"np": 2,
|
||||
"cix": 2,
|
||||
"bm": 0,
|
||||
"ix": 1,
|
||||
"mn": "ADBE Vector Group",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "tm",
|
||||
"s": {
|
||||
"a": 1,
|
||||
"k": [
|
||||
{
|
||||
"i": {
|
||||
"x": [
|
||||
0.667
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.333
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"t": -0.127,
|
||||
"s": [
|
||||
100
|
||||
]
|
||||
},
|
||||
{
|
||||
"t": 32,
|
||||
"s": [
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"e": {
|
||||
"a": 1,
|
||||
"k": [
|
||||
{
|
||||
"i": {
|
||||
"x": [
|
||||
0.833
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.333
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"t": 36,
|
||||
"s": [
|
||||
100
|
||||
]
|
||||
},
|
||||
{
|
||||
"t": 68,
|
||||
"s": [
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": -43,
|
||||
"ix": 3
|
||||
},
|
||||
"m": 1,
|
||||
"ix": 2,
|
||||
"nm": "Trim Paths 1",
|
||||
"mn": "ADBE Vector Filter - Trim",
|
||||
"hd": false
|
||||
}
|
||||
],
|
||||
"ip": 0,
|
||||
"op": 94,
|
||||
"st": 18,
|
||||
"bm": 0
|
||||
}
|
||||
],
|
||||
"markers": []
|
||||
}
|
390
example/assets/Tests/RoundedCorners.json
Normal file
@ -0,0 +1,390 @@
|
||||
{
|
||||
"v": "5.8.1",
|
||||
"fr": 29.9700012207031,
|
||||
"ip": 0,
|
||||
"op": 900.000036657751,
|
||||
"w": 1000,
|
||||
"h": 1000,
|
||||
"nm": "Rounded Corners",
|
||||
"ddd": 0,
|
||||
"assets": [],
|
||||
"layers": [
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 1,
|
||||
"ty": 4,
|
||||
"nm": "Shape Layer 1",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
500,
|
||||
500,
|
||||
0
|
||||
],
|
||||
"ix": 2,
|
||||
"l": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 1,
|
||||
"l": 2
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6,
|
||||
"l": 2
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"shapes": [
|
||||
{
|
||||
"ind": 0,
|
||||
"ty": "sh",
|
||||
"ix": 1,
|
||||
"ks": {
|
||||
"a": 0,
|
||||
"k": {
|
||||
"i": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"o": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"v": [
|
||||
[
|
||||
-75,
|
||||
-475
|
||||
],
|
||||
[
|
||||
-75,
|
||||
-75
|
||||
],
|
||||
[
|
||||
-475,
|
||||
-75
|
||||
],
|
||||
[
|
||||
-475,
|
||||
-475
|
||||
]
|
||||
],
|
||||
"c": true
|
||||
},
|
||||
"ix": 2
|
||||
},
|
||||
"nm": "Path 1",
|
||||
"mn": "ADBE Vector Shape - Group",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "rc",
|
||||
"d": 1,
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
400,
|
||||
400
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
275,
|
||||
-275
|
||||
],
|
||||
"ix": 3
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 4
|
||||
},
|
||||
"nm": "Rectangle Path 1",
|
||||
"mn": "ADBE Vector Shape - Rect",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "sr",
|
||||
"sy": 1,
|
||||
"d": 1,
|
||||
"pt": {
|
||||
"a": 0,
|
||||
"k": 5,
|
||||
"ix": 3
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
275,
|
||||
275
|
||||
],
|
||||
"ix": 4
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 5
|
||||
},
|
||||
"ir": {
|
||||
"a": 0,
|
||||
"k": 107,
|
||||
"ix": 6
|
||||
},
|
||||
"is": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 8
|
||||
},
|
||||
"or": {
|
||||
"a": 0,
|
||||
"k": 275,
|
||||
"ix": 7
|
||||
},
|
||||
"os": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 9
|
||||
},
|
||||
"ix": 3,
|
||||
"nm": "Polystar Path 1",
|
||||
"mn": "ADBE Vector Shape - Star",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ind": 3,
|
||||
"ty": "sh",
|
||||
"ix": 4,
|
||||
"ks": {
|
||||
"a": 0,
|
||||
"k": {
|
||||
"i": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"o": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"v": [
|
||||
[
|
||||
-275,
|
||||
0
|
||||
],
|
||||
[
|
||||
-212.107,
|
||||
188.435
|
||||
],
|
||||
[
|
||||
-13.459,
|
||||
190.02
|
||||
],
|
||||
[
|
||||
-173.237,
|
||||
308.065
|
||||
],
|
||||
[
|
||||
-113.359,
|
||||
497.48
|
||||
],
|
||||
[
|
||||
-275,
|
||||
382
|
||||
],
|
||||
[
|
||||
-436.641,
|
||||
497.48
|
||||
],
|
||||
[
|
||||
-376.763,
|
||||
308.065
|
||||
],
|
||||
[
|
||||
-536.541,
|
||||
190.02
|
||||
],
|
||||
[
|
||||
-337.893,
|
||||
188.435
|
||||
]
|
||||
],
|
||||
"c": true
|
||||
},
|
||||
"ix": 2
|
||||
},
|
||||
"nm": "Path 2",
|
||||
"mn": "ADBE Vector Shape - Group",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "rd",
|
||||
"nm": "Round Corners 1",
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 136,
|
||||
"ix": 1
|
||||
},
|
||||
"ix": 5,
|
||||
"mn": "ADBE Vector Filter - RC",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "fl",
|
||||
"c": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1
|
||||
],
|
||||
"ix": 4
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 5
|
||||
},
|
||||
"r": 1,
|
||||
"bm": 0,
|
||||
"nm": "Fill 1",
|
||||
"mn": "ADBE Vector Graphic - Fill",
|
||||
"hd": false
|
||||
}
|
||||
],
|
||||
"ip": 0,
|
||||
"op": 900.000036657751,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
}
|
||||
],
|
||||
"markers": []
|
||||
}
|
1
example/assets/Tests/StaticShadow.json
Normal file
@ -0,0 +1 @@
|
||||
{"v":"5.7.7","fr":29.9700012207031,"ip":0,"op":181.000007372281,"w":375,"h":375,"nm":"Square","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[187.5,187.5,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":25,"nm":"Drop Shadow2","np":8,"mn":"ADBE Drop Shadow","ix":1,"en":1,"ef":[{"ty":2,"nm":"Shadow Color","mn":"ADBE Drop Shadow-0001","ix":1,"v":{"a":0,"k":[0,1,0.609851837158,1],"ix":1}},{"ty":0,"nm":"Opacity","mn":"ADBE Drop Shadow-0002","ix":2,"v":{"a":0,"k":127.5,"ix":2}},{"ty":0,"nm":"Direction","mn":"ADBE Drop Shadow-0003","ix":3,"v":{"a":0,"k":0,"ix":3}},{"ty":0,"nm":"Distance","mn":"ADBE Drop Shadow-0004","ix":4,"v":{"a":0,"k":10,"ix":4}},{"ty":0,"nm":"Softness","mn":"ADBE Drop Shadow-0005","ix":5,"v":{"a":0,"k":20,"ix":5}},{"ty":7,"nm":"Shadow Only","mn":"ADBE Drop Shadow-0006","ix":6,"v":{"a":0,"k":0,"ix":6}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[217.641,217.641],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-4.68,-1.68],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":184.000007494474,"st":0,"bm":0}],"markers":[]}
|
1
example/assets/Tests/StrokeBlur.json
Normal file
@ -0,0 +1 @@
|
||||
{"v":"5.7.7","fr":29.9700012207031,"ip":0,"op":121.000004928431,"w":400,"h":400,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[200,200,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":29,"nm":"Gaussian Blur2","np":5,"mn":"ADBE Gaussian Blur 2","ix":1,"en":1,"ef":[{"ty":0,"nm":"Blurriness","mn":"ADBE Gaussian Blur 2-0001","ix":1,"v":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":24.00000097754,"s":[120.7]}],"ix":1}},{"ty":7,"nm":"Blur Dimensions","mn":"ADBE Gaussian Blur 2-0002","ix":2,"v":{"a":0,"k":1,"ix":2}},{"ty":7,"nm":"Repeat Edge Pixels","mn":"ADBE Gaussian Blur 2-0003","ix":3,"v":{"a":0,"k":0,"ix":3}}]},{"ty":5,"nm":"Bulge","np":9,"mn":"ADBE Bulge","ix":2,"en":1,"ef":[{"ty":0,"nm":"Horizontal Radius","mn":"ADBE Bulge-0001","ix":1,"v":{"a":0,"k":50,"ix":1}},{"ty":0,"nm":"Vertical Radius","mn":"ADBE Bulge-0002","ix":2,"v":{"a":0,"k":50,"ix":2}},{"ty":3,"nm":"Bulge Center","mn":"ADBE Bulge-0003","ix":3,"v":{"a":0,"k":[200,200],"ix":3}},{"ty":0,"nm":"Bulge Height","mn":"ADBE Bulge-0004","ix":4,"v":{"a":0,"k":1,"ix":4}},{"ty":0,"nm":"Taper Radius","mn":"ADBE Bulge-0005","ix":5,"v":{"a":0,"k":0,"ix":5}},{"ty":7,"nm":"Antialiasing (Best Qual Only)","mn":"ADBE Bulge-0006","ix":6,"v":{"a":0,"k":1,"ix":6}},{"ty":7,"nm":"Pinning","mn":"ADBE Bulge-0007","ix":7,"v":{"a":0,"k":0,"ix":7}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[274.975,274.975],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"tr","p":{"a":0,"k":[-4.513,7.487],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":1,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":46,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false}],"ip":0,"op":121.000004928431,"st":0,"bm":0}],"markers":[]}
|
1
example/assets/Tests/TgsWithoutOpacity.json
Normal file
497
example/assets/Tests/TimeStretchPrecomp2.json
Normal file
@ -0,0 +1,497 @@
|
||||
{
|
||||
"v": "5.7.3",
|
||||
"fr": 25,
|
||||
"ip": 0,
|
||||
"op": 200,
|
||||
"w": 720,
|
||||
"h": 720,
|
||||
"nm": "2222",
|
||||
"ddd": 0,
|
||||
"assets": [
|
||||
{
|
||||
"id": "comp_0",
|
||||
"layers": [
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 1,
|
||||
"ty": 4,
|
||||
"nm": "形状图层 14",
|
||||
"sr": 2,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
604.375,
|
||||
402,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
-372,
|
||||
42,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
101.874,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"shapes": [
|
||||
{
|
||||
"ty": "gr",
|
||||
"it": [
|
||||
{
|
||||
"ind": 0,
|
||||
"ty": "sh",
|
||||
"ix": 1,
|
||||
"ks": {
|
||||
"a": 1,
|
||||
"k": [
|
||||
{
|
||||
"i": {
|
||||
"x": 0.667,
|
||||
"y": 1
|
||||
},
|
||||
"o": {
|
||||
"x": 0.333,
|
||||
"y": 0
|
||||
},
|
||||
"t": 0,
|
||||
"s": [
|
||||
{
|
||||
"i": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"o": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"v": [
|
||||
[
|
||||
-51.35,
|
||||
-640
|
||||
],
|
||||
[
|
||||
-51.35,
|
||||
640
|
||||
],
|
||||
[
|
||||
-51.4,
|
||||
640
|
||||
],
|
||||
[
|
||||
-51.4,
|
||||
-640
|
||||
]
|
||||
],
|
||||
"c": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"i": {
|
||||
"x": 0.667,
|
||||
"y": 1
|
||||
},
|
||||
"o": {
|
||||
"x": 0.333,
|
||||
"y": 0
|
||||
},
|
||||
"t": 34,
|
||||
"s": [
|
||||
{
|
||||
"i": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"o": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"v": [
|
||||
[
|
||||
51.4,
|
||||
-640
|
||||
],
|
||||
[
|
||||
51.4,
|
||||
640
|
||||
],
|
||||
[
|
||||
-51.4,
|
||||
640
|
||||
],
|
||||
[
|
||||
-51.4,
|
||||
-640
|
||||
]
|
||||
],
|
||||
"c": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"i": {
|
||||
"x": 0.833,
|
||||
"y": 1
|
||||
},
|
||||
"o": {
|
||||
"x": 0.333,
|
||||
"y": 0
|
||||
},
|
||||
"t": 62,
|
||||
"s": [
|
||||
{
|
||||
"i": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"o": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"v": [
|
||||
[
|
||||
51.4,
|
||||
-640
|
||||
],
|
||||
[
|
||||
51.4,
|
||||
640
|
||||
],
|
||||
[
|
||||
-51.4,
|
||||
640
|
||||
],
|
||||
[
|
||||
-51.4,
|
||||
-640
|
||||
]
|
||||
],
|
||||
"c": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"t": 100,
|
||||
"s": [
|
||||
{
|
||||
"i": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"o": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"v": [
|
||||
[
|
||||
51.4,
|
||||
-640
|
||||
],
|
||||
[
|
||||
51.4,
|
||||
640
|
||||
],
|
||||
[
|
||||
51.1,
|
||||
640
|
||||
],
|
||||
[
|
||||
51.1,
|
||||
-640
|
||||
]
|
||||
],
|
||||
"c": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"nm": "路径 1",
|
||||
"mn": "ADBE Vector Shape - Group",
|
||||
"hd": false
|
||||
},
|
||||
{
|
||||
"ty": "fl",
|
||||
"c": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0.96862745285,
|
||||
0.960784316063,
|
||||
0.172549024224,
|
||||
1
|
||||
],
|
||||
"ix": 4
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 5
|
||||
},
|
||||
"r": 1,
|
||||
"bm": 0,
|
||||
"nm": "EditableColor#2",
|
||||
"mn": "ADBE Vector Graphic - Fill",
|
||||
"hd": false,
|
||||
"ln": "2"
|
||||
},
|
||||
{
|
||||
"ty": "tr",
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
-310,
|
||||
42
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 3
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 6
|
||||
},
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 7
|
||||
},
|
||||
"sk": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 4
|
||||
},
|
||||
"sa": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 5
|
||||
},
|
||||
"nm": "变换"
|
||||
}
|
||||
],
|
||||
"nm": "矩形 1",
|
||||
"np": 2,
|
||||
"cix": 2,
|
||||
"bm": 0,
|
||||
"ix": 1,
|
||||
"mn": "ADBE Vector Group",
|
||||
"hd": false
|
||||
}
|
||||
],
|
||||
"ip": 0,
|
||||
"op": 100,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"layers": [
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 1,
|
||||
"ty": 0,
|
||||
"nm": "测试2",
|
||||
"refId": "comp_0",
|
||||
"sr": 2,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
360,
|
||||
360,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
360,
|
||||
360,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"w": 720,
|
||||
"h": 720,
|
||||
"ip": 0,
|
||||
"op": 200,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
}
|
||||
],
|
||||
"markers": []
|
||||
}
|
4841
example/assets/Tests/TrimPathWrapAround.json
Normal file
1
example/assets/Tests/exported_with_flow.json
Normal file
1
example/assets/Tests/rect2.json
Normal file
@ -0,0 +1 @@
|
||||
{"assets":[],"layers":[{"ddd":0,"ind":0,"ty":4,"nm":"Shape Layer 1","parent":1,"ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[100,100,0]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0"],"t":0,"s":[85.714,85.714],"e":[52.714,52.714]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0"],"t":16,"s":[52.714,52.714],"e":[85.714,85.714]},{"t":35}]},"p":{"k":[0,0]},"r":{"k":0},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect"},{"ty":"st","c":{"k":[0,0,0,1]},"o":{"k":100},"w":{"k":14},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[2.198,1.099],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":2,"mn":"ADBE Vector Group"}],"ip":0,"op":36,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":1,"nm":"White Solid 1","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[45,45,0]},"a":{"k":[100,100,0]},"s":{"k":[45,45,100]}},"ao":0,"sw":200,"sh":200,"sc":"#ffffff","ip":0,"op":36,"st":0,"bm":0,"sr":1}],"v":"4.5.4","ddd":0,"ip":0,"op":36,"fr":60,"w":90,"h":90}
|
1
example/assets/TwitterHeartButton.json
Normal file
1
example/assets/battery_optimizations.json
Normal file
1
example/assets/bluetoothscanning.json
Normal file
1
example/assets/camera_change.json
Normal file
7280
example/assets/envelope.json
Normal file
833
example/assets/example_with_images/data.json
Normal file
@ -0,0 +1,833 @@
|
||||
{
|
||||
"v": "5.6.9",
|
||||
"fr": 25,
|
||||
"ip": 0,
|
||||
"op": 75,
|
||||
"w": 1200,
|
||||
"h": 1200,
|
||||
"nm": "Character-side v1",
|
||||
"ddd": 0,
|
||||
"assets": [
|
||||
{
|
||||
"id": "image_0",
|
||||
"w": 1200,
|
||||
"h": 1200,
|
||||
"u": "images/",
|
||||
"p": "img_0.png",
|
||||
"e": 0
|
||||
},
|
||||
{
|
||||
"id": "image_1",
|
||||
"w": 1200,
|
||||
"h": 1200,
|
||||
"u": "images/",
|
||||
"p": "img_1.png",
|
||||
"e": 0
|
||||
},
|
||||
{
|
||||
"id": "image_2",
|
||||
"w": 1200,
|
||||
"h": 1200,
|
||||
"u": "images/",
|
||||
"p": "img_2.png",
|
||||
"e": 0
|
||||
},
|
||||
{
|
||||
"id": "image_3",
|
||||
"w": 1200,
|
||||
"h": 1200,
|
||||
"u": "images/",
|
||||
"p": "img_3.png",
|
||||
"e": 0
|
||||
},
|
||||
{
|
||||
"id": "image_4",
|
||||
"w": 1200,
|
||||
"h": 1200,
|
||||
"u": "images/",
|
||||
"p": "img_4.png",
|
||||
"e": 0
|
||||
},
|
||||
{
|
||||
"id": "image_5",
|
||||
"w": 1200,
|
||||
"h": 1200,
|
||||
"u": "images/",
|
||||
"p": "img_5.png",
|
||||
"e": 0
|
||||
},
|
||||
{
|
||||
"id": "image_6",
|
||||
"w": 1200,
|
||||
"h": 1200,
|
||||
"u": "images/",
|
||||
"p": "img_6.png",
|
||||
"e": 0
|
||||
},
|
||||
{
|
||||
"id": "image_7",
|
||||
"w": 1200,
|
||||
"h": 1200,
|
||||
"u": "images/",
|
||||
"p": "img_7.png",
|
||||
"e": 0
|
||||
},
|
||||
{
|
||||
"id": "image_8",
|
||||
"w": 1200,
|
||||
"h": 1200,
|
||||
"u": "images/",
|
||||
"p": "img_8.png",
|
||||
"e": 0
|
||||
},
|
||||
{
|
||||
"id": "image_9",
|
||||
"w": 1200,
|
||||
"h": 1200,
|
||||
"u": "images/",
|
||||
"p": "img_9.png",
|
||||
"e": 0
|
||||
}
|
||||
],
|
||||
"layers": [
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 2,
|
||||
"ty": 2,
|
||||
"nm": "F ARM Up",
|
||||
"parent": 8,
|
||||
"refId": "image_0",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 1,
|
||||
"k": [
|
||||
{
|
||||
"i": {
|
||||
"x": [
|
||||
0.333
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.667
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"t": 0,
|
||||
"s": [
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"i": {
|
||||
"x": [
|
||||
0.333
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.667
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"t": 25,
|
||||
"s": [
|
||||
67
|
||||
]
|
||||
},
|
||||
{
|
||||
"t": 50,
|
||||
"s": [
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
623.019,
|
||||
296.734,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
623.019,
|
||||
296.734,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"ip": 0,
|
||||
"op": 250,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
},
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 3,
|
||||
"ty": 2,
|
||||
"nm": "F ARM Low",
|
||||
"parent": 2,
|
||||
"refId": "image_1",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 1,
|
||||
"k": [
|
||||
{
|
||||
"i": {
|
||||
"x": [
|
||||
0.333
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.667
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"t": 0,
|
||||
"s": [
|
||||
43
|
||||
]
|
||||
},
|
||||
{
|
||||
"i": {
|
||||
"x": [
|
||||
0.333
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.667
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"t": 25,
|
||||
"s": [
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"t": 50,
|
||||
"s": [
|
||||
43
|
||||
]
|
||||
}
|
||||
],
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
623.019,
|
||||
439.113,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
623.019,
|
||||
439.113,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"ip": 0,
|
||||
"op": 250,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
},
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 4,
|
||||
"ty": 2,
|
||||
"nm": "F Hand",
|
||||
"parent": 3,
|
||||
"refId": "image_2",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 1,
|
||||
"k": [
|
||||
{
|
||||
"i": {
|
||||
"x": [
|
||||
0.333
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.667
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"t": 0,
|
||||
"s": [
|
||||
41
|
||||
]
|
||||
},
|
||||
{
|
||||
"i": {
|
||||
"x": [
|
||||
0.333
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.667
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"t": 25,
|
||||
"s": [
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"t": 50,
|
||||
"s": [
|
||||
41
|
||||
]
|
||||
}
|
||||
],
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
623.019,
|
||||
584.501,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
623.019,
|
||||
584.501,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"ip": 0,
|
||||
"op": 250,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
},
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 5,
|
||||
"ty": 2,
|
||||
"nm": "F LEG Up",
|
||||
"refId": "image_3",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 90,
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
604.854,
|
||||
589.662,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
604.854,
|
||||
589.662,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"ip": 0,
|
||||
"op": 250,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
},
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 6,
|
||||
"ty": 2,
|
||||
"nm": "F LEG Low",
|
||||
"parent": 5,
|
||||
"refId": "image_4",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": -90,
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
608.016,
|
||||
829.202,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
608.016,
|
||||
829.202,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"ip": 0,
|
||||
"op": 250,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
},
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 7,
|
||||
"ty": 2,
|
||||
"nm": "F Foot",
|
||||
"parent": 6,
|
||||
"refId": "image_5",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
608.863,
|
||||
1058.742,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
608.863,
|
||||
1058.742,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"ip": 0,
|
||||
"op": 250,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
},
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 8,
|
||||
"ty": 2,
|
||||
"nm": "Body",
|
||||
"parent": 11,
|
||||
"refId": "image_6",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
605.434,
|
||||
468.468,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
605.434,
|
||||
468.468,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"ip": 0,
|
||||
"op": 250,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
},
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 9,
|
||||
"ty": 2,
|
||||
"nm": "Head",
|
||||
"parent": 8,
|
||||
"refId": "image_7",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
623.019,
|
||||
263.511,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
623.019,
|
||||
263.511,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"ip": 0,
|
||||
"op": 250,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
},
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 10,
|
||||
"ty": 2,
|
||||
"nm": "Hair",
|
||||
"parent": 9,
|
||||
"refId": "image_8",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 0,
|
||||
"k": 0,
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
600,
|
||||
600,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
600,
|
||||
600,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"ip": 0,
|
||||
"op": 250,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
},
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 11,
|
||||
"ty": 2,
|
||||
"nm": "Waist",
|
||||
"refId": "image_9",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"o": {
|
||||
"a": 0,
|
||||
"k": 100,
|
||||
"ix": 11
|
||||
},
|
||||
"r": {
|
||||
"a": 1,
|
||||
"k": [
|
||||
{
|
||||
"i": {
|
||||
"x": [
|
||||
0.333
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.667
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"t": 0,
|
||||
"s": [
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"i": {
|
||||
"x": [
|
||||
0.333
|
||||
],
|
||||
"y": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"x": [
|
||||
0.667
|
||||
],
|
||||
"y": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"t": 25,
|
||||
"s": [
|
||||
-70
|
||||
]
|
||||
},
|
||||
{
|
||||
"t": 50,
|
||||
"s": [
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"ix": 10
|
||||
},
|
||||
"p": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
604.854,
|
||||
589.662,
|
||||
0
|
||||
],
|
||||
"ix": 2
|
||||
},
|
||||
"a": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
604.854,
|
||||
589.662,
|
||||
0
|
||||
],
|
||||
"ix": 1
|
||||
},
|
||||
"s": {
|
||||
"a": 0,
|
||||
"k": [
|
||||
100,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"ix": 6
|
||||
}
|
||||
},
|
||||
"ao": 0,
|
||||
"ip": 0,
|
||||
"op": 250,
|
||||
"st": 0,
|
||||
"bm": 0
|
||||
}
|
||||
],
|
||||
"markers": [
|
||||
{
|
||||
"tm": 25,
|
||||
"cm": "9",
|
||||
"dr": 0
|
||||
}
|
||||
]
|
||||
}
|
BIN
example/assets/example_with_images/images/img_0.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
10
example/assets/example_with_images/images/img_0.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.1.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 1200 1200" style="enable-background:new 0 0 1200 1200;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFA913;}
|
||||
</style>
|
||||
<path class="st0" d="M641.59,439.11l7.69-142.38c0-14.5-11.76-26.26-26.26-26.26c-14.5,0-26.26,11.76-26.26,26.26l7.69,142.38
|
||||
c0,10.26,8.31,18.57,18.57,18.57C633.28,457.68,641.59,449.37,641.59,439.11z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 616 B |
BIN
example/assets/example_with_images/images/img_1.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
example/assets/example_with_images/images/img_2.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
example/assets/example_with_images/images/img_3.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
example/assets/example_with_images/images/img_4.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
example/assets/example_with_images/images/img_5.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
example/assets/example_with_images/images/img_6.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
example/assets/example_with_images/images/img_7.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
example/assets/example_with_images/images/img_8.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
example/assets/example_with_images/images/img_9.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
1
example/assets/lottiefiles/28861-connection-style-2.json
Normal file
2293
example/assets/lottiefiles/lf20_fteywrno.json
Normal file
118232
example/assets/playing.json
Normal file
BIN
example/assets/spinning_carrousel.zip
Normal file
1
example/assets/sticker.json
Normal file
3133
example/assets/tent.json
Normal file
1
example/assets/weather/fog.json
Normal file
2534
example/assets/weather/hurricane.json
Normal file
1
example/assets/weather/thunder-storm.json
Normal file
1964
example/assets/weather/tornado.json
Normal file
1
example/assets/weather/windy.json
Normal file
@ -1 +1,3 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
@ -1 +1,3 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
87
example/ios/Podfile
Normal file
@ -0,0 +1,87 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
# platform :ios, '9.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
||||
project 'Runner', {
|
||||
'Debug' => :debug,
|
||||
'Profile' => :release,
|
||||
'Release' => :release,
|
||||
}
|
||||
|
||||
def parse_KV_file(file, separator='=')
|
||||
file_abs_path = File.expand_path(file)
|
||||
if !File.exists? file_abs_path
|
||||
return [];
|
||||
end
|
||||
generated_key_values = {}
|
||||
skip_line_start_symbols = ["#", "/"]
|
||||
File.foreach(file_abs_path) do |line|
|
||||
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
|
||||
plugin = line.split(pattern=separator)
|
||||
if plugin.length == 2
|
||||
podname = plugin[0].strip()
|
||||
path = plugin[1].strip()
|
||||
podpath = File.expand_path("#{path}", file_abs_path)
|
||||
generated_key_values[podname] = podpath
|
||||
else
|
||||
puts "Invalid plugin specification: #{line}"
|
||||
end
|
||||
end
|
||||
generated_key_values
|
||||
end
|
||||
|
||||
target 'Runner' do
|
||||
use_frameworks!
|
||||
use_modular_headers!
|
||||
|
||||
# Flutter Pod
|
||||
|
||||
copied_flutter_dir = File.join(__dir__, 'Flutter')
|
||||
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
|
||||
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
|
||||
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
|
||||
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
|
||||
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
|
||||
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
|
||||
|
||||
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
|
||||
unless File.exist?(generated_xcode_build_settings_path)
|
||||
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
||||
end
|
||||
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
|
||||
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
|
||||
|
||||
unless File.exist?(copied_framework_path)
|
||||
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
|
||||
end
|
||||
unless File.exist?(copied_podspec_path)
|
||||
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
|
||||
end
|
||||
end
|
||||
|
||||
# Keep pod path relative so it can be checked into Podfile.lock.
|
||||
pod 'Flutter', :path => 'Flutter'
|
||||
|
||||
# Plugin Pods
|
||||
|
||||
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
|
||||
# referring to absolute paths on developers' machines.
|
||||
system('rm -rf .symlinks')
|
||||
system('mkdir -p .symlinks/plugins')
|
||||
plugin_pods = parse_KV_file('../.flutter-plugins')
|
||||
plugin_pods.each do |name, path|
|
||||
symlink = File.join('.symlinks', 'plugins', name)
|
||||
File.symlink(path, symlink)
|
||||
pod name, :path => File.join(symlink, 'ios')
|
||||
end
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['ENABLE_BITCODE'] = 'NO'
|
||||
end
|
||||
end
|
||||
end
|
28
example/ios/Podfile.lock
Normal file
@ -0,0 +1,28 @@
|
||||
PODS:
|
||||
- Flutter (1.0.0)
|
||||
- path_provider (0.0.1):
|
||||
- Flutter
|
||||
- path_provider_macos (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
- path_provider (from `.symlinks/plugins/path_provider/ios`)
|
||||
- path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`)
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
path_provider:
|
||||
:path: ".symlinks/plugins/path_provider/ios"
|
||||
path_provider_macos:
|
||||
:path: ".symlinks/plugins/path_provider_macos/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
|
||||
path_provider: fb74bd0465e96b594bb3b5088ee4a4e7bb1f2a9d
|
||||
path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0
|
||||
|
||||
PODFILE CHECKSUM: c34e2287a9ccaa606aeceab922830efb9a6ff69a
|
||||
|
||||
COCOAPODS: 1.9.1
|
@ -9,11 +9,8 @@
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
|
||||
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
4E7FB8175FD7E724C16AD66F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3978ECE970E899926A99EA4E /* Pods_Runner.framework */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
|
||||
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
@ -26,8 +23,6 @@
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
|
||||
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -37,14 +32,16 @@
|
||||
/* Begin PBXFileReference section */
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
1B497423C23FD55DD0B8C378 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
31ACBCF01D379565237D9814 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
3978ECE970E899926A99EA4E /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
|
||||
5A699D4B67473B61D811D350 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
@ -57,20 +54,36 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
|
||||
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
|
||||
4E7FB8175FD7E724C16AD66F /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
14B9AAB3E57437F7B9E442AA /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1B497423C23FD55DD0B8C378 /* Pods-Runner.debug.xcconfig */,
|
||||
31ACBCF01D379565237D9814 /* Pods-Runner.release.xcconfig */,
|
||||
5A699D4B67473B61D811D350 /* Pods-Runner.profile.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3E6BFE152BA6E928D3C57CB7 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3978ECE970E899926A99EA4E /* Pods_Runner.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B80C3931E831B6300D905FE /* App.framework */,
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEBA1CF902C7004384FC /* Flutter.framework */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
@ -84,6 +97,8 @@
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
14B9AAB3E57437F7B9E442AA /* Pods */,
|
||||
3E6BFE152BA6E928D3C57CB7 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@ -125,12 +140,14 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
43690862AB1C8D2C663E62A1 /* [CP] Check Pods Manifest.lock */,
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
DA3E0E6397CD983DB6281FAB /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@ -202,7 +219,29 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
43690862AB1C8D2C663E62A1 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
@ -218,6 +257,26 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
DA3E0E6397CD983DB6281FAB /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
|
||||
"${PODS_ROOT}/../Flutter/Flutter.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@ -4,4 +4,7 @@
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
49
example/lib/examples/alert_dialog.dart
Normal file
@ -0,0 +1,49 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() => runApp(const App());
|
||||
|
||||
class App extends StatelessWidget {
|
||||
const App({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(body: _Page()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _Page extends StatefulWidget {
|
||||
@override
|
||||
__PageState createState() => __PageState();
|
||||
}
|
||||
|
||||
class __PageState extends State<_Page> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) => _showLoader());
|
||||
}
|
||||
|
||||
void _showLoader() {
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
builder: (context) => Center(
|
||||
child: Lottie.network(
|
||||
'https://assets10.lottiefiles.com/datafiles/QeC7XD39x4C1CIj/data.json',
|
||||
fit: BoxFit.contain,
|
||||
width: 200,
|
||||
height: 200,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Center();
|
||||
}
|
||||
}
|
@ -2,26 +2,18 @@ import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() async {
|
||||
runApp(App());
|
||||
runApp(const App());
|
||||
}
|
||||
|
||||
class App extends StatefulWidget {
|
||||
const App({Key key}) : super(key: key);
|
||||
class App extends StatelessWidget {
|
||||
const App({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AppState createState() => _AppState();
|
||||
}
|
||||
|
||||
class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
color: Colors.lightBlue,
|
||||
home: Scaffold(
|
||||
backgroundColor: Colors.lightBlue,
|
||||
appBar: AppBar(
|
||||
title: Text(''),
|
||||
),
|
||||
body: Center(
|
||||
child: SizedBox(
|
||||
width: 300,
|
||||
|
@ -1,15 +1,17 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() => runApp(MyApp());
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_MyAppState createState() => _MyAppState();
|
||||
State<MyApp> createState() => _MyAppState();
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
|
||||
AnimationController _controller;
|
||||
late final AnimationController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -30,8 +32,8 @@ class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
|
||||
home: Scaffold(
|
||||
body: ListView(
|
||||
children: [
|
||||
Lottie.network(
|
||||
'https://raw.githubusercontent.com/xvrh/lottie-flutter/master/example/assets/Mobilo/C.json',
|
||||
Lottie.asset(
|
||||
'assets/LottieLogo1.json',
|
||||
controller: _controller,
|
||||
onLoaded: (composition) {
|
||||
// Configure the AnimationController with the duration of the
|
||||
|
111
example/lib/examples/animation_full_control.dart
Normal file
@ -0,0 +1,111 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
/// This example show how to play the Lottie animation in various way:
|
||||
/// - Start and stop the animation on event callback
|
||||
/// - Play the animation forward and backward
|
||||
/// - Loop between two specific frames
|
||||
///
|
||||
/// This works by creating an AnimationController instance and passing it
|
||||
/// to the Lottie widget.
|
||||
/// The AnimationController class has a rich API to run the animation in various ways.
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MyApp> createState() => _MyAppState();
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
|
||||
late final AnimationController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
_controller = AnimationController(vsync: this)
|
||||
..value = 0.5
|
||||
..addListener(() {
|
||||
setState(() {
|
||||
// Rebuild the widget at each frame to update the "progress" label.
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Animation control'),
|
||||
),
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 20),
|
||||
Lottie.asset(
|
||||
'assets/LottieLogo1.json',
|
||||
controller: _controller,
|
||||
height: 300,
|
||||
onLoaded: (composition) {
|
||||
setState(() {
|
||||
_controller.duration = composition.duration;
|
||||
});
|
||||
},
|
||||
),
|
||||
Text(_controller.value.toStringAsFixed(2)),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// Play backward
|
||||
IconButton(
|
||||
icon: const Icon(Icons.arrow_left),
|
||||
onPressed: () {
|
||||
_controller.reverse();
|
||||
},
|
||||
),
|
||||
// Pause
|
||||
IconButton(
|
||||
icon: const Icon(Icons.pause),
|
||||
onPressed: () {
|
||||
_controller.stop();
|
||||
},
|
||||
),
|
||||
// Play forward
|
||||
IconButton(
|
||||
icon: const Icon(Icons.arrow_right),
|
||||
onPressed: () {
|
||||
_controller.forward();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
// Loop between 2 specifics frames
|
||||
|
||||
var start = 0.1;
|
||||
var stop = 0.5;
|
||||
_controller.repeat(
|
||||
min: start,
|
||||
max: stop,
|
||||
reverse: true,
|
||||
period: _controller.duration! * (stop - start),
|
||||
);
|
||||
},
|
||||
child: const Text('Loop between frames'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
30
example/lib/examples/blur.dart
Normal file
@ -0,0 +1,30 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
body: ListView(
|
||||
children: [
|
||||
Lottie.asset(
|
||||
'assets/AndroidWave.json',
|
||||
height: 300,
|
||||
delegates: LottieDelegates(values: [
|
||||
ValueDelegate.blurRadius(
|
||||
['**'],
|
||||
value: 20,
|
||||
),
|
||||
]),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -1,14 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() => runApp(MyApp());
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
return const MaterialApp(
|
||||
home: Scaffold(
|
||||
body: MyWidget(),
|
||||
),
|
||||
@ -17,12 +18,14 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyWidget extends StatefulWidget {
|
||||
const MyWidget({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_MyWidgetState createState() => _MyWidgetState();
|
||||
State<MyWidget> createState() => _MyWidgetState();
|
||||
}
|
||||
|
||||
class _MyWidgetState extends State<MyWidget> {
|
||||
Future<LottieComposition> _composition;
|
||||
late final Future<LottieComposition> _composition;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -46,7 +49,7 @@ class _MyWidgetState extends State<MyWidget> {
|
||||
if (composition != null) {
|
||||
return CustomDrawer(composition);
|
||||
} else {
|
||||
return Center(child: CircularProgressIndicator());
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
},
|
||||
);
|
||||
@ -57,26 +60,25 @@ class _MyWidgetState extends State<MyWidget> {
|
||||
class CustomDrawer extends StatelessWidget {
|
||||
final LottieComposition composition;
|
||||
|
||||
const CustomDrawer(this.composition, {Key key}) : super(key: key);
|
||||
const CustomDrawer(this.composition, {Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomPaint(
|
||||
painter: _Painter(composition),
|
||||
size: Size(400, 400),
|
||||
size: const Size(400, 400),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _Painter extends CustomPainter {
|
||||
final LottieComposition composition;
|
||||
final LottieDrawable drawable;
|
||||
|
||||
_Painter(this.composition);
|
||||
_Painter(LottieComposition composition)
|
||||
: drawable = LottieDrawable(composition);
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
var drawable = LottieDrawable(composition);
|
||||
|
||||
var frameCount = 40;
|
||||
var columns = 10;
|
||||
for (var i = 0; i < frameCount; i++) {
|
||||
|
@ -1,14 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() => runApp(MyApp());
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
return const MaterialApp(
|
||||
home: Scaffold(
|
||||
body: MyWidget(),
|
||||
),
|
||||
@ -18,12 +19,14 @@ class MyApp extends StatelessWidget {
|
||||
|
||||
//--- example
|
||||
class MyWidget extends StatefulWidget {
|
||||
const MyWidget({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_MyWidgetState createState() => _MyWidgetState();
|
||||
State<MyWidget> createState() => _MyWidgetState();
|
||||
}
|
||||
|
||||
class _MyWidgetState extends State<MyWidget> {
|
||||
Future<LottieComposition> _composition;
|
||||
late final Future<LottieComposition> _composition;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -46,7 +49,7 @@ class _MyWidgetState extends State<MyWidget> {
|
||||
if (composition != null) {
|
||||
return Lottie(composition: composition);
|
||||
} else {
|
||||
return Center(child: CircularProgressIndicator());
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
},
|
||||
);
|
||||
|
35
example/lib/examples/drop_shadow.dart
Normal file
@ -0,0 +1,35 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
body: ListView(
|
||||
children: [
|
||||
Lottie.asset(
|
||||
'assets/Tests/Fill.json',
|
||||
height: 300,
|
||||
delegates: LottieDelegates(values: [
|
||||
ValueDelegate.dropShadow(
|
||||
['**'],
|
||||
value: const DropShadow(
|
||||
color: Colors.blue,
|
||||
direction: 140,
|
||||
distance: 60,
|
||||
radius: 10,
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -1,17 +1,16 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_colorpicker/flutter_colorpicker.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() async {
|
||||
runApp(App());
|
||||
runApp(const App());
|
||||
}
|
||||
|
||||
class App extends StatefulWidget {
|
||||
const App({Key key}) : super(key: key);
|
||||
const App({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AppState createState() => _AppState();
|
||||
State<App> createState() => _AppState();
|
||||
}
|
||||
|
||||
class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
@ -33,7 +32,7 @@ class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
home: Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBar(
|
||||
title: Text('Dynamic properties'),
|
||||
title: const Text('Dynamic properties'),
|
||||
),
|
||||
body: ListView(
|
||||
children: <Widget>[
|
||||
@ -50,7 +49,7 @@ class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
value: _useDelegates,
|
||||
onChanged: (newValue) {
|
||||
setState(() {
|
||||
_useDelegates = newValue;
|
||||
_useDelegates = newValue!;
|
||||
});
|
||||
},
|
||||
),
|
||||
@ -63,7 +62,7 @@ class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
},
|
||||
),
|
||||
Center(
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: 500,
|
||||
child: ColorPicker(
|
||||
pickerColor: _color,
|
||||
@ -72,7 +71,7 @@ class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
_color = newColor;
|
||||
});
|
||||
},
|
||||
showLabel: false,
|
||||
labelTypes: const [],
|
||||
enableAlpha: false,
|
||||
pickerAreaHeightPercent: 0.8,
|
||||
),
|
||||
|
@ -3,18 +3,18 @@ import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() async {
|
||||
runApp(App());
|
||||
runApp(const App());
|
||||
}
|
||||
|
||||
class App extends StatefulWidget {
|
||||
const App({Key key}) : super(key: key);
|
||||
const App({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AppState createState() => _AppState();
|
||||
State<App> createState() => _AppState();
|
||||
}
|
||||
|
||||
class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
TextEditingController _textController;
|
||||
late final TextEditingController _textController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -36,7 +36,7 @@ class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
home: Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBar(
|
||||
title: Text('Dynamic text'),
|
||||
title: const Text('Dynamic text'),
|
||||
),
|
||||
body: Center(
|
||||
child: Column(
|
||||
@ -54,7 +54,7 @@ class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
SizedBox(
|
||||
width: 300,
|
||||
child: CupertinoTextField(
|
||||
controller: _textController,
|
||||
|
31
example/lib/examples/error_builder.dart
Normal file
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
body: ListView(
|
||||
children: [_Animation()],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _Animation extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Lottie.network(
|
||||
'https://example.does.not.exist/lottie.json',
|
||||
errorBuilder: (context, exception, stackTrace) {
|
||||
return const Text('😢');
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
@ -1,9 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() => runApp(MyApp());
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
|
@ -2,18 +2,18 @@ import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() async {
|
||||
runApp(App());
|
||||
runApp(const App());
|
||||
}
|
||||
|
||||
class App extends StatefulWidget {
|
||||
const App({Key key}) : super(key: key);
|
||||
const App({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AppState createState() => _AppState();
|
||||
State<App> createState() => _AppState();
|
||||
}
|
||||
|
||||
class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
AnimationController _animationController;
|
||||
late final AnimationController _animationController;
|
||||
bool _showAnimation = true;
|
||||
|
||||
@override
|
||||
|