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
@@ -13,65 +13,70 @@ final class Repeater: ShapeItem {
13
13
 
14
14
  required init(from decoder: Decoder) throws {
15
15
  let container = try decoder.container(keyedBy: Repeater.CodingKeys.self)
16
- copies = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .copies) ?? KeyframeGroup(Vector1D(0))
17
- offset = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .offset) ?? KeyframeGroup(Vector1D(0))
16
+ copies = try container
17
+ .decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .copies) ?? KeyframeGroup(LottieVector1D(0))
18
+ offset = try container
19
+ .decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .offset) ?? KeyframeGroup(LottieVector1D(0))
18
20
  let transformContainer = try container.nestedContainer(keyedBy: TransformKeys.self, forKey: .transform)
19
21
  startOpacity = try transformContainer
20
- .decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .startOpacity) ?? KeyframeGroup(Vector1D(100))
22
+ .decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .startOpacity) ?? KeyframeGroup(LottieVector1D(100))
21
23
  endOpacity = try transformContainer
22
- .decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .endOpacity) ?? KeyframeGroup(Vector1D(100))
24
+ .decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .endOpacity) ?? KeyframeGroup(LottieVector1D(100))
23
25
  rotation = try transformContainer
24
- .decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .rotation) ?? KeyframeGroup(Vector1D(0))
26
+ .decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .rotation) ?? KeyframeGroup(LottieVector1D(0))
25
27
  position = try transformContainer
26
- .decodeIfPresent(KeyframeGroup<Vector3D>.self, forKey: .position) ?? KeyframeGroup(Vector3D(x: Double(0), y: 0, z: 0))
28
+ .decodeIfPresent(KeyframeGroup<LottieVector3D>.self, forKey: .position) ??
29
+ KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0))
27
30
  anchorPoint = try transformContainer
28
- .decodeIfPresent(KeyframeGroup<Vector3D>.self, forKey: .anchorPoint) ?? KeyframeGroup(Vector3D(x: Double(0), y: 0, z: 0))
31
+ .decodeIfPresent(KeyframeGroup<LottieVector3D>.self, forKey: .anchorPoint) ??
32
+ KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0))
29
33
  scale = try transformContainer
30
- .decodeIfPresent(KeyframeGroup<Vector3D>.self, forKey: .scale) ?? KeyframeGroup(Vector3D(x: Double(100), y: 100, z: 100))
34
+ .decodeIfPresent(KeyframeGroup<LottieVector3D>.self, forKey: .scale) ??
35
+ KeyframeGroup(LottieVector3D(x: Double(100), y: 100, z: 100))
31
36
  try super.init(from: decoder)
32
37
  }
33
38
 
34
39
  required init(dictionary: [String: Any]) throws {
35
40
  if let copiesDictionary = dictionary[CodingKeys.copies.rawValue] as? [String: Any] {
36
- copies = try KeyframeGroup<Vector1D>(dictionary: copiesDictionary)
41
+ copies = try KeyframeGroup<LottieVector1D>(dictionary: copiesDictionary)
37
42
  } else {
38
- copies = KeyframeGroup(Vector1D(0))
43
+ copies = KeyframeGroup(LottieVector1D(0))
39
44
  }
40
45
  if let offsetDictionary = dictionary[CodingKeys.offset.rawValue] as? [String: Any] {
41
- offset = try KeyframeGroup<Vector1D>(dictionary: offsetDictionary)
46
+ offset = try KeyframeGroup<LottieVector1D>(dictionary: offsetDictionary)
42
47
  } else {
43
- offset = KeyframeGroup(Vector1D(0))
48
+ offset = KeyframeGroup(LottieVector1D(0))
44
49
  }
45
50
  let transformDictionary: [String: Any] = try dictionary.value(for: CodingKeys.transform)
46
51
  if let startOpacityDictionary = transformDictionary[TransformKeys.startOpacity.rawValue] as? [String: Any] {
47
- startOpacity = try KeyframeGroup<Vector1D>(dictionary: startOpacityDictionary)
52
+ startOpacity = try KeyframeGroup<LottieVector1D>(dictionary: startOpacityDictionary)
48
53
  } else {
49
- startOpacity = KeyframeGroup(Vector1D(100))
54
+ startOpacity = KeyframeGroup(LottieVector1D(100))
50
55
  }
51
56
  if let endOpacityDictionary = transformDictionary[TransformKeys.endOpacity.rawValue] as? [String: Any] {
52
- endOpacity = try KeyframeGroup<Vector1D>(dictionary: endOpacityDictionary)
57
+ endOpacity = try KeyframeGroup<LottieVector1D>(dictionary: endOpacityDictionary)
53
58
  } else {
54
- endOpacity = KeyframeGroup(Vector1D(100))
59
+ endOpacity = KeyframeGroup(LottieVector1D(100))
55
60
  }
56
61
  if let rotationDictionary = transformDictionary[TransformKeys.rotation.rawValue] as? [String: Any] {
57
- rotation = try KeyframeGroup<Vector1D>(dictionary: rotationDictionary)
62
+ rotation = try KeyframeGroup<LottieVector1D>(dictionary: rotationDictionary)
58
63
  } else {
59
- rotation = KeyframeGroup(Vector1D(0))
64
+ rotation = KeyframeGroup(LottieVector1D(0))
60
65
  }
61
66
  if let positionDictionary = transformDictionary[TransformKeys.position.rawValue] as? [String: Any] {
62
- position = try KeyframeGroup<Vector3D>(dictionary: positionDictionary)
67
+ position = try KeyframeGroup<LottieVector3D>(dictionary: positionDictionary)
63
68
  } else {
64
- position = KeyframeGroup(Vector3D(x: Double(0), y: 0, z: 0))
69
+ position = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0))
65
70
  }
