lottie-ios 3.4.4 → 3.5.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/Lottie.xcodeproj/project.pbxproj +56 -56
- package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift +1 -1
- package/Sources/Private/CoreAnimation/Animations/EllipseAnimation.swift +2 -2
- package/Sources/Private/CoreAnimation/Animations/GradientAnimations.swift +2 -2
- package/Sources/Private/CoreAnimation/Animations/LayerProperty.swift +2 -2
- package/Sources/Private/CoreAnimation/Animations/OpacityAnimation.swift +1 -1
- package/Sources/Private/CoreAnimation/Animations/RectangleAnimation.swift +3 -3
- package/Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift +16 -16
- package/Sources/Private/CoreAnimation/Animations/StarAnimation.swift +11 -11
- package/Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift +4 -4
- package/Sources/Private/CoreAnimation/Animations/TransformAnimations.swift +13 -13
- package/Sources/Private/CoreAnimation/CoreAnimationLayer.swift +3 -3
- package/Sources/Private/CoreAnimation/Layers/AnimationLayer.swift +1 -1
- package/Sources/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift +1 -1
- package/Sources/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift +1 -1
- package/Sources/Private/CoreAnimation/Layers/PreCompLayer.swift +1 -1
- package/Sources/Private/CoreAnimation/Layers/RepeaterLayer.swift +9 -9
- package/Sources/Private/CoreAnimation/ValueProviderStore.swift +1 -1
- package/Sources/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift +2 -2
- package/Sources/Private/MainThread/LayerContainers/CompLayers/PreCompositionLayer.swift +1 -1
- package/Sources/Private/MainThread/LayerContainers/CompLayers/SolidCompositionLayer.swift +2 -2
- package/Sources/Private/MainThread/LayerContainers/MainThreadAnimationLayer.swift +3 -3
- package/Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift +10 -10
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/TrimPathNode.swift +3 -3
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/EllipseNode.swift +2 -2
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift +5 -5
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/RectNode.swift +3 -3
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/StarNode.swift +9 -9
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderContainers/GroupNode.swift +14 -14
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/FillNode.swift +2 -2
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientFillNode.swift +3 -3
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientStrokeNode.swift +10 -10
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift +14 -14
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/Text/TextAnimatorNode.swift +11 -11
- package/Sources/Private/Model/Keyframes/KeyframeData.swift +12 -12
- package/Sources/Private/Model/Layers/PreCompLayerModel.swift +3 -3
- package/Sources/Private/Model/Objects/DashPattern.swift +2 -2
- package/Sources/Private/Model/Objects/Mask.swift +10 -8
- package/Sources/Private/Model/Objects/Transform.swift +39 -35
- package/Sources/Private/Model/ShapeItems/Ellipse.swift +6 -6
- package/Sources/Private/Model/ShapeItems/Fill.swift +6 -6
- package/Sources/Private/Model/ShapeItems/GradientFill.swift +15 -15
- package/Sources/Private/Model/ShapeItems/GradientStroke.swift +18 -18
- package/Sources/Private/Model/ShapeItems/Rectangle.swift +9 -9
- package/Sources/Private/Model/ShapeItems/Repeater.swift +37 -32
- package/Sources/Private/Model/ShapeItems/ShapeTransform.swift +34 -28
- package/Sources/Private/Model/ShapeItems/Star.swift +21 -21
- package/Sources/Private/Model/ShapeItems/Stroke.swift +9 -9
- package/Sources/Private/Model/ShapeItems/Trim.swift +9 -9
- package/Sources/Private/Model/Text/TextAnimator.swift +33 -33
- package/Sources/Private/Model/Text/TextDocument.swift +8 -8
- package/Sources/Private/RootAnimationLayer.swift +4 -4
- package/Sources/Private/Utility/Interpolatable/InterpolatableExtensions.swift +1 -1
- package/Sources/Private/Utility/Interpolatable/KeyframeGroup+Extensions.swift +4 -4
- package/Sources/Private/Utility/Primitives/ColorExtension.swift +7 -7
- package/Sources/Private/Utility/Primitives/VectorsExtensions.swift +29 -21
- package/Sources/{Private/Model/Animation.swift → Public/Animation/LottieAnimation.swift} +13 -5
- package/Sources/Public/Animation/{AnimationPublic.swift → LottieAnimationHelpers.swift} +17 -17
- package/Sources/Public/Animation/{AnimationView.swift → LottieAnimationView.swift} +27 -19
- package/Sources/Public/Animation/{AnimationViewInitializers.swift → LottieAnimationViewInitializers.swift} +6 -6
- package/Sources/Public/AnimationCache/AnimationCacheProvider.swift +3 -3
- package/Sources/Public/AnimationCache/LRUAnimationCache.swift +3 -3
- package/Sources/Public/DynamicProperties/AnimationKeypath.swift +3 -3
- package/Sources/Public/DynamicProperties/AnyValueProvider.swift +2 -2
- package/Sources/Public/DynamicProperties/ValueProviders/ColorValueProvider.swift +10 -10
- package/Sources/Public/DynamicProperties/ValueProviders/FloatValueProvider.swift +4 -4
- package/Sources/Public/DynamicProperties/ValueProviders/GradientValueProvider.swift +5 -5
- package/Sources/Public/DynamicProperties/ValueProviders/PointValueProvider.swift +2 -2
- package/Sources/Public/DynamicProperties/ValueProviders/SizeValueProvider.swift +2 -2
- package/Sources/Public/FontProvider/AnimationFontProvider.swift +1 -1
- package/Sources/Public/ImageProvider/AnimationImageProvider.swift +2 -2
- package/Sources/Public/Keyframes/Interpolatable.swift +17 -17
- package/Sources/Public/Keyframes/Keyframe.swift +10 -10
- package/Sources/Public/LottieConfiguration.swift +1 -1
- package/Sources/Public/Primitives/{Color.swift → LottieColor.swift} +10 -2
- package/Sources/Public/Primitives/Vectors.swift +18 -2
- package/Sources/Public/TextProvider/AnimationTextProvider.swift +1 -1
- package/Sources/Public/iOS/AnimatedButton.swift +1 -1
- package/Sources/Public/iOS/AnimatedControl.swift +6 -6
- package/Sources/Public/iOS/AnimatedSwitch.swift +1 -1
- package/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift +8 -8
- package/Sources/Public/iOS/{AnimationViewBase.swift → LottieAnimationViewBase.swift} +4 -4
- package/Sources/Public/iOS/UIColorExtension.swift +2 -2
- package/Sources/Public/macOS/{AnimationViewBase.macOS.swift → LottieAnimationViewBase.macOS.swift} +4 -4
- package/Tests/AnimationKeypathTests.swift +1 -1
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~22UHuHHSTYh5NFeueXXSDdev_8VAbw8H8yl2ICssaC0vaCLj2G2CGZCjUMEyki9c-k-CecFJRyspvzJLiQTjUw== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~6DmZhylL-XQx-O08NugyWINI0ugrLVgVOpbrdp0sT2tEqw-jVD2vvBWYRnYHALkM2_qP2yy-VoovSMzfYALY8A== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~9dj3E5foFK2l_1CEpoRxToU1N6jCdhRVc5vhR10fHS938L9w8HxbiVCPGxYy5981O6M1yZsD4tHFbqBMbER4bQ== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/{data.0~MBDeCFoahVzzmtSQrVhhy9VMJV6CmcnUkFya_qwe0XsMFscmY2nS8dxrTEYkY16sH68sEH7WVCCzTuW1z1Hocw== → data.0~Bys36bGK_YkCjRNoPMkq3R0OcyPNrVNka1Gz45ilbXJTqp9xAJexx6qKBh86_fm7OgBCO0WS2gJBy77DUUnOOA==} +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~QJMKb50ZfaWLSHxBSGPlrzULLCqTlb_6W-X0N1-e5PfwCKjpYKOElImsOwgZKVK0cdyf-6u4Zp3mm3BfGQVQ9Q== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~YyEdK1WNFTPo-R3Og2OWduKSikuFYneXurEZbyNLZeDmJLJkd7Ew8jNxy4mvgZw4f4Sikp4swEjJgVzXqhev5g== +1 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~bZd73QR3pWGndrn46_NXJw2dUT7WdBjkH5fdPZ7EnzlcZ9Ifv6WR14RKeWI9diiEjcRJE7ZOWqZ9fzf2vvTnLw== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~baCaLsz8Sq-r6sHhJcZeowVdrnrIxKwDps5Q1Aq38G2AQ3HaopZ9m3A8IXtTFSiZGNiO2qnM9yH7iJfuzC5K0A== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~iZXYCVJLYHKtR7eFHwefLiejC9CkRbBBSkkZmwfkiDEIdUKE4GgVkdDrcHry91RF7d9y7AuYovfGVp1-fuNg0g== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~pTTJImrF4EktmVXGCigWBn7v6YlbH5eFCXIW35CW-iyypvzFMXXYYbQO1ly6Bf3u6CdaepZko-L9obC1mjigMA== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~sVXLeN9UCp6IsOPeuoY76nF-bP-w2rBm61UYvs5XE3o5XhbM7itN2s1XD5i9COIaVMytmUFB-mvCLCqHfHWwpw== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~t8Vsjx3tjPBGQIElMCvqzxLS0hDmBGuLa_CEiB64N2Vxp3qoUfNF0Sar84QnEDOKfyVF6c1KTn1QYg7fRJrk8g== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~zUmPx8nRHLa8-g1WWSYYzveS_6qmBf-y4xyS-dHzD7c_xWwPZlsfKg8UngImNdn0gxGOBSRmCeXbYwWpLfj_Rg== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~22UHuHHSTYh5NFeueXXSDdev_8VAbw8H8yl2ICssaC0vaCLj2G2CGZCjUMEyki9c-k-CecFJRyspvzJLiQTjUw== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~7IO4FqH8-VUsSfuA0_wMGUgfGdV7MwzpkzjwWbiB50jXZKQRHtU4G0A7ZXTvsR4mDdrWiawpNC_eriOALfZ7Og== → refs.0~6DmZhylL-XQx-O08NugyWINI0ugrLVgVOpbrdp0sT2tEqw-jVD2vvBWYRnYHALkM2_qP2yy-VoovSMzfYALY8A==} +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~ClRW5-6rvrgZHHbrPS1VEREaxelpVcKlERPzSa3f2rtFNXdoqATxFCsPge3a_nO4mhhtpmTmbYvyfI-obAu8Qg== → refs.0~9dj3E5foFK2l_1CEpoRxToU1N6jCdhRVc5vhR10fHS938L9w8HxbiVCPGxYy5981O6M1yZsD4tHFbqBMbER4bQ==} +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~Bys36bGK_YkCjRNoPMkq3R0OcyPNrVNka1Gz45ilbXJTqp9xAJexx6qKBh86_fm7OgBCO0WS2gJBy77DUUnOOA== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~UsLY5O-vDMEHEe3bF8XJvkKkYxdsKlIytgJW7zgNuetw53fG3SssfZiiMfbuYnOtvvvYBXTwpbz07V6Czp029Q== → refs.0~QJMKb50ZfaWLSHxBSGPlrzULLCqTlb_6W-X0N1-e5PfwCKjpYKOElImsOwgZKVK0cdyf-6u4Zp3mm3BfGQVQ9Q==} +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~YyEdK1WNFTPo-R3Og2OWduKSikuFYneXurEZbyNLZeDmJLJkd7Ew8jNxy4mvgZw4f4Sikp4swEjJgVzXqhev5g== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~cpg4cb7H0TaehHy4a-xINJMFfBM2_AEHal_0tIX8ymNVJPsjlCysi3-Cad0Ca_SvuGwVM7ONF55OBUuC9YKZvA== → refs.0~bZd73QR3pWGndrn46_NXJw2dUT7WdBjkH5fdPZ7EnzlcZ9Ifv6WR14RKeWI9diiEjcRJE7ZOWqZ9fzf2vvTnLw==} +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~jdIx7vWS6ej1cqYcbCS4KyZErSMF13ELR95YwClVc98tIXcsglh7KuGvI1gIxEPDtPXQpfC3XijIAGn1quL8Dw== → refs.0~baCaLsz8Sq-r6sHhJcZeowVdrnrIxKwDps5Q1Aq38G2AQ3HaopZ9m3A8IXtTFSiZGNiO2qnM9yH7iJfuzC5K0A==} +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~iZXYCVJLYHKtR7eFHwefLiejC9CkRbBBSkkZmwfkiDEIdUKE4GgVkdDrcHry91RF7d9y7AuYovfGVp1-fuNg0g== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~pTTJImrF4EktmVXGCigWBn7v6YlbH5eFCXIW35CW-iyypvzFMXXYYbQO1ly6Bf3u6CdaepZko-L9obC1mjigMA== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~lz3e0YeBa8TvMBSSymToh--gc6zznUIdH2jO0AJ4so5OPNdw6wpYmJebhaENGsRoD3beUXvlyD5f7_WeZrzyNQ== → refs.0~sVXLeN9UCp6IsOPeuoY76nF-bP-w2rBm61UYvs5XE3o5XhbM7itN2s1XD5i9COIaVMytmUFB-mvCLCqHfHWwpw==} +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~u_5dWbliYJ__YkyUCDFjdxiFds9M8Epr_RvbU1rIRCbBQdhRJ_TUBXXcL_Qq-wVp4umNLTOzud4OpQItSpO6Rg== → refs.0~t8Vsjx3tjPBGQIElMCvqzxLS0hDmBGuLa_CEiB64N2Vxp3qoUfNF0Sar84QnEDOKfyVF6c1KTn1QYg7fRJrk8g==} +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~v-YGzhC2l_icsAsyp1XAbEWYwxNook-rARAWlVZINioEsgT9LGvhg2oh78nYqoeH78m1fihr5HCcGNfF7SQj0g== → refs.0~zUmPx8nRHLa8-g1WWSYYzveS_6qmBf-y4xyS-dHzD7c_xWwPZlsfKg8UngImNdn0gxGOBSRmCeXbYwWpLfj_Rg==} +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Info.plist +2 -2
- package/Tests/ParsingTests.swift +2 -2
- package/Tests/PerformanceTests.swift +9 -9
- package/Tests/SnapshotConfiguration.swift +4 -4
- package/Tests/SnapshotTests.swift +6 -6
- package/lottie-ios.podspec +1 -1
- package/package.json +1 -1
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~7IO4FqH8-VUsSfuA0_wMGUgfGdV7MwzpkzjwWbiB50jXZKQRHtU4G0A7ZXTvsR4mDdrWiawpNC_eriOALfZ7Og== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~ClRW5-6rvrgZHHbrPS1VEREaxelpVcKlERPzSa3f2rtFNXdoqATxFCsPge3a_nO4mhhtpmTmbYvyfI-obAu8Qg== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~Jr2dFGcJc1188nMoMha82z9wM99lCLm4MKzhjfVVjIxKeCZVGWGZH3HgJFNkTpozdk5p1u5o91dCiY4-cR1Zhg== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~U4plJajEDM_uSZdglhDyj6gQO63mbeKxYP9X94aIaOtL0yErtfQnGz5SgsqQ0ToSZcJj6Ao9Wx-nesZVwBTRuw== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~UsLY5O-vDMEHEe3bF8XJvkKkYxdsKlIytgJW7zgNuetw53fG3SssfZiiMfbuYnOtvvvYBXTwpbz07V6Czp029Q== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~cpg4cb7H0TaehHy4a-xINJMFfBM2_AEHal_0tIX8ymNVJPsjlCysi3-Cad0Ca_SvuGwVM7ONF55OBUuC9YKZvA== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~cuHjdTCuciVumvEpvozxwDj2wAdgWe13bzd1pUAGN45-WOgY0kIid9aUlBX675OnS-xNEc_pyQWo0RO1dKAjcw== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~f_-bfn-KRHHFg39_MtwgBulEAuWH6F05yqGYydXhil6kqZ51eAoRX6tsiqOr0Oa6eL3dK1tcCBD1bWX5orCZhw== +0 -1
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~jdIx7vWS6ej1cqYcbCS4KyZErSMF13ELR95YwClVc98tIXcsglh7KuGvI1gIxEPDtPXQpfC3XijIAGn1quL8Dw== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~lz3e0YeBa8TvMBSSymToh--gc6zznUIdH2jO0AJ4so5OPNdw6wpYmJebhaENGsRoD3beUXvlyD5f7_WeZrzyNQ== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~u_5dWbliYJ__YkyUCDFjdxiFds9M8Epr_RvbU1rIRCbBQdhRJ_TUBXXcL_Qq-wVp4umNLTOzud4OpQItSpO6Rg== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~v-YGzhC2l_icsAsyp1XAbEWYwxNook-rARAWlVZINioEsgT9LGvhg2oh78nYqoeH78m1fihr5HCcGNfF7SQj0g== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~Jr2dFGcJc1188nMoMha82z9wM99lCLm4MKzhjfVVjIxKeCZVGWGZH3HgJFNkTpozdk5p1u5o91dCiY4-cR1Zhg== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~MBDeCFoahVzzmtSQrVhhy9VMJV6CmcnUkFya_qwe0XsMFscmY2nS8dxrTEYkY16sH68sEH7WVCCzTuW1z1Hocw== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~U4plJajEDM_uSZdglhDyj6gQO63mbeKxYP9X94aIaOtL0yErtfQnGz5SgsqQ0ToSZcJj6Ao9Wx-nesZVwBTRuw== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~cuHjdTCuciVumvEpvozxwDj2wAdgWe13bzd1pUAGN45-WOgY0kIid9aUlBX675OnS-xNEc_pyQWo0RO1dKAjcw== +0 -0
- package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~f_-bfn-KRHHFg39_MtwgBulEAuWH6F05yqGYydXhil6kqZ51eAoRX6tsiqOr0Oa6eL3dK1tcCBD1bWX5orCZhw== +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
<plist version="1.0">
|
|
4
4
|
<dict>
|
|
5
5
|
<key>dateCreated</key>
|
|
6
|
-
<date>2022-10-
|
|
6
|
+
<date>2022-10-11T00:03:18Z</date>
|
|
7
7
|
<key>externalLocations</key>
|
|
8
8
|
<array/>
|
|
9
9
|
<key>rootId</key>
|
|
10
10
|
<dict>
|
|
11
11
|
<key>hash</key>
|
|
12
|
-
<string>0~
|
|
12
|
+
<string>0~22UHuHHSTYh5NFeueXXSDdev_8VAbw8H8yl2ICssaC0vaCLj2G2CGZCjUMEyki9c-k-CecFJRyspvzJLiQTjUw==</string>
|
|
13
13
|
</dict>
|
|
14
14
|
<key>storage</key>
|
|
15
15
|
<dict>
|
package/Tests/ParsingTests.swift
CHANGED
|
@@ -18,8 +18,8 @@ final class ParsingTests: XCTestCase {
|
|
|
18
18
|
for url in Samples.sampleAnimationURLs {
|
|
19
19
|
do {
|
|
20
20
|
let data = try Data(contentsOf: url)
|
|
21
|
-
let codableAnimation = try
|
|
22
|
-
let dictAnimation = try
|
|
21
|
+
let codableAnimation = try LottieAnimation.from(data: data, strategy: .codable)
|
|
22
|
+
let dictAnimation = try LottieAnimation.from(data: data, strategy: .dictionaryBased)
|
|
23
23
|
|
|
24
24
|
XCTAssertNoDiff(codableAnimation, dictAnimation)
|
|
25
25
|
} catch {
|
|
@@ -85,12 +85,12 @@ final class PerformanceTests: XCTestCase {
|
|
|
85
85
|
|
|
86
86
|
// MARK: Private
|
|
87
87
|
|
|
88
|
-
private let simpleAnimation =
|
|
88
|
+
private let simpleAnimation = LottieAnimation.named(
|
|
89
89
|
"loading_dots_1",
|
|
90
90
|
bundle: .module,
|
|
91
91
|
subdirectory: "Samples/LottieFiles")!
|
|
92
92
|
|
|
93
|
-
private let complexAnimation =
|
|
93
|
+
private let complexAnimation = LottieAnimation.named(
|
|
94
94
|
"LottieLogo2",
|
|
95
95
|
bundle: .module,
|
|
96
96
|
subdirectory: "Samples")!
|
|
@@ -100,7 +100,7 @@ final class PerformanceTests: XCTestCase {
|
|
|
100
100
|
private func compareEngineSetupPerformance(
|
|
101
101
|
of engineA: RenderingEngineOption,
|
|
102
102
|
with engineB: RenderingEngineOption,
|
|
103
|
-
for animation:
|
|
103
|
+
for animation: LottieAnimation,
|
|
104
104
|
iterations: Int)
|
|
105
105
|
-> Double
|
|
106
106
|
{
|
|
@@ -125,7 +125,7 @@ final class PerformanceTests: XCTestCase {
|
|
|
125
125
|
return ratio
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
private func setUpAndTearDownAnimationView(with animation:
|
|
128
|
+
private func setUpAndTearDownAnimationView(with animation: LottieAnimation, configuration: LottieConfiguration) {
|
|
129
129
|
// Each animation setup needs to be wrapped in its own `CATransaction`
|
|
130
130
|
// in order for the layers to be deallocated immediately. Otherwise
|
|
131
131
|
// the layers aren't deallocated until the end of the test run,
|
|
@@ -142,7 +142,7 @@ final class PerformanceTests: XCTestCase {
|
|
|
142
142
|
|
|
143
143
|
/// Compares performance of scrubbing the given animation with both the Main Thread and Core Animation engine,
|
|
144
144
|
/// and returns the ratio of how much slower the Core Animation is than the Main Thread engine
|
|
145
|
-
private func compareEngineScrubbingPerformance(for animation:
|
|
145
|
+
private func compareEngineScrubbingPerformance(for animation: LottieAnimation, iterations: Int) -> Double {
|
|
146
146
|
let mainThreadAnimationView = setupAnimationView(with: animation, configuration: .init(renderingEngine: .mainThread))
|
|
147
147
|
let mainThreadEnginePerformance = measurePerformance {
|
|
148
148
|
for i in 0..<iterations {
|
|
@@ -177,7 +177,7 @@ final class PerformanceTests: XCTestCase {
|
|
|
177
177
|
private func compareDeserializationPerformance(data: Data, iterations: Int) throws -> Double {
|
|
178
178
|
let codablePerformance = try measurePerformance {
|
|
179
179
|
for _ in 0..<iterations {
|
|
180
|
-
_ = try
|
|
180
|
+
_ = try LottieAnimation.from(data: data, strategy: .codable)
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
|
|
@@ -185,7 +185,7 @@ final class PerformanceTests: XCTestCase {
|
|
|
185
185
|
|
|
186
186
|
let dictPerformance = try measurePerformance {
|
|
187
187
|
for _ in 0..<iterations {
|
|
188
|
-
_ = try
|
|
188
|
+
_ = try LottieAnimation.from(data: data, strategy: .dictionaryBased)
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
@@ -196,8 +196,8 @@ final class PerformanceTests: XCTestCase {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
@discardableResult
|
|
199
|
-
private func setupAnimationView(with animation:
|
|
200
|
-
let animationView =
|
|
199
|
+
private func setupAnimationView(with animation: LottieAnimation, configuration: LottieConfiguration) -> LottieAnimationView {
|
|
200
|
+
let animationView = LottieAnimationView(animation: animation, configuration: configuration)
|
|
201
201
|
animationView.frame.size = CGSize(width: animation.width, height: animation.height)
|
|
202
202
|
animationView.layoutIfNeeded()
|
|
203
203
|
return animationView
|
|
@@ -59,9 +59,9 @@ extension SnapshotConfiguration {
|
|
|
59
59
|
AnimationKeypath(keypath: "Checkmark Outlines 2.Group 1.Stroke 1.Color"): ColorValueProvider(.black),
|
|
60
60
|
AnimationKeypath(keypath: "X Outlines.Group 1.Stroke 1.Color"): ColorValueProvider(.black),
|
|
61
61
|
AnimationKeypath(keypath: "Switch Outline Outlines.Fill 1.Color"): ColorValueProvider([
|
|
62
|
-
Keyframe(value:
|
|
62
|
+
Keyframe(value: LottieColor.black, time: 0),
|
|
63
63
|
Keyframe(value: Color(r: 0.76, g: 0.76, b: 0.76, a: 1), time: 75),
|
|
64
|
-
Keyframe(value:
|
|
64
|
+
Keyframe(value: LottieColor.black, time: 150),
|
|
65
65
|
]),
|
|
66
66
|
]),
|
|
67
67
|
|
|
@@ -163,9 +163,9 @@ extension SnapshotConfiguration {
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
// MARK: -
|
|
166
|
+
// MARK: - LottieColor helpers
|
|
167
167
|
|
|
168
|
-
extension
|
|
168
|
+
extension LottieColor {
|
|
169
169
|
static let black = Color(r: 0, g: 0, b: 0, a: 1)
|
|
170
170
|
static let red = Color(r: 1, g: 0, b: 0, a: 1)
|
|
171
171
|
}
|
|
@@ -140,7 +140,7 @@ class SnapshotTests: XCTestCase {
|
|
|
140
140
|
|
|
141
141
|
// MARK: Animation + snapshotSize
|
|
142
142
|
|
|
143
|
-
extension
|
|
143
|
+
extension LottieAnimation {
|
|
144
144
|
/// The size that this animation should be snapshot at
|
|
145
145
|
fileprivate var snapshotSize: CGSize {
|
|
146
146
|
let maxDimension: CGFloat = 500
|
|
@@ -209,9 +209,9 @@ enum Samples {
|
|
|
209
209
|
.replacingOccurrences(of: ".json", with: "")
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
static func animation(named sampleAnimationName: String) ->
|
|
212
|
+
static func animation(named sampleAnimationName: String) -> LottieAnimation? {
|
|
213
213
|
guard
|
|
214
|
-
let animation =
|
|
214
|
+
let animation = LottieAnimation.named(
|
|
215
215
|
sampleAnimationName,
|
|
216
216
|
bundle: .module,
|
|
217
217
|
subdirectory: Samples.directoryName)
|
|
@@ -225,12 +225,12 @@ enum Samples {
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
extension SnapshotConfiguration {
|
|
228
|
-
/// Creates
|
|
228
|
+
/// Creates a `LottieAnimationView` for the sample snapshot with the given name
|
|
229
229
|
static func makeAnimationView(
|
|
230
230
|
for sampleAnimationName: String,
|
|
231
231
|
configuration: LottieConfiguration,
|
|
232
232
|
logger: LottieLogger = LottieLogger.shared)
|
|
233
|
-
->
|
|
233
|
+
-> LottieAnimationView?
|
|
234
234
|
{
|
|
235
235
|
let snapshotConfiguration = SnapshotConfiguration.forSample(named: sampleAnimationName)
|
|
236
236
|
|
|
@@ -239,7 +239,7 @@ extension SnapshotConfiguration {
|
|
|
239
239
|
let animation = Samples.animation(named: sampleAnimationName)
|
|
240
240
|
else { return nil }
|
|
241
241
|
|
|
242
|
-
let animationView =
|
|
242
|
+
let animationView = LottieAnimationView(
|
|
243
243
|
animation: animation,
|
|
244
244
|
configuration: configuration,
|
|
245
245
|
logger: logger)
|
package/lottie-ios.podspec
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lottie-ios",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exported as json with bodymovin and renders the vector animations natively on mobile and through React Native!",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"name":"LottieTests-A17CE926-26F9-42D1-A19F-AD020F4D4595","type":2},{"name":"scheduling.log","type":1}]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|