SvrfGLTFSceneKit 1.5.1

SvrfGLTFSceneKit 1.5.1

SVRF 维护。



  • 作者
  • SVRF

SvrfGLTFSceneKit

magicien/GLTFSceneKit 分支的 glTF loader 在 SceneKit,继续开发这个优秀的库。

ScreenShot

安装

使用 CocoaPods

将以下内容添加到您的Podfile

pod 'SvrfGLTFSceneKit'

手动

发布版本 中下载 SvrfGLTFSceneKit_vX.X.X.zip

使用方法

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