Skip to content

Instantly share code, notes, and snippets.

View heliang219's full-sized avatar

heliang heliang219

View GitHub Profile
/// Creates A Video Player As An SCNGeometries Diffuse Contents
static func setupVideoOnNode(_ node: SCNNode, fromURL url: URL) {
//1. Create An SKVideoNode
var videoPlayerNode: SKVideoNode!
//2. Create An AVPlayer With Our Video URL
let videoPlayer = AVPlayer(url: url)
//3. Initialize The Video Node With Our Video Player