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 {
965965
966966 public var scale : Float
967967 public var camera : Camera ?
968+ public var element : Element ?
968969
969970 /// Initializer.
970971 public required init ( ) {
@@ -1008,6 +1009,9 @@ extension Database {
10081009 if let idx = data [ " Camera " ] as? Int64 , idx != . empty {
10091010 camera = cache. findOrCreate ( idx)
10101011 }
1012+ if let idx = data [ " Element " ] as? Int64 , idx != . empty {
1013+ element = cache. findOrCreate ( idx)
1014+ }
10111015 }
10121016 }
10131017
Original file line number Diff line number Diff line change @@ -62,4 +62,13 @@ extension Array where Element == SIMD3<Float> {
6262 }
6363}
6464
65+ extension Array where Element == SIMD4 < Float > {
6566
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