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
@@ -105,17 +105,17 @@ final class TextAnimatorNodeProperties: NodePropertyMap, KeypathSearchable {
105
105
 
106
106
  let keypathName: String
107
107
 
108
- let anchor: NodeProperty<Vector3D>?
109
- let position: NodeProperty<Vector3D>?
110
- let scale: NodeProperty<Vector3D>?
111
- let skew: NodeProperty<Vector1D>?
112
- let skewAxis: NodeProperty<Vector1D>?
113
- let rotation: NodeProperty<Vector1D>?
114
- let opacity: NodeProperty<Vector1D>?
115
- let strokeColor: NodeProperty<Color>?
116
- let fillColor: NodeProperty<Color>?
117
- let strokeWidth: NodeProperty<Vector1D>?
118
- let tracking: NodeProperty<Vector1D>?
108
+ let anchor: NodeProperty<LottieVector3D>?
109
+ let position: NodeProperty<LottieVector3D>?
110
+ let scale: NodeProperty<LottieVector3D>?
111
+ let skew: NodeProperty<LottieVector1D>?
112
+ let skewAxis: NodeProperty<LottieVector1D>?
113
+ let rotation: NodeProperty<LottieVector1D>?
114
+ let opacity: NodeProperty<LottieVector1D>?
115
+ let strokeColor: NodeProperty<LottieColor>?
116
+ let fillColor: NodeProperty<LottieColor>?
117
+ let strokeWidth: NodeProperty<LottieVector1D>?
118
+ let tracking: NodeProperty<LottieVector1D>?
119
119
 
120
120
  let keypathProperties: [String: AnyNodeProperty]
121
121
  let properties: [AnyNodeProperty]
@@ -24,10 +24,10 @@ final class KeyframeData<T> {
24
24
  endValue: T?,
25
25
  time: AnimationFrameTime?,
26
26
  hold: Int?,
27
- inTangent: Vector2D?,
28
- outTangent: Vector2D?,
29
- spatialInTangent: Vector3D?,
30
- spatialOutTangent: Vector3D?)
27
+ inTangent: LottieVector2D?,
28
+ outTangent: LottieVector2D?,
29
+ spatialInTangent: LottieVector3D?,
30
+ spatialOutTangent: LottieVector3D?)
31
31
  {
32
32
  self.startValue = startValue
33
33
  self.endValue = endValue
@@ -62,14 +62,14 @@ final class KeyframeData<T> {
62
62
  let hold: Int?
63
63
 
64
64
  /// The in tangent for the time interpolation curve.
65
- let inTangent: Vector2D?
65
+ let inTangent: LottieVector2D?
66
66
  /// The out tangent for the time interpolation curve.
67
- let outTangent: Vector2D?
67
+ let outTangent: LottieVector2D?
68
68
 
69
69
  /// The spacial in tangent of the vector.
70
- let spatialInTangent: Vector3D?
70
+ let spatialInTangent: LottieVector3D?
71
71
  /// The spacial out tangent of the vector.
72
- let spatialOutTangent: Vector3D?
72
+ let spatialOutTangent: LottieVector3D?
73
73
 
74
74
  var isHold: Bool {
75
75
  if let hold = hold {
@@ -95,10 +95,10 @@ extension KeyframeData: DictionaryInitializable where T: AnyInitializable {
95
95
  let endValue = try? dictionary[CodingKeys.endValue.rawValue].flatMap(T.init)
96
96
  let time: AnimationFrameTime? = try? dictionary.value(for: CodingKeys.time)
97
97
  let hold: Int? = try? dictionary.value(for: CodingKeys.hold)
98
- let inTangent: Vector2D? = try? dictionary.value(for: CodingKeys.inTangent)
99
- let outTangent: Vector2D? = try? dictionary.value(for: CodingKeys.outTangent)
100
- let spatialInTangent: Vector3D? = try? dictionary.value(for: CodingKeys.spatialInTangent)
101
- let spatialOutTangent: Vector3D? = try? dictionary.value(for: CodingKeys.spatialOutTangent)
98
+ let inTangent: LottieVector2D? = try? dictionary.value(for: CodingKeys.inTangent)
99
+ let outTangent: LottieVector2D? = try? dictionary.value(for: CodingKeys.outTangent)
100
+ let spatialInTangent: LottieVector3D? = try? dictionary.value(for: CodingKeys.spatialInTangent)
101
+ let spatialOutTangent: LottieVector3D? = try? dictionary.value(for: CodingKeys.spatialOutTangent)
102
102
 
103
103
  self.init(
104
104
  startValue: startValue,
@@ -15,7 +15,7 @@ final class PreCompLayerModel: LayerModel {
15
15
  required init(from decoder: Decoder) throws {
16
16
  let container = try decoder.container(keyedBy: PreCompLayerModel.CodingKeys.self)
17
17
  referenceID = try container.decode(String.self, forKey: .referenceID)
18
- timeRemapping = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .timeRemapping)
18
+ timeRemapping = try container.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .timeRemapping)
19
19
  width = try container.decode(Double.self, forKey: .width)
20
20
  height = try container.decode(Double.self, forKey: .height)
21
21
  try super.init(from: decoder)
@@ -24,7 +24,7 @@ final class PreCompLayerModel: LayerModel {
24
24
  required init(dictionary: [String: Any]) throws {
25
25
  referenceID = try dictionary.value(for: CodingKeys.referenceID)
26
26
  if let timeRemappingDictionary = dictionary[CodingKeys.timeRemapping.rawValue] as? [String: Any] {
27
- timeRemapping = try KeyframeGroup<Vector1D>(dictionary: timeRemappingDictionary)
27
+ timeRemapping = try KeyframeGroup<LottieVector1D>(dictionary: timeRemappingDictionary)
28
28
  } else {
29
29
  timeRemapping = nil
30
30
  }
@@ -39,7 +39,7 @@ final class PreCompLayerModel: LayerModel {
39
39
  let referenceID: String
40
40
 
41
41
  /// A value that remaps time over time.
42
- let timeRemapping: KeyframeGroup<Vector1D>?
42
+ let timeRemapping: KeyframeGroup<LottieVector1D>?
43
43
 
44
44
  /// Precomp Width
45
45
  let width: Double
@@ -28,7 +28,7 @@ final class DashElement: Codable, DictionaryInitializable {
28
28
  }
29
29
  self.type = type
30
30
  let valueDictionary: [String: Any] = try dictionary.value(for: CodingKeys.value)
31
- value = try KeyframeGroup<Vector1D>(dictionary: valueDictionary)
31
+ value = try KeyframeGroup<LottieVector1D>(dictionary: valueDictionary)
32
32
  }
33
33
 
34
34
  // MARK: Internal
@@ -39,6 +39,6 @@ final class DashElement: Codable, DictionaryInitializable {
39
39
  }
40
40
 
41
41
  let type: DashElementType
42
- let value: KeyframeGroup<Vector1D>
42
+ let value: KeyframeGroup<LottieVector1D>
43
43
 
44
44
  }
@@ -28,10 +28,12 @@ final class Mask: Codable, DictionaryInitializable {
28
28
  required init(from decoder: Decoder) throws {
29
29
  let container = try decoder.container(keyedBy: Mask.CodingKeys.self)
30
30
  mode = try container.decodeIfPresent(MaskMode.self, forKey: .mode) ?? .add
31
- opacity = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .opacity) ?? KeyframeGroup(Vector1D(100))
31
+ opacity = try container
32
+ .decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .opacity) ?? KeyframeGroup(LottieVector1D(100))
32
33
  shape = try container.decode(KeyframeGroup<BezierPath>.self, forKey: .shape)
33
34
  inverted = try container.decodeIfPresent(Bool.self, forKey: .inverted) ?? false
34
- expansion = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .expansion) ?? KeyframeGroup(Vector1D(0))
35
+ expansion = try container
36
+ .decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .expansion) ?? KeyframeGroup(LottieVector1D(0))
35
37
  }
36
38
 
37
39
  init(dictionary: [String: Any]) throws {
@@ -44,17 +46,17 @@ final class Mask: Codable, DictionaryInitializable {
44
46
  mode = .add
45
47
  }
46
48
  if let opacityDictionary = dictionary[CodingKeys.opacity.rawValue] as? [String: Any] {
47
- opacity = try KeyframeGroup<Vector1D>(dictionary: opacityDictionary)
49
+ opacity = try KeyframeGroup<LottieVector1D>(dictionary: opacityDictionary)
48
50
  } else {
49
- opacity = KeyframeGroup(Vector1D(100))
51
+ opacity = KeyframeGroup(LottieVector1D(100))
50
52
  }
51
53
  let shapeDictionary: [String: Any] = try dictionary.value(for: CodingKeys.shape)
52
54
  shape = try KeyframeGroup<BezierPath>(dictionary: shapeDictionary)
53
55
  inverted = (try? dictionary.value(for: CodingKeys.inverted)) ?? false
54
56
  if let expansionDictionary = dictionary[CodingKeys.expansion.rawValue] as? [String: Any] {
55
- expansion = try KeyframeGroup<Vector1D>(dictionary: expansionDictionary)
57
+ expansion = try KeyframeGroup<LottieVector1D>(dictionary: expansionDictionary)
56
58
  } else {
57
- expansion = KeyframeGroup(Vector1D(0))
59
+ expansion = KeyframeGroup(LottieVector1D(0))
58
60
  }
59
61
  }
60
62
 
@@ -70,11 +72,11 @@ final class Mask: Codable, DictionaryInitializable {
70
72
 
71
73
  let mode: MaskMode
72
74
 
73
- let opacity: KeyframeGroup<Vector1D>
75
+ let opacity: KeyframeGroup<LottieVector1D>
74
76
 
75
77
  let shape: KeyframeGroup<BezierPath>
76
78
 
77
79
  let inverted: Bool
78
80
 
79
- let expansion: KeyframeGroup<Vector1D>
81
+ let expansion: KeyframeGroup<LottieVector1D>
80
82
  }
@@ -19,23 +19,24 @@ final class Transform: Codable, DictionaryInitializable {
19
19
 
20
20
  // AnchorPoint
21
21
  anchorPoint = try container
22
- .decodeIfPresent(KeyframeGroup<Vector3D>.self, forKey: .anchorPoint) ?? KeyframeGroup(Vector3D(x: Double(0), y: 0, z: 0))
22
+ .decodeIfPresent(KeyframeGroup<LottieVector3D>.self, forKey: .anchorPoint) ??
23
+ KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0))
23
24
 
24
25
  // Position
25
26
  if container.contains(.positionX), container.contains(.positionY) {
26
27
  // Position dimensions are split into two keyframe groups
27
- positionX = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .positionX)
28
- positionY = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .positionY)
28
+ positionX = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .positionX)
29
+ positionY = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .positionY)
29
30
  position = nil
30
- } else if let positionKeyframes = try? container.decode(KeyframeGroup<Vector3D>.self, forKey: .position) {
31
+ } else if let positionKeyframes = try? container.decode(KeyframeGroup<LottieVector3D>.self, forKey: .position) {
31
32
  // Position dimensions are a single keyframe group.
32
33
  position = positionKeyframes
33
34
  positionX = nil
34
35
  positionY = nil
35
36
  } else if
36
37
  let positionContainer = try? container.nestedContainer(keyedBy: PositionCodingKeys.self, forKey: .position),
37
- let positionX = try? positionContainer.decode(KeyframeGroup<Vector1D>.self, forKey: .positionX),
38
- let positionY = try? positionContainer.decode(KeyframeGroup<Vector1D>.self, forKey: .positionY)
38
+ let positionX = try? positionContainer.decode(KeyframeGroup<LottieVector1D>.self, forKey: .positionX),
39
+ let positionY = try? positionContainer.decode(KeyframeGroup<LottieVector1D>.self, forKey: .positionY)
39
40
  {
40
41
  /// Position keyframes are split and nested.
41
42
  self.positionX = positionX
@@ -43,49 +44,52 @@ final class Transform: Codable, DictionaryInitializable {
43
44
  position = nil
44
45
  } else {
45
46
  /// Default value.
46
- position = KeyframeGroup(Vector3D(x: Double(0), y: 0, z: 0))
47
+ position = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0))
47
48
  positionX = nil
48
49
  positionY = nil
49
50
  }
50
51
 
51
52
  // Scale
52
53
  scale = try container
53
- .decodeIfPresent(KeyframeGroup<Vector3D>.self, forKey: .scale) ?? KeyframeGroup(Vector3D(x: Double(100), y: 100, z: 100))
54
+ .decodeIfPresent(KeyframeGroup<LottieVector3D>.self, forKey: .scale) ??
55
+ KeyframeGroup(LottieVector3D(x: Double(100), y: 100, z: 100))
54
56
 
55
57
  // Rotation
56
- if let rotationZ = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .rotationZ) {
58
+ if let rotationZ = try container.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .rotationZ) {
57
59
  rotation = rotationZ
58
60
  } else {
59
- rotation = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .rotation) ?? KeyframeGroup(Vector1D(0))
61
+ rotation = try container
62
+ .decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .rotation) ?? KeyframeGroup(LottieVector1D(0))
60
63
  }
61
64
  rotationZ = nil
62
65
 
63
66
  // Opacity
64
- opacity = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .opacity) ?? KeyframeGroup(Vector1D(100))
67
+ opacity = try container
68
+ .decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .opacity) ?? KeyframeGroup(LottieVector1D(100))
65
69
  }
66
70
 
67
71
  init(dictionary: [String: Any]) throws {
68
72
  if
69
73
  let anchorPointDictionary = dictionary[CodingKeys.anchorPoint.rawValue] as? [String: Any],
70
- let anchorPoint = try? KeyframeGroup<Vector3D>(dictionary: anchorPointDictionary)
74
+ let anchorPoint = try? KeyframeGroup<LottieVector3D>(dictionary: anchorPointDictionary)
71
75
  {
72
76
  self.anchorPoint = anchorPoint
73
77
  } else {
74
- anchorPoint = KeyframeGroup(Vector3D(x: Double(0), y: 0, z: 0))
78
+ anchorPoint = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0))
75
79
  }
76
80
 
77
81
  if
78
82
  let xDictionary = dictionary[CodingKeys.positionX.rawValue] as? [String: Any],
