1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| scene = new THREE.Scene()
scene.fog = new THREE.Fog(0xf7d9aa, 100, 950)
camera = new THREE.PerspectiveCamera( 60, WIDTH / HEIGHT, 1, 10000) camera.position.set(-10, 100, 200)
var light = new THREE.AmbientLight( 0x888888 ) scene.add( light )
renderer = new THREE.WebGLRenderer({ alpha: true, antialias: true }) renderer.setSize(WIDTH, HEIGHT) renderer.shadowMap.enabled = true
container.appendChild(renderer.domElement)
function animate () { renderer.render(scene, camera) requestAnimationFrame(animate) } animate()
|