 			camera.exposureOffset = -1
 			camera.minimumExposure = -1
 		}
-    }
-    
-    func spawnShape() {
-        // 1
-        var geometry:SCNGeometry
-        // 2
-        switch ShapeType.random() {
-        case .Box:
-            geometry = SCNBox(width: 1.0, height: 1.0, length: 1.0, chamferRadius: 0.0)
-        case .Sphere:
-            geometry = SCNSphere(radius: 0.5)
-        case .Pyramid:
-            geometry = SCNPyramid(width: 1.0, height: 1.0, length: 1.0)
-        case .Torus:
-            geometry = SCNTorus(ringRadius: 0.5, pipeRadius: 0.25)
-        case .Capsule:
-            geometry = SCNCapsule(capRadius: 0.3, height: 2.5)
-        case .Cylinder:
-            geometry = SCNCylinder(radius: 0.3, height: 2.5)
-        case .Cone:
-            geometry = SCNCone(topRadius: 0.25, bottomRadius: 0.5, height: 1.0)
-        case .Tube:
-            geometry = SCNTube(innerRadius: 0.25, outerRadius: 0.5, height: 1.0)
-        }
-        geometry.materials.first?.diffuse.contents = UIColor.random()
-        
-        // 4
-        let geometryNode = SCNNode(geometry: geometry)
-        geometryNode.physicsBody = SCNPhysicsBody(type: .dynamic, shape: nil)
-        
-        // 1
-        let randomX = Double.random(min: -2, max: 2)
-        let randomY = Double.random(min: 10, max: 18)
-        // 2
-        let force = SCNVector3(x: Float(randomX), y: Float(randomY) , z: 0)
-        // 3
-        let position = SCNVector3(x: 0.05, y: 0.05, z: 0.05)
-        // 4
-        geometryNode.physicsBody?.applyForce(force, at: position, asImpulse: true)
-        
-        // 5
-        sceneView.scene.rootNode.addChildNode(geometryNode)
-        // sceneView.rootNode.addChildNode(geometryNode)
     }
 	
 	func enableEnvironmentMapWithIntensity(_ intensity: CGFloat) {

		sceneView.contentScaleFactor = 1.3
		//sceneView.showsStatistics = true
        
        spawnShape()
        
		enableEnvironmentMapWithIntensity(25.0)
		
		DispatchQueue.main.async {

		object.position = cameraWorldPos + cameraToPosition
		
		if object.parent == nil {
            object.physicsBody = SCNPhysicsBody(type: .static, shape: SCNPhysicsShape(node: object, options: nil))
            object.physicsBody?.categoryBitMask = PhysicsBodyType.barrier.rawValue
			sceneView.scene.rootNode.addChildNode(object)
		}
    }
