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.
Files changed (136) hide show
  1. package/Lottie.xcodeproj/project.pbxproj +56 -56
  2. package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  3. package/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift +1 -1
  4. package/Sources/Private/CoreAnimation/Animations/EllipseAnimation.swift +2 -2
  5. package/Sources/Private/CoreAnimation/Animations/GradientAnimations.swift +2 -2
  6. package/Sources/Private/CoreAnimation/Animations/LayerProperty.swift +2 -2
  7. package/Sources/Private/CoreAnimation/Animations/OpacityAnimation.swift +1 -1
  8. package/Sources/Private/CoreAnimation/Animations/RectangleAnimation.swift +3 -3
  9. package/Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift +16 -16
  10. package/Sources/Private/CoreAnimation/Animations/StarAnimation.swift +11 -11
  11. package/Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift +4 -4
  12. package/Sources/Private/CoreAnimation/Animations/TransformAnimations.swift +13 -13
  13. package/Sources/Private/CoreAnimation/CoreAnimationLayer.swift +3 -3
  14. package/Sources/Private/CoreAnimation/Layers/AnimationLayer.swift +1 -1
  15. package/Sources/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift +1 -1
  16. package/Sources/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift +1 -1
  17. package/Sources/Private/CoreAnimation/Layers/PreCompLayer.swift +1 -1
  18. package/Sources/Private/CoreAnimation/Layers/RepeaterLayer.swift +9 -9
  19. package/Sources/Private/CoreAnimation/ValueProviderStore.swift +1 -1
  20. package/Sources/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift +2 -2
  21. package/Sources/Private/MainThread/LayerContainers/CompLayers/PreCompositionLayer.swift +1 -1
  22. package/Sources/Private/MainThread/LayerContainers/CompLayers/SolidCompositionLayer.swift +2 -2
  23. package/Sources/Private/MainThread/LayerContainers/MainThreadAnimationLayer.swift +3 -3
  24. package/Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift +10 -10
  25. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/TrimPathNode.swift +3 -3
  26. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/EllipseNode.swift +2 -2
  27. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift +5 -5
  28. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/RectNode.swift +3 -3
  29. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/StarNode.swift +9 -9
  30. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderContainers/GroupNode.swift +14 -14
  31. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/FillNode.swift +2 -2
  32. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientFillNode.swift +3 -3
  33. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientStrokeNode.swift +10 -10
  34. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift +14 -14
  35. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/Text/TextAnimatorNode.swift +11 -11
  36. package/Sources/Private/Model/Keyframes/KeyframeData.swift +12 -12
  37. package/Sources/Private/Model/Layers/PreCompLayerModel.swift +3 -3
  38. package/Sources/Private/Model/Objects/DashPattern.swift +2 -2
  39. package/Sources/Private/Model/Objects/Mask.swift +10 -8
  40. package/Sources/Private/Model/Objects/Transform.swift +39 -35
  41. package/Sources/Private/Model/ShapeItems/Ellipse.swift +6 -6
  42. package/Sources/Private/Model/ShapeItems/Fill.swift +6 -6
  43. package/Sources/Private/Model/ShapeItems/GradientFill.swift +15 -15
  44. package/Sources/Private/Model/ShapeItems/GradientStroke.swift +18 -18
  45. package/Sources/Private/Model/ShapeItems/Rectangle.swift +9 -9
  46. package/Sources/Private/Model/ShapeItems/Repeater.swift +37 -32
  47. package/Sources/Private/Model/ShapeItems/ShapeTransform.swift +34 -28
  48. package/Sources/Private/Model/ShapeItems/Star.swift +21 -21
  49. package/Sources/Private/Model/ShapeItems/Stroke.swift +9 -9
  50. package/Sources/Private/Model/ShapeItems/Trim.swift +9 -9
  51. package/Sources/Private/Model/Text/TextAnimator.swift +33 -33
  52. package/Sources/Private/Model/Text/TextDocument.swift +8 -8
  53. package/Sources/Private/RootAnimationLayer.swift +4 -4
  54. package/Sources/Private/Utility/Interpolatable/InterpolatableExtensions.swift +1 -1
  55. package/Sources/Private/Utility/Interpolatable/KeyframeGroup+Extensions.swift +4 -4
  56. package/Sources/Private/Utility/Primitives/ColorExtension.swift +7 -7
  57. package/Sources/Private/Utility/Primitives/VectorsExtensions.swift +29 -21
  58. package/Sources/{Private/Model/Animation.swift → Public/Animation/LottieAnimation.swift} +13 -5
  59. package/Sources/Public/Animation/{AnimationPublic.swift → LottieAnimationHelpers.swift} +17 -17
  60. package/Sources/Public/Animation/{AnimationView.swift → LottieAnimationView.swift} +27 -19
  61. package/Sources/Public/Animation/{AnimationViewInitializers.swift → LottieAnimationViewInitializers.swift} +6 -6
  62. package/Sources/Public/AnimationCache/AnimationCacheProvider.swift +3 -3
  63. package/Sources/Public/AnimationCache/LRUAnimationCache.swift +3 -3
  64. package/Sources/Public/DynamicProperties/AnimationKeypath.swift +3 -3
  65. package/Sources/Public/DynamicProperties/AnyValueProvider.swift +2 -2
  66. package/Sources/Public/DynamicProperties/ValueProviders/ColorValueProvider.swift +10 -10
  67. package/Sources/Public/DynamicProperties/ValueProviders/FloatValueProvider.swift +4 -4
  68. package/Sources/Public/DynamicProperties/ValueProviders/GradientValueProvider.swift +5 -5
  69. package/Sources/Public/DynamicProperties/ValueProviders/PointValueProvider.swift +2 -2
  70. package/Sources/Public/DynamicProperties/ValueProviders/SizeValueProvider.swift +2 -2
  71. package/Sources/Public/FontProvider/AnimationFontProvider.swift +1 -1
  72. package/Sources/Public/ImageProvider/AnimationImageProvider.swift +2 -2
  73. package/Sources/Public/Keyframes/Interpolatable.swift +17 -17
  74. package/Sources/Public/Keyframes/Keyframe.swift +10 -10
  75. package/Sources/Public/LottieConfiguration.swift +1 -1
  76. package/Sources/Public/Primitives/{Color.swift → LottieColor.swift} +10 -2
  77. package/Sources/Public/Primitives/Vectors.swift +18 -2
  78. package/Sources/Public/TextProvider/AnimationTextProvider.swift +1 -1
  79. package/Sources/Public/iOS/AnimatedButton.swift +1 -1
  80. package/Sources/Public/iOS/AnimatedControl.swift +6 -6
  81. package/Sources/Public/iOS/AnimatedSwitch.swift +1 -1
  82. package/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift +8 -8
  83. package/Sources/Public/iOS/{AnimationViewBase.swift → LottieAnimationViewBase.swift} +4 -4
  84. package/Sources/Public/iOS/UIColorExtension.swift +2 -2
  85. package/Sources/Public/macOS/{AnimationViewBase.macOS.swift → LottieAnimationViewBase.macOS.swift} +4 -4
  86. package/Tests/AnimationKeypathTests.swift +1 -1
  87. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~22UHuHHSTYh5NFeueXXSDdev_8VAbw8H8yl2ICssaC0vaCLj2G2CGZCjUMEyki9c-k-CecFJRyspvzJLiQTjUw== +0 -0
  88. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~6DmZhylL-XQx-O08NugyWINI0ugrLVgVOpbrdp0sT2tEqw-jVD2vvBWYRnYHALkM2_qP2yy-VoovSMzfYALY8A== +0 -0
  89. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~9dj3E5foFK2l_1CEpoRxToU1N6jCdhRVc5vhR10fHS938L9w8HxbiVCPGxYy5981O6M1yZsD4tHFbqBMbER4bQ== +0 -0
  90. package/Tests/Artifacts/LottieTests.xcresult/Data/{data.0~MBDeCFoahVzzmtSQrVhhy9VMJV6CmcnUkFya_qwe0XsMFscmY2nS8dxrTEYkY16sH68sEH7WVCCzTuW1z1Hocw== → data.0~Bys36bGK_YkCjRNoPMkq3R0OcyPNrVNka1Gz45ilbXJTqp9xAJexx6qKBh86_fm7OgBCO0WS2gJBy77DUUnOOA==} +0 -0
  91. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~QJMKb50ZfaWLSHxBSGPlrzULLCqTlb_6W-X0N1-e5PfwCKjpYKOElImsOwgZKVK0cdyf-6u4Zp3mm3BfGQVQ9Q== +0 -0
  92. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~YyEdK1WNFTPo-R3Og2OWduKSikuFYneXurEZbyNLZeDmJLJkd7Ew8jNxy4mvgZw4f4Sikp4swEjJgVzXqhev5g== +1 -0
  93. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~bZd73QR3pWGndrn46_NXJw2dUT7WdBjkH5fdPZ7EnzlcZ9Ifv6WR14RKeWI9diiEjcRJE7ZOWqZ9fzf2vvTnLw== +0 -0
  94. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~baCaLsz8Sq-r6sHhJcZeowVdrnrIxKwDps5Q1Aq38G2AQ3HaopZ9m3A8IXtTFSiZGNiO2qnM9yH7iJfuzC5K0A== +0 -0
  95. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~iZXYCVJLYHKtR7eFHwefLiejC9CkRbBBSkkZmwfkiDEIdUKE4GgVkdDrcHry91RF7d9y7AuYovfGVp1-fuNg0g== +0 -0
  96. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~pTTJImrF4EktmVXGCigWBn7v6YlbH5eFCXIW35CW-iyypvzFMXXYYbQO1ly6Bf3u6CdaepZko-L9obC1mjigMA== +0 -0
  97. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~sVXLeN9UCp6IsOPeuoY76nF-bP-w2rBm61UYvs5XE3o5XhbM7itN2s1XD5i9COIaVMytmUFB-mvCLCqHfHWwpw== +0 -0
  98. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~t8Vsjx3tjPBGQIElMCvqzxLS0hDmBGuLa_CEiB64N2Vxp3qoUfNF0Sar84QnEDOKfyVF6c1KTn1QYg7fRJrk8g== +0 -0
  99. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~zUmPx8nRHLa8-g1WWSYYzveS_6qmBf-y4xyS-dHzD7c_xWwPZlsfKg8UngImNdn0gxGOBSRmCeXbYwWpLfj_Rg== +0 -0
  100. package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~22UHuHHSTYh5NFeueXXSDdev_8VAbw8H8yl2ICssaC0vaCLj2G2CGZCjUMEyki9c-k-CecFJRyspvzJLiQTjUw== +0 -0
  101. package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~7IO4FqH8-VUsSfuA0_wMGUgfGdV7MwzpkzjwWbiB50jXZKQRHtU4G0A7ZXTvsR4mDdrWiawpNC_eriOALfZ7Og== → refs.0~6DmZhylL-XQx-O08NugyWINI0ugrLVgVOpbrdp0sT2tEqw-jVD2vvBWYRnYHALkM2_qP2yy-VoovSMzfYALY8A==} +0 -0
  102. package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~ClRW5-6rvrgZHHbrPS1VEREaxelpVcKlERPzSa3f2rtFNXdoqATxFCsPge3a_nO4mhhtpmTmbYvyfI-obAu8Qg== → refs.0~9dj3E5foFK2l_1CEpoRxToU1N6jCdhRVc5vhR10fHS938L9w8HxbiVCPGxYy5981O6M1yZsD4tHFbqBMbER4bQ==} +0 -0
  103. package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~Bys36bGK_YkCjRNoPMkq3R0OcyPNrVNka1Gz45ilbXJTqp9xAJexx6qKBh86_fm7OgBCO0WS2gJBy77DUUnOOA== +0 -0
  104. package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~UsLY5O-vDMEHEe3bF8XJvkKkYxdsKlIytgJW7zgNuetw53fG3SssfZiiMfbuYnOtvvvYBXTwpbz07V6Czp029Q== → refs.0~QJMKb50ZfaWLSHxBSGPlrzULLCqTlb_6W-X0N1-e5PfwCKjpYKOElImsOwgZKVK0cdyf-6u4Zp3mm3BfGQVQ9Q==} +0 -0
  105. package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~YyEdK1WNFTPo-R3Og2OWduKSikuFYneXurEZbyNLZeDmJLJkd7Ew8jNxy4mvgZw4f4Sikp4swEjJgVzXqhev5g== +0 -0
  106. package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~cpg4cb7H0TaehHy4a-xINJMFfBM2_AEHal_0tIX8ymNVJPsjlCysi3-Cad0Ca_SvuGwVM7ONF55OBUuC9YKZvA== → refs.0~bZd73QR3pWGndrn46_NXJw2dUT7WdBjkH5fdPZ7EnzlcZ9Ifv6WR14RKeWI9diiEjcRJE7ZOWqZ9fzf2vvTnLw==} +0 -0
  107. package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~jdIx7vWS6ej1cqYcbCS4KyZErSMF13ELR95YwClVc98tIXcsglh7KuGvI1gIxEPDtPXQpfC3XijIAGn1quL8Dw== → refs.0~baCaLsz8Sq-r6sHhJcZeowVdrnrIxKwDps5Q1Aq38G2AQ3HaopZ9m3A8IXtTFSiZGNiO2qnM9yH7iJfuzC5K0A==} +0 -0
  108. package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~iZXYCVJLYHKtR7eFHwefLiejC9CkRbBBSkkZmwfkiDEIdUKE4GgVkdDrcHry91RF7d9y7AuYovfGVp1-fuNg0g== +0 -0
  109. package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~pTTJImrF4EktmVXGCigWBn7v6YlbH5eFCXIW35CW-iyypvzFMXXYYbQO1ly6Bf3u6CdaepZko-L9obC1mjigMA== +0 -0
  110. package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~lz3e0YeBa8TvMBSSymToh--gc6zznUIdH2jO0AJ4so5OPNdw6wpYmJebhaENGsRoD3beUXvlyD5f7_WeZrzyNQ== → refs.0~sVXLeN9UCp6IsOPeuoY76nF-bP-w2rBm61UYvs5XE3o5XhbM7itN2s1XD5i9COIaVMytmUFB-mvCLCqHfHWwpw==} +0 -0
  111. package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~u_5dWbliYJ__YkyUCDFjdxiFds9M8Epr_RvbU1rIRCbBQdhRJ_TUBXXcL_Qq-wVp4umNLTOzud4OpQItSpO6Rg== → refs.0~t8Vsjx3tjPBGQIElMCvqzxLS0hDmBGuLa_CEiB64N2Vxp3qoUfNF0Sar84QnEDOKfyVF6c1KTn1QYg7fRJrk8g==} +0 -0
  112. package/Tests/Artifacts/LottieTests.xcresult/Data/{refs.0~v-YGzhC2l_icsAsyp1XAbEWYwxNook-rARAWlVZINioEsgT9LGvhg2oh78nYqoeH78m1fihr5HCcGNfF7SQj0g== → refs.0~zUmPx8nRHLa8-g1WWSYYzveS_6qmBf-y4xyS-dHzD7c_xWwPZlsfKg8UngImNdn0gxGOBSRmCeXbYwWpLfj_Rg==} +0 -0
  113. package/Tests/Artifacts/LottieTests.xcresult/Info.plist +2 -2
  114. package/Tests/ParsingTests.swift +2 -2
  115. package/Tests/PerformanceTests.swift +9 -9
  116. package/Tests/SnapshotConfiguration.swift +4 -4
  117. package/Tests/SnapshotTests.swift +6 -6
  118. package/lottie-ios.podspec +1 -1
  119. package/package.json +1 -1
  120. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~7IO4FqH8-VUsSfuA0_wMGUgfGdV7MwzpkzjwWbiB50jXZKQRHtU4G0A7ZXTvsR4mDdrWiawpNC_eriOALfZ7Og== +0 -0
  121. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~ClRW5-6rvrgZHHbrPS1VEREaxelpVcKlERPzSa3f2rtFNXdoqATxFCsPge3a_nO4mhhtpmTmbYvyfI-obAu8Qg== +0 -0
  122. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~Jr2dFGcJc1188nMoMha82z9wM99lCLm4MKzhjfVVjIxKeCZVGWGZH3HgJFNkTpozdk5p1u5o91dCiY4-cR1Zhg== +0 -0
  123. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~U4plJajEDM_uSZdglhDyj6gQO63mbeKxYP9X94aIaOtL0yErtfQnGz5SgsqQ0ToSZcJj6Ao9Wx-nesZVwBTRuw== +0 -0
  124. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~UsLY5O-vDMEHEe3bF8XJvkKkYxdsKlIytgJW7zgNuetw53fG3SssfZiiMfbuYnOtvvvYBXTwpbz07V6Czp029Q== +0 -0
  125. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~cpg4cb7H0TaehHy4a-xINJMFfBM2_AEHal_0tIX8ymNVJPsjlCysi3-Cad0Ca_SvuGwVM7ONF55OBUuC9YKZvA== +0 -0
  126. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~cuHjdTCuciVumvEpvozxwDj2wAdgWe13bzd1pUAGN45-WOgY0kIid9aUlBX675OnS-xNEc_pyQWo0RO1dKAjcw== +0 -0
  127. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~f_-bfn-KRHHFg39_MtwgBulEAuWH6F05yqGYydXhil6kqZ51eAoRX6tsiqOr0Oa6eL3dK1tcCBD1bWX5orCZhw== +0 -1
  128. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~jdIx7vWS6ej1cqYcbCS4KyZErSMF13ELR95YwClVc98tIXcsglh7KuGvI1gIxEPDtPXQpfC3XijIAGn1quL8Dw== +0 -0
  129. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~lz3e0YeBa8TvMBSSymToh--gc6zznUIdH2jO0AJ4so5OPNdw6wpYmJebhaENGsRoD3beUXvlyD5f7_WeZrzyNQ== +0 -0
  130. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~u_5dWbliYJ__YkyUCDFjdxiFds9M8Epr_RvbU1rIRCbBQdhRJ_TUBXXcL_Qq-wVp4umNLTOzud4OpQItSpO6Rg== +0 -0
  131. package/Tests/Artifacts/LottieTests.xcresult/Data/data.0~v-YGzhC2l_icsAsyp1XAbEWYwxNook-rARAWlVZINioEsgT9LGvhg2oh78nYqoeH78m1fihr5HCcGNfF7SQj0g== +0 -0
  132. package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~Jr2dFGcJc1188nMoMha82z9wM99lCLm4MKzhjfVVjIxKeCZVGWGZH3HgJFNkTpozdk5p1u5o91dCiY4-cR1Zhg== +0 -0
  133. package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~MBDeCFoahVzzmtSQrVhhy9VMJV6CmcnUkFya_qwe0XsMFscmY2nS8dxrTEYkY16sH68sEH7WVCCzTuW1z1Hocw== +0 -0
  134. package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~U4plJajEDM_uSZdglhDyj6gQO63mbeKxYP9X94aIaOtL0yErtfQnGz5SgsqQ0ToSZcJj6Ao9Wx-nesZVwBTRuw== +0 -0
  135. package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~cuHjdTCuciVumvEpvozxwDj2wAdgWe13bzd1pUAGN45-WOgY0kIid9aUlBX675OnS-xNEc_pyQWo0RO1dKAjcw== +0 -0
  136. package/Tests/Artifacts/LottieTests.xcresult/Data/refs.0~f_-bfn-KRHHFg39_MtwgBulEAuWH6F05yqGYydXhil6kqZ51eAoRX6tsiqOr0Oa6eL3dK1tcCBD1bWX5orCZhw== +0 -0
