Home

Awesome

DDDKit

Swift Version Version License Platform

An open source library to support 360 videos and pictures. It's designed as a generic 3D library that you can use for much more!

Example of use cases

Installation

See the wiki! or:

pod 'DDDKit'

Quickstart

import DDDKit
import AVFoundation

class ViewController: DDD360VideoViewController {

  override func viewDidLoad() {
    super.viewDidLoad()
    show(from: myVideoURL)
  }
}

Example

Image filter (easy to be creative!)

// B&W filter:
@IBAction func didPressBW(_ sender: Any) {
  let program = try! DDDShaderProgram(fragment: defaultShader, shaderModifiers: [
    .fragment: "gl_FragColor = vec4(vec3(gl_FragColor.x + gl_FragColor.y + gl_FragColor.z) / 3.0, 1.0);",
  ])
  videoNode.material.shaderProgram = program
}

360 cubic projection

node.geometry = DDDGeometry.Cube()
let videoTexture = DDDVideoTexture(player: player) // AVPlayer with 360 cubic video
node.material.set(
  property: videoTexture,
  for: "SamplerY",
  and: "SamplerUV"
)

Screenshots from the demo app:

output output

Documentation

See the wiki!

Features

Why not SceneKit?

Author

Guillaume Sabran, sabranguillaume@gmail.com, CTO @Pie

License

DDDKit is available under the MIT license. See the LICENSE file for more info.