Go to file
Volodymyr Boichentsov 3a043b41c6
Update Package.swift
2019-12-27 23:14:25 +00:00
.github/workflows Create swift.yml 2019-12-27 22:52:57 +00:00
Sources/glTFSceneKit add "available(OSX 10.12, iOS 10.0, *)" 2019-12-27 10:46:38 +00:00
Tests extended simple test 2019-12-27 22:14:11 +00:00
glTFSceneKit.xcodeproj remove draco include 2019-12-27 10:26:28 +00:00
.gitignore remove draco include 2019-12-27 10:26:28 +00:00
.gitmodules exclude draco from linkage 2019-12-03 23:31:19 +00:00
LICENSE Create LICENSE 2017-11-12 19:54:50 +00:00
Package.swift Update Package.swift 2019-12-27 23:14:25 +00:00
README.md remove draco include 2019-12-27 10:26:28 +00:00
glTFSceneKit-Bridging-Header.h make draco included in glTFSceneKit 2018-05-17 14:42:27 +01:00

README.md

GLTF extension for SceneKit

General

  • Compilable for macOS and iOS
  • Objective-C support
  • swift package
  • GLTF swift extension with wrapper for JSONDecoder
  • Tests
  • Convert SceneKit to GLTF

Encodings

  • JSON
  • Binary (.glb)

Primitive Types

  • Points
  • Lines
  • Line Loop
  • Line Strip
  • Triangles
  • Triangle Strip
  • Triangle Fan

Animation

  • Transform animations
  • Linear interpolation
  • Morph animation
  • Skin and joint animation

Extensions

  • KHR_draco_mesh_compression - Draco (supported draft version, need rework. temporary disabled)
  • 3D4M_compressed_texture - Draft of unofficial extension.

Example:

import glTFSceneKit

let directory = "..." // path to folder where is gltf file located
let decoder = JSONDecoder()
let glTF = try? decoder.decode(GLTF.self, from: jsonData)
if let converter = GLTFConverter(glTF: glTF) {
    let scene = converter.convert(to: view.scene!, geometryCompletionHandler: { 
    // Geometries are loaded and textures are may still in loading process.
    }) { (error) in
       // Fully converted to SceneKit
       // TODO: handle error.
    }
}