66
71
  if let anchorPointDictionary = transformDictionary[TransformKeys.anchorPoint.rawValue] as? [String: Any] {
67
- anchorPoint = try KeyframeGroup<Vector3D>(dictionary: anchorPointDictionary)
72
+ anchorPoint = try KeyframeGroup<LottieVector3D>(dictionary: anchorPointDictionary)
68
73
  } else {
69
- anchorPoint = KeyframeGroup(Vector3D(x: Double(0), y: 0, z: 0))
74
+ anchorPoint = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0))
70
75
  }
71
76
  if let scaleDictionary = transformDictionary[TransformKeys.scale.rawValue] as? [String: Any] {
72
- scale = try KeyframeGroup<Vector3D>(dictionary: scaleDictionary)
77
+ scale = try KeyframeGroup<LottieVector3D>(dictionary: scaleDictionary)
73
78
  } else {
74
- scale = KeyframeGroup(Vector3D(x: Double(100), y: 100, z: 100))
79
+ scale = KeyframeGroup(LottieVector3D(x: Double(100), y: 100, z: 100))
75
80
  }
76
81
  try super.init(dictionary: dictionary)
77
82
  }
@@ -79,28 +84,28 @@ final class Repeater: ShapeItem {
79
84
  // MARK: Internal
80
85
 
81
86
  /// The number of copies to repeat
82
- let copies: KeyframeGroup<Vector1D>
87
+ let copies: KeyframeGroup<LottieVector1D>
83
88
 
84
89
  /// The offset of each copy
85
- let offset: KeyframeGroup<Vector1D>
90
+ let offset: KeyframeGroup<LottieVector1D>
86
91
 
87
92
  /// Start Opacity
88
- let startOpacity: KeyframeGroup<Vector1D>
93
+ let startOpacity: KeyframeGroup<LottieVector1D>
89
94
 
90
95
  /// End opacity
91
- let endOpacity: KeyframeGroup<Vector1D>
96
+ let endOpacity: KeyframeGroup<LottieVector1D>
92
97
 
93
98
  /// The rotation
94
- let rotation: KeyframeGroup<Vector1D>
99
+ let rotation: KeyframeGroup<LottieVector1D>
95
100
 
96
101
  /// Anchor Point
97
- let anchorPoint: KeyframeGroup<Vector3D>
102
+ let anchorPoint: KeyframeGroup<LottieVector3D>
98
103
 
99
104
  /// Position
100
- let position: KeyframeGroup<Vector3D>
105
+ let position: KeyframeGroup<LottieVector3D>
101
106
 
102
107
  /// Scale
103
- let scale: KeyframeGroup<Vector3D>
108
+ let scale: KeyframeGroup<LottieVector3D>
104
109
 
105
110
  override func encode(to encoder: Encoder) throws {
106
111
  try super.encode(to: encoder)
@@ -14,74 +14,80 @@ final class ShapeTransform: ShapeItem {
14
14
  required init(from decoder: Decoder) throws {
15
15
  let container = try decoder.container(keyedBy: ShapeTransform.CodingKeys.self)
16
16
  anchor = try container
17
- .decodeIfPresent(KeyframeGroup<Vector3D>.self, forKey: .anchor) ?? KeyframeGroup(Vector3D(x: Double(0), y: 0, z: 0))
17
+ .decodeIfPresent(KeyframeGroup<LottieVector3D>.self, forKey: .anchor) ??
18
+ KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0))
18
19
  position = try container
19
- .decodeIfPresent(KeyframeGroup<Vector3D>.self, forKey: .position) ?? KeyframeGroup(Vector3D(x: Double(0), y: 0, z: 0))
20
+ .decodeIfPresent(KeyframeGroup<LottieVector3D>.self, forKey: .position) ??
21
+ KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0))
20
22
  scale = try container
21
- .decodeIfPresent(KeyframeGroup<Vector3D>.self, forKey: .scale) ?? KeyframeGroup(Vector3D(x: Double(100), y: 100, z: 100))
22
- rotation = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .rotation) ?? KeyframeGroup(Vector1D(0))
23
- opacity = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .opacity) ?? KeyframeGroup(Vector1D(100))
24
- skew = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .skew) ?? KeyframeGroup(Vector1D(0))
25
- skewAxis = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .skewAxis) ?? KeyframeGroup(Vector1D(0))
23
+ .decodeIfPresent(KeyframeGroup<LottieVector3D>.self, forKey: .scale) ??
24
+ KeyframeGroup(LottieVector3D(x: Double(100), y: 100, z: 100))
25
+ rotation = try container
26
+ .decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .rotation) ?? KeyframeGroup(LottieVector1D(0))
27
+ opacity = try container
28
+ .decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .opacity) ?? KeyframeGroup(LottieVector1D(100))
29
+ skew = try container.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .skew) ?? KeyframeGroup(LottieVector1D(0))
30
+ skewAxis = try container
31
+ .decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .skewAxis) ?? KeyframeGroup(LottieVector1D(0))
26
32
  try super.init(from: decoder)
27
33
  }
28
34
 
29
35
  required init(dictionary: [String: Any]) throws {
30
36
  if
31
37
  let anchorDictionary = dictionary[CodingKeys.anchor.rawValue] as? [String: Any],
32
- let anchor = try? KeyframeGroup<Vector3D>(dictionary: anchorDictionary)
38
+ let anchor = try? KeyframeGroup<LottieVector3D>(dictionary: anchorDictionary)
33
39
  {
34
40
  self.anchor = anchor
35
41
  } else {
36
- anchor = KeyframeGroup(Vector3D(x: Double(0), y: 0, z: 0))
42
+ anchor = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0))
37
43
  }
38
44
  if
39
45
  let positionDictionary = dictionary[CodingKeys.position.rawValue] as? [String: Any],
40
- let position = try? KeyframeGroup<Vector3D>(dictionary: positionDictionary)
46
+ let position = try? KeyframeGroup<LottieVector3D>(dictionary: positionDictionary)
41
47
  {
42
48
  self.position = position
43
49
  } else {
44
- position = KeyframeGroup(Vector3D(x: Double(0), y: 0, z: 0))
50
+ position = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0))
45
51
  }
46
52
  if
47
53
  let scaleDictionary = dictionary[CodingKeys.scale.rawValue] as? [String: Any],
48
- let scale = try? KeyframeGroup<Vector3D>(dictionary: scaleDictionary)
54
+ let scale = try? KeyframeGroup<LottieVector3D>(dictionary: scaleDictionary)
49
55
  {
50
56
  self.scale = scale
51
57
  } else {
52
- scale = KeyframeGroup(Vector3D(x: Double(100), y: 100, z: 100))
58
+ scale = KeyframeGroup(LottieVector3D(x: Double(100), y: 100, z: 100))
53
59
  }
54
60
  if
55
61
  let rotationDictionary = dictionary[CodingKeys.rotation.rawValue] as? [String: Any],
56
- let rotation = try? KeyframeGroup<Vector1D>(dictionary: rotationDictionary)
62
+ let rotation = try? KeyframeGroup<LottieVector1D>(dictionary: rotationDictionary)
57
63
  {
58
64
  self.rotation = rotation
59
65
  } else {
60
- rotation = KeyframeGroup(Vector1D(0))
66
+ rotation = KeyframeGroup(LottieVector1D(0))
61
67
  }
62
68
  if
63
69
  let opacityDictionary = dictionary[CodingKeys.opacity.rawValue] as? [String: Any],
64
- let opacity = try? KeyframeGroup<Vector1D>(dictionary: opacityDictionary)
70
+ let opacity = try? KeyframeGroup<LottieVector1D>(dictionary: opacityDictionary)
65
71
  {
66
72
  self.opacity = opacity
67
73
  } else {
68
- opacity = KeyframeGroup(Vector1D(100))
74
+ opacity = KeyframeGroup(LottieVector1D(100))
69
75
  }
70
76
  if
71
77
  let skewDictionary = dictionary[CodingKeys.skew.rawValue] as? [String: Any],
72
- let skew = try? KeyframeGroup<Vector1D>(dictionary: skewDictionary)
78
+ let skew = try? KeyframeGroup<LottieVector1D>(dictionary: skewDictionary)
73
79
  {
74
80
  self.skew = skew
75
81
  } else {
76
- skew = KeyframeGroup(Vector1D(0))
82
+ skew = KeyframeGroup(LottieVector1D(0))
77
83
  }
78
84
  if
79
85
  let skewAxisDictionary = dictionary[CodingKeys.skewAxis.rawValue] as? [String: Any],
80
- let skewAxis = try? KeyframeGroup<Vector1D>(dictionary: skewAxisDictionary)
86
+ let skewAxis = try? KeyframeGroup<LottieVector1D>(dictionary: skewAxisDictionary)
81
87
  {
82
88
  self.skewAxis = skewAxis
83
89
  } else {
84
- skewAxis = KeyframeGroup(Vector1D(0))
90
+ skewAxis = KeyframeGroup(LottieVector1D(0))
85
91
  }
