From 0cb31bee8b525a5a1d818f953b90fd6ef22def24 Mon Sep 17 00:00:00 2001 From: Chetan Rogbeer Date: Mon, 18 Oct 2021 14:04:05 +0800 Subject: [PATCH] Add point cloud support to GLTFSceneKit --- Sources/GLTFSceneKit/GLTFUnarchiver.swift | 57 ++++++++++++----------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/Sources/GLTFSceneKit/GLTFUnarchiver.swift b/Sources/GLTFSceneKit/GLTFUnarchiver.swift index 1019af32..5bf7befb 100644 --- a/Sources/GLTFSceneKit/GLTFUnarchiver.swift +++ b/Sources/GLTFSceneKit/GLTFUnarchiver.swift @@ -583,33 +583,38 @@ public class GLTFUnarchiver { var counts = [Int](repeating: 0, count: vertexArray.count) for element in elements { - if element.primitiveType != .triangles { - throw GLTFUnarchiveError.NotSupported("createNormalSource: only triangles primitveType is supported: \(element.primitiveType)") - } - - let indexArray = createIndexArray(from: element) - - var indexPos = 0 - for _ in 0..