Skip to content

Commit 49c15eb

Browse files
committed
Merge branch 'master' of github:magicien/GLTFSceneKit
- pull request #5
2 parents 3c80fb7 + cc312a6 commit 49c15eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/Common/GLTFUnarchiver.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,8 +1060,8 @@ public class GLTFUnarchiver {
10601060

10611061
private func loadAttributes(_ attributes: [String: GLTFGlTFid]) throws -> [SCNGeometrySource] {
10621062
var sources = [SCNGeometrySource]()
1063-
1064-
for (attribute, accessorIndex) in attributes {
1063+
// Sort attributes to keep correct semantic order
1064+
for (attribute, accessorIndex) in attributes.sorted(by: { $0.0 < $1.0 }) {
10651065
if let semantic = attributeMap[attribute] {
10661066
let accessor = try self.loadVertexAccessor(index: accessorIndex, semantic: semantic)
10671067
sources.append(accessor)

0 commit comments

Comments
 (0)