86
92
  try super.init(dictionary: dictionary)
87
93
  }
@@ -89,25 +95,25 @@ final class ShapeTransform: ShapeItem {
89
95
  // MARK: Internal
90
96
 
91
97
  /// Anchor Point
92
- let anchor: KeyframeGroup<Vector3D>
98
+ let anchor: KeyframeGroup<LottieVector3D>
93
99
 
94
100
  /// Position
95
- let position: KeyframeGroup<Vector3D>
101
+ let position: KeyframeGroup<LottieVector3D>
96
102
 
97
103
  /// Scale
98
- let scale: KeyframeGroup<Vector3D>
104
+ let scale: KeyframeGroup<LottieVector3D>
99
105
 
100
106
  /// Rotation
101
- let rotation: KeyframeGroup<Vector1D>
107
+ let rotation: KeyframeGroup<LottieVector1D>
102
108
 
103
109
  /// opacity
104
- let opacity: KeyframeGroup<Vector1D>
110
+ let opacity: KeyframeGroup<LottieVector1D>
105
111
 
106
112
  /// Skew
107
- let skew: KeyframeGroup<Vector1D>
113
+ let skew: KeyframeGroup<LottieVector1D>
108
114
 
109
115
  /// Skew Axis
110
- let skewAxis: KeyframeGroup<Vector1D>
116
+ let skewAxis: KeyframeGroup<LottieVector1D>
111
117
 
112
118
  override func encode(to encoder: Encoder) throws {
113
119
  try super.encode(to: encoder)
@@ -24,13 +24,13 @@ final class Star: ShapeItem {
24
24
  required init(from decoder: Decoder) throws {
25
25
  let container = try decoder.container(keyedBy: Star.CodingKeys.self)
26
26
  direction = try container.decodeIfPresent(PathDirection.self, forKey: .direction) ?? .clockwise
27
- position = try container.decode(KeyframeGroup<Vector3D>.self, forKey: .position)
28
- outerRadius = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .outerRadius)
29
- outerRoundness = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .outerRoundness)
30
- innerRadius = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .innerRadius)
31
- innerRoundness = try container.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .innerRoundness)
32
- rotation = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .rotation)
33
- points = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .points)
27
+ position = try container.decode(KeyframeGroup<LottieVector3D>.self, forKey: .position)
28
+ outerRadius = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .outerRadius)
29
+ outerRoundness = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .outerRoundness)
30
+ innerRadius = try container.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .innerRadius)
31
+ innerRoundness = try container.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .innerRoundness)
32
+ rotation = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .rotation)
33
+ points = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .points)
34
34
  starType = try container.decode(StarType.self, forKey: .starType)
35
35
  try super.init(from: decoder)
36
36
  }
@@ -45,25 +45,25 @@ final class Star: ShapeItem {
45
45
  direction = .clockwise
46
46
  }
47
47
  let positionDictionary: [String: Any] = try dictionary.value(for: CodingKeys.position)
48
- position = try KeyframeGroup<Vector3D>(dictionary: positionDictionary)
48
+ position = try KeyframeGroup<LottieVector3D>(dictionary: positionDictionary)
49
49
  let outerRadiusDictionary: [String: Any] = try dictionary.value(for: CodingKeys.outerRadius)
50
- outerRadius = try KeyframeGroup<Vector1D>(dictionary: outerRadiusDictionary)
50
+ outerRadius = try KeyframeGroup<LottieVector1D>(dictionary: outerRadiusDictionary)
51
51
  let outerRoundnessDictionary: [String: Any] = try dictionary.value(for: CodingKeys.outerRoundness)
52
- outerRoundness = try KeyframeGroup<Vector1D>(dictionary: outerRoundnessDictionary)
52
+ outerRoundness = try KeyframeGroup<LottieVector1D>(dictionary: outerRoundnessDictionary)
53
53
  if let innerRadiusDictionary = dictionary[CodingKeys.innerRadius.rawValue] as? [String: Any] {
54
- innerRadius = try KeyframeGroup<Vector1D>(dictionary: innerRadiusDictionary)
54
+ innerRadius = try KeyframeGroup<LottieVector1D>(dictionary: innerRadiusDictionary)
55
55
  } else {
56
56
  innerRadius = nil
57
57
  }
58
58
  if let innerRoundnessDictionary = dictionary[CodingKeys.innerRoundness.rawValue] as? [String: Any] {
59
- innerRoundness = try KeyframeGroup<Vector1D>(dictionary: innerRoundnessDictionary)
59
+ innerRoundness = try KeyframeGroup<LottieVector1D>(dictionary: innerRoundnessDictionary)
60
60
  } else {
61
61
  innerRoundness = nil
62
62
  }
63
63
  let rotationDictionary: [String: Any] = try dictionary.value(for: CodingKeys.rotation)
