Created
June 13, 2017 02:17
-
-
Save azamsharp/02e130f6e810a6bfbe5ac2f47ba8146c to your computer and use it in GitHub Desktop.
ARKit and SCNText
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let text = SCNText(string: item.label, extrusionDepth: 5.0) | |
text.firstMaterial?.diffuse.contents = UIColor.orange | |
text.firstMaterial?.specular.contents = UIColor.orange | |
text.font = UIFont(name: "Optima", size: 44) | |
text.containerFrame = CGRect(x: 0, y: 0, width: 100, height: 44) | |
let textNode = SCNNode(geometry: text) | |
textNode.position = SCNVector3(-0.2 + x, -0.9 + delta, -1) | |
x += 0.12 | |
// self.node.addChildNode(boxNode) | |
self.node.addChildNode(textNode) // this never displays the text node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment