lottie-ios 4.1.3 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yml +27 -9
- package/Lottie.xcodeproj/project.pbxproj +158 -70
- package/Lottie.xcodeproj/xcuserdata/calstephens.xcuserdatad/xcschemes/xcschememanagement.plist +2 -2
- package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/IDEFindNavigatorScopes.plist +5 -0
- package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +258 -0
- package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/xcdebugger/Expressions.xcexplist +13 -2
- package/Package.swift +2 -1
- package/README.md +1 -1
- package/Rakefile +3 -3
- package/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift +16 -2
- package/Sources/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift +1 -1
- package/Sources/Private/CoreAnimation/Animations/CustomPathAnimation.swift +1 -1
- package/Sources/Private/CoreAnimation/Animations/EllipseAnimation.swift +1 -1
- package/Sources/Private/CoreAnimation/Animations/GradientAnimations.swift +6 -6
- package/Sources/Private/CoreAnimation/Animations/LayerProperty.swift +68 -6
- package/Sources/Private/CoreAnimation/Animations/OpacityAnimation.swift +1 -1
- package/Sources/Private/CoreAnimation/Animations/RectangleAnimation.swift +1 -1
- package/Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift +66 -102
- package/Sources/Private/CoreAnimation/Animations/StarAnimation.swift +2 -2
- package/Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift +3 -3
- package/Sources/Private/CoreAnimation/Animations/TransformAnimations.swift +11 -11
- package/Sources/Private/CoreAnimation/CoreAnimationLayer.swift +55 -32
- package/Sources/Private/CoreAnimation/Layers/AnimationLayer.swift +3 -3
- package/Sources/Private/CoreAnimation/Layers/BaseCompositionLayer.swift +7 -9
- package/Sources/Private/CoreAnimation/Layers/ShapeLayer.swift +9 -1
- package/Sources/Private/CoreAnimation/ValueProviderStore.swift +22 -11
- package/Sources/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift +1 -1
- package/Sources/Private/MainThread/LayerContainers/MainThreadAnimationLayer.swift +13 -2
- package/Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift +4 -4
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/EllipseNode.swift +1 -1
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift +2 -2
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/RectNode.swift +1 -1
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/StarNode.swift +2 -2
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderContainers/GroupNode.swift +4 -4
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/FillNode.swift +1 -1
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientFillNode.swift +1 -1
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientStrokeNode.swift +1 -1
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift +1 -1
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/Text/TextAnimatorNode.swift +4 -4
- package/Sources/Private/Model/Assets/ImageAsset.swift +4 -3
- package/Sources/Private/Model/DotLottie/DotLottieAnimation.swift +2 -8
- package/Sources/Private/Model/DotLottie/DotLottieManifest.swift +3 -14
- package/Sources/Private/Model/DotLottie/DotLottieUtils.swift +11 -1
- package/Sources/Private/Model/DotLottie/ZipFoundation/Archive+BackingConfiguration.swift +147 -0
- package/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Helpers.swift +351 -0
- package/Sources/Private/Model/DotLottie/ZipFoundation/Archive+MemoryFile.swift +183 -0
- package/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Progress.swift +66 -0
- package/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Reading.swift +144 -0
- package/Sources/Private/Model/DotLottie/ZipFoundation/Archive+ReadingDeprecated.swift +49 -0
- package/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Writing.swift +385 -0
- package/Sources/Private/Model/DotLottie/ZipFoundation/Archive+WritingDeprecated.swift +91 -0
- package/Sources/Private/Model/DotLottie/ZipFoundation/Archive+ZIP64.swift +170 -0
- package/Sources/Private/Model/DotLottie/{Zip/ZipArchive.swift → ZipFoundation/Archive.swift} +150 -227
- package/Sources/Private/Model/DotLottie/ZipFoundation/Data+Compression.swift +403 -0
- package/Sources/Private/Model/DotLottie/ZipFoundation/Data+CompressionDeprecated.swift +44 -0
- package/Sources/Private/Model/DotLottie/{Zip → ZipFoundation}/Data+Serialization.swift +62 -0
- package/Sources/Private/Model/DotLottie/{Zip/ZipEntry+Serialization.swift → ZipFoundation/Entry+Serialization.swift} +7 -7
- package/Sources/Private/Model/DotLottie/{Zip/ZipEntry+ZIP64.swift → ZipFoundation/Entry+ZIP64.swift} +13 -19
- package/Sources/Private/Model/DotLottie/{Zip/ZipEntry.swift → ZipFoundation/Entry.swift} +141 -10
- package/Sources/Private/Model/DotLottie/ZipFoundation/FileManager+ZIP.swift +368 -0
- package/Sources/Private/Model/DotLottie/ZipFoundation/README.md +24 -0
- package/Sources/Private/Model/DotLottie/ZipFoundation/URL+ZIP.swift +32 -0
- package/Sources/Private/Model/Extensions/Bundle.swift +5 -14
- package/Sources/Private/Model/Keyframes/KeyframeGroup.swift +31 -8
- package/Sources/Private/RootAnimationLayer.swift +3 -1
- package/Sources/Private/Utility/Extensions/AnimationKeypathExtension.swift +12 -4
- package/Sources/Private/Utility/Extensions/DataExtension.swift +14 -4
- package/Sources/Private/Utility/Primitives/BezierPathRoundExtension.swift +11 -0
- package/Sources/Public/Animation/LottieAnimationHelpers.swift +12 -10
- package/Sources/Public/Animation/LottieAnimationView.swift +52 -27
- package/Sources/Public/DotLottie/DotLottieFile.swift +11 -34
- package/Sources/Public/DotLottie/DotLottieFileHelpers.swift +92 -71
- package/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift +58 -0
- package/lottie-ios.podspec +1 -1
- package/package.json +1 -1
- package/LottieAnimation/LottieAnimation.xcodeproj/project.xcworkspace/xcuserdata/calstephens.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/LottieAnimation/LottieAnimation.xcodeproj/project.xcworkspace/xcuserdata/valentinperignon.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/LottieAnimation/LottieAnimation.xcodeproj/xcuserdata/calstephens.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/LottieAnimation/LottieAnimation.xcodeproj/xcuserdata/valentinperignon.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -6
- package/LottieAnimation/LottieAnimation.xcodeproj/xcuserdata/valentinperignon.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/Sources/Private/Model/DotLottie/Zip/Data+Compression.swift +0 -134
- package/Sources/Private/Model/DotLottie/Zip/FileManager+ZIP.swift +0 -130
- package/Sources/Private/Utility/Interpolatable/KeyframeGroup+Extensions.swift +0 -59
package/Lottie.xcodeproj/xcuserdata/calstephens.xcuserdatad/xcschemes/xcschememanagement.plist
CHANGED
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
<key>Lottie (macOS).xcscheme_^#shared#^_</key>
|
|
13
13
|
<dict>
|
|
14
14
|
<key>orderHint</key>
|
|
15
|
-
<integer>
|
|
15
|
+
<integer>3</integer>
|
|
16
16
|
</dict>
|
|
17
17
|
<key>Lottie (tvOS).xcscheme_^#shared#^_</key>
|
|
18
18
|
<dict>
|
|
19
19
|
<key>orderHint</key>
|
|
20
|
-
<integer>
|
|
20
|
+
<integer>4</integer>
|
|
21
21
|
</dict>
|
|
22
22
|
</dict>
|
|
23
23
|
</dict>
|
package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/UserInterfaceState.xcuserstate
CHANGED
|
Binary file
|
package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
CHANGED
|
@@ -68,5 +68,263 @@
|
|
|
68
68
|
landmarkType = "7">
|
|
69
69
|
</BreakpointContent>
|
|
70
70
|
</BreakpointProxy>
|
|
71
|
+
<BreakpointProxy
|
|
72
|
+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
73
|
+
<BreakpointContent
|
|
74
|
+
uuid = "F26C2C9A-5A5F-482E-9611-B74F8D65E1D9"
|
|
75
|
+
shouldBeEnabled = "Yes"
|
|
76
|
+
ignoreCount = "0"
|
|
77
|
+
continueAfterRunningActions = "No"
|
|
78
|
+
filePath = "Sources/Private/Utility/Extensions/DataExtension.swift"
|
|
79
|
+
startingColumnNumber = "9223372036854775807"
|
|
80
|
+
endingColumnNumber = "9223372036854775807"
|
|
81
|
+
startingLineNumber = "31"
|
|
82
|
+
endingLineNumber = "31"
|
|
83
|
+
landmarkName = "init(assetName:in:)"
|
|
84
|
+
landmarkType = "7">
|
|
85
|
+
</BreakpointContent>
|
|
86
|
+
</BreakpointProxy>
|
|
87
|
+
<BreakpointProxy
|
|
88
|
+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
89
|
+
<BreakpointContent
|
|
90
|
+
uuid = "780F4614-9704-4CED-973D-AA8D154C4D4E"
|
|
91
|
+
shouldBeEnabled = "No"
|
|
92
|
+
ignoreCount = "0"
|
|
93
|
+
continueAfterRunningActions = "No"
|
|
94
|
+
filePath = "Sources/Private/CoreAnimation/Layers/ShapeLayer.swift"
|
|
95
|
+
startingColumnNumber = "9223372036854775807"
|
|
96
|
+
endingColumnNumber = "9223372036854775807"
|
|
97
|
+
startingLineNumber = "241"
|
|
98
|
+
endingLineNumber = "241"
|
|
99
|
+
landmarkName = "CALayer"
|
|
100
|
+
landmarkType = "21">
|
|
101
|
+
</BreakpointContent>
|
|
102
|
+
</BreakpointProxy>
|
|
103
|
+
<BreakpointProxy
|
|
104
|
+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
105
|
+
<BreakpointContent
|
|
106
|
+
uuid = "7317D33F-83F7-487F-92D8-361AFDC3108F"
|
|
107
|
+
shouldBeEnabled = "No"
|
|
108
|
+
ignoreCount = "0"
|
|
109
|
+
continueAfterRunningActions = "No"
|
|
110
|
+
filePath = "Sources/Private/CoreAnimation/Layers/AnimationLayer.swift"
|
|
111
|
+
startingColumnNumber = "9223372036854775807"
|
|
112
|
+
endingColumnNumber = "9223372036854775807"
|
|
113
|
+
startingLineNumber = "59"
|
|
114
|
+
endingLineNumber = "59"
|
|
115
|
+
landmarkName = "addingKeypathComponent(_:)"
|
|
116
|
+
landmarkType = "7">
|
|
117
|
+
</BreakpointContent>
|
|
118
|
+
</BreakpointProxy>
|
|
119
|
+
<BreakpointProxy
|
|
120
|
+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
121
|
+
<BreakpointContent
|
|
122
|
+
uuid = "4801815C-7DE8-430B-B7F8-900C71CB5F58"
|
|
123
|
+
shouldBeEnabled = "No"
|
|
124
|
+
condition = "customizableProperty.name.map { $0.rawValue } == ["Position"]"
|
|
125
|
+
ignoreCount = "0"
|
|
126
|
+
continueAfterRunningActions = "No"
|
|
127
|
+
filePath = "Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift"
|
|
128
|
+
startingColumnNumber = "9223372036854775807"
|
|
129
|
+
endingColumnNumber = "9223372036854775807"
|
|
130
|
+
startingLineNumber = "105"
|
|
131
|
+
endingLineNumber = "105"
|
|
132
|
+
landmarkName = "CALayer"
|
|
133
|
+
landmarkType = "21">
|
|
134
|
+
<Locations>
|
|
135
|
+
<Location
|
|
136
|
+
uuid = "4801815C-7DE8-430B-B7F8-900C71CB5F58 - a53351c05a040cfb"
|
|
137
|
+
shouldBeEnabled = "Yes"
|
|
138
|
+
ignoreCount = "0"
|
|
139
|
+
continueAfterRunningActions = "No"
|
|
140
|
+
symbolName = "__C.CALayer.customizedAnimation<τ_0_0>(for: Lottie.LayerProperty<τ_0_0>, context: Lottie.LayerAnimationContext) throws -> Swift.Optional<__C.CAPropertyAnimation>"
|
|
141
|
+
moduleName = "Lottie"
|
|
142
|
+
usesParentBreakpointCondition = "Yes"
|
|
143
|
+
urlString = "file:///Users/calstephens/Documents/lottie/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift"
|
|
144
|
+
startingColumnNumber = "9223372036854775807"
|
|
145
|
+
endingColumnNumber = "9223372036854775807"
|
|
146
|
+
startingLineNumber = "106"
|
|
147
|
+
endingLineNumber = "106"
|
|
148
|
+
offsetFromSymbolStart = "156">
|
|
149
|
+
</Location>
|
|
150
|
+
<Location
|
|
151
|
+
uuid = "4801815C-7DE8-430B-B7F8-900C71CB5F58 - a53351c05a040cfb"
|
|
152
|
+
shouldBeEnabled = "Yes"
|
|
153
|
+
ignoreCount = "0"
|
|
154
|
+
continueAfterRunningActions = "No"
|
|
155
|
+
symbolName = "__C.CALayer.customizedAnimation<τ_0_0>(for: Lottie.LayerProperty<τ_0_0>, context: Lottie.LayerAnimationContext) throws -> Swift.Optional<__C.CAPropertyAnimation>"
|
|
156
|
+
moduleName = "Lottie"
|
|
157
|
+
usesParentBreakpointCondition = "Yes"
|
|
158
|
+
urlString = "file:///Users/calstephens/Documents/lottie/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift"
|
|
159
|
+
startingColumnNumber = "9223372036854775807"
|
|
160
|
+
endingColumnNumber = "9223372036854775807"
|
|
161
|
+
startingLineNumber = "106"
|
|
162
|
+
endingLineNumber = "106"
|
|
163
|
+
offsetFromSymbolStart = "220">
|
|
164
|
+
</Location>
|
|
165
|
+
</Locations>
|
|
166
|
+
</BreakpointContent>
|
|
167
|
+
</BreakpointProxy>
|
|
168
|
+
<BreakpointProxy
|
|
169
|
+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
170
|
+
<BreakpointContent
|
|
171
|
+
uuid = "F52F692F-1F08-4469-8EE8-C10D7FC89847"
|
|
172
|
+
shouldBeEnabled = "No"
|
|
173
|
+
condition = "context.currentKeypath.fullPath.contains("Group 1")"
|
|
174
|
+
ignoreCount = "0"
|
|
175
|
+
continueAfterRunningActions = "No"
|
|
176
|
+
filePath = "Sources/Private/CoreAnimation/Layers/ShapeItemLayer.swift"
|
|
177
|
+
startingColumnNumber = "9223372036854775807"
|
|
178
|
+
endingColumnNumber = "9223372036854775807"
|
|
179
|
+
startingLineNumber = "342"
|
|
180
|
+
endingLineNumber = "342"
|
|
181
|
+
landmarkName = "`for`(_:)"
|
|
182
|
+
landmarkType = "7">
|
|
183
|
+
</BreakpointContent>
|
|
184
|
+
</BreakpointProxy>
|
|
185
|
+
<BreakpointProxy
|
|
186
|
+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
187
|
+
<BreakpointContent
|
|
188
|
+
uuid = "A8A829E3-8C9D-40A2-96C0-111C9B6F69B9"
|
|
189
|
+
shouldBeEnabled = "No"
|
|
190
|
+
ignoreCount = "0"
|
|
191
|
+
continueAfterRunningActions = "No"
|
|
192
|
+
filePath = "Sources/Private/CoreAnimation/Animations/LayerProperty.swift"
|
|
193
|
+
startingColumnNumber = "9223372036854775807"
|
|
194
|
+
endingColumnNumber = "9223372036854775807"
|
|
195
|
+
startingLineNumber = "306"
|
|
196
|
+
endingLineNumber = "306"
|
|
197
|
+
landmarkName = "rotation"
|
|
198
|
+
landmarkType = "24">
|
|
199
|
+
<Locations>
|
|
200
|
+
<Location
|
|
201
|
+
uuid = "A8A829E3-8C9D-40A2-96C0-111C9B6F69B9 - 6c551e311a4aacb0"
|
|
202
|
+
shouldBeEnabled = "Yes"
|
|
203
|
+
ignoreCount = "0"
|
|
204
|
+
continueAfterRunningActions = "No"
|
|
205
|
+
symbolName = "closure #1 (Any) -> Swift.Optional<CoreGraphics.CGFloat> in static Lottie.CustomizableProperty.scaleY.getter : Lottie.CustomizableProperty<CoreGraphics.CGFloat>"
|
|
206
|
+
moduleName = "Lottie"
|
|
207
|
+
usesParentBreakpointCondition = "Yes"
|
|
208
|
+
urlString = "file:///Users/calstephens/Documents/lottie/Sources/Private/CoreAnimation/Animations/LayerProperty.swift"
|
|
209
|
+
startingColumnNumber = "9223372036854775807"
|
|
210
|
+
endingColumnNumber = "9223372036854775807"
|
|
211
|
+
startingLineNumber = "292"
|
|
212
|
+
endingLineNumber = "292"
|
|
213
|
+
offsetFromSymbolStart = "296">
|
|
214
|
+
</Location>
|
|
215
|
+
<Location
|
|
216
|
+
uuid = "A8A829E3-8C9D-40A2-96C0-111C9B6F69B9 - 6c551e311a4aacb0"
|
|
217
|
+
shouldBeEnabled = "Yes"
|
|
218
|
+
ignoreCount = "0"
|
|
219
|
+
continueAfterRunningActions = "No"
|
|
220
|
+
symbolName = "closure #1 (Any) -> Swift.Optional<CoreGraphics.CGFloat> in static Lottie.CustomizableProperty.scaleY.getter : Lottie.CustomizableProperty<CoreGraphics.CGFloat>"
|
|
221
|
+
moduleName = "Lottie"
|
|
222
|
+
usesParentBreakpointCondition = "Yes"
|
|
223
|
+
urlString = "file:///Users/calstephens/Documents/lottie/Sources/Private/CoreAnimation/Animations/LayerProperty.swift"
|
|
224
|
+
startingColumnNumber = "9223372036854775807"
|
|
225
|
+
endingColumnNumber = "9223372036854775807"
|
|
226
|
+
startingLineNumber = "292"
|
|
227
|
+
endingLineNumber = "292"
|
|
228
|
+
offsetFromSymbolStart = "344">
|
|
229
|
+
</Location>
|
|
230
|
+
</Locations>
|
|
231
|
+
</BreakpointContent>
|
|
232
|
+
</BreakpointProxy>
|
|
233
|
+
<BreakpointProxy
|
|
234
|
+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
235
|
+
<BreakpointContent
|
|
236
|
+
uuid = "083F77B7-FF28-4132-ADBB-D0EA9B91C736"
|
|
237
|
+
shouldBeEnabled = "No"
|
|
238
|
+
ignoreCount = "0"
|
|
239
|
+
continueAfterRunningActions = "No"
|
|
240
|
+
filePath = "Sources/Private/CoreAnimation/Animations/LayerProperty.swift"
|
|
241
|
+
startingColumnNumber = "9223372036854775807"
|
|
242
|
+
endingColumnNumber = "9223372036854775807"
|
|
243
|
+
startingLineNumber = "293"
|
|
244
|
+
endingLineNumber = "293"
|
|
245
|
+
landmarkName = "scaleY"
|
|
246
|
+
landmarkType = "24">
|
|
247
|
+
<Locations>
|
|
248
|
+
<Location
|
|
249
|
+
uuid = "083F77B7-FF28-4132-ADBB-D0EA9B91C736 - 6c551e311a4ab35d"
|
|
250
|
+
shouldBeEnabled = "Yes"
|
|
251
|
+
ignoreCount = "0"
|
|
252
|
+
continueAfterRunningActions = "No"
|
|
253
|
+
symbolName = "closure #1 (Any) -> Swift.Optional<CoreGraphics.CGFloat> in static Lottie.CustomizableProperty.scaleX.getter : Lottie.CustomizableProperty<CoreGraphics.CGFloat>"
|
|
254
|
+
moduleName = "Lottie"
|
|
255
|
+
usesParentBreakpointCondition = "Yes"
|
|
256
|
+
urlString = "file:///Users/calstephens/Documents/lottie/Sources/Private/CoreAnimation/Animations/LayerProperty.swift"
|
|
257
|
+
startingColumnNumber = "9223372036854775807"
|
|
258
|
+
endingColumnNumber = "9223372036854775807"
|
|
259
|
+
startingLineNumber = "279"
|
|
260
|
+
endingLineNumber = "279"
|
|
261
|
+
offsetFromSymbolStart = "296">
|
|
262
|
+
</Location>
|
|
263
|
+
<Location
|
|
264
|
+
uuid = "083F77B7-FF28-4132-ADBB-D0EA9B91C736 - 6c551e311a4ab35d"
|
|
265
|
+
shouldBeEnabled = "Yes"
|
|
266
|
+
ignoreCount = "0"
|
|
267
|
+
continueAfterRunningActions = "No"
|
|
268
|
+
symbolName = "closure #1 (Any) -> Swift.Optional<CoreGraphics.CGFloat> in static Lottie.CustomizableProperty.scaleX.getter : Lottie.CustomizableProperty<CoreGraphics.CGFloat>"
|
|
269
|
+
moduleName = "Lottie"
|
|
270
|
+
usesParentBreakpointCondition = "Yes"
|
|
271
|
+
urlString = "file:///Users/calstephens/Documents/lottie/Sources/Private/CoreAnimation/Animations/LayerProperty.swift"
|
|
272
|
+
startingColumnNumber = "9223372036854775807"
|
|
273
|
+
endingColumnNumber = "9223372036854775807"
|
|
274
|
+
startingLineNumber = "279"
|
|
275
|
+
endingLineNumber = "279"
|
|
276
|
+
offsetFromSymbolStart = "344">
|
|
277
|
+
</Location>
|
|
278
|
+
</Locations>
|
|
279
|
+
</BreakpointContent>
|
|
280
|
+
</BreakpointProxy>
|
|
281
|
+
<BreakpointProxy
|
|
282
|
+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
283
|
+
<BreakpointContent
|
|
284
|
+
uuid = "232AD61E-2983-4DD6-A6D6-721AA2D12700"
|
|
285
|
+
shouldBeEnabled = "No"
|
|
286
|
+
ignoreCount = "0"
|
|
287
|
+
continueAfterRunningActions = "No"
|
|
288
|
+
filePath = "Sources/Private/CoreAnimation/Animations/LayerProperty.swift"
|
|
289
|
+
startingColumnNumber = "9223372036854775807"
|
|
290
|
+
endingColumnNumber = "9223372036854775807"
|
|
291
|
+
startingLineNumber = "305"
|
|
292
|
+
endingLineNumber = "305"
|
|
293
|
+
landmarkName = "rotation"
|
|
294
|
+
landmarkType = "24">
|
|
295
|
+
</BreakpointContent>
|
|
296
|
+
</BreakpointProxy>
|
|
297
|
+
<BreakpointProxy
|
|
298
|
+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
299
|
+
<BreakpointContent
|
|
300
|
+
uuid = "DE9A3966-371D-4974-992F-6F20AF21055B"
|
|
301
|
+
shouldBeEnabled = "No"
|
|
302
|
+
ignoreCount = "0"
|
|
303
|
+
continueAfterRunningActions = "No"
|
|
304
|
+
filePath = "Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift"
|
|
305
|
+
startingColumnNumber = "9223372036854775807"
|
|
306
|
+
endingColumnNumber = "9223372036854775807"
|
|
307
|
+
startingLineNumber = "73"
|
|
308
|
+
endingLineNumber = "73"
|
|
309
|
+
landmarkName = "addStrokeAnimations(for:context:)"
|
|
310
|
+
landmarkType = "7">
|
|
311
|
+
</BreakpointContent>
|
|
312
|
+
</BreakpointProxy>
|
|
313
|
+
<BreakpointProxy
|
|
314
|
+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
315
|
+
<BreakpointContent
|
|
316
|
+
uuid = "B61AB02D-FB91-45DD-BAA4-59D15A088394"
|
|
317
|
+
shouldBeEnabled = "No"
|
|
318
|
+
ignoreCount = "0"
|
|
319
|
+
continueAfterRunningActions = "No"
|
|
320
|
+
filePath = "Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift"
|
|
321
|
+
startingColumnNumber = "9223372036854775807"
|
|
322
|
+
endingColumnNumber = "9223372036854775807"
|
|
323
|
+
startingLineNumber = "116"
|
|
324
|
+
endingLineNumber = "116"
|
|
325
|
+
landmarkName = "Trim"
|
|
326
|
+
landmarkType = "21">
|
|
327
|
+
</BreakpointContent>
|
|
328
|
+
</BreakpointProxy>
|
|
71
329
|
</Breakpoints>
|
|
72
330
|
</Bucket>
|
package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/xcdebugger/Expressions.xcexplist
CHANGED
|
@@ -105,6 +105,17 @@
|
|
|
105
105
|
<ContextState
|
|
106
106
|
contextName = "GroupLayer.init(group:items:groupPath:context:):ShapeLayer.swift">
|
|
107
107
|
</ContextState>
|
|
108
|
+
<ContextState
|
|
109
|
+
contextName = "RoundedCornersNode.rebuildOutputs(frame:):RoundedCornersNode.swift">
|
|
110
|
+
<PersistentStrings>
|
|
111
|
+
<PersistentString
|
|
112
|
+
value = "path">
|
|
113
|
+
</PersistentString>
|
|
114
|
+
<PersistentString
|
|
115
|
+
value = "UIBezierPath(cgPath: path.roundCorners(radius: 2).paths[0].cgPath())">
|
|
116
|
+
</PersistentString>
|
|
117
|
+
</PersistentStrings>
|
|
118
|
+
</ContextState>
|
|
108
119
|
<ContextState
|
|
109
120
|
contextName = "CALayer.addTransformAnimations(for:context:):TransformAnimations.swift">
|
|
110
121
|
</ContextState>
|
|
@@ -118,10 +129,10 @@
|
|
|
118
129
|
contextName = "CoreAnimationLayer.display():CoreAnimationLayer.swift">
|
|
119
130
|
<PersistentStrings>
|
|
120
131
|
<PersistentString
|
|
121
|
-
value = "(superlayer!.delegate! as! UIView).
|
|
132
|
+
value = "(superlayer!.delegate! as! UIView).window">
|
|
122
133
|
</PersistentString>
|
|
123
134
|
<PersistentString
|
|
124
|
-
value = "(superlayer!.delegate! as! UIView).
|
|
135
|
+
value = "(superlayer!.delegate! as! UIView).superview!">
|
|
125
136
|
</PersistentString>
|
|
126
137
|
</PersistentStrings>
|
|
127
138
|
</ContextState>
|
package/Package.swift
CHANGED
|
@@ -3,7 +3,8 @@ import PackageDescription
|
|
|
3
3
|
|
|
4
4
|
let package = Package(
|
|
5
5
|
name: "Lottie",
|
|
6
|
-
|
|
6
|
+
// Minimum platform versions should be kept in sync with the per-platform targets in Lottie.xcodeproj and lottie-ios.podspec
|
|
7
|
+
platforms: [.iOS("11.0"), .macOS("10.11"), .tvOS("11.0")],
|
|
7
8
|
products: [.library(name: "Lottie", targets: ["Lottie"])],
|
|
8
9
|
targets: [.target(name: "Lottie", path: "Sources")])
|
|
9
10
|
|
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ To install Lottie using [Swift Package Manager](https://github.com/apple/swift-p
|
|
|
41
41
|
or you can add the following dependency to your `Package.swift`:
|
|
42
42
|
|
|
43
43
|
```swift
|
|
44
|
-
.package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.
|
|
44
|
+
.package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.2.0")
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
When using Swift Package Manager we recommend using the [lottie-spm](https://github.com/airbnb/lottie-spm) repo instead of the main lottie-ios repo. The main git repository for [lottie-ios](https://github.com/airbnb/lottie-ios) is somewhat large (300+ MB), and Swift Package Manager always downloads the full repository with all git history. The [lottie-spm](https://github.com/airbnb/lottie-spm) repo is much smaller (less than 500kb), so can be downloaded much more quickly.
|
package/Rakefile
CHANGED
|
@@ -30,7 +30,7 @@ namespace :build do
|
|
|
30
30
|
|
|
31
31
|
desc 'Builds the iOS Lottie Example app'
|
|
32
32
|
task :iOS do
|
|
33
|
-
xcodebuild('build -scheme "Example (iOS)" -destination "platform=iOS Simulator,name=iPhone
|
|
33
|
+
xcodebuild('build -scheme "Example (iOS)" -destination "platform=iOS Simulator,name=iPhone SE (3rd generation)" -workspace Lottie.xcworkspace')
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
desc 'Builds the macOS Lottie Example app'
|
|
@@ -78,7 +78,7 @@ namespace :test do
|
|
|
78
78
|
desc 'Tests the Lottie package for iOS'
|
|
79
79
|
task :package do
|
|
80
80
|
sh 'rm -rf Tests/Artifacts'
|
|
81
|
-
xcodebuild('test -scheme "Lottie (iOS)" -destination "platform=iOS Simulator,name=iPhone
|
|
81
|
+
xcodebuild('test -scheme "Lottie (iOS)" -destination "platform=iOS Simulator,name=iPhone SE (3rd generation)" -resultBundlePath Tests/Artifacts/LottieTests.xcresult')
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
desc 'Processes .xcresult artifacts from the most recent test:package execution'
|
|
@@ -103,7 +103,7 @@ namespace :test do
|
|
|
103
103
|
sh 'rm -rf ~/Library/Caches/org.carthage.CarthageKit/DerivedData'
|
|
104
104
|
|
|
105
105
|
# Build a test app that imports and uses the LottieCarthage framework
|
|
106
|
-
xcodebuild('build -scheme CarthageTest -destination "platform=iOS Simulator,name=iPhone
|
|
106
|
+
xcodebuild('build -scheme CarthageTest -destination "platform=iOS Simulator,name=iPhone SE (3rd generation)"')
|
|
107
107
|
xcodebuild('build -scheme CarthageTest-macOS')
|
|
108
108
|
end
|
|
109
109
|
end
|
|
@@ -12,7 +12,7 @@ extension CALayer {
|
|
|
12
12
|
@nonobjc
|
|
13
13
|
func addAnimation<KeyframeValue, ValueRepresentation>(
|
|
14
14
|
for property: LayerProperty<ValueRepresentation>,
|
|
15
|
-
keyframes:
|
|
15
|
+
keyframes: KeyframeGroup<KeyframeValue>,
|
|
16
16
|
value keyframeValueMapping: (KeyframeValue) throws -> ValueRepresentation,
|
|
17
17
|
context: LayerAnimationContext)
|
|
18
18
|
throws
|
|
@@ -41,13 +41,27 @@ extension CALayer {
|
|
|
41
41
|
@nonobjc
|
|
42
42
|
private func defaultAnimation<KeyframeValue, ValueRepresentation>(
|
|
43
43
|
for property: LayerProperty<ValueRepresentation>,
|
|
44
|
-
keyframes:
|
|
44
|
+
keyframes keyframeGroup: KeyframeGroup<KeyframeValue>,
|
|
45
45
|
value keyframeValueMapping: (KeyframeValue) throws -> ValueRepresentation,
|
|
46
46
|
context: LayerAnimationContext)
|
|
47
47
|
throws -> CAAnimation?
|
|
48
48
|
{
|
|
49
|
+
let keyframes = keyframeGroup.keyframes
|
|
49
50
|
guard !keyframes.isEmpty else { return nil }
|
|
50
51
|
|
|
52
|
+
// Check if this set of keyframes uses After Effects expressions, which aren't supported.
|
|
53
|
+
if let unsupportedAfterEffectsExpression = keyframeGroup.unsupportedAfterEffectsExpression {
|
|
54
|
+
context.logger.info("""
|
|
55
|
+
`\(property.caLayerKeypath)` animation for "\(context.currentKeypath.fullPath)" \
|
|
56
|
+
includes an After Effects expression (https://helpx.adobe.com/after-effects/using/expression-language.html), \
|
|
57
|
+
which is not supported by lottie-ios (expressions are only supported by lottie-web). \
|
|
58
|
+
This animation may not play correctly.
|
|
59
|
+
|
|
60
|
+
\(unsupportedAfterEffectsExpression.replacingOccurrences(of: "\n", with: "\n "))
|
|
61
|
+
|
|
62
|
+
""")
|
|
63
|
+
}
|
|
64
|
+
|
|
51
65
|
// If there is exactly one keyframe value, we can improve performance
|
|
52
66
|
// by applying that value directly to the layer instead of creating
|
|
53
67
|
// a relatively expensive `CAKeyframeAnimation`.
|
|
@@ -57,7 +57,7 @@ extension GradientRenderLayer {
|
|
|
57
57
|
|
|
58
58
|
try addAnimation(
|
|
59
59
|
for: .colors,
|
|
60
|
-
keyframes: gradient.colors
|
|
60
|
+
keyframes: gradient.colors,
|
|
61
61
|
value: { colorComponents in
|
|
62
62
|
gradient.colorConfiguration(from: colorComponents, type: type).map { $0.color }
|
|
63
63
|
},
|
|
@@ -65,7 +65,7 @@ extension GradientRenderLayer {
|
|
|
65
65
|
|
|
66
66
|
try addAnimation(
|
|
67
67
|
for: .locations,
|
|
68
|
-
keyframes: gradient.colors
|
|
68
|
+
keyframes: gradient.colors,
|
|
69
69
|
value: { colorComponents in
|
|
70
70
|
gradient.colorConfiguration(from: colorComponents, type: type).map { $0.location }
|
|
71
71
|
},
|
|
@@ -94,7 +94,7 @@ extension GradientRenderLayer {
|
|
|
94
94
|
|
|
95
95
|
try addAnimation(
|
|
96
96
|
for: .startPoint,
|
|
97
|
-
keyframes: gradient.startPoint
|
|
97
|
+
keyframes: gradient.startPoint,
|
|
98
98
|
value: { absoluteStartPoint in
|
|
99
99
|
percentBasedPointInBounds(from: absoluteStartPoint.pointValue)
|
|
100
100
|
},
|
|
@@ -102,7 +102,7 @@ extension GradientRenderLayer {
|
|
|
102
102
|
|
|
103
103
|
try addAnimation(
|
|
104
104
|
for: .endPoint,
|
|
105
|
-
keyframes: gradient.endPoint
|
|
105
|
+
keyframes: gradient.endPoint,
|
|
106
106
|
value: { absoluteEndPoint in
|
|
107
107
|
percentBasedPointInBounds(from: absoluteEndPoint.pointValue)
|
|
108
108
|
},
|
|
@@ -128,13 +128,13 @@ extension GradientRenderLayer {
|
|
|
128
128
|
|
|
129
129
|
try addAnimation(
|
|
130
130
|
for: .startPoint,
|
|
131
|
-
keyframes: combinedKeyframes
|
|
131
|
+
keyframes: combinedKeyframes,
|
|
132
132
|
value: \.startPoint,
|
|
133
133
|
context: context)
|
|
134
134
|
|
|
135
135
|
try addAnimation(
|
|
136
136
|
for: .endPoint,
|
|
137
|
-
keyframes: combinedKeyframes
|
|
137
|
+
keyframes: combinedKeyframes,
|
|
138
138
|
value: \.endPoint,
|
|
139
139
|
context: context)
|
|
140
140
|
}
|
|
@@ -60,8 +60,12 @@ struct CustomizableProperty<ValueRepresentation> {
|
|
|
60
60
|
/// The name of a customizable property that can be used in an `AnimationKeypath`
|
|
61
61
|
/// - These values should be shared between the two rendering engines,
|
|
62
62
|
/// since they form the public API of the `AnimationKeypath` system.
|
|
63
|
-
enum PropertyName: String {
|
|
63
|
+
enum PropertyName: String, CaseIterable {
|
|
64
64
|
case color = "Color"
|
|
65
|
+
case opacity = "Opacity"
|
|
66
|
+
case scale = "Scale"
|
|
67
|
+
case position = "Position"
|
|
68
|
+
case rotation = "Rotation"
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
// MARK: CALayer properties
|
|
@@ -71,7 +75,7 @@ extension LayerProperty {
|
|
|
71
75
|
.init(
|
|
72
76
|
caLayerKeypath: "transform.translation",
|
|
73
77
|
defaultValue: CGPoint(x: 0, y: 0),
|
|
74
|
-
customizableProperty:
|
|
78
|
+
customizableProperty: .position)
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
static var positionX: LayerProperty<CGFloat> {
|
|
@@ -99,14 +103,14 @@ extension LayerProperty {
|
|
|
99
103
|
.init(
|
|
100
104
|
caLayerKeypath: "transform.scale.x",
|
|
101
105
|
defaultValue: 1,
|
|
102
|
-
customizableProperty:
|
|
106
|
+
customizableProperty: .scaleX)
|
|
103
107
|
}
|
|
104
108
|
|
|
105
109
|
static var scaleY: LayerProperty<CGFloat> {
|
|
106
110
|
.init(
|
|
107
111
|
caLayerKeypath: "transform.scale.y",
|
|
108
112
|
defaultValue: 1,
|
|
109
|
-
customizableProperty:
|
|
113
|
+
customizableProperty: .scaleY)
|
|
110
114
|
}
|
|
111
115
|
|
|
112
116
|
static var rotationX: LayerProperty<CGFloat> {
|
|
@@ -127,7 +131,7 @@ extension LayerProperty {
|
|
|
127
131
|
.init(
|
|
128
132
|
caLayerKeypath: "transform.rotation.z",
|
|
129
133
|
defaultValue: 0,
|
|
130
|
-
customizableProperty:
|
|
134
|
+
customizableProperty: .rotation)
|
|
131
135
|
}
|
|
132
136
|
|
|
133
137
|
static var anchorPoint: LayerProperty<CGPoint> {
|
|
@@ -143,7 +147,7 @@ extension LayerProperty {
|
|
|
143
147
|
.init(
|
|
144
148
|
caLayerKeypath: #keyPath(CALayer.opacity),
|
|
145
149
|
defaultValue: 1,
|
|
146
|
-
customizableProperty:
|
|
150
|
+
customizableProperty: .opacity)
|
|
147
151
|
}
|
|
148
152
|
|
|
149
153
|
static var transform: LayerProperty<CATransform3D> {
|
|
@@ -256,4 +260,62 @@ extension CustomizableProperty {
|
|
|
256
260
|
return .rgba(CGFloat(color.r), CGFloat(color.g), CGFloat(color.b), CGFloat(color.a))
|
|
257
261
|
})
|
|
258
262
|
}
|
|
263
|
+
|
|
264
|
+
static var opacity: CustomizableProperty<CGFloat> {
|
|
265
|
+
.init(
|
|
266
|
+
name: [.opacity],
|
|
267
|
+
conversion: { typeErasedValue in
|
|
268
|
+
guard let vector = typeErasedValue as? LottieVector1D else { return nil }
|
|
269
|
+
|
|
270
|
+
// Lottie animation files express opacity as a numerical percentage value
|
|
271
|
+
// (e.g. 50%, 100%, 200%) so we divide by 100 to get the decimal values
|
|
272
|
+
// expected by Core Animation (e.g. 0.5, 1.0, 2.0).
|
|
273
|
+
return vector.cgFloatValue / 100
|
|
274
|
+
})
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
static var scaleX: CustomizableProperty<CGFloat> {
|
|
278
|
+
.init(
|
|
279
|
+
name: [.scale],
|
|
280
|
+
conversion: { typeErasedValue in
|
|
281
|
+
guard let vector = typeErasedValue as? LottieVector3D else { return nil }
|
|
282
|
+
|
|
283
|
+
// Lottie animation files express scale as a numerical percentage value
|
|
284
|
+
// (e.g. 50%, 100%, 200%) so we divide by 100 to get the decimal values
|
|
285
|
+
// expected by Core Animation (e.g. 0.5, 1.0, 2.0).
|
|
286
|
+
return vector.pointValue.x / 100
|
|
287
|
+
})
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
static var scaleY: CustomizableProperty<CGFloat> {
|
|
291
|
+
.init(
|
|
292
|
+
name: [.scale],
|
|
293
|
+
conversion: { typeErasedValue in
|
|
294
|
+
guard let vector = typeErasedValue as? LottieVector3D else { return nil }
|
|
295
|
+
|
|
296
|
+
// Lottie animation files express scale as a numerical percentage value
|
|
297
|
+
// (e.g. 50%, 100%, 200%) so we divide by 100 to get the decimal values
|
|
298
|
+
// expected by Core Animation (e.g. 0.5, 1.0, 2.0).
|
|
299
|
+
return vector.pointValue.y / 100
|
|
300
|
+
})
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
static var rotation: CustomizableProperty<CGFloat> {
|
|
304
|
+
.init(
|
|
305
|
+
name: [.rotation],
|
|
306
|
+
conversion: { typeErasedValue in
|
|
307
|
+
guard let vector = typeErasedValue as? LottieVector1D else { return nil }
|
|
308
|
+
|
|
309
|
+
// Lottie animation files express rotation in degrees
|
|
310
|
+
// (e.g. 90º, 180º, 360º) so we covert to radians to get the
|
|
311
|
+
// values expected by Core Animation (e.g. π/2, π, 2π)
|
|
312
|
+
return vector.cgFloatValue * .pi / 180
|
|
313
|
+
})
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
static var position: CustomizableProperty<CGPoint> {
|
|
317
|
+
.init(
|
|
318
|
+
name: [.position],
|
|
319
|
+
conversion: { ($0 as? LottieVector3D)?.pointValue })
|
|
320
|
+
}
|
|
259
321
|
}
|
|
@@ -40,7 +40,7 @@ extension CALayer {
|
|
|
40
40
|
func addOpacityAnimation(for opacity: OpacityAnimationModel, context: LayerAnimationContext) throws {
|
|
41
41
|
try addAnimation(
|
|
42
42
|
for: .opacity,
|
|
43
|
-
keyframes: opacity.opacity
|
|
43
|
+
keyframes: opacity.opacity,
|
|
44
44
|
value: {
|
|
45
45
|
// Lottie animation files express opacity as a numerical percentage value
|
|
46
46
|
// (e.g. 0%, 50%, 100%) so we divide by 100 to get the decimal values
|
|
@@ -15,7 +15,7 @@ extension CAShapeLayer {
|
|
|
15
15
|
{
|
|
16
16
|
try addAnimation(
|
|
17
17
|
for: .path,
|
|
18
|
-
keyframes: try rectangle.combinedKeyframes(roundedCorners: roundedCorners)
|
|
18
|
+
keyframes: try rectangle.combinedKeyframes(roundedCorners: roundedCorners),
|
|
19
19
|
value: { keyframe in
|
|
20
20
|
BezierPath.rectangle(
|
|
21
21
|
position: keyframe.position.pointValue,
|