64
- rotation = try KeyframeGroup<Vector1D>(dictionary: rotationDictionary)
64
+ rotation = try KeyframeGroup<LottieVector1D>(dictionary: rotationDictionary)
65
65
  let pointsDictionary: [String: Any] = try dictionary.value(for: CodingKeys.points)
66
- points = try KeyframeGroup<Vector1D>(dictionary: pointsDictionary)
66
+ points = try KeyframeGroup<LottieVector1D>(dictionary: pointsDictionary)
67
67
  let starTypeRawValue: Int = try dictionary.value(for: CodingKeys.starType)
68
68
  guard let starType = StarType(rawValue: starTypeRawValue) else {
69
69
  throw InitializableError.invalidInput
@@ -78,25 +78,25 @@ final class Star: ShapeItem {
78
78
  let direction: PathDirection
79
79
 
80
80
  /// The position of the star
81
- let position: KeyframeGroup<Vector3D>
81
+ let position: KeyframeGroup<LottieVector3D>
82
82
 
83
83
  /// The outer radius of the star
84
- let outerRadius: KeyframeGroup<Vector1D>
84
+ let outerRadius: KeyframeGroup<LottieVector1D>
85
85
 
86
86
  /// The outer roundness of the star
87
- let outerRoundness: KeyframeGroup<Vector1D>
87
+ let outerRoundness: KeyframeGroup<LottieVector1D>
88
88
 
89
89
  /// The outer radius of the star
90
- let innerRadius: KeyframeGroup<Vector1D>?
90
+ let innerRadius: KeyframeGroup<LottieVector1D>?
91
91
 
92
92
  /// The outer roundness of the star
93
- let innerRoundness: KeyframeGroup<Vector1D>?
93
+ let innerRoundness: KeyframeGroup<LottieVector1D>?
94
94
 
95
95
  /// The rotation of the star
96
- let rotation: KeyframeGroup<Vector1D>
96
+ let rotation: KeyframeGroup<LottieVector1D>
97
97
 
98
98
  /// The number of points on the star
99
- let points: KeyframeGroup<Vector1D>
99
+ let points: KeyframeGroup<LottieVector1D>
100
100
 
101
101
  /// The type of star
102
102
  let starType: StarType
@@ -13,9 +13,9 @@ final class Stroke: ShapeItem {
13
13
 
14
14
  required init(from decoder: Decoder) throws {
15
15
  let container = try decoder.container(keyedBy: Stroke.CodingKeys.self)
16
- opacity = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .opacity)
17
- color = try container.decode(KeyframeGroup<Color>.self, forKey: .color)
18
- width = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .width)
16
+ opacity = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .opacity)
17
+ color = try container.decode(KeyframeGroup<LottieColor>.self, forKey: .color)
18
+ width = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .width)
19
19
  lineCap = try container.decodeIfPresent(LineCap.self, forKey: .lineCap) ?? .round
20
20
  lineJoin = try container.decodeIfPresent(LineJoin.self, forKey: .lineJoin) ?? .round
21
21
  miterLimit = try container.decodeIfPresent(Double.self, forKey: .miterLimit) ?? 4
@@ -25,11 +25,11 @@ final class Stroke: ShapeItem {
25
25
 
26
26
  required init(dictionary: [String: Any]) throws {
27
27
  let opacityDictionary: [String: Any] = try dictionary.value(for: CodingKeys.opacity)
28
- opacity = try KeyframeGroup<Vector1D>(dictionary: opacityDictionary)
28
+ opacity = try KeyframeGroup<LottieVector1D>(dictionary: opacityDictionary)
29
29
  let colorDictionary: [String: Any] = try dictionary.value(for: CodingKeys.color)
30
- color = try KeyframeGroup<Color>(dictionary: colorDictionary)
30
+ color = try KeyframeGroup<LottieColor>(dictionary: colorDictionary)
31
31
  let widthDictionary: [String: Any] = try dictionary.value(for: CodingKeys.width)
32
- width = try KeyframeGroup<Vector1D>(dictionary: widthDictionary)
32
+ width = try KeyframeGroup<LottieVector1D>(dictionary: widthDictionary)
33
33
  if
34
34
  let lineCapRawValue = dictionary[CodingKeys.lineCap.rawValue] as? Int,
35
35
  let lineCap = LineCap(rawValue: lineCapRawValue)
@@ -55,13 +55,13 @@ final class Stroke: ShapeItem {
55
55
  // MARK: Internal
56
56
 
57
57
  /// The opacity of the stroke
58
- let opacity: KeyframeGroup<Vector1D>
58
+ let opacity: KeyframeGroup<LottieVector1D>
59
59
 
60
60
  /// The Color of the stroke
61
- let color: KeyframeGroup<Color>
61
+ let color: KeyframeGroup<LottieColor>
62
62
 
63
63
  /// The width of the stroke
64
- let width: KeyframeGroup<Vector1D>
64
+ let width: KeyframeGroup<LottieVector1D>
65
65
 
66
66
  /// Line Cap
67
67
  let lineCap: LineCap
@@ -22,20 +22,20 @@ final class Trim: ShapeItem {
22
22
 
23
23
  required init(from decoder: Decoder) throws {
24
24
  let container = try decoder.container(keyedBy: Trim.CodingKeys.self)
25
- start = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .start)
26
- end = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .end)
27
- offset = try container.decode(KeyframeGroup<Vector1D>.self, forKey: .offset)
25
+ start = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .start)
26
+ end = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .end)
27
+ offset = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .offset)
28
28
  trimType = try container.decode(TrimType.self, forKey: .trimType)
