Remove unused nodes from the scene graph; make the spheres gray
This commit is contained in:
parent
ef199a0805
commit
38d39bd05a
2 changed files with 1 additions and 0 deletions
|
@ -63,6 +63,7 @@ class GameViewController: NSViewController, SCNSceneRendererDelegate {
|
||||||
for j in 0..<GameViewController.numberOfBallsPerSide {
|
for j in 0..<GameViewController.numberOfBallsPerSide {
|
||||||
let ijSphere = sphere.clone()
|
let ijSphere = sphere.clone()
|
||||||
balls.append(ijSphere)
|
balls.append(ijSphere)
|
||||||
|
ijSphere.name = "sphere\(i),\(j)"
|
||||||
ijSphere.worldPosition = SCNVector3(x: CGFloat(-GameViewController.numberOfBallsPerSide / 2) + CGFloat(i),
|
ijSphere.worldPosition = SCNVector3(x: CGFloat(-GameViewController.numberOfBallsPerSide / 2) + CGFloat(i),
|
||||||
y: 0.0,
|
y: 0.0,
|
||||||
z: CGFloat(-GameViewController.numberOfBallsPerSide / 2) + CGFloat(j))
|
z: CGFloat(-GameViewController.numberOfBallsPerSide / 2) + CGFloat(j))
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue