GLTFSceneKit

0.3.0

glTF loader for SceneKit
magicien/GLTFSceneKit

What's New

0.3.0

2021-07-18T18:49:48Z
  • Add Swift Package Manager support (#48)
    • Change the directory structure
  • Change the version number format from vX.X.X to X.X.X

Carthage compatible

GLTFSceneKit

glTF loader for SceneKit

ScreenShot

Installation

Using CocoaPods

Add the following to your Podfile:

pod 'GLTFSceneKit'

Using Carthage

Add the following to your Cartfile:

github "magicien/GLTFSceneKit" ~> 0.2.0

Using Swift Package Manager

  1. Open your project with Xcode
  2. Select File > Swift Packages > Add Package Dependency...
  3. Put https://github.com/magicien/GLTFSceneKit in the search box and click Next

Usage

Swift

import GLTFSceneKit

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

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

See also

GLTFQuickLook - QuickLook plugin for glTF files

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Apr 22 2024 16:47:34 GMT-0900 (Hawaii-Aleutian Daylight Time)