File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -965,6 +965,7 @@ extension Database {
965
965
966
966
public var scale : Float
967
967
public var camera : Camera ?
968
+ public var element : Element ?
968
969
969
970
/// Initializer.
970
971
public required init ( ) {
@@ -1008,6 +1009,9 @@ extension Database {
1008
1009
if let idx = data [ " Camera " ] as? Int64 , idx != . empty {
1009
1010
camera = cache. findOrCreate ( idx)
1010
1011
}
1012
+ if let idx = data [ " Element " ] as? Int64 , idx != . empty {
1013
+ element = cache. findOrCreate ( idx)
1014
+ }
1011
1015
}
1012
1016
}
1013
1017
Original file line number Diff line number Diff line change @@ -62,4 +62,13 @@ extension Array where Element == SIMD3<Float> {
62
62
}
63
63
}
64
64
65
+ extension Array where Element == SIMD4 < Float > {
65
66
67
+ /// Invalidates all elements of the array by assigning the values as `.invalid`.
68
+ public mutating func invalidate( ) {
69
+ guard self . isNotEmpty else { return }
70
+ for i in 0 ..< self . count {
71
+ self [ i] = . invalid
72
+ }
73
+ }
74
+ }
You can’t perform that action at this time.
0 commit comments