glTF loader for SceneKit
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
GLTFSceneKit.xcodeproj
Sample
Source
tool
LICENSE
README.md
SvrfGLTFSceneKit.podspec
convert.sh
screenshot.png

README.md

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;
}