What Did That Set-Up Code Do? (part 2)
.... Continued from part 1 06 var geometry = new THREE.CubeGeometry(1,1,1); 06 To see anything in our newly created scene, we have to create some game objects. Again, we use the 'var' keyword and pick a name for our object, in this case it is called 'geometry'. We then fill it with '= new' and a call to THREE.CubeGeometry(1,1,1). Have you noticed a pattern yet? The pattern is: var name = new THREE.something(); - (where 'name' is the name you pick, and '.something' is the name of the helper function you are calling from the Three.js graphics library. Get used to this pattern because you will see a LOT of instances of it throughout our code, especially the THREE.something part. Moving on, '.CubeGeometry()' is a function of the Three.js library that creates a cube or box shape. The 3 parameters inside the parentheses() give the dimensions of the cube in order: (width, height,depth). So to create a box or cube with 1 un...