CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

SvrfGLTFSceneKit 1.5.1

SvrfGLTFSceneKit 1.5.1

Maintained by SVRF.



  • By
  • SVRF

SvrfGLTFSceneKit

glTF loader for SceneKit forked from magicien/GLTFSceneKit to continue developing this great library.

ScreenShot

Installation

Using CocoaPods

Add the following to your Podfile:

pod 'SvrfGLTFSceneKit'

Manually

Download SvrfGLTFSceneKit_vX.X.X.zip from Releases.

Usage

Swift

import SvrfGLTFSceneKit

var scene: SCNScene
do {
  let sceneSource = try GLTFSceneSource(named: "art.scnassets/Box/glTF/Box.gltf")
  scene = try sceneSource.scene()
} catch {
  print("\(error.localizedDescription)")
  return
}

Objective-C

@import SvrfGLTFSceneKit;

GLTFSceneSource *source = [[GLTFSceneSource alloc] initWithURL:url options:nil];
NSError *error;
SCNScene *scene = [source sceneWithOptions:nil error:&error];
if (error != nil) {
  NSLog(@"%@", error);
  return;
}