Skip to content

Instantly share code, notes, and snippets.

@literalpie
Last active May 19, 2019 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save literalpie/865d54c2a52a3e8673a8893084b78032 to your computer and use it in GitHub Desktop.
Save literalpie/865d54c2a52a3e8673a8893084b78032 to your computer and use it in GitHub Desktop.
for use in part 1 of a literalpie medium post
// Create the box:
let cube = SCNBox(width: 10, height: 10, length: 10, chamferRadius: 1.0)
let cubeNode = SCNNode(geometry: cube)
scene.rootNode.addChildNode(cubeNode)
// Create the gesture recognizer:
let panRecognizer = UIPanGestureRecognizer(target: self, action: #selector(handlePan(panGesture:)))
view.addGestureRecognizer(panRecognizer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment