Compare commits

...

16 Commits

Author SHA1 Message Date
fc450a88f4 Fix some warnings with Flutter 3.3 (#235) 2022-09-14 13:21:29 +02:00
c0bc257f4f use FilterQuality.low to default when draw image layer to fix some image render sawtooth (#230) 2022-08-25 11:55:26 +02:00
0e7499d82e Allow AlignmentGeometry for alignment (#228)
Thanks for the contribution
2022-08-03 11:52:58 +02:00
4cd9ec759a Update publish-on-pub action 2022-07-27 11:15:31 +02:00
d8f5b872ef [feat] support image layer quality setting (#214) 2022-07-27 11:11:26 +02:00
bc3eb4621b Add latest feature/fixes from Lottie-Android (#209)
- Added support for rounded corners on shapes and rects
- Add support for text in dynamic properties (ValueDelegate)
- Improve stroke with offset
- Add support for reversed polystar paths
- Enforce order of operations to avoid rounding errors
2022-04-14 22:20:22 +02:00
08d7da747a Add pubignore 2022-02-14 10:07:39 +01:00
b2ebd2058d Fix new lints in Flutter 2.10 (#196) 2022-02-14 09:31:30 +01:00
2979b62dc0 fix: Revert Cubic to PathInterpolator.cubic (#173) 2021-09-24 23:42:56 +02:00
340f0d2f27 Format changelog 2021-09-19 20:51:42 +02:00
34fef26eb2 Fix changelog 2021-09-19 20:50:56 +02:00
89c62122bf Add support for Blur & DropShadow (#170) 2021-09-19 20:48:01 +02:00
56157b52af Fix publish script 2021-07-08 22:10:09 +02:00
a52977f2b3 Fix onWarning callback (#156) 2021-07-08 21:58:01 +02:00
cb929e791d Remove more dependencies and add errorBuilder (#155) 2021-07-07 10:21:05 +02:00
50495f24e2 Add newest bug fixes from lottie-android (#154) 2021-06-25 14:41:43 +02:00
319 changed files with 33007 additions and 953 deletions

View File

@ -10,11 +10,11 @@ jobs:
name: Flutter analyze
strategy:
matrix:
flutter: ['beta']
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"
@ -38,10 +38,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
- uses: subosito/flutter-action@v2
with:
channel: 'beta'
- run: flutter config --enable-web
channel: 'stable'
- run: flutter precache web
- run: flutter pub get
working-directory: example

View File

@ -8,17 +8,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
- uses: subosito/flutter-action@v2
with:
channel: 'beta'
channel: 'stable'
- run: flutter pub get
- run: flutter pub run tool/publish/comment_dependency_overrides.dart
- run: flutter pub get
- 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
View File

@ -3,6 +3,7 @@ _*
!.gitignore
!.github
!.pubignore
**/failures/*.png

15
.pubignore Normal file
View 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/

View File

@ -1,3 +1,102 @@
## [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`

View File

@ -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(
@ -56,11 +58,13 @@ With a custom `AnimationController` you have a rich API to play the animation in
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 {
@ -132,8 +136,10 @@ 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> {
@ -160,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());
}
},
);
@ -182,7 +188,7 @@ class CustomDrawer extends StatelessWidget {
Widget build(BuildContext context) {
return CustomPaint(
painter: _Painter(composition),
size: Size(400, 400),
size: const Size(400, 400),
);
}
}
@ -236,7 +242,7 @@ class _Animation extends StatelessWidget {
),
ValueDelegate.position(
const ['Shape Layer 1', 'Rectangle', '**'],
relative: Offset(100, 200),
relative: const Offset(100, 200),
),
],
),

View File

@ -1,38 +1,29 @@
include: package:pedantic/analysis_options.yaml
include: package:flutter_lints/flutter.yaml
analyzer:
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

View File

@ -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(

View File

@ -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

View File

@ -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'
}

View File

@ -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.
-->

View File

@ -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"/>

View File

@ -0,0 +1,6 @@
package com.github.xvrh.lottie.example
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}

View File

@ -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);
}
}

View File

@ -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>

View 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>

View File

@ -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>

View File

@ -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.
-->

View File

@ -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()
}
}

View File

@ -1,4 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true

View File

@ -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

View File

@ -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"

View 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":[]}

File diff suppressed because it is too large Load Diff

View 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":[]}

View 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":[]}

File diff suppressed because it is too large Load Diff

View 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": []
}

View 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":[]}

File diff suppressed because one or more lines are too long

View 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}

View 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}

View 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 }

View 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}

View 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}

View 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 }

File diff suppressed because one or more lines are too long

View 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}

View 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": []
}

View 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": []
}

View 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":[]}

View 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":[]}

File diff suppressed because one or more lines are too long

View 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": []
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View 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}

File diff suppressed because it is too large Load Diff

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -2,9 +2,11 @@ import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:lottie/lottie.dart';
void main() => runApp(App());
void main() => runApp(const App());
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
@ -23,7 +25,7 @@ class __PageState extends State<_Page> {
void initState() {
super.initState();
SchedulerBinding.instance!.addPostFrameCallback((_) => _showLoader());
SchedulerBinding.instance.addPostFrameCallback((_) => _showLoader());
}
void _showLoader() {
@ -42,6 +44,6 @@ class __PageState extends State<_Page> {
@override
Widget build(BuildContext context) {
return Center();
return const Center();
}
}

View File

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';
void main() async {
runApp(App());
runApp(const App());
}
class App extends StatelessWidget {

View File

@ -1,11 +1,13 @@
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 {

View File

@ -9,11 +9,13 @@ import 'package:lottie/lottie.dart';
/// 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(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 {
@ -43,7 +45,7 @@ class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Animation control'),
title: const Text('Animation control'),
),
body: Column(
children: <Widget>[
@ -58,27 +60,27 @@ class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
});
},
),
Text('${_controller.value.toStringAsFixed(2)}'),
Text(_controller.value.toStringAsFixed(2)),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Play backward
IconButton(
icon: Icon(Icons.arrow_left),
icon: const Icon(Icons.arrow_left),
onPressed: () {
_controller.reverse();
},
),
// Pause
IconButton(
icon: Icon(Icons.pause),
icon: const Icon(Icons.pause),
onPressed: () {
_controller.stop();
},
),
// Play forward
IconButton(
icon: Icon(Icons.arrow_right),
icon: const Icon(Icons.arrow_right),
onPressed: () {
_controller.forward();
},
@ -99,7 +101,7 @@ class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
period: _controller.duration! * (stop - start),
);
},
child: Text('Loop between frames'),
child: const Text('Loop between frames'),
),
],
),

View 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,
),
]),
),
],
),
),
);
}
}

View File

@ -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,8 +18,10 @@ 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> {
@ -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());
}
},
);
@ -63,7 +66,7 @@ class CustomDrawer extends StatelessWidget {
Widget build(BuildContext context) {
return CustomPaint(
painter: _Painter(composition),
size: Size(400, 400),
size: const Size(400, 400),
);
}
}

View File

@ -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,8 +19,10 @@ 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> {
@ -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());
}
},
);

View 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,
),
),
]),
),
],
),
),
);
}
}

View File

@ -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);
@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>[
@ -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,
),

View File

@ -3,14 +3,14 @@ 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);
@override
_AppState createState() => _AppState();
State<App> createState() => _AppState();
}
class _AppState extends State<App> with TickerProviderStateMixin {
@ -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,

View 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('😢');
},
);
}
}

View File

@ -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(

View File

@ -2,14 +2,14 @@ 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);
@override
_AppState createState() => _AppState();
State<App> createState() => _AppState();
}
class _AppState extends State<App> with TickerProviderStateMixin {

View File

@ -5,14 +5,14 @@ import 'package:lottie/lottie.dart';
/// It is based on this article for lottie-ios:
/// https://medium.com/swlh/controlling-lottie-animation-with-markers-5e9035d94623
void main() async {
runApp(App());
runApp(const App());
}
class App extends StatefulWidget {
const App({Key? key}) : super(key: key);
@override
_AppState createState() => _AppState();
State<App> createState() => _AppState();
}
class _AppState extends State<App> with TickerProviderStateMixin {
@ -30,13 +30,13 @@ class _AppState extends State<App> with TickerProviderStateMixin {
theme: ThemeData.dark(),
home: Scaffold(
appBar: AppBar(
title: Text('Markers'),
title: const Text('Markers'),
),
body: FutureBuilder<LottieComposition>(
future: _composition,
builder: (context, snapshot) {
if (snapshot.hasError) return ErrorWidget(snapshot.error!);
if (!snapshot.hasData) return CircularProgressIndicator();
if (!snapshot.hasData) return const CircularProgressIndicator();
return _LottieDetails(snapshot.data!);
},
),
@ -80,24 +80,24 @@ class _LottieDetailsState extends State<_LottieDetails>
height: 150,
),
ListTile(
title: Text('Composition start frame'),
title: const Text('Composition start frame'),
trailing: Text(widget.composition.startFrame.toStringAsFixed(1)),
),
ListTile(
title: Text('Composition duration'),
title: const Text('Composition duration'),
trailing: Text(widget.composition.durationFrames.toStringAsFixed(1)),
),
ElevatedButton(
onPressed: () => _playBetween('touchDownEnd', 'touchUpCancel'),
child: Text('touchDownEnd - touchUpCancel'),
child: const Text('touchDownEnd - touchUpCancel'),
),
ElevatedButton(
onPressed: () => _playBetween('touchDownStart', 'touchDownEnd'),
child: Text('touchDownStart - touchDownEnd'),
child: const Text('touchDownStart - touchDownEnd'),
),
ElevatedButton(
onPressed: () => _playBetween('touchDownEnd', 'touchUpEnd'),
child: Text('touchDownEnd - touchUpEnd'),
child: const Text('touchDownEnd - touchUpEnd'),
),
for (var marker in widget.composition.markers)
ListTile(

View File

@ -1,11 +1,13 @@
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 {

View File

@ -8,14 +8,14 @@ void main() async {
..level = Level.ALL
..onRecord.listen(print);
runApp(App());
runApp(const App());
}
class App extends StatefulWidget {
const App({Key? key}) : super(key: key);
@override
_AppState createState() => _AppState();
State<App> createState() => _AppState();
}
class _AppState extends State<App> with TickerProviderStateMixin {

View File

@ -1,5 +1,3 @@
//@dart=2.10
import 'dart:io';
import 'dart:ui';
import 'package:flutter/material.dart';
@ -9,15 +7,17 @@ import 'package:path/path.dart' as p;
import 'package:path_provider/path_provider.dart';
/// This example shows how to save the frame of an animation to files on disk.
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> {
List<File> _frames;
List<File>? _frames;
@override
Widget build(BuildContext context) {
@ -30,13 +30,13 @@ class _MyAppState extends State<MyApp> {
children: [
ElevatedButton(
onPressed: _export,
child: Text('Export all frames'),
child: const Text('Export all frames'),
),
if (_frames != null)
Expanded(
child: GridView.count(
crossAxisCount: 10,
children: [..._frames.map((f) => Image.file(f))],
children: [..._frames!.map((f) => Image.file(f))],
),
)
],
@ -53,7 +53,7 @@ class _MyAppState extends State<MyApp> {
var frames = await exportFrames(
composition, await _createTempDirectory('export-lottie'),
progresses: [for (var i = 0.0; i <= 1; i += 0.1) i],
size: Size(50, 50));
size: const Size(50, 50));
setState(() {
_frames = frames;
@ -62,7 +62,7 @@ class _MyAppState extends State<MyApp> {
}
Future<List<File>> exportFrames(LottieComposition composition, String directory,
{@required Size size, @required List<double> progresses}) async {
{required Size size, required List<double> progresses}) async {
var drawable = LottieDrawable(composition);
var frames = <File>[];
@ -89,7 +89,7 @@ Future<ByteData> _toByteData(LottieDrawable drawable, Size size) async {
var picture = pictureRecorder.endRecording();
var image = await picture.toImage(size.width.toInt(), size.height.toInt());
return await image.toByteData(format: ImageByteFormat.png);
return (await image.toByteData(format: ImageByteFormat.png))!;
}
Future<String> _createTempDirectory(String folderName) async {

View File

@ -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(
@ -35,7 +37,7 @@ class _Animation extends StatelessWidget {
),
ValueDelegate.position(
const ['Shape Layer 1', 'Rectangle', '**'],
relative: Offset(100, 200),
relative: const Offset(100, 200),
),
],
),

View File

@ -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(

View File

@ -1,31 +1,34 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:lottie/lottie.dart';
import 'src/all_files.g.dart';
final _logger = Logger('main_app');
void main() {
Logger.root
..level = Level.ALL
..onRecord.listen(print);
Lottie.traceEnabled = true;
runApp(App());
runApp(const App());
}
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
//showPerformanceOverlay: true,
home: Scaffold(
appBar: AppBar(
title: Text('Lottie Flutter'),
title: const Text('Lottie Flutter'),
),
body: Scrollbar(
child: GridView.builder(
itemCount: files.length,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 4),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4),
itemBuilder: (context, index) {
var assetName = files[index];
return GestureDetector(
@ -38,6 +41,7 @@ class App extends StatelessWidget {
child: _Item(
child: Lottie.asset(
assetName,
onWarning: (w) => _logger.info('$assetName - $w'),
frameBuilder: (context, child, composition) {
return AnimatedOpacity(
opacity: composition == null ? 0 : 1,
@ -69,11 +73,11 @@ class _Item extends StatelessWidget {
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(10)),
borderRadius: const BorderRadius.all(Radius.circular(10)),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
offset: Offset(2, 2),
offset: const Offset(2, 2),
blurRadius: 5)
]),
child: child,
@ -88,7 +92,7 @@ class Detail extends StatefulWidget {
const Detail(this.assetName, {Key? key}) : super(key: key);
@override
_DetailState createState() => _DetailState();
State<Detail> createState() => _DetailState();
}
class _DetailState extends State<Detail> with TickerProviderStateMixin {
@ -104,7 +108,7 @@ class _DetailState extends State<Detail> with TickerProviderStateMixin {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('${widget.assetName}'),
title: Text(widget.assetName),
),
body: SingleChildScrollView(
child: Column(

View File

@ -20,7 +20,7 @@ class App extends StatelessWidget {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text(''),
title: const Text(''),
),
body: SingleChildScrollView(
child: Center(

View File

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';
void main() async {
runApp(App());
runApp(const App());
}
class App extends StatelessWidget {
@ -13,7 +13,7 @@ class App extends StatelessWidget {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text(''),
title: const Text(''),
),
body: SingleChildScrollView(
child: Center(

View File

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';
void main() async {
runApp(App());
runApp(const App());
}
class App extends StatelessWidget {
@ -13,11 +13,12 @@ class App extends StatelessWidget {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text(''),
title: const Text(''),
),
body: GridView(
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 4),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
),
children: [
Lottie.asset(
'assets/Tests/WeAccept.json',

View File

@ -9,74 +9,32 @@ project 'Runner', {
'Release' => :release,
}
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |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)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
end
def pubspec_supports_macos(file)
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return false;
end
File.foreach(file_abs_path) { |line|
return true if line =~ /^\s*macos:/
}
return false
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_macos_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
ephemeral_dir = File.join('Flutter', 'ephemeral')
symlink_dir = File.join(ephemeral_dir, '.symlinks')
symlink_plugins_dir = File.join(symlink_dir, 'plugins')
system("rm -rf #{symlink_dir}")
system("mkdir -p #{symlink_plugins_dir}")
# Flutter Pods
generated_xcconfig = parse_KV_file(File.join(ephemeral_dir, 'Flutter-Generated.xcconfig'))
if generated_xcconfig.empty?
puts "Flutter-Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
end
generated_xcconfig.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join(symlink_dir, 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'FlutterMacOS', :path => File.join(symlink, File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join(symlink_plugins_dir, p[:name])
File.symlink(p[:path], symlink)
if pubspec_supports_macos(File.join(symlink, 'pubspec.yaml'))
pod p[:name], :path => File.join(symlink, 'macos')
end
}
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
end
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_macos_build_settings(target)
end
end

View File

@ -1,28 +1,22 @@
PODS:
- FlutterMacOS (1.22.4)
- path_provider (0.0.1)
- FlutterMacOS (1.0.0)
- path_provider_macos (0.0.1):
- FlutterMacOS
DEPENDENCIES:
- path_provider (from `Flutter/ephemeral/.symlinks/plugins/path_provider/macos`)
- FlutterMacOS (from `Flutter/ephemeral`)
- path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`)
SPEC REPOS:
trunk:
- FlutterMacOS
EXTERNAL SOURCES:
path_provider:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider/macos
FlutterMacOS:
:path: Flutter/ephemeral
path_provider_macos:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos
SPEC CHECKSUMS:
FlutterMacOS: ac210ef71944b3f04789076d70d4c72c7ec0c619
path_provider: e0848572d1d38b9a7dd099e79cf83f5b7e2cde9f
path_provider_macos: a0a3fd666cb7cd0448e936fb4abad4052961002b
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
path_provider_macos: 160cab0d5461f0c0e02995469a98f24bdb9a3f1f
PODFILE CHECKSUM: d8ba9b3e9e93c62c74a660b46c6fcb09f03991a7
PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
COCOAPODS: 1.10.1
COCOAPODS: 1.11.3

View File

@ -319,9 +319,12 @@
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/path_provider_macos/path_provider_macos.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_macos.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;

View File

@ -7,14 +7,14 @@ packages:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.2"
version: "3.3.1"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0"
version: "2.9.0"
boolean_selector:
dependency: transitive
description:
@ -28,56 +28,49 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.2.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "3.0.2"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "2.0.1"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.0"
version: "6.1.4"
flutter:
dependency: "direct main"
description: flutter
@ -89,7 +82,14 @@ packages:
name: flutter_colorpicker
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.0"
version: "1.0.3"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
flutter_test:
dependency: "direct dev"
description: flutter
@ -101,119 +101,140 @@ packages:
name: golden_toolkit
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.0"
version: "0.13.0"
http:
dependency: "direct main"
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.3"
version: "0.13.5"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
logging:
version: "4.0.1"
lints:
dependency: transitive
description:
name: lints
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
logging:
dependency: "direct main"
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "1.0.2"
lottie:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "1.0.1"
version: "1.4.3"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.12"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.5"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.8.0"
path:
dependency: transitive
dependency: "direct main"
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.2"
path_provider:
dependency: "direct main"
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "2.0.11"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.20"
path_provider_ios:
dependency: transitive
description:
name: path_provider_ios
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.7"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.0.6"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "2.0.4"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.11.0"
version: "2.1.3"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.2"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.1"
version: "4.2.4"
sky_engine:
dependency: transitive
description: flutter
@ -225,7 +246,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.9.0"
stack_trace:
dependency: transitive
description:
@ -246,49 +267,49 @@ packages:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19"
version: "0.4.12"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.3.1"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.2"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "3.0.0"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
version: "0.2.0+2"
sdks:
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.20.0"
dart: ">=2.18.0 <3.0.0"
flutter: ">=3.3.0"

View File

@ -10,11 +10,14 @@ dependencies:
sdk: flutter
flutter_colorpicker:
http:
logging:
lottie:
path: ../
path:
path_provider:
dev_dependencies:
flutter_lints:
flutter_test:
sdk: flutter
golden_toolkit:

View File

@ -3,7 +3,7 @@ import 'package:lottie_example/main_app.dart';
void main() {
testWidgets('Main sample', (tester) async {
await tester.pumpWidget(App());
await tester.pumpWidget(const App());
await tester.pump();
});
}

BIN
example/web/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

35
example/web/manifest.json Normal file
View File

@ -0,0 +1,35 @@
{
"name": "example",
"short_name": "example",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "icons/Icon-maskable-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "icons/Icon-maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}

View File

@ -14,4 +14,5 @@ export 'src/providers/lottie_provider.dart' show LottieProvider;
export 'src/providers/memory_provider.dart' show MemoryLottie;
export 'src/providers/network_provider.dart' show NetworkLottie;
export 'src/raw_lottie.dart' show RawLottie;
export 'src/value/drop_shadow.dart' show DropShadow;
export 'src/value_delegate.dart' show ValueDelegate;

View File

@ -1,12 +1,13 @@
import 'dart:math';
import 'dart:ui';
import 'package:meta/meta.dart';
import 'package:flutter/foundation.dart';
import 'package:vector_math/vector_math_64.dart';
import '../../l.dart';
import '../../lottie_drawable.dart';
import '../../lottie_property.dart';
import '../../model/animatable/animatable_double_value.dart';
import '../../model/animatable/animatable_integer_value.dart';
import '../../model/content/drop_shadow_effect.dart';
import '../../model/content/shape_trim_path.dart';
import '../../model/key_path.dart';
import '../../model/layer/base_layer.dart';
@ -15,8 +16,10 @@ import '../../utils/dash_path.dart';
import '../../utils/misc.dart';
import '../../utils/path_factory.dart';
import '../../utils/utils.dart';
import '../../value/drop_shadow.dart';
import '../../value/lottie_value_callback.dart';
import '../keyframe/base_keyframe_animation.dart';
import '../keyframe/drop_shadow_keyframe_animation.dart';
import '../keyframe/value_callback_keyframe_animation.dart';
import 'content.dart';
import 'drawing_content.dart';
@ -39,6 +42,9 @@ abstract class BaseStrokeContent
final List<BaseKeyframeAnimation<Object, double>> _dashPatternAnimations;
final BaseKeyframeAnimation<Object, double>? _dashPatternOffsetAnimation;
BaseKeyframeAnimation<ColorFilter, ColorFilter?>? _colorFilterAnimation;
BaseKeyframeAnimation<double, double>? _blurAnimation;
double _blurMaskFilterRadius = 0;
DropShadowKeyframeAnimation? dropShadowAnimation;
BaseStrokeContent(this.lottieDrawable, this.layer,
{required StrokeCap cap,
@ -77,6 +83,17 @@ abstract class BaseStrokeContent
if (_dashPatternOffsetAnimation != null) {
_dashPatternOffsetAnimation!.addUpdateListener(onUpdateListener);
}
var blurEffect = layer.blurEffect;
if (blurEffect != null) {
_blurAnimation = blurEffect.blurriness.createAnimation()
..addUpdateListener(onUpdateListener);
layer.addAnimation(_blurAnimation);
}
var dropShadowEffect = layer.dropShadowEffect;
if (dropShadowEffect != null) {
dropShadowAnimation = DropShadowKeyframeAnimation(
onUpdateListener, layer, dropShadowEffect);
}
}
void onUpdateListener() {
@ -139,6 +156,18 @@ abstract class BaseStrokeContent
paint.colorFilter = _colorFilterAnimation!.value;
}
var blurAnimation = _blurAnimation;
if (blurAnimation != null) {
var blurRadius = blurAnimation.value;
if (blurRadius == 0) {
paint.maskFilter = null;
} else if (blurRadius != _blurMaskFilterRadius) {
var blur = layer.getBlurMaskFilter(blurRadius);
paint.maskFilter = blur;
}
_blurMaskFilterRadius = blurRadius;
}
for (var i = 0; i < _pathGroups.length; i++) {
var pathGroup = _pathGroups[i];
@ -153,6 +182,10 @@ abstract class BaseStrokeContent
}
L.endSection('StrokeContent#buildPath');
L.beginSection('StrokeContent#drawPath');
var dropShadow = dropShadowAnimation;
if (dropShadow != null) {
dropShadow.draw(canvas, _path);
}
canvas.drawPath(_withDashPattern(_path, parentMatrix), paint);
L.endSection('StrokeContent#drawPath');
}
@ -163,7 +196,8 @@ abstract class BaseStrokeContent
void _applyTrimPath(
Canvas canvas, _PathGroup pathGroup, Matrix4 parentMatrix) {
L.beginSection('StrokeContent#applyTrimPath');
if (pathGroup.trimPath == null) {
var trimPath = pathGroup.trimPath;
if (trimPath == null) {
L.endSection('StrokeContent#applyTrimPath');
return;
}
@ -172,13 +206,24 @@ abstract class BaseStrokeContent
_path.addPath(pathGroup.paths[j].getPath(), Offset.zero,
matrix4: parentMatrix.storage);
}
var animStartValue = trimPath.start.value / 100;
var animEndValue = trimPath.end.value / 100;
var animOffsetValue = trimPath.offset.value / 360;
// If the start-end is ~100, consider it to be the full path.
if (animStartValue < 0.01 && animEndValue > 0.99) {
canvas.drawPath(_path, paint);
L.endSection('StrokeContent#applyTrimPath');
return;
}
var pathMetrics = _path.computeMetrics().toList();
var totalLength = pathMetrics.fold<double>(0.0, (a, b) => a + b.length);
var trimPath = pathGroup.trimPath!;
var offsetLength = totalLength * trimPath.offset.value / 360.0;
var startLength = totalLength * trimPath.start.value / 100.0 + offsetLength;
var endLength = totalLength * trimPath.end.value / 100.0 + offsetLength;
var offsetLength = totalLength * animOffsetValue;
var startLength = totalLength * animStartValue + offsetLength;
var endLength = min(totalLength * animEndValue + offsetLength,
startLength + totalLength - 1);
var currentLength = 0.0;
for (var j = pathGroup.paths.length - 1; j >= 0; j--) {
@ -294,9 +339,10 @@ abstract class BaseStrokeContent
@mustCallSuper
void addValueCallback<T>(T property, LottieValueCallback<T>? callback) {
if (property == LottieProperty.opacity) {
_opacityAnimation.setValueCallback(callback as LottieValueCallback<int>);
_opacityAnimation.setValueCallback(callback as LottieValueCallback<int>?);
} else if (property == LottieProperty.strokeWidth) {
_widthAnimation.setValueCallback(callback as LottieValueCallback<double>);
_widthAnimation
.setValueCallback(callback as LottieValueCallback<double>?);
} else if (property == LottieProperty.colorFilter) {
if (_colorFilterAnimation != null) {
layer.removeAnimation(_colorFilterAnimation);
@ -307,10 +353,31 @@ abstract class BaseStrokeContent
} else {
_colorFilterAnimation =
ValueCallbackKeyframeAnimation<ColorFilter, ColorFilter?>(
callback as LottieValueCallback<ColorFilter>, null);
_colorFilterAnimation!.addUpdateListener(onUpdateListener);
callback as LottieValueCallback<ColorFilter>, null)
..addUpdateListener(onUpdateListener);
layer.addAnimation(_colorFilterAnimation);
}
} else if (property == LottieProperty.blurRadius) {
var blurAnimation = _blurAnimation;
if (blurAnimation != null) {
blurAnimation
.setValueCallback(callback as LottieValueCallback<double>?);
} else {
_blurAnimation = blurAnimation = ValueCallbackKeyframeAnimation(
callback as LottieValueCallback<double>?, 0)
..addUpdateListener(onUpdateListener);
layer.addAnimation(blurAnimation);
}
} else if (property == LottieProperty.dropShadow) {
var dropShadowAnimation = this.dropShadowAnimation;
if (dropShadowAnimation == null) {
var effect = DropShadowEffect.createEmpty();
this.dropShadowAnimation = dropShadowAnimation = dropShadowAnimation =
DropShadowKeyframeAnimation(onUpdateListener, layer, effect);
}
dropShadowAnimation
.setCallback(callback as LottieValueCallback<DropShadow>?);
}
}
}

View File

@ -217,7 +217,7 @@ class ContentGroup implements DrawingContent, PathContent, KeyPathElement {
@override
void resolveKeyPath(KeyPath keyPath, int depth, List<KeyPath> accumulator,
KeyPath currentPartialKeyPath) {
if (!keyPath.matches(name, depth)) {
if (!keyPath.matches(name, depth) && name != '__container') {
return;
}

View File

@ -17,7 +17,7 @@ import 'path_content.dart';
import 'trim_path_content.dart';
class EllipseContent implements PathContent, KeyPathElementContent {
static final double _ellipseControlPointPercentage = 0.55228;
static const _ellipseControlPointPercentage = 0.55228;
final Path _path = PathFactory.create();
@ -117,10 +117,10 @@ class EllipseContent implements PathContent, KeyPathElementContent {
@override
void addValueCallback<T>(T property, LottieValueCallback<T>? callback) {
if (property == LottieProperty.ellipseSize) {
_sizeAnimation.setValueCallback(callback as LottieValueCallback<Offset>);
_sizeAnimation.setValueCallback(callback as LottieValueCallback<Offset>?);
} else if (property == LottieProperty.position) {
_positionAnimation
.setValueCallback(callback as LottieValueCallback<Offset>);
.setValueCallback(callback as LottieValueCallback<Offset>?);
}
}
}

View File

@ -3,14 +3,17 @@ import 'package:vector_math/vector_math_64.dart';
import '../../l.dart';
import '../../lottie_drawable.dart';
import '../../lottie_property.dart';
import '../../model/content/drop_shadow_effect.dart';
import '../../model/content/shape_fill.dart';
import '../../model/key_path.dart';
import '../../model/layer/base_layer.dart';
import '../../utils.dart';
import '../../utils/misc.dart';
import '../../utils/path_factory.dart';
import '../../value/drop_shadow.dart';
import '../../value/lottie_value_callback.dart';
import '../keyframe/base_keyframe_animation.dart';
import '../keyframe/drop_shadow_keyframe_animation.dart';
import '../keyframe/value_callback_keyframe_animation.dart';
import 'content.dart';
import 'drawing_content.dart';
@ -29,10 +32,25 @@ class FillContent implements DrawingContent, KeyPathElementContent {
late final BaseKeyframeAnimation<int, int> _opacityAnimation;
BaseKeyframeAnimation<ColorFilter, ColorFilter?>? _colorFilterAnimation;
final LottieDrawable lottieDrawable;
BaseKeyframeAnimation<double, double>? _blurAnimation;
double _blurMaskFilterRadius = 0;
DropShadowKeyframeAnimation? dropShadowAnimation;
FillContent(this.lottieDrawable, this.layer, ShapeFill fill)
: name = fill.name,
_hidden = fill.hidden {
var blurEffect = layer.blurEffect;
if (blurEffect != null) {
_blurAnimation = blurEffect.blurriness.createAnimation()
..addUpdateListener(onValueChanged);
layer.addAnimation(_blurAnimation);
}
var dropShadowEffect = layer.dropShadowEffect;
if (dropShadowEffect != null) {
dropShadowAnimation =
DropShadowKeyframeAnimation(onValueChanged, layer, dropShadowEffect);
}
if (fill.color == null || fill.opacity == null) {
return;
}
@ -80,6 +98,18 @@ class FillContent implements DrawingContent, KeyPathElementContent {
_paint.colorFilter = _colorFilterAnimation!.value;
}
var blurAnimation = _blurAnimation;
if (blurAnimation != null) {
var blurRadius = blurAnimation.value;
if (blurRadius == 0) {
_paint.maskFilter = null;
} else if (blurRadius != _blurMaskFilterRadius) {
var blur = layer.getBlurMaskFilter(blurRadius);
_paint.maskFilter = blur;
}
_blurMaskFilterRadius = blurRadius;
}
_path.reset();
for (var i = 0; i < _paths.length; i++) {
_path.addPath(_paths[i].getPath(), Offset.zero);
@ -87,6 +117,10 @@ class FillContent implements DrawingContent, KeyPathElementContent {
canvas.save();
canvas.transform(parentMatrix.storage);
var dropShadow = dropShadowAnimation;
if (dropShadow != null) {
dropShadow.draw(canvas, _path);
}
canvas.drawPath(_path, _paint);
canvas.restore();
@ -116,9 +150,9 @@ class FillContent implements DrawingContent, KeyPathElementContent {
@override
void addValueCallback<T>(T property, LottieValueCallback<T>? callback) {
if (property == LottieProperty.color) {
_colorAnimation.setValueCallback(callback as LottieValueCallback<Color>);
_colorAnimation.setValueCallback(callback as LottieValueCallback<Color>?);
} else if (property == LottieProperty.opacity) {
_opacityAnimation.setValueCallback(callback as LottieValueCallback<int>);
_opacityAnimation.setValueCallback(callback as LottieValueCallback<int>?);
} else if (property == LottieProperty.colorFilter) {
if (_colorFilterAnimation != null) {
layer.removeAnimation(_colorFilterAnimation);
@ -132,6 +166,28 @@ class FillContent implements DrawingContent, KeyPathElementContent {
..addUpdateListener(onValueChanged);
layer.addAnimation(_colorFilterAnimation);
}
} else if (property == LottieProperty.blurRadius) {
var blurAnimation = _blurAnimation;
if (blurAnimation != null) {
blurAnimation
.setValueCallback(callback as LottieValueCallback<double>?);
} else {
var callbackBlur = callback as LottieValueCallback<double>?;
_blurAnimation = blurAnimation = ValueCallbackKeyframeAnimation(
callbackBlur, callbackBlur?.value ?? 0)
..addUpdateListener(onValueChanged);
layer.addAnimation(blurAnimation);
}
} else if (property == LottieProperty.dropShadow) {
var dropShadowAnimation = this.dropShadowAnimation;
if (dropShadowAnimation == null) {
var effect = DropShadowEffect.createEmpty();
this.dropShadowAnimation = dropShadowAnimation = dropShadowAnimation =
DropShadowKeyframeAnimation(onValueChanged, layer, effect);
}
dropShadowAnimation
.setCallback(callback as LottieValueCallback<DropShadow>?);
}
}
}

View File

@ -3,6 +3,7 @@ import 'package:vector_math/vector_math_64.dart';
import '../../l.dart';
import '../../lottie_drawable.dart';
import '../../lottie_property.dart';
import '../../model/content/drop_shadow_effect.dart';
import '../../model/content/gradient_color.dart';
import '../../model/content/gradient_fill.dart';
import '../../model/content/gradient_type.dart';
@ -11,8 +12,10 @@ import '../../model/layer/base_layer.dart';
import '../../utils.dart';
import '../../utils/misc.dart';
import '../../utils/path_factory.dart';
import '../../value/drop_shadow.dart';
import '../../value/lottie_value_callback.dart';
import '../keyframe/base_keyframe_animation.dart';
import '../keyframe/drop_shadow_keyframe_animation.dart';
import '../keyframe/value_callback_keyframe_animation.dart';
import 'content.dart';
import 'drawing_content.dart';
@ -21,7 +24,7 @@ import 'path_content.dart';
class GradientFillContent implements DrawingContent, KeyPathElementContent {
/// Cache the gradients such that it runs at 30fps.
static final int _cacheStepsMs = 32;
static const _cacheStepsMs = 32;
final BaseLayer layer;
final GradientFill _fill;
final _linearGradientCache = <int, Gradient>{};
@ -38,6 +41,9 @@ class GradientFillContent implements DrawingContent, KeyPathElementContent {
_colorCallbackAnimation;
final LottieDrawable lottieDrawable;
final int _cacheSteps;
BaseKeyframeAnimation<double, double>? _blurAnimation;
double _blurMaskFilterRadius = 0;
DropShadowKeyframeAnimation? dropShadowAnimation;
GradientFillContent(this.lottieDrawable, this.layer, this._fill)
: _cacheSteps =
@ -59,6 +65,18 @@ class GradientFillContent implements DrawingContent, KeyPathElementContent {
_endPointAnimation.addUpdateListener(invalidate);
layer.addAnimation(_endPointAnimation);
var blurEffect = layer.blurEffect;
if (blurEffect != null) {
_blurAnimation = blurEffect.blurriness.createAnimation()
..addUpdateListener(invalidate);
layer.addAnimation(_blurAnimation);
}
var dropShadowEffect = layer.dropShadowEffect;
if (dropShadowEffect != null) {
dropShadowAnimation =
DropShadowKeyframeAnimation(invalidate, layer, dropShadowEffect);
}
}
@override
@ -103,6 +121,18 @@ class GradientFillContent implements DrawingContent, KeyPathElementContent {
_paint.colorFilter = _colorFilterAnimation!.value;
}
var blurAnimation = _blurAnimation;
if (blurAnimation != null) {
var blurRadius = blurAnimation.value;
if (blurRadius == 0) {
_paint.maskFilter = null;
} else if (blurRadius != _blurMaskFilterRadius) {
var blur = layer.getBlurMaskFilter(blurRadius);
_paint.maskFilter = blur;
}
_blurMaskFilterRadius = blurRadius;
}
var alpha =
((parentAlpha / 255.0 * _opacityAnimation.value / 100.0) * 255).round();
_paint.setAlpha(alpha.clamp(0, 255).toInt());
@ -112,6 +142,10 @@ class GradientFillContent implements DrawingContent, KeyPathElementContent {
canvas.save();
canvas.transform(parentMatrix.storage);
var dropShadow = dropShadowAnimation;
if (dropShadow != null) {
dropShadow.draw(canvas, _path);
}
canvas.drawPath(_path, _paint);
canvas.restore();
L.endSection('GradientFillContent#draw');
@ -198,7 +232,7 @@ class GradientFillContent implements DrawingContent, KeyPathElementContent {
colors[i] = dynamicColors[i];
}
} else {
colors = List.filled(dynamicColors.length, Color(0x00000000));
colors = List.filled(dynamicColors.length, const Color(0x00000000));
for (var i = 0; i < dynamicColors.length; i++) {
colors[i] = dynamicColors[i];
}
@ -217,7 +251,7 @@ class GradientFillContent implements DrawingContent, KeyPathElementContent {
@override
void addValueCallback<T>(T property, LottieValueCallback<T>? callback) {
if (property == LottieProperty.opacity) {
_opacityAnimation.setValueCallback(callback as LottieValueCallback<int>);
_opacityAnimation.setValueCallback(callback as LottieValueCallback<int>?);
} else if (property == LottieProperty.colorFilter) {
if (_colorFilterAnimation != null) {
layer.removeAnimation(_colorFilterAnimation);
@ -239,11 +273,34 @@ class GradientFillContent implements DrawingContent, KeyPathElementContent {
if (callback == null) {
_colorCallbackAnimation = null;
} else {
_linearGradientCache.clear();
_radialGradientCache.clear();
_colorCallbackAnimation = ValueCallbackKeyframeAnimation(
callback as LottieValueCallback<List<Color>>, <Color>[])
..addUpdateListener(invalidate);
layer.addAnimation(_colorCallbackAnimation);
}
} else if (property == LottieProperty.blurRadius) {
var blurAnimation = _blurAnimation;
if (blurAnimation != null) {
blurAnimation
.setValueCallback(callback as LottieValueCallback<double>?);
} else {
_blurAnimation = blurAnimation = ValueCallbackKeyframeAnimation(
callback as LottieValueCallback<double>?, 0)
..addUpdateListener(invalidate);
layer.addAnimation(blurAnimation);
}
} else if (property == LottieProperty.dropShadow) {
var dropShadowAnimation = this.dropShadowAnimation;
if (dropShadowAnimation == null) {
var effect = DropShadowEffect.createEmpty();
this.dropShadowAnimation = dropShadowAnimation = dropShadowAnimation =
DropShadowKeyframeAnimation(invalidate, layer, effect);
}
dropShadowAnimation
.setCallback(callback as LottieValueCallback<DropShadow>?);
}
}
}

View File

@ -15,7 +15,7 @@ import 'base_stroke_content.dart';
class GradientStrokeContent extends BaseStrokeContent {
/// Cache the gradients such that it runs at 30fps.
static final int _cacheStepsMs = 32;
static const _cacheStepsMs = 32;
@override
final String? name;
@ -149,7 +149,8 @@ class GradientStrokeContent extends BaseStrokeContent {
colors[i] = dynamicColors[i];
}
} else {
colors = List<Color>.filled(dynamicColors.length, Color(0x00000000));
colors =
List<Color>.filled(dynamicColors.length, const Color(0x00000000));
for (var i = 0; i < dynamicColors.length; i++) {
colors[i] = dynamicColors[i];
}

View File

@ -22,8 +22,8 @@ class PolystarContent implements PathContent, KeyPathElementContent {
/// curves, and calculating a scale factor.
/// It works best for polygons and stars with 3 points and needs more
/// work otherwise.
static final _polystarMagicNumber = .47829;
static final _polygonMagicNumber = .25;
static const _polystarMagicNumber = .47829;
static const _polygonMagicNumber = .25;
final _path = PathFactory.create();
final LottieDrawable lottieDrawable;
@ -134,6 +134,9 @@ class PolystarContent implements PathContent, KeyPathElementContent {
currentAngle = radians(currentAngle);
// adjust current angle for partial points
var anglePerPoint = 2 * pi / points;
if (_polystarShape.isReversed) {
anglePerPoint *= -1;
}
var halfAnglePerPoint = anglePerPoint / 2.0;
var partialPointAmount = points - points.toInt();
if (partialPointAmount != 0) {
@ -295,27 +298,27 @@ class PolystarContent implements PathContent, KeyPathElementContent {
void addValueCallback<T>(T property, LottieValueCallback<T>? callback) {
if (property == LottieProperty.polystarPoints) {
_pointsAnimation
.setValueCallback(callback as LottieValueCallback<double>);
.setValueCallback(callback as LottieValueCallback<double>?);
} else if (property == LottieProperty.polystarRotation) {
_rotationAnimation
.setValueCallback(callback as LottieValueCallback<double>);
.setValueCallback(callback as LottieValueCallback<double>?);
} else if (property == LottieProperty.position) {
_positionAnimation
.setValueCallback(callback as LottieValueCallback<Offset>);
.setValueCallback(callback as LottieValueCallback<Offset>?);
} else if (property == LottieProperty.polystarInnerRadius &&
_innerRadiusAnimation != null) {
_innerRadiusAnimation!
.setValueCallback(callback as LottieValueCallback<double>);
.setValueCallback(callback as LottieValueCallback<double>?);
} else if (property == LottieProperty.polystarOuterRadius) {
_outerRadiusAnimation
.setValueCallback(callback as LottieValueCallback<double>);
.setValueCallback(callback as LottieValueCallback<double>?);
} else if (property == LottieProperty.polystarInnerRoundedness &&
_innerRoundednessAnimation != null) {
_innerRoundednessAnimation!
.setValueCallback(callback as LottieValueCallback<double>);
.setValueCallback(callback as LottieValueCallback<double>?);
} else if (property == LottieProperty.polystarOuterRoundedness) {
_outerRoundednessAnimation
.setValueCallback(callback as LottieValueCallback<double>);
.setValueCallback(callback as LottieValueCallback<double>?);
}
}
}

View File

@ -15,6 +15,7 @@ import 'compound_trim_path_content.dart';
import 'content.dart';
import 'key_path_element_content.dart';
import 'path_content.dart';
import 'rounded_corners_content.dart';
import 'trim_path_content.dart';
class RectangleContent implements KeyPathElementContent, PathContent {
@ -29,6 +30,9 @@ class RectangleContent implements KeyPathElementContent, PathContent {
final BaseKeyframeAnimation<Object, double> _cornerRadiusAnimation;
final CompoundTrimPathContent _trimPaths = CompoundTrimPathContent();
/// This corner radius is from a layer item. The first one is from the roundedness on this specific rect.
BaseKeyframeAnimation<double, double>? _roundedCornersAnimation;
bool _isPathValid = false;
RectangleContent(
@ -61,6 +65,8 @@ class RectangleContent implements KeyPathElementContent, PathContent {
var trimPath = content;
_trimPaths.addTrimPath(trimPath);
trimPath.addListener(invalidate);
} else if (content is RoundedCornersContent) {
_roundedCornersAnimation = content.roundedCorners;
}
}
}
@ -82,6 +88,10 @@ class RectangleContent implements KeyPathElementContent, PathContent {
var halfWidth = size.dx / 2.0;
var halfHeight = size.dy / 2.0;
var radius = _cornerRadiusAnimation.value;
var roundedCornersAnimation = _roundedCornersAnimation;
if (radius == 0 && roundedCornersAnimation != null) {
radius = min(roundedCornersAnimation.value, min(halfWidth, halfHeight));
}
var maxRadius = min(halfWidth, halfHeight);
if (radius > maxRadius) {
radius = maxRadius;
@ -165,13 +175,13 @@ class RectangleContent implements KeyPathElementContent, PathContent {
@override
void addValueCallback<T>(T property, LottieValueCallback<T>? callback) {
if (property == LottieProperty.rectangleSize) {
_sizeAnimation.setValueCallback(callback as LottieValueCallback<Offset>);
_sizeAnimation.setValueCallback(callback as LottieValueCallback<Offset>?);
} else if (property == LottieProperty.position) {
_positionAnimation
.setValueCallback(callback as LottieValueCallback<Offset>);
.setValueCallback(callback as LottieValueCallback<Offset>?);
} else if (property == LottieProperty.cornerRadius) {
_cornerRadiusAnimation
.setValueCallback(callback as LottieValueCallback<double>);
.setValueCallback(callback as LottieValueCallback<double>?);
}
}
}

View File

@ -142,9 +142,9 @@ class RepeaterContent
}
if (property == LottieProperty.repeaterCopies) {
_copies.setValueCallback(callback as LottieValueCallback<double>);
_copies.setValueCallback(callback as LottieValueCallback<double>?);
} else if (property == LottieProperty.repeaterOffset) {
_offset.setValueCallback(callback as LottieValueCallback<double>);
_offset.setValueCallback(callback as LottieValueCallback<double>?);
}
}
}

View File

@ -0,0 +1,236 @@
import 'dart:math' as math;
import 'dart:ui';
import '../../lottie_drawable.dart';
import '../../model/content/rounded_corners.dart';
import '../../model/content/shape_data.dart';
import '../../model/cubic_curve_data.dart';
import '../../model/layer/base_layer.dart';
import '../../utils.dart';
import '../keyframe/base_keyframe_animation.dart';
import 'content.dart';
import 'shape_modifier_content.dart';
class RoundedCornersContent implements ShapeModifierContent {
/// Copied from:
/// https://github.com/airbnb/lottie-web/blob/bb71072a26e03f1ca993da60915860f39aae890b/player/js/utils/common.js#L47
static const _roundedCornerMagicNumber = 0.5519;
final LottieDrawable lottieDrawable;
@override
final String name;
final BaseKeyframeAnimation<double, double> roundedCorners;
ShapeData? shapeData;
RoundedCornersContent(
this.lottieDrawable, BaseLayer layer, RoundedCorners roundedCorners)
: name = roundedCorners.name,
roundedCorners = roundedCorners.cornerRadius.createAnimation() {
layer.addAnimation(this.roundedCorners);
this.roundedCorners.addUpdateListener(_onValueChanged);
}
void _onValueChanged() {
lottieDrawable.invalidateSelf();
}
@override
void setContents(List<Content> contentsBefore, List<Content> contentsAfter) {
// Do nothing.
}
/// Rounded corner algorithm:
/// Iterate through each vertex.
/// If a vertex is a sharp corner, it rounds it.
/// If a vertex has control points, it is already rounded, so it does nothing.
/// <p>
/// To round a vertex:
/// Split the vertex into two.
/// Move vertex 1 directly towards the previous vertex.
/// Set vertex 1's in control point to itself so it is not rounded on that side.
/// Extend vertex 1's out control point towards the original vertex.
/// <p>
/// Repeat for vertex 2:
/// Move vertex 2 directly towards the next vertex.
/// Set vertex 2's out point to itself so it is not rounded on that side.
/// Extend vertex 2's in control point towards the original vertex.
/// <p>
/// The distance that the vertices and control points are moved are relative to the
/// shape's vertex distances and the roundedness set in the animation.
@override
ShapeData modifyShape(ShapeData startingShapeData) {
var startingCurves = startingShapeData.curves;
if (startingCurves.length <= 2) {
return startingShapeData;
}
var roundedness = roundedCorners.value;
if (roundedness == 0) {
return startingShapeData;
}
var modifiedShapeData = _getShapeData(startingShapeData);
modifiedShapeData.setInitialPoint(
startingShapeData.initialPoint.dx, startingShapeData.initialPoint.dy);
var modifiedCurves = modifiedShapeData.curves;
var modifiedCurvesIndex = 0;
var isClosed = startingShapeData.isClosed;
// i represents which vertex we are currently on. Refer to the docs of CubicCurveData prior to working with
// this code.
// When i == 0
// vertex=ShapeData.initialPoint
// inCp=if closed vertex else curves[size - 1].cp2
// outCp=curves[0].cp1
// When i == 1
// vertex=curves[0].vertex
// inCp=curves[0].cp2
// outCp=curves[1].cp1.
// When i == size - 1
// vertex=curves[size - 1].vertex
// inCp=curves[size - 1].cp2
// outCp=if closed vertex else curves[0].cp1
for (var i = 0; i < startingCurves.length; i++) {
var startingCurve = startingCurves[i];
var previousCurve =
startingCurves[floorMod(i - 1, startingCurves.length)];
var previousPreviousCurve =
startingCurves[floorMod(i - 2, startingCurves.length)];
var vertex = (i == 0 && !isClosed)
? startingShapeData.initialPoint
: previousCurve.vertex;
var inPoint =
(i == 0 && !isClosed) ? vertex : previousCurve.controlPoint2;
var outPoint = startingCurve.controlPoint1;
var previousVertex = previousPreviousCurve.vertex;
var nextVertex = startingCurve.vertex;
// We can't round the corner of the end of a non-closed curve.
var isEndOfCurve = !startingShapeData.isClosed &&
(i == 0 && i == startingCurves.length - 1);
if (inPoint == vertex && outPoint == vertex && !isEndOfCurve) {
// This vertex is a point. Round its corners
var dxToPreviousVertex = vertex.dx - previousVertex.dx;
var dyToPreviousVertex = vertex.dy - previousVertex.dy;
var dxToNextVertex = nextVertex.dx - vertex.dx;
var dyToNextVertex = nextVertex.dy - vertex.dy;
var dToPreviousVertex = hypot(dxToPreviousVertex, dyToPreviousVertex);
var dToNextVertex = hypot(dxToNextVertex, dyToNextVertex);
double previousVertexPercent =
math.min(roundedness / dToPreviousVertex, 0.5);
double nextVertexPercent = math.min(roundedness / dToNextVertex, 0.5);
// Split the vertex into two and move each vertex towards the previous/next vertex.
var newVertex1X =
vertex.dx + (previousVertex.dx - vertex.dx) * previousVertexPercent;
var newVertex1Y =
vertex.dy + (previousVertex.dy - vertex.dy) * previousVertexPercent;
var newVertex2X =
vertex.dx + (nextVertex.dx - vertex.dx) * nextVertexPercent;
var newVertex2Y =
vertex.dy + (nextVertex.dy - vertex.dy) * nextVertexPercent;
// Extend the new vertex control point towards the original vertex.
var newVertex1OutPointX =
newVertex1X - (newVertex1X - vertex.dx) * _roundedCornerMagicNumber;
var newVertex1OutPointY =
newVertex1Y - (newVertex1Y - vertex.dy) * _roundedCornerMagicNumber;
var newVertex2InPointX =
newVertex2X - (newVertex2X - vertex.dx) * _roundedCornerMagicNumber;
var newVertex2InPointY =
newVertex2Y - (newVertex2Y - vertex.dy) * _roundedCornerMagicNumber;
// Remap vertex/in/out point to CubicCurveData.
// Refer to the docs for CubicCurveData for more info on the difference.
var previousCurveData = modifiedCurves[
floorMod(modifiedCurvesIndex - 1, modifiedCurves.length)];
var currentCurveData = modifiedCurves[modifiedCurvesIndex];
previousCurveData.controlPoint2 = Offset(newVertex1X, newVertex1Y);
previousCurveData.vertex = Offset(newVertex1X, newVertex1Y);
if (i == 0) {
modifiedShapeData.setInitialPoint(newVertex1X, newVertex1Y);
}
currentCurveData.controlPoint1 =
Offset(newVertex1OutPointX, newVertex1OutPointY);
modifiedCurvesIndex++;
previousCurveData = currentCurveData;
currentCurveData = modifiedCurves[modifiedCurvesIndex];
previousCurveData.controlPoint2 =
Offset(newVertex2InPointX, newVertex2InPointY);
previousCurveData.vertex = Offset(newVertex2X, newVertex2Y);
currentCurveData.controlPoint1 = Offset(newVertex2X, newVertex2Y);
modifiedCurvesIndex++;
} else {
// This vertex is not a point. Don't modify it. Refer to the documentation above and for CubicCurveData for mapping a vertex
// oriented point to CubicCurveData (path segments).
var previousCurveData = modifiedCurves[
floorMod(modifiedCurvesIndex - 1, modifiedCurves.length)];
var currentCurveData = modifiedCurves[modifiedCurvesIndex];
previousCurveData.controlPoint2 =
Offset(previousCurve.vertex.dx, previousCurve.vertex.dy);
previousCurveData.vertex =
Offset(previousCurve.vertex.dx, previousCurve.vertex.dy);
currentCurveData.controlPoint1 =
Offset(startingCurve.vertex.dx, startingCurve.vertex.dy);
modifiedCurvesIndex++;
}
}
return modifiedShapeData;
}
/// Returns a shape data with the correct number of vertices for the rounded corners shape.
/// This just returns the object. It does not update any values within the shape.
ShapeData _getShapeData(ShapeData startingShapeData) {
var startingCurves = startingShapeData.curves;
var isClosed = startingShapeData.isClosed;
var vertices = 0;
for (var i = startingCurves.length - 1; i >= 0; i--) {
var startingCurve = startingCurves[i];
var previousCurve =
startingCurves[floorMod(i - 1, startingCurves.length)];
var vertex = (i == 0 && !isClosed)
? startingShapeData.initialPoint
: previousCurve.vertex;
var inPoint =
(i == 0 && !isClosed) ? vertex : previousCurve.controlPoint2;
var outPoint = startingCurve.controlPoint1;
var isEndOfCurve = !startingShapeData.isClosed &&
(i == 0 && i == startingCurves.length - 1);
if (inPoint == vertex && outPoint == vertex && !isEndOfCurve) {
vertices += 2;
} else {
vertices += 1;
}
}
var shapeData = this.shapeData;
if (shapeData == null || shapeData.curves.length != vertices) {
var newCurves = <CubicCurveData>[];
for (var i = 0; i < vertices; i++) {
newCurves.add(CubicCurveData());
}
this.shapeData = shapeData =
ShapeData(newCurves, initialPoint: Offset.zero, closed: false);
}
shapeData.setClosed(isClosed);
return shapeData;
}
/// Copied from the API 24+ AOSP source.
static int floorMod(int x, int y) {
return x - floorDiv(x, y) * y;
}
/// Copied from the API 24+ AOSP source.
static int floorDiv(int x, int y) {
var r = x ~/ y;
// if the signs are different and modulo not zero, round down
if ((x ^ y) < 0 && (r * y != x)) {
r--;
}
return r;
}
}

View File

@ -5,10 +5,11 @@ import '../../model/content/shape_trim_path.dart';
import '../../model/layer/base_layer.dart';
import '../../utils.dart';
import '../../utils/path_factory.dart';
import '../keyframe/base_keyframe_animation.dart';
import '../keyframe/shape_keyframe_animation.dart';
import 'compound_trim_path_content.dart';
import 'content.dart';
import 'path_content.dart';
import 'shape_modifier_content.dart';
import 'trim_path_content.dart';
class ShapeContent implements PathContent {
@ -17,7 +18,7 @@ class ShapeContent implements PathContent {
final ShapePath _shape;
final LottieDrawable lottieDrawable;
final BaseKeyframeAnimation<Object, Path> _shapeAnimation;
final ShapeKeyframeAnimation _shapeAnimation;
bool _isPathValid = false;
final _trimPaths = CompoundTrimPathContent();
@ -35,6 +36,7 @@ class ShapeContent implements PathContent {
@override
void setContents(List<Content> contentsBefore, List<Content> contentsAfter) {
List<ShapeModifierContent>? shapeModifierContents;
for (var i = 0; i < contentsBefore.length; i++) {
var content = contentsBefore[i];
if (content is TrimPathContent &&
@ -43,8 +45,12 @@ class ShapeContent implements PathContent {
var trimPath = content;
_trimPaths.addTrimPath(trimPath);
trimPath.addListener(_invalidate);
} else if (content is ShapeModifierContent) {
shapeModifierContents ??= [];
shapeModifierContents.add(content);
}
}
_shapeAnimation.setShapeModifiers(shapeModifierContents);
}
@override

View File

@ -0,0 +1,6 @@
import '../../model/content/shape_data.dart';
import 'content.dart';
abstract class ShapeModifierContent extends Content {
ShapeData modifyShape(ShapeData shapeData);
}

View File

@ -50,7 +50,7 @@ class StrokeContent extends BaseStrokeContent {
void addValueCallback<T>(T property, LottieValueCallback<T>? callback) {
super.addValueCallback(property, callback);
if (property == LottieProperty.strokeColor) {
_colorAnimation.setValueCallback(callback as LottieValueCallback<Color>);
_colorAnimation.setValueCallback(callback as LottieValueCallback<Color>?);
} else if (property == LottieProperty.colorFilter) {
if (_colorFilterAnimation != null) {
layer.removeAnimation(_colorFilterAnimation);

Some files were not shown because too many files have changed in this diff Show More