renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); // Camera var camera = new THREE.PerspectiveCamera(75, window.innerWidth/ window.innerHeight, 1, 10000); camera.position.z = 4; scene.add(camera); // Cube var geometry = new THREE.BoxGeometry(1, 1, 1); var material = new THREE.MeshLambertMaterial({ color: 'blue' }); var cube = new THREE.Mesh(geometry, material); scene.add(cube); // Ambient lighting var ambientLight = new THREE.AmbientLight(0x000044); scene.add(ambientLight); Example.html