Remove unused nodes from the scene graph; make the spheres gray

This commit is contained in:
Eryn Wells 2018-09-18 07:06:17 -07:00
parent ef199a0805
commit 38d39bd05a
2 changed files with 1 additions and 0 deletions

View file

@ -63,6 +63,7 @@ class GameViewController: NSViewController, SCNSceneRendererDelegate {
for j in 0..<GameViewController.numberOfBallsPerSide {
let ijSphere = sphere.clone()
balls.append(ijSphere)
ijSphere.name = "sphere\(i),\(j)"
ijSphere.worldPosition = SCNVector3(x: CGFloat(-GameViewController.numberOfBallsPerSide / 2) + CGFloat(i),
y: 0.0,
z: CGFloat(-GameViewController.numberOfBallsPerSide / 2) + CGFloat(j))