Merge commit '7621e2f8dec938cf48181c8b10afc9b01f444e68' into beta

This commit is contained in:
Ilya Laktyushin
2025-12-06 02:17:48 +04:00
commit 8344b97e03
28070 changed files with 7995182 additions and 0 deletions
@@ -0,0 +1,44 @@
//
// DashPattern.swift
// lottie-swift
//
// Created by Brandon Withrow on 1/22/19.
//
import Foundation
// MARK: - DashElementType
enum DashElementType: String, Codable {
case offset = "o"
case dash = "d"
case gap = "g"
}
// MARK: - DashElement
final class DashElement: Codable, DictionaryInitializable {
// MARK: Lifecycle
init(dictionary: [String: Any]) throws {
let typeRawValue: String = try dictionary.value(for: CodingKeys.type)
guard let type = DashElementType(rawValue: typeRawValue) else {
throw InitializableError.invalidInput
}
self.type = type
let valueDictionary: [String: Any] = try dictionary.value(for: CodingKeys.value)
value = try KeyframeGroup<Vector1D>(dictionary: valueDictionary)
}
// MARK: Internal
enum CodingKeys: String, CodingKey {
case type = "n"
case value = "v"
}
let type: DashElementType
let value: KeyframeGroup<Vector1D>
}