How to programmatically wrap png texture around cube in SceneKit
问题 I'm new to SceneKit... trying to get some basic stuff working without much success so far. For some reason when I try to apply a png texture to a CNBox I end up with nothing but blackness. Here is the simple code snippet I have in viewDidLoad: let sceneView = (view as SCNView) let scene = SCNScene() let boxGeometry = SCNBox(width: 10.0, height: 10.0, length: 10.0, chamferRadius: 1.0) let mat = SCNMaterial() mat.locksAmbientWithDiffuse = true mat.diffuse.contents = ["sofb.png","sofb.png","sofb