What is the best way to load a 3d model from a URL inside of iOS at runtime. I have tried this .scn
and .gtlf
models importer.
I am using this framework https://github.com/prolificinteractive/SamMitiAR-iOS I load the model like this:
let virtualObjectGLTFNode = SamMitiVirtualObject(gltfUrl: URL(string:
"https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-
Models/master/2.0/Duck/glTF-Embedded/Duck.gltf")!, allowedAlignments:
[.horizontal])
virtualObjectGLTFNode.name = "Duck"
virtualObjectGLTFNode.setAnimationForVirtualObjectRemoving { (node, completed) in
SceneKitAnimator.animateWithDuration(duration: 0.35 / 2,
timingFunction: .easeIn,
animations: {
let transform = SCNMatrix4MakeScale(0.01, 0.01, 0.01)
node.contentNode?.transform = transform
}, completion: completed)
}
return virtualObjectGLTFNode
like above i am loading different url from remote server please guide me How can i load 3d models from remote server.In which format i want take url.Please send any link have that scn files from remote server Thanks adavance.