29
29
  try super.init(from: decoder)
30
30
  }
31
31
 
32
32
  required init(dictionary: [String: Any]) throws {
33
33
  let startDictionary: [String: Any] = try dictionary.value(for: CodingKeys.start)
34
- start = try KeyframeGroup<Vector1D>(dictionary: startDictionary)
34
+ start = try KeyframeGroup<LottieVector1D>(dictionary: startDictionary)
35
35
  let endDictionary: [String: Any] = try dictionary.value(for: CodingKeys.end)
36
- end = try KeyframeGroup<Vector1D>(dictionary: endDictionary)
36
+ end = try KeyframeGroup<LottieVector1D>(dictionary: endDictionary)
37
37
  let offsetDictionary: [String: Any] = try dictionary.value(for: CodingKeys.offset)
38
- offset = try KeyframeGroup<Vector1D>(dictionary: offsetDictionary)
38
+ offset = try KeyframeGroup<LottieVector1D>(dictionary: offsetDictionary)
39
39
  let trimTypeRawValue: Int = try dictionary.value(for: CodingKeys.trimType)
40
40
  guard let trimType = TrimType(rawValue: trimTypeRawValue) else {
41
41
  throw InitializableError.invalidInput
@@ -47,13 +47,13 @@ final class Trim: ShapeItem {
47
47
  // MARK: Internal
48
48
 
49
49
  /// The start of the trim
50
- let start: KeyframeGroup<Vector1D>
50
+ let start: KeyframeGroup<LottieVector1D>
51
51
 
52
52
  /// The end of the trim
53
- let end: KeyframeGroup<Vector1D>
53
+ let end: KeyframeGroup<LottieVector1D>
54
54
 
55
55
  /// The offset of the trim
56
- let offset: KeyframeGroup<Vector1D>
56
+ let offset: KeyframeGroup<LottieVector1D>
57
57
 
58
58
  let trimType: TrimType
59
59
 
@@ -15,74 +15,74 @@ final class TextAnimator: Codable, DictionaryInitializable {
15
15
  let container = try decoder.container(keyedBy: TextAnimator.CodingKeys.self)
16
16
  name = try container.decodeIfPresent(String.self, forKey: .name) ?? ""
17
17
  let animatorContainer = try container.nestedContainer(keyedBy: TextAnimatorKeys.self, forKey: .textAnimator)
18
- fillColor = try animatorContainer.decodeIfPresent(KeyframeGroup<Color>.self, forKey: .fillColor)
19
- strokeColor = try animatorContainer.decodeIfPresent(KeyframeGroup<Color>.self, forKey: .strokeColor)
20
- strokeWidth = try animatorContainer.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .strokeWidth)
21
- tracking = try animatorContainer.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .tracking)
22
- anchor = try animatorContainer.decodeIfPresent(KeyframeGroup<Vector3D>.self, forKey: .anchor)
23
- position = try animatorContainer.decodeIfPresent(KeyframeGroup<Vector3D>.self, forKey: .position)
24
- scale = try animatorContainer.decodeIfPresent(KeyframeGroup<Vector3D>.self, forKey: .scale)
25
- skew = try animatorContainer.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .skew)
26
- skewAxis = try animatorContainer.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .skewAxis)
27
- rotation = try animatorContainer.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .rotation)
28
- opacity = try animatorContainer.decodeIfPresent(KeyframeGroup<Vector1D>.self, forKey: .opacity)
18
+ fillColor = try animatorContainer.decodeIfPresent(KeyframeGroup<LottieColor>.self, forKey: .fillColor)
19
+ strokeColor = try animatorContainer.decodeIfPresent(KeyframeGroup<LottieColor>.self, forKey: .strokeColor)
20
+ strokeWidth = try animatorContainer.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .strokeWidth)
21
+ tracking = try animatorContainer.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .tracking)
22
+ anchor = try animatorContainer.decodeIfPresent(KeyframeGroup<LottieVector3D>.self, forKey: .anchor)
23
+ position = try animatorContainer.decodeIfPresent(KeyframeGroup<LottieVector3D>.self, forKey: .position)
24
+ scale = try animatorContainer.decodeIfPresent(KeyframeGroup<LottieVector3D>.self, forKey: .scale)
25
+ skew = try animatorContainer.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .skew)
26
+ skewAxis = try animatorContainer.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .skewAxis)
27
+ rotation = try animatorContainer.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .rotation)
28
+ opacity = try animatorContainer.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .opacity)
29
29
  }
30
30
 
31
31
  init(dictionary: [String: Any]) throws {
32
32
  name = (try? dictionary.value(for: CodingKeys.name)) ?? ""
33
33
  let animatorDictionary: [String: Any] = try dictionary.value(for: CodingKeys.textAnimator)
34
34
  if let fillColorDictionary = animatorDictionary[TextAnimatorKeys.fillColor.rawValue] as? [String: Any] {
35
- fillColor = try? KeyframeGroup<Color>(dictionary: fillColorDictionary)
35
+ fillColor = try? KeyframeGroup<LottieColor>(dictionary: fillColorDictionary)
36
36
  } else {
37
37
  fillColor = nil
38
38
  }
39
39
  if let strokeColorDictionary = animatorDictionary[TextAnimatorKeys.strokeColor.rawValue] as? [String: Any] {
40
- strokeColor = try? KeyframeGroup<Color>(dictionary: strokeColorDictionary)
40
+ strokeColor = try? KeyframeGroup<LottieColor>(dictionary: strokeColorDictionary)
41
41
  } else {
42
42
  strokeColor = nil
43
43
  }
44
44
  if let strokeWidthDictionary = animatorDictionary[TextAnimatorKeys.strokeWidth.rawValue] as? [String: Any] {
45
- strokeWidth = try? KeyframeGroup<Vector1D>(dictionary: strokeWidthDictionary)
45
+ strokeWidth = try? KeyframeGroup<LottieVector1D>(dictionary: strokeWidthDictionary)
46
46
  } else {
47
47
  strokeWidth = nil
48
48
  }
49
49
  if let trackingDictionary = animatorDictionary[TextAnimatorKeys.tracking.rawValue] as? [String: Any] {
50
- tracking = try? KeyframeGroup<Vector1D>(dictionary: trackingDictionary)
50
+ tracking = try? KeyframeGroup<LottieVector1D>(dictionary: trackingDictionary)
51
51
  } else {
52
52
  tracking = nil
53
53
  }
54
54
  if let anchorDictionary = animatorDictionary[TextAnimatorKeys.anchor.rawValue] as? [String: Any] {
55
- anchor = try? KeyframeGroup<Vector3D>(dictionary: anchorDictionary)
55
+ anchor = try? KeyframeGroup<LottieVector3D>(dictionary: anchorDictionary)
56
56
  } else {
57
57
  anchor = nil
58
58
  }
59
59
  if let positionDictionary = animatorDictionary[TextAnimatorKeys.position.rawValue] as? [String: Any] {
60
- position = try? KeyframeGroup<Vector3D>(dictionary: positionDictionary)
60
+ position = try? KeyframeGroup<LottieVector3D>(dictionary: positionDictionary)
61
61
  } else {
62
62
  position = nil
63
63
  }
64
64
  if let scaleDictionary = animatorDictionary[TextAnimatorKeys.scale.rawValue] as? [String: Any] {
65
- scale = try? KeyframeGroup<Vector3D>(dictionary: scaleDictionary)
65
+ scale = try? KeyframeGroup<LottieVector3D>(dictionary: scaleDictionary)
66
66
  } else {
67
67
  scale = nil
68
68
  }
69
69
  if let skewDictionary = animatorDictionary[TextAnimatorKeys.skew.rawValue] as? [String: Any] {
70
- skew = try? KeyframeGroup<Vector1D>(dictionary: skewDictionary)
70
+ skew = try? KeyframeGroup<LottieVector1D>(dictionary: skewDictionary)
71
71
  } else {
72
72
  skew = nil
73
73
  }
74
74
  if let skewAxisDictionary = animatorDictionary[TextAnimatorKeys.skewAxis.rawValue] as? [String: Any] {
75
- skewAxis = try? KeyframeGroup<Vector1D>(dictionary: skewAxisDictionary)
75
+ skewAxis = try? KeyframeGroup<LottieVector1D>(dictionary: skewAxisDictionary)
76
76
  } else {
77
77
  skewAxis = nil
78
78
  }
79
79
  if let rotationDictionary = animatorDictionary[TextAnimatorKeys.rotation.rawValue] as? [String: Any] {
80
- rotation = try? KeyframeGroup<Vector1D>(dictionary: rotationDictionary)
80
+ rotation = try? KeyframeGroup<LottieVector1D>(dictionary: rotationDictionary)
81
81
  } else {
82
82
  rotation = nil
83
83
  }
84
84
  if let opacityDictionary = animatorDictionary[TextAnimatorKeys.opacity.rawValue] as? [String: Any] {
85
- opacity = try KeyframeGroup<Vector1D>(dictionary: opacityDictionary)
85
+ opacity = try KeyframeGroup<LottieVector1D>(dictionary: opacityDictionary)
86
86
  } else {
87
87
  opacity = nil
88
88
  }
@@ -93,37 +93,37 @@ final class TextAnimator: Codable, DictionaryInitializable {
93
93
  let name: String
94
94
 
95
95
  /// Anchor
96
- let anchor: KeyframeGroup<Vector3D>?
96
+ let anchor: KeyframeGroup<LottieVector3D>?
97
97
 
98
98
  /// Position
99
- let position: KeyframeGroup<Vector3D>?
99
+ let position: KeyframeGroup<LottieVector3D>?
100
100
 
101
101
  /// Scale
102
- let scale: KeyframeGroup<Vector3D>?
102
+ let scale: KeyframeGroup<LottieVector3D>?
103
103
 
104
104
  /// Skew
105
- let skew: KeyframeGroup<Vector1D>?
105
+ let skew: KeyframeGroup<LottieVector1D>?
106
106
 
107
107
  /// Skew Axis
108
- let skewAxis: KeyframeGroup<Vector1D>?
108
+ let skewAxis: KeyframeGroup<LottieVector1D>?
109
109
 
110
110
  /// Rotation
111
- let rotation: KeyframeGroup<Vector1D>?
111
+ let rotation: KeyframeGroup<LottieVector1D>?
112
112
 
113
113
  /// Opacity
114
- let opacity: KeyframeGroup<Vector1D>?
114
+ let opacity: KeyframeGroup<LottieVector1D>?
115
115
 
116
116
  /// Stroke Color
117
- let strokeColor: KeyframeGroup<Color>?
117
+ let strokeColor: KeyframeGroup<LottieColor>?
118
118
 
119
119
  /// Fill Color
120
- let fillColor: KeyframeGroup<Color>?
120
+ let fillColor: KeyframeGroup<LottieColor>?
121
121
 
122
122
  /// Stroke Width
123
- let strokeWidth: KeyframeGroup<Vector1D>?
123
+ let strokeWidth: KeyframeGroup<LottieVector1D>?
124
124
 
125
125
  /// Tracking
126
- let tracking: KeyframeGroup<Vector1D>?
126
+ let tracking: KeyframeGroup<LottieVector1D>?
127
127
 
128
128
  func encode(to encoder: Encoder) throws {
129
129
  var container = encoder.container(keyedBy: CodingKeys.self)
@@ -34,24 +34,24 @@ final class TextDocument: Codable, DictionaryInitializable, AnyInitializable {
34
34
  lineHeight = try dictionary.value(for: CodingKeys.lineHeight)
35
35
  baseline = try dictionary.value(for: CodingKeys.baseline)
36
36
  if let fillColorRawValue = dictionary[CodingKeys.fillColorData.rawValue] {
37
- fillColorData = try? Color(value: fillColorRawValue)
37
+ fillColorData = try? LottieColor(value: fillColorRawValue)
38
38
  } else {
39
39
  fillColorData = nil
40
40
  }
41
41
  if let strokeColorRawValue = dictionary[CodingKeys.strokeColorData.rawValue] {
42
- strokeColorData = try? Color(value: strokeColorRawValue)
42
+ strokeColorData = try? LottieColor(value: strokeColorRawValue)
43
43
  } else {
44
44
  strokeColorData = nil
45
45
  }
46
46
  strokeWidth = try? dictionary.value(for: CodingKeys.strokeWidth)
47
47
  strokeOverFill = try? dictionary.value(for: CodingKeys.strokeOverFill)
48
48
  if let textFramePositionRawValue = dictionary[CodingKeys.textFramePosition.rawValue] {
49
- textFramePosition = try? Vector3D(value: textFramePositionRawValue)
49
+ textFramePosition = try? LottieVector3D(value: textFramePositionRawValue)
50
50
  } else {
51
51
  textFramePosition = nil
52
52
  }
53
53
  if let textFrameSizeRawValue = dictionary[CodingKeys.textFrameSize.rawValue] {
54
- textFrameSize = try? Vector3D(value: textFrameSizeRawValue)
54
+ textFrameSize = try? LottieVector3D(value: textFrameSizeRawValue)
55
55
  } else {
56
56
  textFrameSize = nil
57
57
  }
@@ -88,10 +88,10 @@ final class TextDocument: Codable, DictionaryInitializable, AnyInitializable {
88
88
  let baseline: Double?
89
89
 
90
90
  /// Fill Color data
91
- let fillColorData: Color?
91
+ let fillColorData: LottieColor?
92
92
 
93
93
  /// Scroke Color data
94
- let strokeColorData: Color?
94
+ let strokeColorData: LottieColor?
95
95
 
96
96
  /// Stroke Width
97
97
  let strokeWidth: Double?
@@ -99,9 +99,9 @@ final class TextDocument: Codable, DictionaryInitializable, AnyInitializable {
99
99
  /// Stroke Over Fill
100
100
  let strokeOverFill: Bool?
101
101
 
102
- let textFramePosition: Vector3D?
102
+ let textFramePosition: LottieVector3D?
103
103
 
104
- let textFrameSize: Vector3D?
104
+ let textFrameSize: LottieVector3D?
105
105
 
106
106
  // MARK: Private
107
107