@@ -81,13 +81,13 @@ extension CAShapeLayer {
81
81
  extension Star {
82
82
  /// Data that represents how to render a star at a specific point in time
83
83
  struct Keyframe {
84
- let position: Vector3D
85
- let outerRadius: Vector1D
86
- let innerRadius: Vector1D
87
- let outerRoundness: Vector1D
88
- let innerRoundness: Vector1D
89
- let points: Vector1D
90
- let rotation: Vector1D
84
+ let position: LottieVector3D
85
+ let outerRadius: LottieVector1D
86
+ let innerRadius: LottieVector1D
87
+ let outerRoundness: LottieVector1D
88
+ let innerRoundness: LottieVector1D
89
+ let points: LottieVector1D
90
+ let rotation: LottieVector1D
91
91
  }
92
92
 
93
93
  /// Creates a single array of animatable keyframes from the separate arrays of keyframes in this star/polygon
@@ -95,9 +95,9 @@ extension Star {
95
95
  let combinedKeyframes = Keyframes.combinedIfPossible(
96
96
  position,
97
97
  outerRadius,
98
- innerRadius ?? KeyframeGroup(Vector1D(0)),
98
+ innerRadius ?? KeyframeGroup(LottieVector1D(0)),
99
99
  outerRoundness,
100
- innerRoundness ?? KeyframeGroup(Vector1D(0)),
100
+ innerRoundness ?? KeyframeGroup(LottieVector1D(0)),
101
101
  points,
102
102
  rotation,
103
103
  makeCombinedResult: Star.Keyframe.init)
@@ -112,10 +112,10 @@ extension Star {
112
112
  position: positionValue,
113
113
  outerRadius: try outerRadius.exactlyOneKeyframe(context: context, description: "star outerRadius"),
114
114
  innerRadius: try innerRadius?.exactlyOneKeyframe(context: context, description: "star innerRadius")
115
- ?? Vector1D(0),
115
+ ?? LottieVector1D(0),
116
116
  outerRoundness: try outerRoundness.exactlyOneKeyframe(context: context, description: "star outerRoundness"),
117
117
  innerRoundness: try innerRoundness?.exactlyOneKeyframe(context: context, description: "star innerRoundness")
118
- ?? Vector1D(0),
118
+ ?? LottieVector1D(0),
119
119
  points: try points.exactlyOneKeyframe(context: context, description: "star points"),
120
120
  rotation: try rotation.exactlyOneKeyframe(context: context, description: "star rotation"))
121
121
  }
@@ -8,8 +8,8 @@ import QuartzCore
8
8
 
9
9
  /// A `ShapeItem` that represents a stroke
10
10
  protocol StrokeShapeItem: OpacityAnimationModel {
11
- var strokeColor: KeyframeGroup<Color>? { get }
12
- var width: KeyframeGroup<Vector1D> { get }
11
+ var strokeColor: KeyframeGroup<LottieColor>? { get }
12
+ var width: KeyframeGroup<LottieVector1D> { get }
13
13
  var lineCap: LineCap { get }
14
14
  var lineJoin: LineJoin { get }
15
15
  var miterLimit: Double { get }
@@ -19,13 +19,13 @@ protocol StrokeShapeItem: OpacityAnimationModel {
19
19
  // MARK: - Stroke + StrokeShapeItem
20
20
 
21
21
  extension Stroke: StrokeShapeItem {
22
- var strokeColor: KeyframeGroup<Color>? { color }
22
+ var strokeColor: KeyframeGroup<LottieColor>? { color }
23
23
  }
24
24
 
25
25
  // MARK: - GradientStroke + StrokeShapeItem
26
26
 
27
27
  extension GradientStroke: StrokeShapeItem {
28
- var strokeColor: KeyframeGroup<Color>? { nil }
28
+ var strokeColor: KeyframeGroup<LottieColor>? { nil }
29
29
  }
30
30
 
31
31
  // MARK: - CAShapeLayer + StrokeShapeItem
@@ -10,39 +10,39 @@ import QuartzCore
10
10
  /// both transform types to share the same animation implementation.
11
11
  protocol TransformModel {
12
12
  /// The anchor point of the transform.
13
- var anchorPoint: KeyframeGroup<Vector3D> { get }
13
+ var anchorPoint: KeyframeGroup<LottieVector3D> { get }
14
14
 
15
15
  /// The position of the transform. This is nil if the position data was split.
16
- var _position: KeyframeGroup<Vector3D>? { get }
16
+ var _position: KeyframeGroup<LottieVector3D>? { get }
17
17
 
18
18
  /// The positionX of the transform. This is nil if the position property is set.
19
- var _positionX: KeyframeGroup<Vector1D>? { get }
19
+ var _positionX: KeyframeGroup<LottieVector1D>? { get }
20
20
 
21
21
  /// The positionY of the transform. This is nil if the position property is set.
22
- var _positionY: KeyframeGroup<Vector1D>? { get }
22
+ var _positionY: KeyframeGroup<LottieVector1D>? { get }
23
23
 
24
24
  /// The scale of the transform
25
- var scale: KeyframeGroup<Vector3D> { get }
25
+ var scale: KeyframeGroup<LottieVector3D> { get }
26
26
 
27
27
  /// The rotation of the transform. Note: This is single dimensional rotation.
28
- var rotation: KeyframeGroup<Vector1D> { get }
28
+ var rotation: KeyframeGroup<LottieVector1D> { get }
29
29
  }
30
30
 
31
31
  // MARK: - Transform + TransformModel
32
32
 
33
33
  extension Transform: TransformModel {
34
- var _position: KeyframeGroup<Vector3D>? { position }
35
- var _positionX: KeyframeGroup<Vector1D>? { positionX }
36
- var _positionY: KeyframeGroup<Vector1D>? { positionY }
34
+ var _position: KeyframeGroup<LottieVector3D>? { position }
35
+ var _positionX: KeyframeGroup<LottieVector1D>? { positionX }
36
+ var _positionY: KeyframeGroup<LottieVector1D>? { positionY }
37
37
  }
38
38
 
39
39
  // MARK: - ShapeTransform + TransformModel
40
40
 
41
41
  extension ShapeTransform: TransformModel {
42
- var anchorPoint: KeyframeGroup<Vector3D> { anchor }
43
- var _position: KeyframeGroup<Vector3D>? { position }
44
- var _positionX: KeyframeGroup<Vector1D>? { nil }
45
- var _positionY: KeyframeGroup<Vector1D>? { nil }
42
+ var anchorPoint: KeyframeGroup<LottieVector3D> { anchor }
43
+ var _position: KeyframeGroup<LottieVector3D>? { position }
44
+ var _positionX: KeyframeGroup<LottieVector1D>? { nil }
45
+ var _positionY: KeyframeGroup<LottieVector1D>? { nil }
46
46
  }
47
47
 
48
48
  // MARK: - CALayer + TransformModel
@@ -15,7 +15,7 @@ final class CoreAnimationLayer: BaseAnimationLayer {
15
15
  /// - This initializer is throwing, but will only throw when using
16
16
  /// `CompatibilityTracker.Mode.abort`.
17
17
  init(
18
- animation: Animation,
18
+ animation: LottieAnimation,
19
19
  imageProvider: AnimationImageProvider,
20
20
  textProvider: AnimationTextProvider,
21
21
  fontProvider: AnimationFontProvider,
@@ -156,7 +156,7 @@ final class CoreAnimationLayer: BaseAnimationLayer {
156
156
  } catch {
157
157
  if case CompatibilityTracker.Error.encounteredCompatibilityIssue(let compatibilityIssue) = error {
158
158
  // Even though the animation setup failed, we still update the layer's playback state
159
- // so it can be read by the parent `AnimationView` when handling this error
159
+ // so it can be read by the parent `LottieAnimationView` when handling this error
160
160
  currentPlaybackState = pendingAnimationConfiguration.playbackState
161
161
 
162
162
  didSetUpAnimation?([compatibilityIssue])
@@ -187,7 +187,7 @@ final class CoreAnimationLayer: BaseAnimationLayer {
187
187
  /// which is also the realtime animation progress of this layer's animation
188
188
  @objc private var animationProgress: CGFloat = 0
189
189
 
190
- private let animation: Animation
190
+ private let animation: LottieAnimation
191
191
  private let valueProviderStore: ValueProviderStore
192
192
  private let compatibilityTracker: CompatibilityTracker
193
193
  private let logger: LottieLogger
@@ -18,7 +18,7 @@ protocol AnimationLayer: CALayer {
18
18
  // Context describing the timing parameters of the current animation
19
19
  struct LayerAnimationContext {
20
20
  /// The animation being played
21
- let animation: Animation
21
+ let animation: LottieAnimation
22
22
 
23
23
  /// The timing configuration that should be applied to `CAAnimation`s
24
24
  let timingConfiguration: CoreAnimationLayer.CAMediaTimingConfiguration
@@ -15,7 +15,7 @@ extension CALayer {
15
15
  context: LayerContext)
16
16
  throws
17
17
  {
18
- // An `Animation`'s `LayerModel`s are listed from front to back,
18
+ // A `LottieAnimation`'s `LayerModel`s are listed from front to back,
19
19
  // but `CALayer.sublayers` are listed from back to front.
20
20
  // We reverse the layer ordering to match what Core Animation expects.
21
21
  // The final view hierarchy must display the layers in this exact order.
@@ -7,7 +7,7 @@ import QuartzCore
7
7
 
8
8
  /// Context available when constructing an `AnimationLayer`
9
9
  struct LayerContext {
10
- let animation: Animation
10
+ let animation: LottieAnimation
11
11
  let imageProvider: AnimationImageProvider
12
12
  let textProvider: AnimationTextProvider
13
13
  let fontProvider: AnimationFontProvider
@@ -108,7 +108,7 @@ extension PreCompLayer: CustomLayoutLayer {
108
108
  extension KeyframeInterpolator where ValueType == AnimationFrameTime {
109
109
  /// A `KeyframeInterpolator` for the given `timeRemapping` keyframes
110
110
  static func timeRemapping(
111
- keyframes timeRemappingKeyframes: KeyframeGroup<Vector1D>,
111
+ keyframes timeRemappingKeyframes: KeyframeGroup<LottieVector1D>,
112
112
  context: LayerContext)
113
113
  throws
114
114
  -> KeyframeInterpolator<AnimationFrameTime>
@@ -56,11 +56,11 @@ private struct RepeaterTransform {
56
56
  scale = repeater.scale
57
57
 
58
58
  rotation = repeater.rotation.map { rotation in
59
- Vector1D(rotation.value * Double(index))
59
+ LottieVector1D(rotation.value * Double(index))
60
60
  }
61
61
 
62
62
  position = repeater.position.map { position in
63
- Vector3D(
63
+ LottieVector3D(
64
64
  x: position.x * Double(index),
65
65
  y: position.y * Double(index),
66
66
  z: position.z * Double(index))
@@ -69,17 +69,17 @@ private struct RepeaterTransform {
69
69
 
70
70
  // MARK: Internal
71
71
 
72
- let anchorPoint: KeyframeGroup<Vector3D>
73
- let position: KeyframeGroup<Vector3D>
74
- let rotation: KeyframeGroup<Vector1D>
75
- let scale: KeyframeGroup<Vector3D>
72
+ let anchorPoint: KeyframeGroup<LottieVector3D>
73
+ let position: KeyframeGroup<LottieVector3D>
74
+ let rotation: KeyframeGroup<LottieVector1D>
75
+ let scale: KeyframeGroup<LottieVector3D>
76
76
 
77
77
  }
78
78
 
79
79
  // MARK: TransformModel
80
80
 
81
81
  extension RepeaterTransform: TransformModel {
82
- var _position: KeyframeGroup<Vector3D>? { position }
83
- var _positionX: KeyframeGroup<Vector1D>? { nil }
84
- var _positionY: KeyframeGroup<Vector1D>? { nil }
82
+ var _position: KeyframeGroup<LottieVector3D>? { position }
83
+ var _positionX: KeyframeGroup<LottieVector1D>? { nil }
84
+ var _positionY: KeyframeGroup<LottieVector1D>? { nil }
85
85
  }
@@ -6,7 +6,7 @@ import QuartzCore
6
6
  // MARK: - ValueProviderStore
7
7
 
8
8
  /// Registration and storage for `AnyValueProvider`s that can dynamically
9
- /// provide custom values for `AnimationKeypath`s within an `Animation`.
9
+ /// provide custom values for `AnimationKeypath`s within a `LottieAnimation`.
10
10
  final class ValueProviderStore {
11
11
 
12
12
  // MARK: Lifecycle
@@ -183,7 +183,7 @@ private class MaskNodeProperties: NodePropertyMap {
183
183
  let mode: MaskMode
184
184
  let inverted: Bool
185
185
 
186
- let opacity: NodeProperty<Vector1D>
186
+ let opacity: NodeProperty<LottieVector1D>
187
187
  let shape: NodeProperty<BezierPath>
188
- let expansion: NodeProperty<Vector1D>
188
+ let expansion: NodeProperty<LottieVector1D>
189
189
  }
@@ -90,7 +90,7 @@ final class PreCompositionLayer: CompositionLayer {
90
90
  // MARK: Internal
91
91
 
92
92
  let frameRate: CGFloat
93
- let remappingNode: NodeProperty<Vector1D>?
93
+ let remappingNode: NodeProperty<LottieVector1D>?
94
94
 
95
95
  override var keypathProperties: [String: AnyNodeProperty] {
96
96
  guard let remappingNode = remappingNode else {
@@ -15,7 +15,7 @@ final class SolidCompositionLayer: CompositionLayer {
15
15
  init(solid: SolidLayerModel) {
16
16
  let components = solid.colorHex.hexColorComponents()
17
17
  colorProperty =
18
- NodeProperty(provider: SingleValueProvider(Color(
18
+ NodeProperty(provider: SingleValueProvider(LottieColor(
19
19
  r: Double(components.red),
20
20
  g: Double(components.green),
21
21
  b: Double(components.blue),
@@ -41,7 +41,7 @@ final class SolidCompositionLayer: CompositionLayer {
41
41
 
42
42
  // MARK: Internal
43
43
 
44
- let colorProperty: NodeProperty<Color>?
44
+ let colorProperty: NodeProperty<LottieColor>?
45
45
  let solidShape = CAShapeLayer()
46
46
 
47
47
  override var keypathProperties: [String: AnyNodeProperty] {
@@ -19,7 +19,7 @@ final class MainThreadAnimationLayer: CALayer, RootAnimationLayer {
19
19
  // MARK: Lifecycle
20
20
 
21
21
  init(
22
- animation: Animation,
22
+ animation: LottieAnimation,
23
23
  imageProvider: AnimationImageProvider,
24
24
  textProvider: AnimationTextProvider,
25
25
  fontProvider: AnimationFontProvider,
@@ -152,7 +152,7 @@ final class MainThreadAnimationLayer: CALayer, RootAnimationLayer {
152
152
  }
153
153
 
154
154
  var isAnimationPlaying: Bool? {
155
- nil // this state is managed by `AnimationView`
155
+ nil // this state is managed by `LottieAnimationView`
156
156
  }
157
157
 
158
158
  var _animationLayers: [CALayer] {
@@ -189,7 +189,7 @@ final class MainThreadAnimationLayer: CALayer, RootAnimationLayer {
189
189
  }
190
190
 
191
191
  func removeAnimations() {
192
- // no-op, since the primary animation is managed by the `AnimationView`.
192
+ // no-op, since the primary animation is managed by the `LottieAnimationView`.
193
193
  }
194
194
 
195
195
  /// Forces the view to update its drawing.
@@ -32,15 +32,15 @@ final class LayerTransformProperties: NodePropertyMap, KeypathSearchable {
32
32
  let positionKeyframesX = transform.positionX?.keyframes,
33
33
  let positionKeyframesY = transform.positionY?.keyframes
34
34
  {
35
- let xPosition: NodeProperty<Vector1D> = NodeProperty(provider: KeyframeInterpolator(keyframes: positionKeyframesX))
36
- let yPosition: NodeProperty<Vector1D> = NodeProperty(provider: KeyframeInterpolator(keyframes: positionKeyframesY))
35
+ let xPosition: NodeProperty<LottieVector1D> = NodeProperty(provider: KeyframeInterpolator(keyframes: positionKeyframesX))
36
+ let yPosition: NodeProperty<LottieVector1D> = NodeProperty(provider: KeyframeInterpolator(keyframes: positionKeyframesY))
37
37
  propertyMap["X Position"] = xPosition
38
38
  propertyMap["Y Position"] = yPosition
39
39
  positionX = xPosition
40
40
  positionY = yPosition
41
41
  position = nil
42
42
  } else if let positionKeyframes = transform.position?.keyframes {
43
- let position: NodeProperty<Vector3D> = NodeProperty(provider: KeyframeInterpolator(keyframes: positionKeyframes))
43
+ let position: NodeProperty<LottieVector3D> = NodeProperty(provider: KeyframeInterpolator(keyframes: positionKeyframes))
44
44
  propertyMap["Position"] = position
45
45
  self.position = position
46
46
  positionX = nil
@@ -62,13 +62,13 @@ final class LayerTransformProperties: NodePropertyMap, KeypathSearchable {
62
62
 
63
63
  let properties: [AnyNodeProperty]
64
64
 
65
- let anchor: NodeProperty<Vector3D>
66
- let scale: NodeProperty<Vector3D>
67
- let rotation: NodeProperty<Vector1D>
68
- let position: NodeProperty<Vector3D>?
69
- let positionX: NodeProperty<Vector1D>?
70
- let positionY: NodeProperty<Vector1D>?
71
- let opacity: NodeProperty<Vector1D>
65
+ let anchor: NodeProperty<LottieVector3D>
66
+ let scale: NodeProperty<LottieVector3D>
67
+ let rotation: NodeProperty<LottieVector1D>
68
+ let position: NodeProperty<LottieVector3D>?
69
+ let positionX: NodeProperty<LottieVector1D>?
70
+ let positionY: NodeProperty<LottieVector1D>?
71
+ let opacity: NodeProperty<LottieVector1D>
72
72
 
73
73
  var childKeypaths: [KeypathSearchable] {
74
74
  []
@@ -34,9 +34,9 @@ final class TrimPathProperties: NodePropertyMap, KeypathSearchable {
34
34
  let properties: [AnyNodeProperty]
35
35
  let keypathName: String
36
36
 
37
- let start: NodeProperty<Vector1D>
38
- let end: NodeProperty<Vector1D>
39
- let offset: NodeProperty<Vector1D>
37
+ let start: NodeProperty<LottieVector1D>
38
+ let end: NodeProperty<LottieVector1D>
39
+ let offset: NodeProperty<LottieVector1D>
40
40
  let type: TrimType
41
41
  }
42
42
 
@@ -31,8 +31,8 @@ final class EllipseNodeProperties: NodePropertyMap, KeypathSearchable {
31
31
  var keypathName: String
32
32
 
33
33
  let direction: PathDirection
34
- let position: NodeProperty<Vector3D>
35
- let size: NodeProperty<Vector3D>
34
+ let position: NodeProperty<LottieVector3D>
35
+ let size: NodeProperty<LottieVector3D>
36
36
 
37
37
  let keypathProperties: [String: AnyNodeProperty]
38
38
  let properties: [AnyNodeProperty]
@@ -42,11 +42,11 @@ final class PolygonNodeProperties: NodePropertyMap, KeypathSearchable {
42
42
  let properties: [AnyNodeProperty]
43
43
 
44
44
  let direction: PathDirection
45
- let position: NodeProperty<Vector3D>
46
- let outerRadius: NodeProperty<Vector1D>
47
- let outerRoundedness: NodeProperty<Vector1D>
48
- let rotation: NodeProperty<Vector1D>
49
- let points: NodeProperty<Vector1D>
45
+ let position: NodeProperty<LottieVector3D>
46
+ let outerRadius: NodeProperty<LottieVector1D>
47
+ let outerRoundedness: NodeProperty<LottieVector1D>
48
+ let rotation: NodeProperty<LottieVector1D>
49
+ let points: NodeProperty<LottieVector1D>
50
50
  }
51
51
 
52
52
  // MARK: - PolygonNode
@@ -38,9 +38,9 @@ final class RectNodeProperties: NodePropertyMap, KeypathSearchable {
38
38
  let properties: [AnyNodeProperty]
39
39
 
40
40
  let direction: PathDirection
41
- let position: NodeProperty<Vector3D>
42
- let size: NodeProperty<Vector3D>
43
- let cornerRadius: NodeProperty<Vector1D>
41
+ let position: NodeProperty<LottieVector3D>
42
+ let size: NodeProperty<LottieVector3D>
43
+ let cornerRadius: NodeProperty<LottieVector1D>
44
44
 
45
45
  }
46
46
 
@@ -23,12 +23,12 @@ final class StarNodeProperties: NodePropertyMap, KeypathSearchable {
23
23
  if let innerRadiusKeyframes = star.innerRadius?.keyframes {
24
24
  innerRadius = NodeProperty(provider: KeyframeInterpolator(keyframes: innerRadiusKeyframes))
25
25
  } else {
26
- innerRadius = NodeProperty(provider: SingleValueProvider(Vector1D(0)))
26
+ innerRadius = NodeProperty(provider: SingleValueProvider(LottieVector1D(0)))
27
27
  }
28
28
  if let innderRoundedness = star.innerRoundness?.keyframes {
29
29
  innerRoundedness = NodeProperty(provider: KeyframeInterpolator(keyframes: innderRoundedness))
30
30
  } else {
31
- innerRoundedness = NodeProperty(provider: SingleValueProvider(Vector1D(0)))
31
+ innerRoundedness = NodeProperty(provider: SingleValueProvider(LottieVector1D(0)))
32
32
  }
33
33
  rotation = NodeProperty(provider: KeyframeInterpolator(keyframes: star.rotation.keyframes))
34
34
  points = NodeProperty(provider: KeyframeInterpolator(keyframes: star.points.keyframes))
@@ -52,13 +52,13 @@ final class StarNodeProperties: NodePropertyMap, KeypathSearchable {
52
52
  let properties: [AnyNodeProperty]
53
53
 
54
54
  let direction: PathDirection
55
- let position: NodeProperty<Vector3D>
56
- let outerRadius: NodeProperty<Vector1D>
57
- let outerRoundedness: NodeProperty<Vector1D>
58
- let innerRadius: NodeProperty<Vector1D>
59
- let innerRoundedness: NodeProperty<Vector1D>
60
- let rotation: NodeProperty<Vector1D>
61
- let points: NodeProperty<Vector1D>
55
+ let position: NodeProperty<LottieVector3D>
56
+ let outerRadius: NodeProperty<LottieVector1D>
57
+ let outerRoundedness: NodeProperty<LottieVector1D>
58
+ let innerRadius: NodeProperty<LottieVector1D>
59
+ let innerRoundedness: NodeProperty<LottieVector1D>
60
+ let rotation: NodeProperty<LottieVector1D>
61
+ let points: NodeProperty<LottieVector1D>
62
62
  }
63
63
 
64
64
  // MARK: - StarNode
@@ -26,13 +26,13 @@ final class GroupNodeProperties: NodePropertyMap, KeypathSearchable {
26
26
  skewAxis = NodeProperty(provider: KeyframeInterpolator(keyframes: transform.skewAxis.keyframes))
27
27
  } else {
28
28
  /// Transform node missing. Default to empty transform.
29
- anchor = NodeProperty(provider: SingleValueProvider(Vector3D(x: CGFloat(0), y: CGFloat(0), z: CGFloat(0))))
30
- position = NodeProperty(provider: SingleValueProvider(Vector3D(x: CGFloat(0), y: CGFloat(0), z: CGFloat(0))))
31
- scale = NodeProperty(provider: SingleValueProvider(Vector3D(x: CGFloat(100), y: CGFloat(100), z: CGFloat(100))))
32
- rotation = NodeProperty(provider: SingleValueProvider(Vector1D(0)))
33
- opacity = NodeProperty(provider: SingleValueProvider(Vector1D(100)))
34
- skew = NodeProperty(provider: SingleValueProvider(Vector1D(0)))
35
- skewAxis = NodeProperty(provider: SingleValueProvider(Vector1D(0)))
29
+ anchor = NodeProperty(provider: SingleValueProvider(LottieVector3D(x: CGFloat(0), y: CGFloat(0), z: CGFloat(0))))
30
+ position = NodeProperty(provider: SingleValueProvider(LottieVector3D(x: CGFloat(0), y: CGFloat(0), z: CGFloat(0))))
31
+ scale = NodeProperty(provider: SingleValueProvider(LottieVector3D(x: CGFloat(100), y: CGFloat(100), z: CGFloat(100))))
32
+ rotation = NodeProperty(provider: SingleValueProvider(LottieVector1D(0)))
33
+ opacity = NodeProperty(provider: SingleValueProvider(LottieVector1D(100)))
34
+ skew = NodeProperty(provider: SingleValueProvider(LottieVector1D(0)))
35
+ skewAxis = NodeProperty(provider: SingleValueProvider(LottieVector1D(0)))
36
36
  }
37
37
  keypathProperties = [
38
38
  "Anchor Point" : anchor,
@@ -55,13 +55,13 @@ final class GroupNodeProperties: NodePropertyMap, KeypathSearchable {
55
55
  let keypathProperties: [String: AnyNodeProperty]
56
56
  let properties: [AnyNodeProperty]
57
57
 
58
- let anchor: NodeProperty<Vector3D>
59
- let position: NodeProperty<Vector3D>
60
- let scale: NodeProperty<Vector3D>
61
- let rotation: NodeProperty<Vector1D>
62
- let opacity: NodeProperty<Vector1D>
63
- let skew: NodeProperty<Vector1D>
64
- let skewAxis: NodeProperty<Vector1D>
58
+ let anchor: NodeProperty<LottieVector3D>
59
+ let position: NodeProperty<LottieVector3D>
60
+ let scale: NodeProperty<LottieVector3D>
61
+ let rotation: NodeProperty<LottieVector1D>
62
+ let opacity: NodeProperty<LottieVector1D>
63
+ let skew: NodeProperty<LottieVector1D>
64
+ let skewAxis: NodeProperty<LottieVector1D>
65
65
 
66
66
  var caTransform: CATransform3D {
67
67
  CATransform3D.makeTransform(
@@ -30,8 +30,8 @@ final class FillNodeProperties: NodePropertyMap, KeypathSearchable {
30
30
 
31
31
  var keypathName: String
32
32
 
33
- let opacity: NodeProperty<Vector1D>
34
- let color: NodeProperty<Color>
33
+ let opacity: NodeProperty<LottieVector1D>
34
+ let color: NodeProperty<LottieColor>
35
35
  let type: FillRule
36
36
 
37
37
  let keypathProperties: [String: AnyNodeProperty]
@@ -36,9 +36,9 @@ final class GradientFillProperties: NodePropertyMap, KeypathSearchable {
36
36
 
37
37
  var keypathName: String
38
38
 
39
- let opacity: NodeProperty<Vector1D>
40
- let startPoint: NodeProperty<Vector3D>
41
- let endPoint: NodeProperty<Vector3D>
39
+ let opacity: NodeProperty<LottieVector1D>
40
+ let startPoint: NodeProperty<LottieVector3D>
41
+ let endPoint: NodeProperty<LottieVector3D>
42
42
  let colors: NodeProperty<[Double]>
43
43
 
44
44
  let gradientType: GradientType
@@ -28,8 +28,8 @@ final class GradientStrokeProperties: NodePropertyMap, KeypathSearchable {
28
28
  lineJoin = gradientStroke.lineJoin
29
29
 
30
30
  if let dashes = gradientStroke.dashPattern {
31
- var dashPatterns = ContiguousArray<ContiguousArray<Keyframe<Vector1D>>>()
32
- var dashPhase = ContiguousArray<Keyframe<Vector1D>>()
31
+ var dashPatterns = ContiguousArray<ContiguousArray<Keyframe<LottieVector1D>>>()
32
+ var dashPhase = ContiguousArray<Keyframe<LottieVector1D>>()
33
33
  for dash in dashes {
34
34
  if dash.type == .offset {
35
35
  dashPhase = dash.value.keyframes
@@ -40,8 +40,8 @@ final class GradientStrokeProperties: NodePropertyMap, KeypathSearchable {
40
40
  dashPattern = NodeProperty(provider: GroupInterpolator(keyframeGroups: dashPatterns))
41
41
  self.dashPhase = NodeProperty(provider: KeyframeInterpolator(keyframes: dashPhase))
42
42
  } else {
43
- dashPattern = NodeProperty(provider: SingleValueProvider([Vector1D]()))
44
- dashPhase = NodeProperty(provider: SingleValueProvider(Vector1D(0)))
43
+ dashPattern = NodeProperty(provider: SingleValueProvider([LottieVector1D]()))
44
+ dashPhase = NodeProperty(provider: SingleValueProvider(LottieVector1D(0)))
45
45
  }
46
46
  keypathProperties = [
47
47
  "Opacity" : opacity,
@@ -59,14 +59,14 @@ final class GradientStrokeProperties: NodePropertyMap, KeypathSearchable {
59
59
 
60
60
  var keypathName: String
61
61
 
62
- let opacity: NodeProperty<Vector1D>
63
- let startPoint: NodeProperty<Vector3D>
64
- let endPoint: NodeProperty<Vector3D>
62
+ let opacity: NodeProperty<LottieVector1D>
63
+ let startPoint: NodeProperty<LottieVector3D>
64
+ let endPoint: NodeProperty<LottieVector3D>
65
65
  let colors: NodeProperty<[Double]>
66
- let width: NodeProperty<Vector1D>
66
+ let width: NodeProperty<LottieVector1D>
67
67
 
68
- let dashPattern: NodeProperty<[Vector1D]>
69
- let dashPhase: NodeProperty<Vector1D>
68
+ let dashPattern: NodeProperty<[LottieVector1D]>
69
+ let dashPhase: NodeProperty<LottieVector1D>
70
70
 
71
71
  let lineCap: LineCap
72
72
  let lineJoin: LineJoin
@@ -27,13 +27,13 @@ final class StrokeNodeProperties: NodePropertyMap, KeypathSearchable {
27
27
  let (dashPatterns, dashPhase) = dashes.shapeLayerConfiguration
28
28
  dashPattern = NodeProperty(provider: GroupInterpolator(keyframeGroups: dashPatterns))
29
29
  if dashPhase.count == 0 {
30
- self.dashPhase = NodeProperty(provider: SingleValueProvider(Vector1D(0)))
30
+ self.dashPhase = NodeProperty(provider: SingleValueProvider(LottieVector1D(0)))
31
31
  } else {
32
32
  self.dashPhase = NodeProperty(provider: KeyframeInterpolator(keyframes: dashPhase))
33
33
  }
34
34
  } else {
35
- dashPattern = NodeProperty(provider: SingleValueProvider([Vector1D]()))
36
- dashPhase = NodeProperty(provider: SingleValueProvider(Vector1D(0)))
35
+ dashPattern = NodeProperty(provider: SingleValueProvider([LottieVector1D]()))
36
+ dashPhase = NodeProperty(provider: SingleValueProvider(LottieVector1D(0)))
37
37
  }
38
38
  keypathProperties = [
39
39
  "Opacity" : opacity,
@@ -51,12 +51,12 @@ final class StrokeNodeProperties: NodePropertyMap, KeypathSearchable {
51
51
  let keypathProperties: [String: AnyNodeProperty]
52
52
  let properties: [AnyNodeProperty]
53
53
 
54
- let opacity: NodeProperty<Vector1D>
55
- let color: NodeProperty<Color>
56
- let width: NodeProperty<Vector1D>
54
+ let opacity: NodeProperty<LottieVector1D>
55
+ let color: NodeProperty<LottieColor>
56
+ let width: NodeProperty<LottieVector1D>
57
57
 
58
- let dashPattern: NodeProperty<[Vector1D]>
59
- let dashPhase: NodeProperty<Vector1D>
58
+ let dashPattern: NodeProperty<[LottieVector1D]>
59
+ let dashPhase: NodeProperty<LottieVector1D>
60
60
 
61
61
  let lineCap: LineCap
62
62
  let lineJoin: LineJoin
@@ -133,14 +133,14 @@ final class StrokeNode: AnimatorNode, RenderNode {
133
133
 
134
134
  extension Array where Element == DashElement {
135
135
  typealias ShapeLayerConfiguration = (
136
- dashPatterns: ContiguousArray<ContiguousArray<Keyframe<Vector1D>>>,
137
- dashPhase: ContiguousArray<Keyframe<Vector1D>>)
136
+ dashPatterns: ContiguousArray<ContiguousArray<Keyframe<LottieVector1D>>>,
137
+ dashPhase: ContiguousArray<Keyframe<LottieVector1D>>)
138
138
 
139
139
  /// Converts the `[DashElement]` data model into `lineDashPattern` and `lineDashPhase`
140
140
  /// representations usable in a `CAShapeLayer`
141
141
  var shapeLayerConfiguration: ShapeLayerConfiguration {
142
- var dashPatterns = ContiguousArray<ContiguousArray<Keyframe<Vector1D>>>()
143
- var dashPhase = ContiguousArray<Keyframe<Vector1D>>()
142
+ var dashPatterns = ContiguousArray<ContiguousArray<Keyframe<LottieVector1D>>>()
143
+ var dashPhase = ContiguousArray<Keyframe<LottieVector1D>>()
144
144
  for dash in self {
145
145
  if dash.type == .offset {
146
146
  dashPhase = dash.value.keyframes
@@ -150,14 +150,14 @@ extension Array where Element == DashElement {
150
150
  }
151
151
 
152
152
  dashPatterns = ContiguousArray(dashPatterns.map { pattern in
153
- ContiguousArray(pattern.map { keyframe -> Keyframe<Vector1D> in
153
+ ContiguousArray(pattern.map { keyframe -> Keyframe<LottieVector1D> in
154
154
  // The recommended way to create a stroke of round dots, in theory,
155
155
  // is to use a value of 0 followed by the stroke width, but for
156
156
  // some reason Core Animation incorrectly (?) renders these as pills
157
157
  // instead of circles. As a workaround, for parity with Lottie on other
158
158
  // platforms, we can change `0`s to `0.01`: https://stackoverflow.com/a/38036486
159
159
  if keyframe.value.cgFloatValue == 0 {
160
- return keyframe.withValue(Vector1D(0.01))
160
+ return keyframe.withValue(LottieVector1D(0.01))
161
161
  } else {
162
162
  return keyframe
163
163
  }