ARKit的使用
//创建场景
let scene = SCNScene()
/*
//1.几何
let box = SCNBox.init(width: 0.1, height: 0.1, length: 0.1, chamferRadius: 0 )
//2.渲染
let materil = SCNMaterial.init()
materil.diffuse.contents = UIColor.red
box.materials = [materil]
//3.节点
let node = SCNNode.init(geometry: box)
node.position = SCNVector3.init(0, 0, -0.5)
scene.rootNode.addChildNode(node)
*/
//几何 渲染
let text = SCNText.init(string: "hello ARKit", extrusionDepth: 0)
text.font = UIFont.init(name: "Future", size: 0.15)
text.firstMaterial?.diffuse.contents = UIColor.orange
text.firstMaterial?.specular.contents = UIColor.white
//几点
let textNode = SCNNode.init(geometry: text)
textNode.position = SCNVector3.init(0, 0, -0.5 )
// textNode.scale =
scene.rootNode.addChildNode(textNode)
//把场景显示出来
sceneView.scene = scene;