79
83
  let yDictionary = dictionary[CodingKeys.positionY.rawValue] as? [String: Any]
80
84
  {
81
- positionX = try KeyframeGroup<Vector1D>(dictionary: xDictionary)
82
- positionY = try KeyframeGroup<Vector1D>(dictionary: yDictionary)
85
+ positionX = try KeyframeGroup<LottieVector1D>(dictionary: xDictionary)
86
+ positionY = try KeyframeGroup<LottieVector1D>(dictionary: yDictionary)
83
87
  position = nil
84
88
  } else if
85
89
  let positionDictionary = dictionary[CodingKeys.position.rawValue] as? [String: Any],
86
- positionDictionary[KeyframeGroup<Vector3D>.KeyframeWrapperKey.keyframeData.rawValue] != nil
90
+ positionDictionary[KeyframeGroup<LottieVector3D>.KeyframeWrapperKey.keyframeData.rawValue] != nil
87
91
  {
88
- position = try KeyframeGroup<Vector3D>(dictionary: positionDictionary)
92
+ position = try KeyframeGroup<LottieVector3D>(dictionary: positionDictionary)
89
93
  positionX = nil
90
94
  positionY = nil
91
95
  } else if
@@ -93,44 +97,44 @@ final class Transform: Codable, DictionaryInitializable {
93
97
  let xDictionary = positionDictionary[PositionCodingKeys.positionX.rawValue] as? [String: Any],
94
98
  let yDictionary = positionDictionary[PositionCodingKeys.positionY.rawValue] as? [String: Any]
95
99
  {
96
- positionX = try KeyframeGroup<Vector1D>(dictionary: xDictionary)
97
- positionY = try KeyframeGroup<Vector1D>(dictionary: yDictionary)
100
+ positionX = try KeyframeGroup<LottieVector1D>(dictionary: xDictionary)
101
+ positionY = try KeyframeGroup<LottieVector1D>(dictionary: yDictionary)
98
102
  position = nil
99
103
  } else {
100
- position = KeyframeGroup(Vector3D(x: Double(0), y: 0, z: 0))
104
+ position = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0))
101
105
  positionX = nil
102
106
  positionY = nil
103
107
  }
104
108
 
105
109
  if
106
110
  let scaleDictionary = dictionary[CodingKeys.scale.rawValue] as? [String: Any],
107
- let scale = try? KeyframeGroup<Vector3D>(dictionary: scaleDictionary)
111
+ let scale = try? KeyframeGroup<LottieVector3D>(dictionary: scaleDictionary)
108
112
  {
109
113
  self.scale = scale
110
114
  } else {
111
- scale = KeyframeGroup(Vector3D(x: Double(100), y: 100, z: 100))
115
+ scale = KeyframeGroup(LottieVector3D(x: Double(100), y: 100, z: 100))
112
116
  }
113
117
  if
114
118
  let rotationDictionary = dictionary[CodingKeys.rotationZ.rawValue] as? [String: Any],
115
- let rotation = try? KeyframeGroup<Vector1D>(dictionary: rotationDictionary)
119
+ let rotation = try? KeyframeGroup<LottieVector1D>(dictionary: rotationDictionary)
116
120
  {
117
121
  self.rotation = rotation
118
122
  } else if
119
123
  let rotationDictionary = dictionary[CodingKeys.rotation.rawValue] as? [String: Any],
120
- let rotation = try? KeyframeGroup<Vector1D>(dictionary: rotationDictionary)
124
+ let rotation = try? KeyframeGroup<LottieVector1D>(dictionary: rotationDictionary)
121
125
  {
122
126
  self.rotation = rotation
123
127
  } else {
124
- rotation = KeyframeGroup(Vector1D(0))
128
+ rotation = KeyframeGroup(LottieVector1D(0))
125
129
  }
126
130
  rotationZ = nil
127
131
  if
128
132
  let opacityDictionary = dictionary[CodingKeys.opacity.rawValue] as? [String: Any],
129
- let opacity = try? KeyframeGroup<Vector1D>(dictionary: opacityDictionary)
133
+ let opacity = try? KeyframeGroup<LottieVector1D>(dictionary: opacityDictionary)
130
134
  {
131
135
  self.opacity = opacity
132
136
  } else {
133
- opacity = KeyframeGroup(Vector1D(100))
137
+ opacity = KeyframeGroup(LottieVector1D(100))
134
138
  }
135
139
  }
136
140
 
@@ -154,26 +158,26 @@ final class Transform: Codable, DictionaryInitializable {
154
158
  }
155
159
 
156
160
  /// The anchor point of the transform.
157
- let anchorPoint: KeyframeGroup<Vector3D>
161
+ let anchorPoint: KeyframeGroup<LottieVector3D>
158
162
 
159
163
  /// The position of the transform. This is nil if the position data was split.
160
- let position: KeyframeGroup<Vector3D>?
164
+ let position: KeyframeGroup<LottieVector3D>?
161
165
 
162
166
  /// The positionX of the transform. This is nil if the position property is set.
163
- let positionX: KeyframeGroup<Vector1D>?
167
+ let positionX: KeyframeGroup<LottieVector1D>?
164
168
 
165
169
  /// The positionY of the transform. This is nil if the position property is set.
166
- let positionY: KeyframeGroup<Vector1D>?
170
+ let positionY: KeyframeGroup<LottieVector1D>?
167
171
 
168
172
  /// The scale of the transform
169
- let scale: KeyframeGroup<Vector3D>
173
+ let scale: KeyframeGroup<LottieVector3D>
170
174
 
171
175
  /// The rotation of the transform. Note: This is single dimensional rotation.
172
- let rotation: KeyframeGroup<Vector1D>
176
+ let rotation: KeyframeGroup<LottieVector1D>
173
177
 
174
178
  /// The opacity of the transform.
175
- let opacity: KeyframeGroup<Vector1D>
179
+ let opacity: KeyframeGroup<LottieVector1D>
176
180
 
177
181
  /// Should always be nil.
178
- let rotationZ: KeyframeGroup<Vector1D>?
182
+ let rotationZ: KeyframeGroup<LottieVector1D>?
179
183
  }
@@ -24,8 +24,8 @@ final class Ellipse: ShapeItem {
24
24
  required init(from decoder: Decoder) throws {
25
25
  let container = try decoder.container(keyedBy: Ellipse.CodingKeys.self)
26
26
  direction = try container.decodeIfPresent(PathDirection.self, forKey: .direction) ?? .clockwise
27
- position = try container.decode(KeyframeGroup<Vector3D>.self, forKey: .position)
28
- size = try container.decode(KeyframeGroup<Vector3D>.self, forKey: .size)
27
+ position = try container.decode(KeyframeGroup<LottieVector3D>.self, forKey: .position)
28
+ size = try container.decode(KeyframeGroup<LottieVector3D>.self, forKey: .size)
29
29
  try super.init(from: decoder)
30
30
  }
31
31
 
@@ -39,9 +39,9 @@ final class Ellipse: ShapeItem {
39
39
  direction = .clockwise
40
40
  }
41
41
  let positionDictionary: [String: Any] = try dictionary.value(for: CodingKeys.position)
42
- position = try KeyframeGroup<Vector3D>(dictionary: positionDictionary)
42
+ position = try KeyframeGroup<LottieVector3D>(dictionary: positionDictionary)
43
43
  let sizeDictionary: [String: Any] = try dictionary.value(for: CodingKeys.size)
44
- size = try KeyframeGroup<Vector3D>(dictionary: sizeDictionary)
44
+ size = try KeyframeGroup<LottieVector3D>(dictionary: sizeDictionary)
45
45
  try super.init(dictionary: dictionary)
46
46
  }
47
47
 
@@ -51,10 +51,10 @@ final class Ellipse: ShapeItem {
51
51
  let direction: PathDirection
52
52
 
53
53
  /// The position of the ellipse
54
- let position: KeyframeGroup<Vector3D>
54
+ let position: KeyframeGroup<LottieVector3D>
55
55
 
56
56
  /// The size of the ellipse
57
- let size: KeyframeGroup<Vector3D>
57
+ let size: KeyframeGroup<LottieVector3D>
58
58
 
59
59
  override func encode(to encoder: Encoder) throws {
60
60
  try super.encode(to: encoder)
@@ -23,17 +23,17 @@ final class Fill: ShapeItem {
23
23
 
24
24
  required init(from decoder: Decoder) throws {
25
25
  let container = try decoder.container(keyedBy: Fill.CodingKeys.self)
26
- opacity = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .opacity)
27
- color = try container.decode(KeyframeGroup<Color>.self, forKey: .color)
26
+ opacity = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .opacity)
27
+ color = try container.decode(KeyframeGroup<LottieColor>.self, forKey: .color)
28
28
  fillRule = try container.decodeIfPresent(FillRule.self, forKey: .fillRule) ?? .nonZeroWinding
29
29
  try super.init(from: decoder)
30
30
  }
31
31
 
32
32
  required init(dictionary: [String: Any]) throws {
33
33
  let opacityDictionary: [String: Any] = try dictionary.value(for: CodingKeys.opacity)
34
- opacity = try KeyframeGroup<Vector1D>(dictionary: opacityDictionary)
34
+ opacity = try KeyframeGroup<LottieVector1D>(dictionary: opacityDictionary)
35
35
  let colorDictionary: [String: Any] = try dictionary.value(for: CodingKeys.color)
36
- color = try KeyframeGroup<Color>(dictionary: colorDictionary)
36
+ color = try KeyframeGroup<LottieColor>(dictionary: colorDictionary)
37
37
  if
38
38
  let fillRuleRawValue = dictionary[CodingKeys.fillRule.rawValue] as? Int,
39
39
  let fillRule = FillRule(rawValue: fillRuleRawValue)
@@ -48,10 +48,10 @@ final class Fill: ShapeItem {
48
48
  // MARK: Internal
49
49
 
50
50
  /// The opacity of the fill
51
- let opacity: KeyframeGroup<Vector1D>
51
+ let opacity: KeyframeGroup<LottieVector1D>
52
52
 
53
53
  /// The color keyframes for the fill
54
- let color: KeyframeGroup<Color>
54
+ let color: KeyframeGroup<LottieColor>
55
55
 
56
56
  /// The fill rule to use when filling a path
57
57
  let fillRule: FillRule
@@ -23,12 +23,12 @@ final class GradientFill: ShapeItem {
23
23
 
24
24
  required init(from decoder: Decoder) throws {
25
25
  let container = try decoder.container(keyedBy: GradientFill.CodingKeys.self)
26
- opacity = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .opacity)
27
- startPoint = try container.decode(KeyframeGroup<Vector3D>.self, forKey: .startPoint)
28
- endPoint = try container.decode(KeyframeGroup<Vector3D>.self, forKey: .endPoint)
26
+ opacity = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .opacity)
27
+ startPoint = try container.decode(KeyframeGroup<LottieVector3D>.self, forKey: .startPoint)
28
+ endPoint = try container.decode(KeyframeGroup<LottieVector3D>.self, forKey: .endPoint)
29
29
  gradientType = try container.decode(GradientType.self, forKey: .gradientType)
30
- highlightLength = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .highlightLength)
31
- highlightAngle = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .highlightAngle)
30
+ highlightLength = try container.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .highlightLength)
31
+ highlightAngle = try container.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .highlightAngle)
32
32
  fillRule = try container.decodeIfPresent(FillRule.self, forKey: .fillRule) ?? .nonZeroWinding
33
33
  let colorsContainer = try container.nestedContainer(keyedBy: GradientDataKeys.self, forKey: .colors)
34
34
  colors = try colorsContainer.decode(KeyframeGroup<[Double]>.self, forKey: .colors)
@@ -38,23 +38,23 @@ final class GradientFill: ShapeItem {
38
38
 
39
39
  required init(dictionary: [String: Any]) throws {
40
40
  let opacityDictionary: [String: Any] = try dictionary.value(for: CodingKeys.opacity)
41
- opacity = try KeyframeGroup<Vector1D>(dictionary: opacityDictionary)
41
+ opacity = try KeyframeGroup<LottieVector1D>(dictionary: opacityDictionary)
42
42
  let startPointDictionary: [String: Any] = try dictionary.value(for: CodingKeys.startPoint)
43
- startPoint = try KeyframeGroup<Vector3D>(dictionary: startPointDictionary)
43
+ startPoint = try KeyframeGroup<LottieVector3D>(dictionary: startPointDictionary)
44
44
  let endPointDictionary: [String: Any] = try dictionary.value(for: CodingKeys.endPoint)
45
- endPoint = try KeyframeGroup<Vector3D>(dictionary: endPointDictionary)
45
+ endPoint = try KeyframeGroup<LottieVector3D>(dictionary: endPointDictionary)
46
46
  let gradientRawType: Int = try dictionary.value(for: CodingKeys.gradientType)
47
47
  guard let gradient = GradientType(rawValue: gradientRawType) else {
48
48
  throw InitializableError.invalidInput
49
49
  }
50
50
  gradientType = gradient
51
51
  if let highlightLengthDictionary = dictionary[CodingKeys.highlightLength.rawValue] as? [String: Any] {
52
- highlightLength = try? KeyframeGroup<Vector1D>(dictionary: highlightLengthDictionary)
52
+ highlightLength = try? KeyframeGroup<LottieVector1D>(dictionary: highlightLengthDictionary)
53
53
  } else {
54
54
  highlightLength = nil
55
55
  }
56
56
  if let highlightAngleDictionary = dictionary[CodingKeys.highlightAngle.rawValue] as? [String: Any] {
57
- highlightAngle = try? KeyframeGroup<Vector1D>(dictionary: highlightAngleDictionary)
57
+ highlightAngle = try? KeyframeGroup<LottieVector1D>(dictionary: highlightAngleDictionary)
58
58
  } else {
59
59
  highlightAngle = nil
60
60
  }
@@ -76,22 +76,22 @@ final class GradientFill: ShapeItem {
76
76
  // MARK: Internal
77
77
 
78
78
  /// The opacity of the fill
79
- let opacity: KeyframeGroup<Vector1D>
79
+ let opacity: KeyframeGroup<LottieVector1D>
80
80
 
81
81
  /// The start of the gradient
82
- let startPoint: KeyframeGroup<Vector3D>
82
+ let startPoint: KeyframeGroup<LottieVector3D>
83
83
 
84
84
  /// The end of the gradient
85
- let endPoint: KeyframeGroup<Vector3D>
85
+ let endPoint: KeyframeGroup<LottieVector3D>
86
86
 
87
87
  /// The type of gradient
88
88
  let gradientType: GradientType
89
89
 
90
90
  /// Gradient Highlight Length. Only if type is Radial
91
- let highlightLength: KeyframeGroup<Vector1D>?
91
+ let highlightLength: KeyframeGroup<LottieVector1D>?
92
92
 
93
93
  /// Highlight Angle. Only if type is Radial
94
- let highlightAngle: KeyframeGroup<Vector1D>?
94
+ let highlightAngle: KeyframeGroup<LottieVector1D>?
95
95
 
96
96
  /// The number of color points in the gradient
97
97
  let numberOfColors: Int
@@ -33,13 +33,13 @@ final class GradientStroke: ShapeItem {
33
33
 
34
34
  required init(from decoder: Decoder) throws {
35
35
  let container = try decoder.container(keyedBy: GradientStroke.CodingKeys.self)
36
- opacity = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .opacity)
37
- startPoint = try container.decode(KeyframeGroup<Vector3D>.self, forKey: .startPoint)
38
- endPoint = try container.decode(KeyframeGroup<Vector3D>.self, forKey: .endPoint)
36
+ opacity = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .opacity)
37
+ startPoint = try container.decode(KeyframeGroup<LottieVector3D>.self, forKey: .startPoint)
38
+ endPoint = try container.decode(KeyframeGroup<LottieVector3D>.self, forKey: .endPoint)
39
39
  gradientType = try container.decode(GradientType.self, forKey: .gradientType)
40
- highlightLength = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .highlightLength)
41
- highlightAngle = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .highlightAngle)
42
- width = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .width)
40
+ highlightLength = try container.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .highlightLength)
41
+ highlightAngle = try container.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .highlightAngle)
42
+ width = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .width)
43
43
  lineCap = try container.decodeIfPresent(LineCap.self, forKey: .lineCap) ?? .round
44
44
  lineJoin = try container.decodeIfPresent(LineJoin.self, forKey: .lineJoin) ?? .round
45
45
  miterLimit = try container.decodeIfPresent(Double.self, forKey: .miterLimit) ?? 4
@@ -53,28 +53,28 @@ final class GradientStroke: ShapeItem {
53
53
 
54
54
  required init(dictionary: [String: Any]) throws {
55
55
  let opacityDictionary: [String: Any] = try dictionary.value(for: CodingKeys.opacity)
56
- opacity = try KeyframeGroup<Vector1D>(dictionary: opacityDictionary)
56
+ opacity = try KeyframeGroup<LottieVector1D>(dictionary: opacityDictionary)
57
57
  let startPointDictionary: [String: Any] = try dictionary.value(for: CodingKeys.startPoint)
58
- startPoint = try KeyframeGroup<Vector3D>(dictionary: startPointDictionary)
58
+ startPoint = try KeyframeGroup<LottieVector3D>(dictionary: startPointDictionary)
59
59
  let endPointDictionary: [String: Any] = try dictionary.value(for: CodingKeys.endPoint)
60
- endPoint = try KeyframeGroup<Vector3D>(dictionary: endPointDictionary)
60
+ endPoint = try KeyframeGroup<LottieVector3D>(dictionary: endPointDictionary)
61
61
  let gradientRawType: Int = try dictionary.value(for: CodingKeys.gradientType)
62
62
  guard let gradient = GradientType(rawValue: gradientRawType) else {
63
63
  throw InitializableError.invalidInput
64
64
  }
65
65
  gradientType = gradient
66
66
  if let highlightLengthDictionary = dictionary[CodingKeys.highlightLength.rawValue] as? [String: Any] {
67
- highlightLength = try? KeyframeGroup<Vector1D>(dictionary: highlightLengthDictionary)
67
+ highlightLength = try? KeyframeGroup<LottieVector1D>(dictionary: highlightLengthDictionary)
68
68
  } else {
69
69
  highlightLength = nil
70
70
  }
71
71
  if let highlightAngleDictionary = dictionary[CodingKeys.highlightAngle.rawValue] as? [String: Any] {
72
- highlightAngle = try? KeyframeGroup<Vector1D>(dictionary: highlightAngleDictionary)
72
+ highlightAngle = try? KeyframeGroup<LottieVector1D>(dictionary: highlightAngleDictionary)
73
73
  } else {
74
74
  highlightAngle = nil
75
75
  }
76
76
  let widthDictionary: [String: Any] = try dictionary.value(for: CodingKeys.width)
77
- width = try KeyframeGroup<Vector1D>(dictionary: widthDictionary)
77
+ width = try KeyframeGroup<LottieVector1D>(dictionary: widthDictionary)
78
78
  if
79
79
  let lineCapRawValue = dictionary[CodingKeys.lineCap.rawValue] as? Int,
80
80
  let lineCap = LineCap(rawValue: lineCapRawValue)
@@ -104,22 +104,22 @@ final class GradientStroke: ShapeItem {
104
104
  // MARK: Internal
105
105
 
106
106
  /// The opacity of the fill
107
- let opacity: KeyframeGroup<Vector1D>
107
+ let opacity: KeyframeGroup<LottieVector1D>
108
108
 
109
109
  /// The start of the gradient
110
- let startPoint: KeyframeGroup<Vector3D>
110
+ let startPoint: KeyframeGroup<LottieVector3D>
111
111
 
112
112
  /// The end of the gradient
113
- let endPoint: KeyframeGroup<Vector3D>
113
+ let endPoint: KeyframeGroup<LottieVector3D>
114
114
 
115
115
  /// The type of gradient
116
116
  let gradientType: GradientType
117
117
 
118
118
  /// Gradient Highlight Length. Only if type is Radial
119
- let highlightLength: KeyframeGroup<Vector1D>?
119
+ let highlightLength: KeyframeGroup<LottieVector1D>?
120
120
 
121
121
  /// Highlight Angle. Only if type is Radial
122
- let highlightAngle: KeyframeGroup<Vector1D>?
122
+ let highlightAngle: KeyframeGroup<LottieVector1D>?
123
123
 
124
124
  /// The number of color points in the gradient
125
125
  let numberOfColors: Int
@@ -128,7 +128,7 @@ final class GradientStroke: ShapeItem {
128
128
  let colors: KeyframeGroup<[Double]>
129
129
 
130
130
  /// The width of the stroke
131
- let width: KeyframeGroup<Vector1D>
131
+ let width: KeyframeGroup<LottieVector1D>
132
132
 
133
133
  /// Line Cap
134
134
  let lineCap: LineCap
@@ -14,9 +14,9 @@ final class Rectangle: ShapeItem {
14
14
  required init(from decoder: Decoder) throws {
15
15
  let container = try decoder.container(keyedBy: Rectangle.CodingKeys.self)
16
16
  direction = try container.decodeIfPresent(PathDirection.self, forKey: .direction) ?? .clockwise
17
- position = try container.decode(KeyframeGroup<Vector3D>.self, forKey: .position)
18
- size = try container.decode(KeyframeGroup<Vector3D>.self, forKey: .size)
19
- cornerRadius = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .cornerRadius)
17
+ position = try container.decode(KeyframeGroup<LottieVector3D>.self, forKey: .position)
18
+ size = try container.decode(KeyframeGroup<LottieVector3D>.self, forKey: .size)
19
+ cornerRadius = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .cornerRadius)
20
20
  try super.init(from: decoder)
21
21
  }
22
22
 
@@ -30,11 +30,11 @@ final class Rectangle: ShapeItem {
30
30
  direction = .clockwise
31
31
  }
32
32
  let positionDictionary: [String: Any] = try dictionary.value(for: CodingKeys.position)
33
- position = try KeyframeGroup<Vector3D>(dictionary: positionDictionary)
33
+ position = try KeyframeGroup<LottieVector3D>(dictionary: positionDictionary)
34
34
  let sizeDictionary: [String: Any] = try dictionary.value(for: CodingKeys.size)
35
- size = try KeyframeGroup<Vector3D>(dictionary: sizeDictionary)
35
+ size = try KeyframeGroup<LottieVector3D>(dictionary: sizeDictionary)
36
36
  let cornerRadiusDictionary: [String: Any] = try dictionary.value(for: CodingKeys.cornerRadius)
37
- cornerRadius = try KeyframeGroup<Vector1D>(dictionary: cornerRadiusDictionary)
37
+ cornerRadius = try KeyframeGroup<LottieVector1D>(dictionary: cornerRadiusDictionary)
38
38
  try super.init(dictionary: dictionary)
39
39
  }
40
40
 
@@ -44,13 +44,13 @@ final class Rectangle: ShapeItem {
44
44
  let direction: PathDirection
45
45
 
46
46
  /// The position
47
- let position: KeyframeGroup<Vector3D>
47
+ let position: KeyframeGroup<LottieVector3D>
48
48
 
49
49
  /// The size
50
- let size: KeyframeGroup<Vector3D>
50
+ let size: KeyframeGroup<LottieVector3D>
51
51
 
52
52
  /// The Corner radius of the rectangle
53
- let cornerRadius: KeyframeGroup<Vector1D>
53
+ let cornerRadius: KeyframeGroup<LottieVector1D>
54
54
 
55
55
  override func encode(to encoder: Encoder) throws {
56
56
  try super.encode(to: encoder)