Kaynağa Gözat

Updated examples with the new `.add`/`.remove` methods.

Mr.doob 14 yıl önce
ebeveyn
işleme
a940f05427
100 değiştirilmiş dosya ile 380 ekleme ve 405 silme
  1. 6 6
      examples/canvas_camera_orthographic.html
  2. 1 1
      examples/canvas_geometry_birds.html
  3. 2 2
      examples/canvas_geometry_cube.html
  4. 2 2
      examples/canvas_geometry_earth.html
  5. 2 2
      examples/canvas_geometry_hierarchy.html
  6. 1 1
      examples/canvas_geometry_panorama.html
  7. 1 1
      examples/canvas_geometry_panorama_fisheye.html
  8. 1 1
      examples/canvas_geometry_terrain.html
  9. 2 2
      examples/canvas_geometry_text.html
  10. 2 2
      examples/canvas_interactive_cubes.html
  11. 1 1
      examples/canvas_interactive_cubes_tween.html
  12. 1 1
      examples/canvas_interactive_particles.html
  13. 8 8
      examples/canvas_interactive_voxelpainter.html
  14. 8 8
      examples/canvas_lights_pointlights.html
  15. 8 8
      examples/canvas_lights_pointlights_smooth.html
  16. 2 2
      examples/canvas_lines.html
  17. 2 2
      examples/canvas_lines_sphere.html
  18. 7 7
      examples/canvas_materials.html
  19. 5 5
      examples/canvas_materials_depth.html
  20. 1 1
      examples/canvas_materials_normal.html
  21. 1 1
      examples/canvas_materials_reflection.html
  22. 3 3
      examples/canvas_materials_video.html
  23. 1 1
      examples/canvas_particles_floor.html
  24. 2 2
      examples/canvas_particles_random.html
  25. 5 5
      examples/canvas_particles_shapes.html
  26. 1 1
      examples/canvas_particles_sprites.html
  27. 1 1
      examples/canvas_particles_waves.html
  28. 6 6
      examples/canvas_performance.html
  29. 6 6
      examples/canvas_sandbox.html
  30. 5 5
      examples/misc_camera_path.html
  31. 9 9
      examples/misc_camera_roll.html
  32. 8 8
      examples/misc_camera_trackball.html
  33. 7 7
      examples/misc_lights_test.html
  34. 2 2
      examples/misc_lookat.html
  35. 9 15
      examples/misc_materials_multimaterials.html
  36. 4 4
      examples/misc_sound.html
  37. 8 8
      examples/misc_ubiquity_test.html
  38. 4 4
      examples/webgl_animation_skinning.html
  39. 6 6
      examples/webgl_collada.html
  40. 3 3
      examples/webgl_collisions_box.html
  41. 3 3
      examples/webgl_collisions_mesh.html
  42. 4 4
      examples/webgl_collisions_normal.html
  43. 5 5
      examples/webgl_collisions_primitives.html
  44. 5 5
      examples/webgl_collisions_reaction.html
  45. 4 4
      examples/webgl_collisions_terrain.html
  46. 4 4
      examples/webgl_collisions_trigger.html
  47. 1 1
      examples/webgl_custom_attributes.html
  48. 2 2
      examples/webgl_custom_attributes_particles.html
  49. 2 2
      examples/webgl_custom_attributes_particles2.html
  50. 2 2
      examples/webgl_custom_attributes_particles3.html
  51. 6 6
      examples/webgl_flycamera_earth.html
  52. 3 5
      examples/webgl_geometry_blenderexport_colors.html
  53. 7 7
      examples/webgl_geometry_colors.html
  54. 1 5
      examples/webgl_geometry_dynamic.html
  55. 2 2
      examples/webgl_geometry_hierarchy.html
  56. 7 7
      examples/webgl_geometry_hierarchy2.html
  57. 5 5
      examples/webgl_geometry_large_mesh.html
  58. 3 3
      examples/webgl_geometry_minecraft.html
  59. 3 3
      examples/webgl_geometry_minecraft_ao.html
  60. 8 8
      examples/webgl_geometry_shapes.html
  61. 1 1
      examples/webgl_geometry_terrain.html
  62. 1 1
      examples/webgl_geometry_terrain_fog.html
  63. 8 8
      examples/webgl_geometry_text.html
  64. 2 2
      examples/webgl_hdr.html
  65. 3 3
      examples/webgl_interactive_cubes.html
  66. 7 7
      examples/webgl_interactive_voxelpainter.html
  67. 8 18
      examples/webgl_lights_pointlights.html
  68. 1 1
      examples/webgl_lines_colors.html
  69. 1 1
      examples/webgl_lines_cubes.html
  70. 1 1
      examples/webgl_lines_sphere.html
  71. 1 1
      examples/webgl_lines_splines.html
  72. 3 3
      examples/webgl_lod.html
  73. 3 3
      examples/webgl_lod_text.html
  74. 6 6
      examples/webgl_materials.html
  75. 6 6
      examples/webgl_materials_cars.html
  76. 6 6
      examples/webgl_materials_cars_anaglyph.html
  77. 5 5
      examples/webgl_materials_cars_camaro.html
  78. 5 5
      examples/webgl_materials_cars_camaro_crosseyed.html
  79. 7 7
      examples/webgl_materials_cubemap.html
  80. 2 2
      examples/webgl_materials_cubemap_balls_reflection.html
  81. 2 2
      examples/webgl_materials_cubemap_balls_reflection_anaglyph.html
  82. 2 2
      examples/webgl_materials_cubemap_balls_refraction.html
  83. 2 2
      examples/webgl_materials_cubemap_balls_refraction_crosseyed.html
  84. 2 2
      examples/webgl_materials_cubemap_escher.html
  85. 7 7
      examples/webgl_materials_cubemap_refraction.html
  86. 1 1
      examples/webgl_materials_grass.html
  87. 6 6
      examples/webgl_materials_normalmap.html
  88. 4 4
      examples/webgl_materials_normalmap2.html
  89. 5 5
      examples/webgl_materials_shaders.html
  90. 2 2
      examples/webgl_materials_shaders_fresnel.html
  91. 5 5
      examples/webgl_materials_texture_filters.html
  92. 2 2
      examples/webgl_materials_video.html
  93. 3 3
      examples/webgl_morphtargets.html
  94. 3 3
      examples/webgl_morphtargets_horse.html
  95. 7 7
      examples/webgl_multiple_canvases_complex.html
  96. 7 7
      examples/webgl_multiple_canvases_grid.html
  97. 7 10
      examples/webgl_objconvert_test.html
  98. 1 1
      examples/webgl_panorama_equirectangular.html
  99. 2 2
      examples/webgl_particles_billboards.html
  100. 2 2
      examples/webgl_particles_billboards_colors.html

+ 6 - 6
examples/canvas_camera_orthographic.html

@@ -59,12 +59,12 @@
 
 
 					var line = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } ) );
 					var line = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } ) );
 					line.position.z = ( i * 50 ) - 500;
 					line.position.z = ( i * 50 ) - 500;
-					scene.addObject( line );
+					scene.add( line );
 
 
 					var line = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } ) );
 					var line = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } ) );
 					line.position.x = ( i * 50 ) - 500;
 					line.position.x = ( i * 50 ) - 500;
 					line.rotation.y = 90 * Math.PI / 180;
 					line.rotation.y = 90 * Math.PI / 180;
-					scene.addObject( line );
+					scene.add( line );
 
 
 				}
 				}
 
 
@@ -84,28 +84,28 @@
 					cube.position.y = ( cube.scale.y * 50 ) / 2;
 					cube.position.y = ( cube.scale.y * 50 ) / 2;
 					cube.position.z = Math.floor( ( Math.random() * 1000 - 500 ) / 50 ) * 50 + 25;
 					cube.position.z = Math.floor( ( Math.random() * 1000 - 500 ) / 50 ) * 50 + 25;
 
 
-					scene.addObject(cube);
+					scene.add(cube);
 
 
 				}
 				}
 
 
 				// Lights
 				// Lights
 
 
 				var ambientLight = new THREE.AmbientLight( Math.random() * 0x10 );
 				var ambientLight = new THREE.AmbientLight( Math.random() * 0x10 );
-				scene.addLight( ambientLight );
+				scene.add( ambientLight );
 
 
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 1 - 1
examples/canvas_geometry_birds.html

@@ -361,7 +361,7 @@
 					bird.position = boids[ i ].position;
 					bird.position = boids[ i ].position;
 					bird.doubleSided = true;
 					bird.doubleSided = true;
 					// bird.scale.x = bird.scale.y = bird.scale.z = 10;
 					// bird.scale.x = bird.scale.y = bird.scale.z = 10;
-					scene.addObject( bird );
+					scene.add( bird );
 
 
 
 
 				}
 				}

+ 2 - 2
examples/canvas_geometry_cube.html

@@ -73,14 +73,14 @@
 				cube = new THREE.Mesh( new THREE.CubeGeometry( 200, 200, 200, 1, 1, 1, materials ), new THREE.MeshFaceMaterial() );
 				cube = new THREE.Mesh( new THREE.CubeGeometry( 200, 200, 200, 1, 1, 1, materials ), new THREE.MeshFaceMaterial() );
 				cube.position.y = 150;
 				cube.position.y = 150;
 				cube.overdraw = true;
 				cube.overdraw = true;
-				scene.addObject( cube );
+				scene.add( cube );
 
 
 				// Plane
 				// Plane
 
 
 				plane = new THREE.Mesh( new THREE.PlaneGeometry( 200, 200 ), new THREE.MeshBasicMaterial( { color: 0xe0e0e0 } ) );
 				plane = new THREE.Mesh( new THREE.PlaneGeometry( 200, 200 ), new THREE.MeshBasicMaterial( { color: 0xe0e0e0 } ) );
 				plane.rotation.x = - 90 * ( Math.PI / 180 );
 				plane.rotation.x = - 90 * ( Math.PI / 180 );
 				plane.overdraw = true;
 				plane.overdraw = true;
-				scene.addObject( plane );
+				scene.add( plane );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 2 - 2
examples/canvas_geometry_earth.html

@@ -67,11 +67,11 @@
 				mesh.overdraw = true;
 				mesh.overdraw = true;
 				mesh.position.y = - 250;
 				mesh.position.y = - 250;
 				mesh.rotation.x = - 90 * Math.PI / 180;
 				mesh.rotation.x = - 90 * Math.PI / 180;
-				scene.addObject(mesh);
+				scene.add(mesh);
 
 
 				mesh = new THREE.Mesh( new THREE.SphereGeometry( 200, 20, 20 ), new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/land_ocean_ice_cloud_2048.jpg' ) } ) );
 				mesh = new THREE.Mesh( new THREE.SphereGeometry( 200, 20, 20 ), new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/land_ocean_ice_cloud_2048.jpg' ) } ) );
 				mesh.overdraw = true;
 				mesh.overdraw = true;
-				scene.addObject(mesh);
+				scene.add(mesh);
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 2 - 2
examples/canvas_geometry_hierarchy.html

@@ -65,11 +65,11 @@
 					mesh.matrixAutoUpdate = false;
 					mesh.matrixAutoUpdate = false;
 					mesh.updateMatrix();
 					mesh.updateMatrix();
 
 
-					group.addChild( mesh );
+					group.add( mesh );
 
 
 				}
 				}
 
 
-				scene.addObject( group );
+				scene.add( group );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 1 - 1
examples/canvas_geometry_panorama.html

@@ -78,7 +78,7 @@
 
 
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 300, 300, 300, 7, 7, 7, materials, true ), new THREE.MeshFaceMaterial() );
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 300, 300, 300, 7, 7, 7, materials, true ), new THREE.MeshFaceMaterial() );
 				mesh.overdraw = true;
 				mesh.overdraw = true;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 1 - 1
examples/canvas_geometry_panorama_fisheye.html

@@ -78,7 +78,7 @@
 
 
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 300, 300, 300, 7, 7, 7, materials, true ), new THREE.MeshFaceMaterial() );
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 300, 300, 300, 7, 7, 7, materials, true ), new THREE.MeshFaceMaterial() );
 				mesh.overdraw = true;
 				mesh.overdraw = true;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				for ( var i = 0, l = mesh.geometry.vertices.length; i < l; i ++ ) {
 				for ( var i = 0, l = mesh.geometry.vertices.length; i < l; i ++ ) {
 
 

+ 1 - 1
examples/canvas_geometry_terrain.html

@@ -84,7 +84,7 @@
 				mesh = new THREE.Mesh( plane, material );
 				mesh = new THREE.Mesh( plane, material );
 				mesh.rotation.x = -90 * Math.PI / 180;
 				mesh.rotation.x = -90 * Math.PI / 180;
 				mesh.overdraw = true;
 				mesh.overdraw = true;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 2 - 2
examples/canvas_geometry_text.html

@@ -104,9 +104,9 @@
 				text.overdraw = true;
 				text.overdraw = true;
 
 
 				parent = new THREE.Object3D();
 				parent = new THREE.Object3D();
-                parent.addChild( text );
+                parent.add( text );
 
 
-				scene.addObject( parent );
+				scene.add( parent );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
                 renderer.setSize( window.innerWidth, window.innerHeight );
                 renderer.setSize( window.innerWidth, window.innerHeight );

+ 2 - 2
examples/canvas_interactive_cubes.html

@@ -63,7 +63,7 @@
 					object.rotation.x = ( Math.random() * 360 ) * Math.PI / 180;
 					object.rotation.x = ( Math.random() * 360 ) * Math.PI / 180;
 					object.rotation.y = ( Math.random() * 360 ) * Math.PI / 180;
 					object.rotation.y = ( Math.random() * 360 ) * Math.PI / 180;
 					object.rotation.z = ( Math.random() * 360 ) * Math.PI / 180;
 					object.rotation.z = ( Math.random() * 360 ) * Math.PI / 180;
-					scene.addObject( object );
+					scene.add( object );
 
 
 					objects.push( object );
 					objects.push( object );
 
 
@@ -118,7 +118,7 @@
 					var particle = new THREE.Particle( particleMaterial );
 					var particle = new THREE.Particle( particleMaterial );
 					particle.position = intersects[ 0 ].point;
 					particle.position = intersects[ 0 ].point;
 					particle.scale.x = particle.scale.y = 8;
 					particle.scale.x = particle.scale.y = 8;
-					scene.addObject( particle );
+					scene.add( particle );
 
 
 				}
 				}
 
 

+ 1 - 1
examples/canvas_interactive_cubes_tween.html

@@ -61,7 +61,7 @@
 					object.rotation.x = ( Math.random() * 360 ) * Math.PI / 180;
 					object.rotation.x = ( Math.random() * 360 ) * Math.PI / 180;
 					object.rotation.y = ( Math.random() * 360 ) * Math.PI / 180;
 					object.rotation.y = ( Math.random() * 360 ) * Math.PI / 180;
 					object.rotation.z = ( Math.random() * 360 ) * Math.PI / 180;
 					object.rotation.z = ( Math.random() * 360 ) * Math.PI / 180;
-					scene.addObject( object );
+					scene.add( object );
 
 
 				}
 				}
 
 

+ 1 - 1
examples/canvas_interactive_particles.html

@@ -76,7 +76,7 @@
 					particle.position.y = Math.random() * 800 - 400;
 					particle.position.y = Math.random() * 800 - 400;
 					particle.position.z = Math.random() * 800 - 400;
 					particle.position.z = Math.random() * 800 - 400;
 					particle.scale.x = particle.scale.y = Math.random() * 10 + 10;
 					particle.scale.x = particle.scale.y = Math.random() * 10 + 10;
-					scene.addObject( particle );
+					scene.add( particle );
 
 
 				}
 				}
 
 

+ 8 - 8
examples/canvas_interactive_voxelpainter.html

@@ -62,12 +62,12 @@
 
 
 					var line = new THREE.Line( geometry, material );
 					var line = new THREE.Line( geometry, material );
 					line.position.z = ( i * 50 ) - 500;
 					line.position.z = ( i * 50 ) - 500;
-					scene.addObject( line );
+					scene.add( line );
 
 
 					var line = new THREE.Line( geometry, material );
 					var line = new THREE.Line( geometry, material );
 					line.position.x = ( i * 50 ) - 500;
 					line.position.x = ( i * 50 ) - 500;
 					line.rotation.y = 90 * Math.PI / 180;
 					line.rotation.y = 90 * Math.PI / 180;
-					scene.addObject( line );
+					scene.add( line );
 
 
 				}
 				}
 
 
@@ -75,7 +75,7 @@
 
 
 				plane = new THREE.Mesh( new THREE.PlaneGeometry( 1000, 1000, 20, 20 ), new THREE.MeshFaceMaterial() );
 				plane = new THREE.Mesh( new THREE.PlaneGeometry( 1000, 1000, 20, 20 ), new THREE.MeshFaceMaterial() );
 				plane.rotation.x = - 90 * Math.PI / 180;
 				plane.rotation.x = - 90 * Math.PI / 180;
-				scene.addObject( plane );
+				scene.add( plane );
 
 
 				mouse2D = new THREE.Vector3( 0, 10000, 0.5 );
 				mouse2D = new THREE.Vector3( 0, 10000, 0.5 );
 				ray = new THREE.Ray( camera.position, null );
 				ray = new THREE.Ray( camera.position, null );
@@ -83,21 +83,21 @@
 				// Lights
 				// Lights
 
 
 				var ambientLight = new THREE.AmbientLight( 0x606060 );
 				var ambientLight = new THREE.AmbientLight( 0x606060 );
-				scene.addLight( ambientLight );
+				scene.add( ambientLight );
 
 
 				var directionalLight = new THREE.DirectionalLight( 0xffffff );
 				var directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				var directionalLight = new THREE.DirectionalLight( 0x808080 );
 				var directionalLight = new THREE.DirectionalLight( 0x808080 );
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );
@@ -137,7 +137,7 @@
 
 
 						if ( intersects[ 0 ].object != plane ) {
 						if ( intersects[ 0 ].object != plane ) {
 
 
-							scene.removeObject( intersects[ 0 ].object );
+							scene.remove( intersects[ 0 ].object );
 
 
 						}
 						}
 
 
@@ -152,7 +152,7 @@
 						voxel.matrixAutoUpdate = false;
 						voxel.matrixAutoUpdate = false;
 						voxel.updateMatrix();
 						voxel.updateMatrix();
 						voxel.overdraw = true;
 						voxel.overdraw = true;
-						scene.addObject( voxel );
+						scene.add( voxel );
 
 
 					}
 					}
 
 

+ 8 - 8
examples/canvas_lights_pointlights.html

@@ -62,16 +62,16 @@
 
 
 				scene = new THREE.Scene();
 				scene = new THREE.Scene();
 
 
-				scene.addLight( new THREE.AmbientLight( 0x00020 ) );
+				scene.add( new THREE.AmbientLight( 0x00020 ) );
 
 
 				light1 = new THREE.PointLight( 0xff0040, 1, 50 );
 				light1 = new THREE.PointLight( 0xff0040, 1, 50 );
-				scene.addLight( light1 );
+				scene.add( light1 );
 
 
 				light2 = new THREE.PointLight( 0x0040ff, 1, 50 );
 				light2 = new THREE.PointLight( 0x0040ff, 1, 50 );
-				scene.addLight( light2 );
+				scene.add( light2 );
 
 
 				light3 = new THREE.PointLight( 0x80ff80, 1, 50 );
 				light3 = new THREE.PointLight( 0x80ff80, 1, 50 );
-				scene.addLight( light3 );
+				scene.add( light3 );
 
 
 				var PI2 = Math.PI * 2;
 				var PI2 = Math.PI * 2;
 				var program = function ( context ) {
 				var program = function ( context ) {
@@ -85,19 +85,19 @@
 
 
 				particle1 = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0xff0040, program: program } ) );
 				particle1 = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0xff0040, program: program } ) );
 				particle1.scale.x = particle1.scale.y = particle1.scale.z = 0.5;
 				particle1.scale.x = particle1.scale.y = particle1.scale.z = 0.5;
-				scene.addObject( particle1 );
+				scene.add( particle1 );
 
 
 				particle2 = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0x0040ff, program: program } ) );
 				particle2 = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0x0040ff, program: program } ) );
 				particle2.scale.x = particle2.scale.y = particle2.scale.z = 0.5;
 				particle2.scale.x = particle2.scale.y = particle2.scale.z = 0.5;
-				scene.addObject( particle2 );
+				scene.add( particle2 );
 
 
 				particle3 = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0x80ff80, program: program } ) );
 				particle3 = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0x80ff80, program: program } ) );
 				particle3.scale.x = particle3.scale.y = particle3.scale.z = 0.5;
 				particle3.scale.x = particle3.scale.y = particle3.scale.z = 0.5;
-				scene.addObject( particle3 );
+				scene.add( particle3 );
 
 
 				mesh = new THREE.Mesh( new WaltHead(), new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading } ) );
 				mesh = new THREE.Mesh( new WaltHead(), new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading } ) );
 				mesh.overdraw = true;
 				mesh.overdraw = true;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 8 - 8
examples/canvas_lights_pointlights_smooth.html

@@ -62,16 +62,16 @@
 
 
 				scene = new THREE.Scene();
 				scene = new THREE.Scene();
 
 
-				scene.addLight( new THREE.AmbientLight( 0x00020 ) );
+				scene.add( new THREE.AmbientLight( 0x00020 ) );
 
 
 				light1 = new THREE.PointLight( 0xff0040, 1, 50 );
 				light1 = new THREE.PointLight( 0xff0040, 1, 50 );
-				scene.addLight( light1 );
+				scene.add( light1 );
 
 
 				light2 = new THREE.PointLight( 0x0040ff, 1, 50 );
 				light2 = new THREE.PointLight( 0x0040ff, 1, 50 );
-				scene.addLight( light2 );
+				scene.add( light2 );
 
 
 				light3 = new THREE.PointLight( 0x80ff80, 1, 50 );
 				light3 = new THREE.PointLight( 0x80ff80, 1, 50 );
-				scene.addLight( light3 );
+				scene.add( light3 );
 
 
 				var PI2 = Math.PI * 2;
 				var PI2 = Math.PI * 2;
 				var program = function ( context ) {
 				var program = function ( context ) {
@@ -85,22 +85,22 @@
 
 
 				particle1 = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0xff0040, program: program } ) );
 				particle1 = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0xff0040, program: program } ) );
 				particle1.scale.x = particle1.scale.y = particle1.scale.z = 0.5;
 				particle1.scale.x = particle1.scale.y = particle1.scale.z = 0.5;
-				scene.addObject( particle1 );
+				scene.add( particle1 );
 
 
 				particle2 = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0x0040ff, program: program } ) );
 				particle2 = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0x0040ff, program: program } ) );
 				particle2.scale.x = particle2.scale.y = particle2.scale.z = 0.5;
 				particle2.scale.x = particle2.scale.y = particle2.scale.z = 0.5;
-				scene.addObject( particle2 );
+				scene.add( particle2 );
 
 
 				particle3 = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0x80ff80, program: program } ) );
 				particle3 = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0x80ff80, program: program } ) );
 				particle3.scale.x = particle3.scale.y = particle3.scale.z = 0.5;
 				particle3.scale.x = particle3.scale.y = particle3.scale.z = 0.5;
-				scene.addObject( particle3 );
+				scene.add( particle3 );
 
 
 				geometry = new WaltHead();
 				geometry = new WaltHead();
 				geometry.computeVertexNormals();
 				geometry.computeVertexNormals();
 
 
 				mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.SmoothShading } ) );
 				mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.SmoothShading } ) );
 				mesh.overdraw = true;
 				mesh.overdraw = true;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 2 - 2
examples/canvas_lines.html

@@ -83,7 +83,7 @@
 					particle.position.normalize();
 					particle.position.normalize();
 					particle.position.multiplyScalar( Math.random() * 10 + 450 );
 					particle.position.multiplyScalar( Math.random() * 10 + 450 );
 					particle.scale.x = particle.scale.y = 5;
 					particle.scale.x = particle.scale.y = 5;
-					scene.addObject( particle );
+					scene.add( particle );
 
 
 					geometry.vertices.push( new THREE.Vertex( particle.position ) );
 					geometry.vertices.push( new THREE.Vertex( particle.position ) );
 
 
@@ -92,7 +92,7 @@
 				// lines
 				// lines
 
 
 				var line = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0xffffff, opacity: 0.5 } ) );
 				var line = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0xffffff, opacity: 0.5 } ) );
-				scene.addObject( line );
+				scene.add( line );
 
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 2 - 2
examples/canvas_lines_sphere.html

@@ -83,7 +83,7 @@
 					particle.position.z = Math.random() * 2 - 1;
 					particle.position.z = Math.random() * 2 - 1;
 					particle.position.normalize();
 					particle.position.normalize();
 					particle.position.multiplyScalar( Math.random() * 10 + 450 );
 					particle.position.multiplyScalar( Math.random() * 10 + 450 );
-					scene.addObject( particle );
+					scene.add( particle );
 
 
 				}
 				}
 
 
@@ -105,7 +105,7 @@
 					geometry.vertices.push( new THREE.Vertex( vector2 ) );
 					geometry.vertices.push( new THREE.Vertex( vector2 ) );
 
 
 					var line = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0xffffff, opacity: Math.random() } ) );
 					var line = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0xffffff, opacity: Math.random() } ) );
-					scene.addObject( line );
+					scene.add( line );
 				}
 				}
 
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );

+ 7 - 7
examples/canvas_materials.html

@@ -53,13 +53,13 @@
 					var line = new THREE.Line( geometry, material );
 					var line = new THREE.Line( geometry, material );
 					line.position.y = - 120;
 					line.position.y = - 120;
 					line.position.z = ( i * 100 ) - 500;
 					line.position.z = ( i * 100 ) - 500;
-					scene.addObject( line );
+					scene.add( line );
 
 
 					var line = new THREE.Line( geometry, material );
 					var line = new THREE.Line( geometry, material );
 					line.position.x = ( i * 100 ) - 500;
 					line.position.x = ( i * 100 ) - 500;
 					line.position.y = - 120;
 					line.position.y = - 120;
 					line.rotation.y = 90 * Math.PI / 180;
 					line.rotation.y = 90 * Math.PI / 180;
-					scene.addObject( line );
+					scene.add( line );
 
 
 				}
 				}
 
 
@@ -107,7 +107,7 @@
 
 
 					objects.push( sphere );
 					objects.push( sphere );
 
 
-					scene.addObject( sphere );
+					scene.add( sphere );
 
 
 				}
 				}
 
 
@@ -123,21 +123,21 @@
 
 
 				particleLight = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0xffffff, program: program } ) );
 				particleLight = new THREE.Particle( new THREE.ParticleCanvasMaterial( { color: 0xffffff, program: program } ) );
 				particleLight.scale.x = particleLight.scale.y = particleLight.scale.z = 4;
 				particleLight.scale.x = particleLight.scale.y = particleLight.scale.z = 4;
-				scene.addObject( particleLight );
+				scene.add( particleLight );
 
 
 				// Lights
 				// Lights
 
 
-				scene.addLight( new THREE.AmbientLight( Math.random() * 0x202020 ) );
+				scene.add( new THREE.AmbientLight( Math.random() * 0x202020 ) );
 
 
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				pointLight = new THREE.PointLight( 0xffffff, 1 );
 				pointLight = new THREE.PointLight( 0xffffff, 1 );
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				// renderer = new THREE.WebGLRenderer();
 				// renderer = new THREE.WebGLRenderer();

+ 5 - 5
examples/canvas_materials_depth.html

@@ -79,7 +79,7 @@
 				plane.rotation.x = - 90 * ( Math.PI / 180 );
 				plane.rotation.x = - 90 * ( Math.PI / 180 );
 				plane.position.y = - 100;
 				plane.position.y = - 100;
 
 
-				scene.addObject( plane );
+				scene.add( plane );
 
 
 				// Spheres
 				// Spheres
 
 
@@ -108,24 +108,24 @@
 					cube.scale.x = cube.scale.y = cube.scale.z = Math.random() + 0.5;
 					cube.scale.x = cube.scale.y = cube.scale.z = Math.random() + 0.5;
 					*/
 					*/
 
 
-					scene.addObject(cube);
+					scene.add(cube);
 
 
 				}
 				}
 
 
 				// Lights
 				// Lights
 
 
 				var ambientLight = new THREE.AmbientLight( Math.random() * 0x202020 );
 				var ambientLight = new THREE.AmbientLight( Math.random() * 0x202020 );
-				scene.addLight( ambientLight );
+				scene.add( ambientLight );
 
 
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				var pointLight = new THREE.PointLight( 0xff0000, 1 );
 				var pointLight = new THREE.PointLight( 0xff0000, 1 );
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 1 - 1
examples/canvas_materials_normal.html

@@ -63,7 +63,7 @@
 				object = new THREE.Mesh( new WaltHead(), new THREE.MeshNormalMaterial() );
 				object = new THREE.Mesh( new WaltHead(), new THREE.MeshNormalMaterial() );
 				object.overdraw = true;
 				object.overdraw = true;
 				object.scale.x = object.scale.y = object.scale.z = 10;
 				object.scale.x = object.scale.y = object.scale.z = 10;
-				scene.addObject( object );
+				scene.add( object );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 1 - 1
examples/canvas_materials_reflection.html

@@ -68,7 +68,7 @@
 
 
 				mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { envMap: THREE.ImageUtils.loadTexture( 'textures/metal.jpg', new THREE.SphericalReflectionMapping() ) } ) );
 				mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { envMap: THREE.ImageUtils.loadTexture( 'textures/metal.jpg', new THREE.SphericalReflectionMapping() ) } ) );
 				mesh.overdraw = true;
 				mesh.overdraw = true;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 3 - 3
examples/canvas_materials_video.html

@@ -109,7 +109,7 @@
 				mesh = new THREE.Mesh( plane, material );
 				mesh = new THREE.Mesh( plane, material );
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 1.5;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 1.5;
 				mesh.overdraw = true;
 				mesh.overdraw = true;
-				scene.addObject(mesh);
+				scene.add(mesh);
 
 
 				mesh = new THREE.Mesh( plane, materialReflection );
 				mesh = new THREE.Mesh( plane, materialReflection );
 				mesh.position.y = -306;
 				mesh.position.y = -306;
@@ -117,7 +117,7 @@
 				mesh.rotation.x = 180 * Math.PI / 180;
 				mesh.rotation.x = 180 * Math.PI / 180;
 				mesh.doubleSided = true;
 				mesh.doubleSided = true;
 				mesh.overdraw = true;
 				mesh.overdraw = true;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				//
 				//
 
 
@@ -148,7 +148,7 @@
 						particle.position.x = ix * separation - ( ( amountx * separation ) / 2 );
 						particle.position.x = ix * separation - ( ( amountx * separation ) / 2 );
 						particle.position.y = -153
 						particle.position.y = -153
 						particle.position.z = iy * separation - ( ( amounty * separation ) / 2 );
 						particle.position.z = iy * separation - ( ( amounty * separation ) / 2 );
-						scene.addObject( particle );
+						scene.add( particle );
 
 
 					}
 					}
 				}
 				}

+ 1 - 1
examples/canvas_particles_floor.html

@@ -71,7 +71,7 @@
 						particle = new THREE.Particle( material );
 						particle = new THREE.Particle( material );
 						particle.position.x = ix * SEPARATION - ( ( AMOUNTX * SEPARATION ) / 2 );
 						particle.position.x = ix * SEPARATION - ( ( AMOUNTX * SEPARATION ) / 2 );
 						particle.position.z = iy * SEPARATION - ( ( AMOUNTY * SEPARATION ) / 2 );
 						particle.position.z = iy * SEPARATION - ( ( AMOUNTY * SEPARATION ) / 2 );
-						scene.addObject( particle );
+						scene.add( particle );
 					}
 					}
 				}
 				}
 
 

+ 2 - 2
examples/canvas_particles_random.html

@@ -56,7 +56,7 @@
 				}
 				}
 
 
 				group = new THREE.Object3D();
 				group = new THREE.Object3D();
-				scene.addObject( group );
+				scene.add( group );
 
 
 				for ( var i = 0; i < 1000; i++ ) {
 				for ( var i = 0; i < 1000; i++ ) {
 
 
@@ -65,7 +65,7 @@
 					particle.position.y = Math.random() * 2000 - 1000;
 					particle.position.y = Math.random() * 2000 - 1000;
 					particle.position.z = Math.random() * 2000 - 1000;
 					particle.position.z = Math.random() * 2000 - 1000;
 					particle.scale.x = particle.scale.y = Math.random() * 10 + 5;
 					particle.scale.x = particle.scale.y = Math.random() * 10 + 5;
-					group.addChild( particle );
+					group.add( particle );
 				}
 				}
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();

+ 5 - 5
examples/canvas_particles_shapes.html

@@ -115,14 +115,14 @@
 				text.overdraw = true;
 				text.overdraw = true;
 
 
 				parent = new THREE.Object3D();
 				parent = new THREE.Object3D();
-                parent.addChild( text );
+                parent.add( text );
 
 
 				
 				
 				particleCloud = new THREE.Object3D(); // Just a group
 				particleCloud = new THREE.Object3D(); // Just a group
 				particleCloud.y = 800;
 				particleCloud.y = 800;
-				parent.addChild( particleCloud );
+				parent.add( particleCloud );
 				
 				
-				scene.addObject( parent );
+				scene.add( parent );
 				
 				
 				
 				
 				// Create Particle Systems
 				// Create Particle Systems
@@ -184,7 +184,7 @@
 					particle = new THREE.Particle( material );
 					particle = new THREE.Particle( material );
 
 
 					particle.scale.x = particle.scale.y = Math.random() * 20 +20;
 					particle.scale.x = particle.scale.y = Math.random() * 20 +20;
-					particleCloud.addChild( particle );	
+					particleCloud.add( particle );	
 
 
 					return particle;
 					return particle;
 				};
 				};
@@ -196,7 +196,7 @@
 			
 			
 				var onParticleDead = function(particle) {
 				var onParticleDead = function(particle) {
 					particle.target.visible = false;
 					particle.target.visible = false;
-					particleCloud.removeChild(particle.target); 
+					particleCloud.remove(particle.target); 
 				};
 				};
 				
 				
 				
 				

+ 1 - 1
examples/canvas_particles_sprites.html

@@ -54,7 +54,7 @@
 
 
 					initParticle( particle, i * 10 );
 					initParticle( particle, i * 10 );
 
 
-					scene.addObject( particle );
+					scene.add( particle );
 				}
 				}
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();

+ 1 - 1
examples/canvas_particles_waves.html

@@ -75,7 +75,7 @@
 						particle = particles[ i ++ ] = new THREE.Particle( material );
 						particle = particles[ i ++ ] = new THREE.Particle( material );
 						particle.position.x = ix * SEPARATION - ( ( AMOUNTX * SEPARATION ) / 2 );
 						particle.position.x = ix * SEPARATION - ( ( AMOUNTX * SEPARATION ) / 2 );
 						particle.position.z = iy * SEPARATION - ( ( AMOUNTY * SEPARATION ) / 2 );
 						particle.position.z = iy * SEPARATION - ( ( AMOUNTY * SEPARATION ) / 2 );
-						scene.addObject( particle );
+						scene.add( particle );
 
 
 					}
 					}
 
 

+ 6 - 6
examples/canvas_performance.html

@@ -63,12 +63,12 @@
 
 
 					var line = new THREE.Line( geometry, material );
 					var line = new THREE.Line( geometry, material );
 					line.position.z = ( i * 100 ) - 500;
 					line.position.z = ( i * 100 ) - 500;
-					scene.addObject( line );
+					scene.add( line );
 
 
 					var line = new THREE.Line( geometry, material );
 					var line = new THREE.Line( geometry, material );
 					line.position.x = ( i * 100 ) - 500;
 					line.position.x = ( i * 100 ) - 500;
 					line.rotation.y = 90 * Math.PI / 180;
 					line.rotation.y = 90 * Math.PI / 180;
-					scene.addObject( line );
+					scene.add( line );
 
 
 				}
 				}
 
 
@@ -85,23 +85,23 @@
 					sphere.position.x = ( i % 5 ) * 200 - 400;
 					sphere.position.x = ( i % 5 ) * 200 - 400;
 					sphere.position.z = Math.floor( i / 5 ) * 200 - 400;
 					sphere.position.z = Math.floor( i / 5 ) * 200 - 400;
 
 
-					scene.addObject( sphere );
+					scene.add( sphere );
 
 
 				}
 				}
 
 
 				// Lights
 				// Lights
 
 
 				var ambientLight = new THREE.AmbientLight( Math.random() * 0x202020 );
 				var ambientLight = new THREE.AmbientLight( Math.random() * 0x202020 );
-				scene.addLight( ambientLight );
+				scene.add( ambientLight );
 
 
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				directionalLight.position.x = 0;
 				directionalLight.position.x = 0;
 				directionalLight.position.y = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.z = 0;
 				directionalLight.position.z = 0;
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				var pointLight = new THREE.PointLight( 0xff0000, 1, 500 );
 				var pointLight = new THREE.PointLight( 0xff0000, 1, 500 );
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 6 - 6
examples/canvas_sandbox.html

@@ -178,12 +178,12 @@
 
 
 					var line = new THREE.Line( geometry, material );
 					var line = new THREE.Line( geometry, material );
 					line.position.z = ( i * 100 ) - 500;
 					line.position.z = ( i * 100 ) - 500;
-					scene.addObject( line );
+					scene.add( line );
 
 
 					var line = new THREE.Line( geometry, material );
 					var line = new THREE.Line( geometry, material );
 					line.position.x = ( i * 100 ) - 500;
 					line.position.x = ( i * 100 ) - 500;
 					line.rotation.y = 90 * Math.PI / 180;
 					line.rotation.y = 90 * Math.PI / 180;
-					scene.addObject( line );
+					scene.add( line );
 
 
 				}
 				}
 
 
@@ -211,24 +211,24 @@
 
 
 					objects.push( sphere );
 					objects.push( sphere );
 
 
-					scene.addObject( sphere );
+					scene.add( sphere );
 
 
 				}
 				}
 
 
 				// Lights
 				// Lights
 
 
 				var ambientLight = new THREE.AmbientLight( Math.random() * 0x202020 );
 				var ambientLight = new THREE.AmbientLight( Math.random() * 0x202020 );
-				scene.addLight( ambientLight );
+				scene.add( ambientLight );
 
 
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				pointLight = new THREE.PointLight( 0xff0000, 1 );
 				pointLight = new THREE.PointLight( 0xff0000, 1 );
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				renderer = new THREE.CanvasRenderer();
 				renderer = new THREE.CanvasRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 5 - 5
examples/misc_camera_path.html

@@ -102,24 +102,24 @@
 									  
 									  
 					mesh.updateMatrix();
 					mesh.updateMatrix();
 					mesh.matrixAutoUpdate = false;
 					mesh.matrixAutoUpdate = false;
-					scene.addChild( mesh );
+					scene.add( mesh );
 					
 					
 				}
 				}
 
 
-				scene.addObject( camera.animationParent );
+				scene.add( camera.animationParent );
 
 
 				// lights				
 				// lights				
 
 
 				light = new THREE.DirectionalLight( 0xffffff );
 				light = new THREE.DirectionalLight( 0xffffff );
 				light.position.set( 1, 1, 1 );
 				light.position.set( 1, 1, 1 );
-				scene.addChild( light );
+				scene.add( light );
 
 
 				light = new THREE.DirectionalLight( 0x002288 );
 				light = new THREE.DirectionalLight( 0x002288 );
 				light.position.set( -1, -1, -1 );
 				light.position.set( -1, -1, -1 );
-				scene.addChild( light );
+				scene.add( light );
 
 
 				light = new THREE.AmbientLight( 0x222222 );
 				light = new THREE.AmbientLight( 0x222222 );
-				scene.addChild( light );
+				scene.add( light );
 
 
 
 
 				// renderer
 				// renderer

+ 9 - 9
examples/misc_camera_roll.html

@@ -85,7 +85,7 @@
 									  
 									  
 					mesh.updateMatrix();
 					mesh.updateMatrix();
 					mesh.matrixAutoUpdate = false;
 					mesh.matrixAutoUpdate = false;
-					scene.addChild( mesh );
+					scene.add( mesh );
 					
 					
 				}
 				}
 
 
@@ -100,37 +100,37 @@
 				var material = new THREE.MeshPhongMaterial( { color:0xff0000 } );
 				var material = new THREE.MeshPhongMaterial( { color:0xff0000 } );
 				var mesh = new THREE.Mesh( new THREE.Cube( 40, 5, 5 ), material );
 				var mesh = new THREE.Mesh( new THREE.Cube( 40, 5, 5 ), material );
 				mesh.position.x = 20;
 				mesh.position.x = 20;
-				cross.addChild( mesh );
+				cross.add( mesh );
 
 
 				var material = new THREE.MeshPhongMaterial( { color:0x00ff00 } );
 				var material = new THREE.MeshPhongMaterial( { color:0x00ff00 } );
 				var mesh = new THREE.Mesh( new THREE.Cube( 5, 40, 5 ), material );
 				var mesh = new THREE.Mesh( new THREE.Cube( 5, 40, 5 ), material );
 				mesh.position.y = 20;
 				mesh.position.y = 20;
-				cross.addChild( mesh );
+				cross.add( mesh );
 
 
 				var material = new THREE.MeshPhongMaterial( { color:0x0000ff } );
 				var material = new THREE.MeshPhongMaterial( { color:0x0000ff } );
 				var mesh = new THREE.Mesh( new THREE.Cube( 5, 5, 40 ), material );
 				var mesh = new THREE.Mesh( new THREE.Cube( 5, 5, 40 ), material );
 				mesh.position.z = 20;
 				mesh.position.z = 20;
 				
 				
-				cross.addChild( mesh );
-				camera.addChild( cross );
+				cross.add( mesh );
+				camera.add( cross );
 
 
 				*/
 				*/
 				
 				
-				scene.addChild( camera );
+				scene.add( camera );
 
 
 
 
 				// lights				
 				// lights				
 
 
 				light = new THREE.DirectionalLight( 0xffffff );
 				light = new THREE.DirectionalLight( 0xffffff );
 				light.position.set( 1, 1, 1 );
 				light.position.set( 1, 1, 1 );
-				scene.addChild( light );
+				scene.add( light );
 
 
 				light = new THREE.DirectionalLight( 0x002288 );
 				light = new THREE.DirectionalLight( 0x002288 );
 				light.position.set( -1, -1, -1 );
 				light.position.set( -1, -1, -1 );
-				scene.addChild( light );
+				scene.add( light );
 
 
 				light = new THREE.AmbientLight( 0x222222 );
 				light = new THREE.AmbientLight( 0x222222 );
-				scene.addChild( light );
+				scene.add( light );
 
 
 
 
 				// renderer
 				// renderer

+ 8 - 8
examples/misc_camera_trackball.html

@@ -102,7 +102,7 @@
 									  
 									  
 					mesh.updateMatrix();
 					mesh.updateMatrix();
 					mesh.matrixAutoUpdate = false;
 					mesh.matrixAutoUpdate = false;
-					scene.addChild( mesh );
+					scene.add( mesh );
 					
 					
 				}
 				}
 
 
@@ -117,19 +117,19 @@
 				var material = new THREE.MeshPhongMaterial( { color:0xff0000 } );
 				var material = new THREE.MeshPhongMaterial( { color:0xff0000 } );
 				var mesh = new THREE.Mesh( new THREE.Cube( 40, 5, 5 ), material );
 				var mesh = new THREE.Mesh( new THREE.Cube( 40, 5, 5 ), material );
 				mesh.position.x = 20;
 				mesh.position.x = 20;
-				cross.addChild( mesh );
+				cross.add( mesh );
 
 
 				var material = new THREE.MeshPhongMaterial( { color:0x00ff00 } );
 				var material = new THREE.MeshPhongMaterial( { color:0x00ff00 } );
 				var mesh = new THREE.Mesh( new THREE.Cube( 5, 40, 5 ), material );
 				var mesh = new THREE.Mesh( new THREE.Cube( 5, 40, 5 ), material );
 				mesh.position.y = 20;
 				mesh.position.y = 20;
-				cross.addChild( mesh );
+				cross.add( mesh );
 
 
 				var material = new THREE.MeshPhongMaterial( { color:0x0000ff } );
 				var material = new THREE.MeshPhongMaterial( { color:0x0000ff } );
 				var mesh = new THREE.Mesh( new THREE.Cube( 5, 5, 40 ), material );
 				var mesh = new THREE.Mesh( new THREE.Cube( 5, 5, 40 ), material );
 				mesh.position.z = 20;
 				mesh.position.z = 20;
 
 
-				cross.addChild( mesh );
-				camera.addChild( cross );
+				cross.add( mesh );
+				camera.add( cross );
 				*/
 				*/
 
 
 
 
@@ -137,14 +137,14 @@
 
 
 				light = new THREE.DirectionalLight( 0xffffff );
 				light = new THREE.DirectionalLight( 0xffffff );
 				light.position.set( 1, 1, 1 );
 				light.position.set( 1, 1, 1 );
-				scene.addChild( light );
+				scene.add( light );
 
 
 				light = new THREE.DirectionalLight( 0x002288 );
 				light = new THREE.DirectionalLight( 0x002288 );
 				light.position.set( -1, -1, -1 );
 				light.position.set( -1, -1, -1 );
-				scene.addChild( light );
+				scene.add( light );
 
 
 				light = new THREE.AmbientLight( 0x222222 );
 				light = new THREE.AmbientLight( 0x222222 );
-				scene.addChild( light );
+				scene.add( light );
 
 
 
 
 				// renderer
 				// renderer

+ 7 - 7
examples/misc_lights_test.html

@@ -101,7 +101,7 @@
 					mesh.position.z = 500 * ( Math.random() - 0.5 );
 					mesh.position.z = 500 * ( Math.random() - 0.5 );
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 0.25 * ( Math.random() + 0.5 );
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 0.25 * ( Math.random() + 0.5 );
 					mesh.overdraw = true;
 					mesh.overdraw = true;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 				}
 				}
 
 
@@ -109,30 +109,30 @@
 
 
 				mesh = new THREE.Mesh( new THREE.TorusGeometry( 100, 25, 15, 30 ), new THREE.MeshLambertMaterial( { color: 0xffffff } ) );
 				mesh = new THREE.Mesh( new THREE.TorusGeometry( 100, 25, 15, 30 ), new THREE.MeshLambertMaterial( { color: 0xffffff } ) );
 				mesh.overdraw = true;
 				mesh.overdraw = true;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				// Lights
 				// Lights
 
 
 				var ambient = new THREE.AmbientLight( 0x101010 );
 				var ambient = new THREE.AmbientLight( 0x101010 );
-				scene.addLight( ambient );
+				scene.add( ambient );
 
 
 				directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight.position.y = -70;
 				directionalLight.position.y = -70;
 				directionalLight.position.z = 100;
 				directionalLight.position.z = 100;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				pointLight = new THREE.PointLight( 0xffaa00 );
 				pointLight = new THREE.PointLight( 0xffaa00 );
 				pointLight.position.x = 0;
 				pointLight.position.x = 0;
 				pointLight.position.y = 0;
 				pointLight.position.y = 0;
 				pointLight.position.z = 0;
 				pointLight.position.z = 0;
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				lightMesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { color: 0xffaa00 } ) );
 				lightMesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { color: 0xffaa00 } ) );
 				lightMesh.scale.x = lightMesh.scale.y = lightMesh.scale.z = 0.05;
 				lightMesh.scale.x = lightMesh.scale.y = lightMesh.scale.z = 0.05;
 				lightMesh.position = pointLight.position;
 				lightMesh.position = pointLight.position;
 				lightMesh.overdraw = true;
 				lightMesh.overdraw = true;
-				scene.addObject(lightMesh);
+				scene.add(lightMesh);
 
 
 
 
 				if ( render_canvas ) {
 				if ( render_canvas ) {
@@ -193,7 +193,7 @@
 
 
 			function render() {
 			function render() {
 
 
-				counter == 30 ? scene.removeLight( directionalLight ) : counter ++;
+				counter == 30 ? scene.remove( directionalLight ) : counter ++;
 
 
 				camera.position.x += ( mouseX - camera.position.x ) * .05;
 				camera.position.x += ( mouseX - camera.position.x ) * .05;
 				camera.position.y += ( - mouseY - camera.position.y ) * .05;
 				camera.position.y += ( - mouseY - camera.position.y ) * .05;

+ 2 - 2
examples/misc_lookat.html

@@ -68,7 +68,7 @@
 				var material = new THREE.MeshNormalMaterial( { shading: THREE.SmoothShading } );
 				var material = new THREE.MeshNormalMaterial( { shading: THREE.SmoothShading } );
 
 
 				target = new THREE.Mesh( new THREE.SphereGeometry( 100, 20, 20 ), material );
 				target = new THREE.Mesh( new THREE.SphereGeometry( 100, 20, 20 ), material );
-				scene.addObject( target );
+				scene.add( target );
 
 
 				for ( var i = 0; i < 1000; i ++ ) {
 				for ( var i = 0; i < 1000; i ++ ) {
 
 
@@ -77,7 +77,7 @@
 					mesh.position.y = Math.random() * 4000 - 2000;
 					mesh.position.y = Math.random() * 4000 - 2000;
 					mesh.position.z = Math.random() * 4000 - 2000;
 					mesh.position.z = Math.random() * 4000 - 2000;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = Math.random() * 4 + 2;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = Math.random() * 4 + 2;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 				}
 				}
 
 

+ 9 - 15
examples/misc_materials_multimaterials.html

@@ -60,7 +60,7 @@
 
 
 			var mesh, zmesh, geometry;
 			var mesh, zmesh, geometry;
 
 
-			var directionalLight, pointLight;
+			var directionalLight;
 
 
 			var mouseX = 0;
 			var mouseX = 0;
 			var mouseY = 0;
 			var mouseY = 0;
@@ -108,7 +108,7 @@
 					mesh.position.y = 500 * ( Math.random() - 0.5 );
 					mesh.position.y = 500 * ( Math.random() - 0.5 );
 					mesh.position.z = 500 * ( Math.random() - 0.5 );
 					mesh.position.z = 500 * ( Math.random() - 0.5 );
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 0.25 * (Math.random() + 0.5);
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 0.25 * (Math.random() + 0.5);
-					scene.addObject(mesh);
+					scene.add(mesh);
 
 
 				}
 				}
 
 
@@ -116,24 +116,18 @@
 				// LIGHTS
 				// LIGHTS
 
 
 				var ambient = new THREE.AmbientLight( 0x101010 );
 				var ambient = new THREE.AmbientLight( 0x101010 );
-				scene.addLight( ambient );
+				scene.add( ambient );
 
 
 				directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight.position.y = -70;
 				directionalLight.position.y = -70;
 				directionalLight.position.z = 100;
 				directionalLight.position.z = 100;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
-
-				pointLight = new THREE.PointLight( 0xffaa00 );
-				pointLight.position.x = 0;
-				pointLight.position.y = 0;
-				pointLight.position.z = 120;
-				//scene.addLight( pointLight );
+				scene.add( directionalLight );
 
 
 				mesh = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color: 0xff0000 } ) );
 				mesh = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color: 0xff0000 } ) );
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 0.1;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 0.1;
-				mesh.position = pointLight.position;
-				scene.addObject(mesh);
+				mesh.position.set( 0, 0, 120 );
+				scene.add(mesh);
 
 
 				if ( render_gl ) {
 				if ( render_gl ) {
 					try {
 					try {
@@ -230,7 +224,7 @@
 				zmesh.scale.x = zmesh.scale.y = zmesh.scale.z = 3;
 				zmesh.scale.x = zmesh.scale.y = zmesh.scale.z = 3;
 				zmesh.overdraw = true;
 				zmesh.overdraw = true;
 				zmesh.updateMatrix();
 				zmesh.updateMatrix();
-				scene.addObject(zmesh);
+				scene.add(zmesh);
 
 
 				// PLANES with all materials from the model
 				// PLANES with all materials from the model
 
 
@@ -250,7 +244,7 @@
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
 					mesh.doubleSided = true;
 					mesh.doubleSided = true;
 					mesh.updateMatrix();
 					mesh.updateMatrix();
-					scene.addObject(mesh);
+					scene.add(mesh);
 
 
 					// number
 					// number
 					var x = document.createElement( "canvas" );
 					var x = document.createElement( "canvas" );
@@ -272,7 +266,7 @@
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
 					mesh.doubleSided = true;
 					mesh.doubleSided = true;
 					mesh.updateMatrix();
 					mesh.updateMatrix();
-					scene.addObject(mesh);
+					scene.add(mesh);
 				}
 				}
 
 
 			}
 			}

+ 4 - 4
examples/misc_sound.html

@@ -118,7 +118,7 @@
 				light = new THREE.DirectionalLight( 0xffffff );
 				light = new THREE.DirectionalLight( 0xffffff );
 				light.position.set( 0, 0.5, 1 );
 				light.position.set( 0, 0.5, 1 );
 				light.position.normalize();
 				light.position.normalize();
-				scene.addLight( light );
+				scene.add( light );
 
 
 				var sphere = new THREE.SphereGeometry( 20, 32, 16 );
 				var sphere = new THREE.SphereGeometry( 20, 32, 16 );
 
 
@@ -136,7 +136,7 @@
 				var mesh1 = new THREE.Mesh( sphere, material_sphere1 );
 				var mesh1 = new THREE.Mesh( sphere, material_sphere1 );
 				mesh1.position.set( -250, 30, 0 );
 				mesh1.position.set( -250, 30, 0 );
 				mesh1.scale.set( s, s, s );
 				mesh1.scale.set( s, s, s );
-				scene.addObject( mesh1 );
+				scene.add( mesh1 );
 
 
 				sound1 = new Sound( [ 'sounds/358232_j_s_song.mp3', 'sounds/358232_j_s_song.ogg' ], 275, 1 );
 				sound1 = new Sound( [ 'sounds/358232_j_s_song.mp3', 'sounds/358232_j_s_song.ogg' ], 275, 1 );
 				sound1.position.copy( mesh1.position );
 				sound1.position.copy( mesh1.position );
@@ -147,7 +147,7 @@
 				var mesh2 = new THREE.Mesh( sphere, material_sphere2 );
 				var mesh2 = new THREE.Mesh( sphere, material_sphere2 );
 				mesh2.position.set( 250, 30, 0 );
 				mesh2.position.set( 250, 30, 0 );
 				mesh2.scale.set( s, s, s );
 				mesh2.scale.set( s, s, s );
-				scene.addObject( mesh2 );
+				scene.add( mesh2 );
 
 
 				sound2 = new Sound( [ 'sounds/376737_Skullbeatz___Bad_Cat_Maste.mp3', 'sounds/376737_Skullbeatz___Bad_Cat_Maste.ogg' ], 275, 1 );
 				sound2 = new Sound( [ 'sounds/376737_Skullbeatz___Bad_Cat_Maste.mp3', 'sounds/376737_Skullbeatz___Bad_Cat_Maste.ogg' ], 275, 1 );
 				sound2.position.copy( mesh2.position );
 				sound2.position.copy( mesh2.position );
@@ -164,7 +164,7 @@
 				mesh = new THREE.Mesh( plane, material_wireframe );
 				mesh = new THREE.Mesh( plane, material_wireframe );
 				mesh.position.y = 0.1;
 				mesh.position.y = 0.1;
 				mesh.rotation.x = -1.57;
 				mesh.rotation.x = -1.57;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 
 
 				renderer = new THREE.WebGLRenderer( { clearColor: 0x000000, clearAlpha: 1, antialias: false } );
 				renderer = new THREE.WebGLRenderer( { clearColor: 0x000000, clearAlpha: 1, antialias: false } );

+ 8 - 8
examples/misc_ubiquity_test.html

@@ -163,7 +163,7 @@
 
 
 				qrcode = mesh = new THREE.Mesh( new Qrcode(), new THREE.MeshFaceMaterial() );
 				qrcode = mesh = new THREE.Mesh( new Qrcode(), new THREE.MeshFaceMaterial() );
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				// CUBES
 				// CUBES
 
 
@@ -174,7 +174,7 @@
 				mesh.rotation.x = Math.random();
 				mesh.rotation.x = Math.random();
 				mesh.rotation.y = Math.random();
 				mesh.rotation.y = Math.random();
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				mesh = new THREE.Mesh( cube, new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff } ) );
 				mesh = new THREE.Mesh( cube, new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff } ) );
 				mesh.position.x = 500;
 				mesh.position.x = 500;
@@ -182,7 +182,7 @@
 				mesh.rotation.x = Math.random();
 				mesh.rotation.x = Math.random();
 				mesh.rotation.y = Math.random();
 				mesh.rotation.y = Math.random();
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				// PLANE
 				// PLANE
 
 
@@ -190,14 +190,14 @@
 				mesh.position.y = -500;
 				mesh.position.y = -500;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
 				mesh.doubleSided = true;
 				mesh.doubleSided = true;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				// CYLINDER
 				// CYLINDER
 
 
 				mesh = new THREE.Mesh( new THREE.CylinderGeometry( 10, 20, 100, 200, - 50, - 20 ), new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff } ) );
 				mesh = new THREE.Mesh( new THREE.CylinderGeometry( 10, 20, 100, 200, - 50, - 20 ), new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff } ) );
 				mesh.position.x = -500;
 				mesh.position.x = -500;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				// POLYFIELD
 				// POLYFIELD
 
 
@@ -226,16 +226,16 @@
 				mesh = new THREE.Mesh( geometry, [ new THREE.MeshFaceMaterial(), new THREE.MeshBasicMaterial( { color: 0xff0000, opacity: 0.5, transparent: true, wireframe: true, wireframeLinewidth: 10 } ) ] );
 				mesh = new THREE.Mesh( geometry, [ new THREE.MeshFaceMaterial(), new THREE.MeshBasicMaterial( { color: 0xff0000, opacity: 0.5, transparent: true, wireframe: true, wireframeLinewidth: 10 } ) ] );
 				mesh.doubleSided = true;
 				mesh.doubleSided = true;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 
 
 				// LIGHTS
 				// LIGHTS
 
 
 				var ambient = new THREE.AmbientLight( 0x80ffff );
 				var ambient = new THREE.AmbientLight( 0x80ffff );
-				scene.addLight( ambient );
+				scene.add( ambient );
 
 
 				var directional = new THREE.DirectionalLight( 0xffff00 );
 				var directional = new THREE.DirectionalLight( 0xffff00 );
-				scene.addLight( directional );
+				scene.add( directional );
 
 
 				canvasRenderer = new THREE.CanvasRenderer();
 				canvasRenderer = new THREE.CanvasRenderer();
 				canvasRenderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
 				canvasRenderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );

+ 4 - 4
examples/webgl_animation_skinning.html

@@ -86,7 +86,7 @@
 				light = new THREE.DirectionalLight( 0xffffff, 1.5 );
 				light = new THREE.DirectionalLight( 0xffffff, 1.5 );
 				light.position.set( 0, 1, 1 );
 				light.position.set( 0, 1, 1 );
 				light.position.normalize();
 				light.position.normalize();
-				scene.addLight( light );
+				scene.add( light );
 
 
 				var planeSimple = new THREE.PlaneGeometry( 200, 300 );
 				var planeSimple = new THREE.PlaneGeometry( 200, 300 );
 				var planeTesselated = new THREE.PlaneGeometry( 100, 300, 25, 40 );
 				var planeTesselated = new THREE.PlaneGeometry( 100, 300, 25, 40 );
@@ -98,12 +98,12 @@
 				floor.position.y = -10;
 				floor.position.y = -10;
 				floor.rotation.x = -1.57;
 				floor.rotation.x = -1.57;
 				floor.scale.set( 25, 25, 25 );
 				floor.scale.set( 25, 25, 25 );
-				scene.addObject( floor );
+				scene.add( floor );
 
 
 				floor = new THREE.Mesh( planeTesselated, matWire );
 				floor = new THREE.Mesh( planeTesselated, matWire );
 				floor.rotation.x = -1.57;
 				floor.rotation.x = -1.57;
 				floor.scale.set( 25, 25, 25 );
 				floor.scale.set( 25, 25, 25 );
-				scene.addObject( floor );
+				scene.add( floor );
 
 
 				renderer = new THREE.WebGLRenderer( { clearColor: 0xffffff, clearAlpha: 1 } );
 				renderer = new THREE.WebGLRenderer( { clearColor: 0xffffff, clearAlpha: 1 } );
 				renderer.setSize( window.innerWidth, height );
 				renderer.setSize( window.innerWidth, height );
@@ -161,7 +161,7 @@
 						buffalo.position.y = buffalo.boundRadius * 0.5;
 						buffalo.position.y = buffalo.boundRadius * 0.5;
 						buffalo.rotation.y = 0.2 - Math.random() * 0.4;
 						buffalo.rotation.y = 0.2 - Math.random() * 0.4;
 
 
-						scene.addObject( buffalo );
+						scene.add( buffalo );
 
 
 						buffalos.push( buffalo );
 						buffalos.push( buffalo );
 
 

+ 6 - 6
examples/webgl_collada.html

@@ -76,29 +76,29 @@
 				}
 				}
 
 
 				var line = new THREE.Line( geometry, line_material, THREE.LinePieces );
 				var line = new THREE.Line( geometry, line_material, THREE.LinePieces );
-				scene.addObject( line );
+				scene.add( line );
 
 
 				// Add the COLLADA
 				// Add the COLLADA
 
 
-				scene.addObject( dae );
+				scene.add( dae );
 
 
 				particleLight = new THREE.Mesh( new THREE.SphereGeometry( 4, 8, 8 ), new THREE.MeshBasicMaterial( { color: 0xffffff } ) );
 				particleLight = new THREE.Mesh( new THREE.SphereGeometry( 4, 8, 8 ), new THREE.MeshBasicMaterial( { color: 0xffffff } ) );
-				scene.addObject( particleLight );
+				scene.add( particleLight );
 
 
 				// Lights
 				// Lights
 
 
-				scene.addLight( new THREE.AmbientLight( 0xcccccc ) );
+				scene.add( new THREE.AmbientLight( 0xcccccc ) );
 
 
 				var directionalLight = new THREE.DirectionalLight(/*Math.random() * 0xffffff*/0xeeeeee );
 				var directionalLight = new THREE.DirectionalLight(/*Math.random() * 0xffffff*/0xeeeeee );
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				pointLight = new THREE.PointLight( 0xffffff, 4 );
 				pointLight = new THREE.PointLight( 0xffffff, 4 );
 				pointLight.position.x = 10000;
 				pointLight.position.x = 10000;
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				renderer = new THREE.WebGLRenderer();
 				renderer = new THREE.WebGLRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 3 - 3
examples/webgl_collisions_box.html

@@ -68,11 +68,11 @@ function init() {
 	container.appendChild(renderer.domElement);
 	container.appendChild(renderer.domElement);
 
 
 	var ambientLight = new THREE.AmbientLight( 0x606060 );
 	var ambientLight = new THREE.AmbientLight( 0x606060 );
-	scene.addLight( ambientLight );
+	scene.add( ambientLight );
 
 
 	sun = new THREE.DirectionalLight( 0xffffff );
 	sun = new THREE.DirectionalLight( 0xffffff );
 	sun.position = camera.position.clone();
 	sun.position = camera.position.clone();
-	scene.addLight( sun );
+	scene.add( sun );
 
 
 	createCube( 200, new THREE.Vector3( 0,0,0 ) );
 	createCube( 200, new THREE.Vector3( 0,0,0 ) );
 
 
@@ -94,7 +94,7 @@ function createCube( s, p ) {
 	);
 	);
 
 
 	cube.position = p;
 	cube.position = p;
-	scene.addObject( cube );
+	scene.add( cube );
 
 
 	THREE.Collisions.colliders.push( THREE.CollisionUtils.MeshOBB( cube ) );
 	THREE.Collisions.colliders.push( THREE.CollisionUtils.MeshOBB( cube ) );
 
 

+ 3 - 3
examples/webgl_collisions_mesh.html

@@ -76,11 +76,11 @@ function init() {
 	container.appendChild( renderer.domElement );
 	container.appendChild( renderer.domElement );
 	
 	
 	var ambientLight = new THREE.AmbientLight( 0x606060 );
 	var ambientLight = new THREE.AmbientLight( 0x606060 );
-	scene.addLight( ambientLight );
+	scene.add( ambientLight );
 
 
 	sun = new THREE.DirectionalLight( 0xffffff );
 	sun = new THREE.DirectionalLight( 0xffffff );
 	sun.position = camera.position.clone();
 	sun.position = camera.position.clone();
-	scene.addLight( sun );
+	scene.add( sun );
 	
 	
 	loadCube();
 	loadCube();
 
 
@@ -174,7 +174,7 @@ function addCube( p, g) {
 	//mesh.scale.y = Math.random() + 0.5;
 	//mesh.scale.y = Math.random() + 0.5;
 	//mesh.scale.z = Math.random() + 0.5;
 	//mesh.scale.z = Math.random() + 0.5;
 	
 	
-	scene.addObject( mesh );
+	scene.add( mesh );
 	var mc = THREE.CollisionUtils.MeshColliderWBox(mesh);
 	var mc = THREE.CollisionUtils.MeshColliderWBox(mesh);
 	THREE.Collisions.colliders.push( mc );
 	THREE.Collisions.colliders.push( mc );
 	meshes.push( mesh );
 	meshes.push( mesh );

+ 4 - 4
examples/webgl_collisions_normal.html

@@ -76,11 +76,11 @@ function init() {
 	container.appendChild( renderer.domElement );
 	container.appendChild( renderer.domElement );
 	
 	
 	var ambientLight = new THREE.AmbientLight( 0x606060 );
 	var ambientLight = new THREE.AmbientLight( 0x606060 );
-	scene.addLight( ambientLight );
+	scene.add( ambientLight );
 
 
 	sun = new THREE.DirectionalLight( 0xffffff );
 	sun = new THREE.DirectionalLight( 0xffffff );
 	sun.position = camera.position.clone();
 	sun.position = camera.position.clone();
-	scene.addLight( sun );
+	scene.add( sun );
 	
 	
 	loadCube();
 	loadCube();
 	
 	
@@ -91,7 +91,7 @@ function init() {
 	geom.vertices.push( new THREE.Vertex( new THREE.Vector3( 100, 0, 0) ) );
 	geom.vertices.push( new THREE.Vertex( new THREE.Vector3( 100, 0, 0) ) );
 	
 	
 	line = new THREE.Line(geom, lineMat);
 	line = new THREE.Line(geom, lineMat);
-	scene.addObject( line );
+	scene.add( line );
 
 
 	stats = new Stats();
 	stats = new Stats();
 	stats.domElement.style.position = 'absolute';
 	stats.domElement.style.position = 'absolute';
@@ -127,7 +127,7 @@ function addCube( p, g) {
 	var mesh = new THREE.Mesh( g, new THREE.MeshLambertMaterial( { color: 0x003300 } ) );
 	var mesh = new THREE.Mesh( g, new THREE.MeshLambertMaterial( { color: 0x003300 } ) );
 	mesh.position = p;
 	mesh.position = p;
 
 
-	scene.addObject( mesh );
+	scene.add( mesh );
 	var mc = THREE.CollisionUtils.MeshColliderWBox(mesh);
 	var mc = THREE.CollisionUtils.MeshColliderWBox(mesh);
 	THREE.Collisions.colliders.push( mc );
 	THREE.Collisions.colliders.push( mc );
 	meshes.push( mesh );
 	meshes.push( mesh );

+ 5 - 5
examples/webgl_collisions_primitives.html

@@ -73,10 +73,10 @@
                 container.appendChild(renderer.domElement);
                 container.appendChild(renderer.domElement);
 
 
                 var ambientLight = new THREE.AmbientLight(0x606060);
                 var ambientLight = new THREE.AmbientLight(0x606060);
-                scene.addLight(ambientLight);
+                scene.add(ambientLight);
 
 
                 sun = new THREE.DirectionalLight(0xffffff);
                 sun = new THREE.DirectionalLight(0xffffff);
-                scene.addLight(sun);
+                scene.add(sun);
 
 
                 //makeWall(480);
                 //makeWall(480);
                 //makeWall(360);
                 //makeWall(360);
@@ -91,7 +91,7 @@
                 plane = new THREE.Mesh( new THREE.PlaneGeometry( 30000, 30000, 10, 10 ), new THREE.MeshLambertMaterial( { color: 0x003300 } ) );
                 plane = new THREE.Mesh( new THREE.PlaneGeometry( 30000, 30000, 10, 10 ), new THREE.MeshLambertMaterial( { color: 0x003300 } ) );
                 plane.position.y = - 480;
                 plane.position.y = - 480;
                 plane.rotation.x = Math.PI / - 2;
                 plane.rotation.x = Math.PI / - 2;
-                scene.addObject( plane );
+                scene.add( plane );
                 geoms.push( plane );
                 geoms.push( plane );
 
 
                 var cplane = new THREE.PlaneCollider( plane.position, new THREE.Vector3( 0, 1, 0 ) );
                 var cplane = new THREE.PlaneCollider( plane.position, new THREE.Vector3( 0, 1, 0 ) );
@@ -123,7 +123,7 @@
             function createCube(s, p){
             function createCube(s, p){
                 var cube = new THREE.Mesh(new THREE.CubeGeometry( s, s, s ), new THREE.MeshLambertMaterial( { color: 0x003300 } ) );
                 var cube = new THREE.Mesh(new THREE.CubeGeometry( s, s, s ), new THREE.MeshLambertMaterial( { color: 0x003300 } ) );
                 cube.position = p;
                 cube.position = p;
-                scene.addObject(cube);
+                scene.add(cube);
                 geoms.push(cube);
                 geoms.push(cube);
                 THREE.Collisions.colliders.push(THREE.CollisionUtils.MeshAABB(cube, p));
                 THREE.Collisions.colliders.push(THREE.CollisionUtils.MeshAABB(cube, p));
             }
             }
@@ -131,7 +131,7 @@
             function createSphere(rad, p){
             function createSphere(rad, p){
                 var sphere = new THREE.Mesh( new THREE.SphereGeometry( rad, 10, 10 ), new THREE.MeshLambertMaterial( { color: 0x003300 } ) );
                 var sphere = new THREE.Mesh( new THREE.SphereGeometry( rad, 10, 10 ), new THREE.MeshLambertMaterial( { color: 0x003300 } ) );
                 sphere.position = p;
                 sphere.position = p;
-                scene.addObject(sphere);
+                scene.add(sphere);
                 geoms.push(sphere);
                 geoms.push(sphere);
 
 
                 var sc = new THREE.SphereCollider(p, rad);
                 var sc = new THREE.SphereCollider(p, rad);

+ 5 - 5
examples/webgl_collisions_reaction.html

@@ -74,18 +74,18 @@
                 scene = new THREE.Scene();
                 scene = new THREE.Scene();
 
 
                 sphere = new THREE.Mesh( new THREE.SphereGeometry( sphereSize, 10, 10 ), new THREE.MeshLambertMaterial( { color: 0xff0000 } ) );
                 sphere = new THREE.Mesh( new THREE.SphereGeometry( sphereSize, 10, 10 ), new THREE.MeshLambertMaterial( { color: 0xff0000 } ) );
-                scene.addObject( sphere );
+                scene.add( sphere );
 
 
                 renderer = new THREE.WebGLRenderer();
                 renderer = new THREE.WebGLRenderer();
                 renderer.setSize(window.innerWidth, window.innerHeight);
                 renderer.setSize(window.innerWidth, window.innerHeight);
                 container.appendChild(renderer.domElement);
                 container.appendChild(renderer.domElement);
 
 
                 var ambientLight = new THREE.AmbientLight(0xdddddd);
                 var ambientLight = new THREE.AmbientLight(0xdddddd);
-                scene.addLight(ambientLight);
+                scene.add(ambientLight);
 
 
                 sun = new THREE.DirectionalLight(0xffffff);
                 sun = new THREE.DirectionalLight(0xffffff);
                 sun.position = new THREE.Vector3(1, -1, 1).normalize();
                 sun.position = new THREE.Vector3(1, -1, 1).normalize();
-                scene.addLight(sun);
+                scene.add(sun);
 
 
                 createObstacles();
                 createObstacles();
 
 
@@ -93,7 +93,7 @@
 				geometry.vertices.push( new THREE.Vertex( new THREE.Vector3(0,  0,  0) ) );
 				geometry.vertices.push( new THREE.Vertex( new THREE.Vector3(0,  0,  0) ) );
 				geometry.vertices.push( new THREE.Vertex( new THREE.Vector3(10, 0,  0) ) );
 				geometry.vertices.push( new THREE.Vertex( new THREE.Vector3(10, 0,  0) ) );
 				debugNormal = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0xff0000 } ) );
 				debugNormal = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0xff0000 } ) );
-				scene.addObject( debugNormal );
+				scene.add( debugNormal );
 
 
                 container.onmousemove = onDocumentMouseMove;
                 container.onmousemove = onDocumentMouseMove;
                 animate();
                 animate();
@@ -110,7 +110,7 @@
                 var cube = new THREE.Mesh( new THREE.CubeGeometry( sx, sy, sz ), new THREE.MeshLambertMaterial( { color: 0x003300 } ) );
                 var cube = new THREE.Mesh( new THREE.CubeGeometry( sx, sy, sz ), new THREE.MeshLambertMaterial( { color: 0x003300 } ) );
                 cube.position = p;
                 cube.position = p;
 		cube.rotation.y = ry;
 		cube.rotation.y = ry;
-                scene.addObject(cube);
+                scene.add(cube);
                 THREE.Collisions.colliders.push( THREE.CollisionUtils.MeshOBB(cube) );
                 THREE.Collisions.colliders.push( THREE.CollisionUtils.MeshOBB(cube) );
 				cubes.push(cube);
 				cubes.push(cube);
 				return cube;
 				return cube;

+ 4 - 4
examples/webgl_collisions_terrain.html

@@ -69,18 +69,18 @@ function init() {
 	ray.direction = new THREE.Vector3(0, -1, 0);
 	ray.direction = new THREE.Vector3(0, -1, 0);
 
 
 	sphere = new THREE.Mesh( new THREE.SphereGeometry( sphereSize, 10, 10 ), new THREE.MeshLambertMaterial( { color: 0xff0000 } ) );
 	sphere = new THREE.Mesh( new THREE.SphereGeometry( sphereSize, 10, 10 ), new THREE.MeshLambertMaterial( { color: 0xff0000 } ) );
-	scene.addObject(sphere);
+	scene.add(sphere);
 
 
 	renderer = new THREE.WebGLRenderer();
 	renderer = new THREE.WebGLRenderer();
 	renderer.setSize( window.innerWidth, window.innerHeight );
 	renderer.setSize( window.innerWidth, window.innerHeight );
 	container.appendChild(renderer.domElement);
 	container.appendChild(renderer.domElement);
 
 
 	var ambientLight = new THREE.AmbientLight( 0x444444 );
 	var ambientLight = new THREE.AmbientLight( 0x444444 );
-	scene.addLight( ambientLight );
+	scene.add( ambientLight );
 
 
 	sun = new THREE.DirectionalLight( 0xaaaaaa );
 	sun = new THREE.DirectionalLight( 0xaaaaaa );
 	sun.position = new THREE.Vector3(-1,1, -1).normalize();
 	sun.position = new THREE.Vector3(-1,1, -1).normalize();
-	scene.addLight( sun );
+	scene.add( sun );
 
 
 	loadCube();
 	loadCube();
 
 
@@ -93,7 +93,7 @@ function init() {
 function loadCube(p) {
 function loadCube(p) {
 	var onGeometry = function( geometry ) {
 	var onGeometry = function( geometry ) {
 		var mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( { color: 0xf3e4b8 } ) );
 		var mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( { color: 0xf3e4b8 } ) );
-		scene.addObject( mesh );
+		scene.add( mesh );
 		THREE.Collisions.colliders.push( THREE.CollisionUtils.MeshColliderWBox(mesh) );
 		THREE.Collisions.colliders.push( THREE.CollisionUtils.MeshColliderWBox(mesh) );
 	};
 	};
 
 

+ 4 - 4
examples/webgl_collisions_trigger.html

@@ -74,18 +74,18 @@
                 scene = new THREE.Scene();
                 scene = new THREE.Scene();
 
 
                 sphere = new THREE.Mesh( new THREE.SphereGeometry( sphereSize, 10, 10 ), new THREE.MeshLambertMaterial( { color: 0xff0000 } ) );
                 sphere = new THREE.Mesh( new THREE.SphereGeometry( sphereSize, 10, 10 ), new THREE.MeshLambertMaterial( { color: 0xff0000 } ) );
-                scene.addObject( sphere );
+                scene.add( sphere );
 
 
                 renderer = new THREE.WebGLRenderer();
                 renderer = new THREE.WebGLRenderer();
                 renderer.setSize(window.innerWidth, window.innerHeight);
                 renderer.setSize(window.innerWidth, window.innerHeight);
                 container.appendChild(renderer.domElement);
                 container.appendChild(renderer.domElement);
 
 
                 var ambientLight = new THREE.AmbientLight(0xdddddd);
                 var ambientLight = new THREE.AmbientLight(0xdddddd);
-                scene.addLight(ambientLight);
+                scene.add(ambientLight);
 
 
                 sun = new THREE.DirectionalLight(0xffffff);
                 sun = new THREE.DirectionalLight(0xffffff);
                 sun.position = new THREE.Vector3(1, -1, 1).normalize();
                 sun.position = new THREE.Vector3(1, -1, 1).normalize();
-                scene.addLight(sun);
+                scene.add(sun);
 
 
                 createObstacles();
                 createObstacles();
 
 
@@ -102,7 +102,7 @@
             function createCube(sx, sy, sz, p){
             function createCube(sx, sy, sz, p){
                 var cube = new THREE.Mesh(new THREE.CubeGeometry( sx, sy, sz ), new THREE.MeshLambertMaterial( { color: 0x003300 } ) );
                 var cube = new THREE.Mesh(new THREE.CubeGeometry( sx, sy, sz ), new THREE.MeshLambertMaterial( { color: 0x003300 } ) );
                 cube.position = p;
                 cube.position = p;
-                scene.addObject(cube);
+                scene.add(cube);
                 THREE.Collisions.colliders.push( THREE.CollisionUtils.MeshOBB(cube) );
                 THREE.Collisions.colliders.push( THREE.CollisionUtils.MeshOBB(cube) );
 				cubes.push(cube);
 				cubes.push(cube);
 				return cube;
 				return cube;

+ 1 - 1
examples/webgl_custom_attributes.html

@@ -149,7 +149,7 @@
 
 
 			}
 			}
 
 
-			scene.addChild( sphere );
+			scene.add( sphere );
 
 
 			renderer = new THREE.WebGLRenderer( { clearColor: 0x050505, clearAlpha: 1 } );
 			renderer = new THREE.WebGLRenderer( { clearColor: 0x050505, clearAlpha: 1 } );
 			renderer.setSize( WIDTH, HEIGHT );
 			renderer.setSize( WIDTH, HEIGHT );

+ 2 - 2
examples/webgl_custom_attributes_particles.html

@@ -165,7 +165,7 @@
 
 
 			}
 			}
 
 
-			scene.addChild( sphere );
+			scene.add( sphere );
 
 
 			renderer = new THREE.WebGLRenderer( { clearColor: 0x000000, clearAlpha: 1 } );
 			renderer = new THREE.WebGLRenderer( { clearColor: 0x000000, clearAlpha: 1 } );
 			renderer.setSize( WIDTH, HEIGHT );
 			renderer.setSize( WIDTH, HEIGHT );
@@ -221,4 +221,4 @@
 
 
 </body>
 </body>
 
 
-</html>
+</html>

+ 2 - 2
examples/webgl_custom_attributes_particles2.html

@@ -162,7 +162,7 @@
 
 
 			}
 			}
 
 
-			scene.addChild( sphere );
+			scene.add( sphere );
 
 
 			renderer = new THREE.WebGLRenderer( { clearColor: 0x000000, clearAlpha: 1 } );
 			renderer = new THREE.WebGLRenderer( { clearColor: 0x000000, clearAlpha: 1 } );
 			renderer.setSize( WIDTH, HEIGHT );
 			renderer.setSize( WIDTH, HEIGHT );
@@ -220,4 +220,4 @@
 
 
 </body>
 </body>
 
 
-</html>
+</html>

+ 2 - 2
examples/webgl_custom_attributes_particles3.html

@@ -221,7 +221,7 @@
 
 
 			console.log( vertices.length );
 			console.log( vertices.length );
 
 
-			scene.addObject( object );
+			scene.add( object );
 
 
 			renderer = new THREE.WebGLRenderer( { clearColor: 0x000000, clearAlpha: 1 } );
 			renderer = new THREE.WebGLRenderer( { clearColor: 0x000000, clearAlpha: 1 } );
 			renderer.setSize( WIDTH, HEIGHT );
 			renderer.setSize( WIDTH, HEIGHT );
@@ -279,4 +279,4 @@
 
 
 </body>
 </body>
 
 
-</html>
+</html>

+ 6 - 6
examples/webgl_flycamera_earth.html

@@ -106,10 +106,10 @@
         dirLight = new THREE.DirectionalLight( 0xffffff );
         dirLight = new THREE.DirectionalLight( 0xffffff );
         dirLight.position.set( -1, 0, 1 );
         dirLight.position.set( -1, 0, 1 );
         dirLight.position.normalize();
         dirLight.position.normalize();
-        scene.addLight( dirLight );
+        scene.add( dirLight );
 
 
 		ambientLight = new THREE.AmbientLight( 0x000000 );
 		ambientLight = new THREE.AmbientLight( 0x000000 );
-		scene.addLight( ambientLight );
+		scene.add( ambientLight );
 
 
 		var planetTexture   = THREE.ImageUtils.loadTexture( "textures/planets/earth_atmos_2048.jpg" );
 		var planetTexture   = THREE.ImageUtils.loadTexture( "textures/planets/earth_atmos_2048.jpg" );
 		var cloudsTexture   = THREE.ImageUtils.loadTexture( "textures/planets/earth_clouds_1024.png" );
 		var cloudsTexture   = THREE.ImageUtils.loadTexture( "textures/planets/earth_clouds_1024.png" );
@@ -148,7 +148,7 @@
         meshPlanet = new THREE.Mesh( geometry, materialNormalMap );
         meshPlanet = new THREE.Mesh( geometry, materialNormalMap );
 		meshPlanet.rotation.y = 1.3;
 		meshPlanet.rotation.y = 1.3;
 		meshPlanet.rotation.z = tilt;
 		meshPlanet.rotation.z = tilt;
-        scene.addObject( meshPlanet );
+        scene.add( meshPlanet );
 
 
 		// clouds
 		// clouds
 
 
@@ -157,7 +157,7 @@
 		meshClouds = new THREE.Mesh( geometry, materialClouds );
 		meshClouds = new THREE.Mesh( geometry, materialClouds );
 		meshClouds.scale.set( cloudsScale, cloudsScale, cloudsScale );
 		meshClouds.scale.set( cloudsScale, cloudsScale, cloudsScale );
 		meshClouds.rotation.z = tilt;
 		meshClouds.rotation.z = tilt;
-        scene.addObject( meshClouds );
+        scene.add( meshClouds );
 
 
 		// moon
 		// moon
 
 
@@ -166,7 +166,7 @@
         meshMoon = new THREE.Mesh( geometry, materialMoon );
         meshMoon = new THREE.Mesh( geometry, materialMoon );
 		meshMoon.position.set( radius * 5, 0, 0 );
 		meshMoon.position.set( radius * 5, 0, 0 );
 		meshMoon.scale.set( moonScale, moonScale, moonScale );
 		meshMoon.scale.set( moonScale, moonScale, moonScale );
-        scene.addObject( meshMoon );
+        scene.add( meshMoon );
 
 
 		// stars
 		// stars
 
 
@@ -214,7 +214,7 @@
 			stars.matrixAutoUpdate = false;
 			stars.matrixAutoUpdate = false;
 			stars.updateMatrix();
 			stars.updateMatrix();
 
 
-			scene.addObject( stars );
+			scene.add( stars );
 
 
 		}
 		}
 
 

+ 3 - 5
examples/webgl_geometry_blenderexport_colors.html

@@ -66,12 +66,10 @@
 
 
 				scene = new THREE.Scene();
 				scene = new THREE.Scene();
 
 
-				//scene.addLight( new THREE.AmbientLight( 0x333333 )  );
-
 				light = new THREE.DirectionalLight( 0xffffff );
 				light = new THREE.DirectionalLight( 0xffffff );
 				light.position.set( 0, 0, 1 );
 				light.position.set( 0, 0, 1 );
 				light.position.normalize();
 				light.position.normalize();
-				scene.addLight( light );
+				scene.add( light );
 
 
 				var loader = new THREE.JSONLoader();
 				var loader = new THREE.JSONLoader();
 				loader.load( { model: "obj/cubecolors/cubecolors.js", callback: createScene1 } );
 				loader.load( { model: "obj/cubecolors/cubecolors.js", callback: createScene1 } );
@@ -100,7 +98,7 @@
 				mesh = new THREE.Mesh( geometry, material );
 				mesh = new THREE.Mesh( geometry, material );
 				mesh.position.x = 400;
 				mesh.position.x = 400;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 250;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 250;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 			}
 			}
 
 
@@ -113,7 +111,7 @@
 				mesh2 = new THREE.Mesh( geometry, material );
 				mesh2 = new THREE.Mesh( geometry, material );
 				mesh2.position.x = - 400;
 				mesh2.position.x = - 400;
 				mesh2.scale.x = mesh2.scale.y = mesh2.scale.z = 250;
 				mesh2.scale.x = mesh2.scale.y = mesh2.scale.z = 250;
-				scene.addObject( mesh2 );
+				scene.add( mesh2 );
 
 
 			}
 			}
 
 

+ 7 - 7
examples/webgl_geometry_colors.html

@@ -69,7 +69,7 @@
 				light = new THREE.DirectionalLight( 0xffffff );
 				light = new THREE.DirectionalLight( 0xffffff );
 				light.position.set( 0, 0, 1 );
 				light.position.set( 0, 0, 1 );
 				light.position.normalize();
 				light.position.normalize();
-				scene.addLight( light );
+				scene.add( light );
 
 
 				var shadowMaterial = new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/shadow.png' ) } );
 				var shadowMaterial = new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/shadow.png' ) } );
 				var shadowGeo = new THREE.PlaneGeometry( 300, 300, 1, 1 );
 				var shadowGeo = new THREE.PlaneGeometry( 300, 300, 1, 1 );
@@ -77,19 +77,19 @@
 				mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 				mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 				mesh.position.y = - 250;
 				mesh.position.y = - 250;
 				mesh.rotation.x = - 90 * Math.PI / 180;
 				mesh.rotation.x = - 90 * Math.PI / 180;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 				mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 				mesh.position.y = - 250;
 				mesh.position.y = - 250;
 				mesh.position.x = - 400;
 				mesh.position.x = - 400;
 				mesh.rotation.x = - 90 * Math.PI / 180;
 				mesh.rotation.x = - 90 * Math.PI / 180;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 				mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 				mesh.position.y = - 250;
 				mesh.position.y = - 250;
 				mesh.position.x = 400;
 				mesh.position.x = 400;
 				mesh.rotation.x = - 90 * Math.PI / 180;
 				mesh.rotation.x = - 90 * Math.PI / 180;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				var faceIndices = [ 'a', 'b', 'c', 'd' ];
 				var faceIndices = [ 'a', 'b', 'c', 'd' ];
 
 
@@ -144,19 +144,19 @@
 				mesh.position.x = -400;
 				mesh.position.x = -400;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 200;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 200;
 				mesh.rotation.x = -1.87;
 				mesh.rotation.x = -1.87;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				mesh2 = new THREE.Mesh( geometry2, materials  );
 				mesh2 = new THREE.Mesh( geometry2, materials  );
 				mesh2.position.x = 400;
 				mesh2.position.x = 400;
 				mesh2.rotation.x = 0;
 				mesh2.rotation.x = 0;
 				mesh2.scale = mesh.scale;
 				mesh2.scale = mesh.scale;
-				scene.addObject( mesh2 );
+				scene.add( mesh2 );
 
 
 				mesh3 = new THREE.Mesh( geometry3, materials  );
 				mesh3 = new THREE.Mesh( geometry3, materials  );
 				mesh3.position.x = 0;
 				mesh3.position.x = 0;
 				mesh3.rotation.x = 0;
 				mesh3.rotation.x = 0;
 				mesh3.scale = mesh.scale;
 				mesh3.scale = mesh.scale;
-				scene.addObject( mesh3 );
+				scene.add( mesh3 );
 
 
 				renderer = new THREE.WebGLRenderer( { antialias: true } );
 				renderer = new THREE.WebGLRenderer( { antialias: true } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 1 - 5
examples/webgl_geometry_dynamic.html

@@ -82,10 +82,6 @@
 				scene = new THREE.Scene();
 				scene = new THREE.Scene();
 				scene.fog = new THREE.FogExp2( 0xaaccff, 0.0007 );
 				scene.fog = new THREE.FogExp2( 0xaaccff, 0.0007 );
 
 
-				//var light = new THREE.PointLight( 0xffffff, 2 );
-				//light.position.y = 500;
-				//scene.addLight( light );
-
 				camera.position.y = 200;
 				camera.position.y = 200;
 				camera.target.position.y = camera.position.y;
 				camera.target.position.y = camera.position.y;
 
 
@@ -113,7 +109,7 @@
 
 
 				mesh = new THREE.Mesh( geometry, material );
 				mesh = new THREE.Mesh( geometry, material );
 				mesh.rotation.x = - 90 * Math.PI / 180;
 				mesh.rotation.x = - 90 * Math.PI / 180;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				renderer = new THREE.WebGLRenderer( { clearColor:0xaaccff, clearAlpha: 1 } );
 				renderer = new THREE.WebGLRenderer( { clearColor:0xaaccff, clearAlpha: 1 } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 2 - 2
examples/webgl_geometry_hierarchy.html

@@ -65,11 +65,11 @@
 					mesh.matrixAutoUpdate = false;
 					mesh.matrixAutoUpdate = false;
 					mesh.updateMatrix();
 					mesh.updateMatrix();
 
 
-					group.addChild( mesh );
+					group.add( mesh );
 
 
 				}
 				}
 
 
-				scene.addObject( group );
+				scene.add( group );
 
 
 				renderer = new THREE.WebGLRenderer();
 				renderer = new THREE.WebGLRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 7 - 7
examples/webgl_geometry_hierarchy2.html

@@ -66,7 +66,7 @@
 					child = new THREE.Mesh( geometry, material );
 					child = new THREE.Mesh( geometry, material );
 					child.position.x = 100;
 					child.position.x = 100;
 
 
-					object.addChild( child );
+					object.add( child );
 					object = child;
 					object = child;
 
 
 					objects.push( child );
 					objects.push( child );
@@ -80,7 +80,7 @@
 					child = new THREE.Mesh( geometry, material );
 					child = new THREE.Mesh( geometry, material );
 					child.position.x = - 100;
 					child.position.x = - 100;
 
 
-					object.addChild( child );
+					object.add( child );
 					object = child;
 					object = child;
 
 
 					objects.push( child );
 					objects.push( child );
@@ -94,7 +94,7 @@
 					child = new THREE.Mesh( geometry, material );
 					child = new THREE.Mesh( geometry, material );
 					child.position.y = - 100;
 					child.position.y = - 100;
 
 
-					object.addChild( child );
+					object.add( child );
 					object = child;
 					object = child;
 
 
 					objects.push( child );
 					objects.push( child );
@@ -108,7 +108,7 @@
 					child = new THREE.Mesh( geometry, material );
 					child = new THREE.Mesh( geometry, material );
 					child.position.y = 100;
 					child.position.y = 100;
 
 
-					object.addChild( child );
+					object.add( child );
 					object = child;
 					object = child;
 
 
 					objects.push( child );
 					objects.push( child );
@@ -122,7 +122,7 @@
 					child = new THREE.Mesh( geometry, material );
 					child = new THREE.Mesh( geometry, material );
 					child.position.z = - 100;
 					child.position.z = - 100;
 
 
-					object.addChild( child );
+					object.add( child );
 					object = child;
 					object = child;
 
 
 					objects.push( child );
 					objects.push( child );
@@ -136,14 +136,14 @@
 					child = new THREE.Mesh( geometry, material );
 					child = new THREE.Mesh( geometry, material );
 					child.position.z = 100;
 					child.position.z = 100;
 
 
-					object.addChild( child );
+					object.add( child );
 					object = child;
 					object = child;
 
 
 					objects.push( child );
 					objects.push( child );
 
 
 				}
 				}
 
 
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				renderer = new THREE.WebGLRenderer();
 				renderer = new THREE.WebGLRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 5 - 5
examples/webgl_geometry_large_mesh.html

@@ -97,7 +97,7 @@
 				mesh.rotation.z = rz;
 				mesh.rotation.z = rz;
 				mesh.overdraw = true;
 				mesh.overdraw = true;
 				mesh.updateMatrix();
 				mesh.updateMatrix();
-				scene.addObject(mesh);
+				scene.add(mesh);
 
 
 			}
 			}
 
 
@@ -115,20 +115,20 @@
 				// LIGHTS
 				// LIGHTS
 
 
 				var ambient = new THREE.AmbientLight( 0x101010 );
 				var ambient = new THREE.AmbientLight( 0x101010 );
-				scene.addLight( ambient );
+				scene.add( ambient );
 
 
 				directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 );
 				directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 );
 				directionalLight.position.x = 1;
 				directionalLight.position.x = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.z = 2;
 				directionalLight.position.z = 2;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				pointLight = new THREE.PointLight( 0xffaa00 );
 				pointLight = new THREE.PointLight( 0xffaa00 );
 				pointLight.position.x = 0;
 				pointLight.position.x = 0;
 				pointLight.position.y = 0;
 				pointLight.position.y = 0;
 				pointLight.position.z = 0;
 				pointLight.position.z = 0;
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				// light representation
 				// light representation
 				sphere = new THREE.SphereGeometry( 100, 16, 8, 1 );
 				sphere = new THREE.SphereGeometry( 100, 16, 8, 1 );
@@ -137,7 +137,7 @@
 				lightMesh.position = pointLight.position;
 				lightMesh.position = pointLight.position;
 				lightMesh.overdraw = true;
 				lightMesh.overdraw = true;
 				lightMesh.updateMatrix();
 				lightMesh.updateMatrix();
-				scene.addObject( lightMesh );
+				scene.add( lightMesh );
 
 
 
 
 				if ( render_gl ) {
 				if ( render_gl ) {

+ 3 - 3
examples/webgl_geometry_minecraft.html

@@ -151,17 +151,17 @@
 				}
 				}
 
 
 				mesh = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial() );
 				mesh = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial() );
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				var ambientLight = new THREE.AmbientLight( 0xcccccc );
 				var ambientLight = new THREE.AmbientLight( 0xcccccc );
-				scene.addLight( ambientLight );
+				scene.add( ambientLight );
 
 
 				var directionalLight = new THREE.DirectionalLight( 0xffffff, 1.5 );
 				var directionalLight = new THREE.DirectionalLight( 0xffffff, 1.5 );
 				directionalLight.position.x = 1;
 				directionalLight.position.x = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.z = 0.5;
 				directionalLight.position.z = 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				renderer = new THREE.WebGLRenderer();
 				renderer = new THREE.WebGLRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 3 - 3
examples/webgl_geometry_minecraft_ao.html

@@ -438,17 +438,17 @@
 				}
 				}
 
 
 				mesh = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial() );
 				mesh = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial() );
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				var ambientLight = new THREE.AmbientLight( 0xcccccc );
 				var ambientLight = new THREE.AmbientLight( 0xcccccc );
-				scene.addLight( ambientLight );
+				scene.add( ambientLight );
 
 
 				var directionalLight = new THREE.DirectionalLight( 0xffffff, 1.5 );
 				var directionalLight = new THREE.DirectionalLight( 0xffffff, 1.5 );
 				directionalLight.position.x = 1;
 				directionalLight.position.x = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.z = 0.5;
 				directionalLight.position.z = 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				renderer = new THREE.WebGLRenderer();
 				renderer = new THREE.WebGLRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 8 - 8
examples/webgl_geometry_shapes.html

@@ -65,11 +65,11 @@
 				var light = new THREE.DirectionalLight( 0xffffff );
 				var light = new THREE.DirectionalLight( 0xffffff );
 				light.position.set( 0, 0, 1 );
 				light.position.set( 0, 0, 1 );
 				light.position.normalize();
 				light.position.normalize();
-				scene.addLight( light );
+				scene.add( light );
 
 
 				parent = new THREE.Object3D();
 				parent = new THREE.Object3D();
 				parent.position.y = 50;
 				parent.position.y = 50;
-				scene.addChild( parent );
+				scene.add( parent );
 
 
 				function addGeometry( geometry, points, spacedPoints, color, x, y, z, rx, ry, rz, s ) {
 				function addGeometry( geometry, points, spacedPoints, color, x, y, z, rx, ry, rz, s ) {
 
 
@@ -79,7 +79,7 @@
 					mesh.position.set( x, y, z - 75 );
 					mesh.position.set( x, y, z - 75 );
 					mesh.rotation.set( rx, ry, rz );
 					mesh.rotation.set( rx, ry, rz );
 					mesh.scale.set( s, s, s );
 					mesh.scale.set( s, s, s );
-					parent.addChild( mesh );
+					parent.add( mesh );
 
 
 					// solid line
 					// solid line
 
 
@@ -87,7 +87,7 @@
 					line.position.set( x, y, z + 25 );
 					line.position.set( x, y, z + 25 );
 					line.rotation.set( rx, ry, rz );
 					line.rotation.set( rx, ry, rz );
 					line.scale.set( s, s, s );
 					line.scale.set( s, s, s );
-					parent.addChild( line );
+					parent.add( line );
 
 
 					// transparent line from real points
 					// transparent line from real points
 
 
@@ -95,7 +95,7 @@
 					line.position.set( x, y, z + 75 );
 					line.position.set( x, y, z + 75 );
 					line.rotation.set( rx, ry, rz );
 					line.rotation.set( rx, ry, rz );
 					line.scale.set( s, s, s );
 					line.scale.set( s, s, s );
-					parent.addChild( line );
+					parent.add( line );
 
 
 					// vertices from real points
 					// vertices from real points
 
 
@@ -104,7 +104,7 @@
 					particles.position.set( x, y, z + 75 );
 					particles.position.set( x, y, z + 75 );
 					particles.rotation.set( rx, ry, rz );
 					particles.rotation.set( rx, ry, rz );
 					particles.scale.set( s, s, s );
 					particles.scale.set( s, s, s );
-					parent.addChild( particles );
+					parent.add( particles );
 
 
 					// transparent line from equidistance sampled points
 					// transparent line from equidistance sampled points
 
 
@@ -112,7 +112,7 @@
 					line.position.set( x, y, z + 100 );
 					line.position.set( x, y, z + 100 );
 					line.rotation.set( rx, ry, rz );
 					line.rotation.set( rx, ry, rz );
 					line.scale.set( s, s, s );
 					line.scale.set( s, s, s );
-					parent.addChild( line );
+					parent.add( line );
 
 
 					// equidistance sampled points
 					// equidistance sampled points
 
 
@@ -121,7 +121,7 @@
 					particles2.position.set( x, y, z + 100 );
 					particles2.position.set( x, y, z + 100 );
 					particles2.rotation.set( rx, ry, rz );
 					particles2.rotation.set( rx, ry, rz );
 					particles2.scale.set( s, s, s );
 					particles2.scale.set( s, s, s );
-					parent.addChild( particles2 );
+					parent.add( particles2 );
 
 
 				}
 				}
 
 

+ 1 - 1
examples/webgl_geometry_terrain.html

@@ -96,7 +96,7 @@
 
 
 				mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { map: texture } ) );
 				mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { map: texture } ) );
 				mesh.rotation.x = - 90 * Math.PI / 180;
 				mesh.rotation.x = - 90 * Math.PI / 180;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				renderer = new THREE.WebGLRenderer();
 				renderer = new THREE.WebGLRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 1 - 1
examples/webgl_geometry_terrain_fog.html

@@ -96,7 +96,7 @@
 
 
 				mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { map: texture } ) );
 				mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { map: texture } ) );
 				mesh.rotation.x = - 90 * Math.PI / 180;
 				mesh.rotation.x = - 90 * Math.PI / 180;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				renderer = new THREE.WebGLRenderer( { clearColor: 0xefd1b5, clearAlpha: 1 } );
 				renderer = new THREE.WebGLRenderer( { clearColor: 0xefd1b5, clearAlpha: 1 } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 8 - 8
examples/webgl_geometry_text.html

@@ -175,11 +175,11 @@
 				var dirLight = new THREE.DirectionalLight( 0xffffff, 0.125 );
 				var dirLight = new THREE.DirectionalLight( 0xffffff, 0.125 );
 				dirLight.position.set( 0, 0, 1 );
 				dirLight.position.set( 0, 0, 1 );
 				dirLight.position.normalize();
 				dirLight.position.normalize();
-				scene.addLight( dirLight );
+				scene.add( dirLight );
 
 
 				var pointLight = new THREE.PointLight( 0xffffff, 1.5 );
 				var pointLight = new THREE.PointLight( 0xffffff, 1.5 );
 				pointLight.position.set( 0, 100, 90 );
 				pointLight.position.set( 0, 100, 90 );
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				//text = capitalize( font ) + " " + capitalize( weight );
 				//text = capitalize( font ) + " " + capitalize( weight );
 				//text = "abcdefghijklmnopqrstuvwxyz0123456789";
 				//text = "abcdefghijklmnopqrstuvwxyz0123456789";
@@ -228,14 +228,14 @@
 				parent = new THREE.Object3D();
 				parent = new THREE.Object3D();
 				parent.position.y = 100;
 				parent.position.y = 100;
 
 
-				scene.addChild( parent );
+				scene.add( parent );
 
 
 				createText();
 				createText();
 
 
 				var plane = new THREE.Mesh( new THREE.PlaneGeometry( 10000, 10000 ), new THREE.MeshBasicMaterial( { color: 0xffffff, opacity: 0.5, transparent: true } ) );
 				var plane = new THREE.Mesh( new THREE.PlaneGeometry( 10000, 10000 ), new THREE.MeshBasicMaterial( { color: 0xffffff, opacity: 0.5, transparent: true } ) );
 				plane.rotation.x = -1.57;
 				plane.rotation.x = -1.57;
 				plane.position.y = 100;
 				plane.position.y = 100;
-				scene.addChild( plane );
+				scene.add( plane );
 
 
 				// RENDERER
 				// RENDERER
 
 
@@ -499,7 +499,7 @@
 				textMesh1.rotation.x = 0;
 				textMesh1.rotation.x = 0;
 				textMesh1.rotation.y = Math.PI * 2;
 				textMesh1.rotation.y = Math.PI * 2;
 
 
-				parent.addChild( textMesh1 );
+				parent.add( textMesh1 );
 
 
 				if ( mirror ) {
 				if ( mirror ) {
 
 
@@ -512,7 +512,7 @@
 					textMesh2.rotation.x = Math.PI;
 					textMesh2.rotation.x = Math.PI;
 					textMesh2.rotation.y = Math.PI * 2;
 					textMesh2.rotation.y = Math.PI * 2;
 
 
-					parent.addChild( textMesh2 );
+					parent.add( textMesh2 );
 
 
 				}
 				}
 
 
@@ -522,8 +522,8 @@
 
 
 				updatePermalink();
 				updatePermalink();
 
 
-				scene.removeChild( textMesh1 );
-				if ( mirror ) scene.removeChild( textMesh2 );
+				scene.remove( textMesh1 );
+				if ( mirror ) scene.remove( textMesh2 );
 
 
 				if ( !text ) return;
 				if ( !text ) return;
 
 

+ 2 - 2
examples/webgl_hdr.html

@@ -125,7 +125,7 @@
 				directionalLight.position.y = 0;
 				directionalLight.position.y = 0;
 				directionalLight.position.z = 1;
 				directionalLight.position.z = 1;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				var texture = THREE.ImageUtils.loadTexture( "textures/memorial.png" );
 				var texture = THREE.ImageUtils.loadTexture( "textures/memorial.png" );
 				texture.minFilter = THREE.LinearFilter;
 				texture.minFilter = THREE.LinearFilter;
@@ -147,7 +147,7 @@
 
 
 				quad = new THREE.Mesh( plane, materialHDR );
 				quad = new THREE.Mesh( plane, materialHDR );
 				quad.position.z = -100;
 				quad.position.z = -100;
-				scene.addObject( quad );
+				scene.add( quad );
 
 
 				renderer = new THREE.WebGLRenderer();
 				renderer = new THREE.WebGLRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 3 - 3
examples/webgl_interactive_cubes.html

@@ -53,14 +53,14 @@
 				light.position.y = 1;
 				light.position.y = 1;
 				light.position.z = 1;
 				light.position.z = 1;
 				light.position.normalize();
 				light.position.normalize();
-				scene.addLight( light );
+				scene.add( light );
 
 
 				var light = new THREE.DirectionalLight( 0xffffff );
 				var light = new THREE.DirectionalLight( 0xffffff );
 				light.position.x = - 1;
 				light.position.x = - 1;
 				light.position.y = - 1;
 				light.position.y = - 1;
 				light.position.z = - 1;
 				light.position.z = - 1;
 				light.position.normalize();
 				light.position.normalize();
-				scene.addLight( light );
+				scene.add( light );
 
 
 				var geometry = new THREE.CubeGeometry( 20, 20, 20 );
 				var geometry = new THREE.CubeGeometry( 20, 20, 20 );
 
 
@@ -76,7 +76,7 @@
 					object.scale.x = Math.random() * 2 + 1;
 					object.scale.x = Math.random() * 2 + 1;
 					object.scale.y = Math.random() * 2 + 1;
 					object.scale.y = Math.random() * 2 + 1;
 					object.scale.z = Math.random() * 2 + 1;
 					object.scale.z = Math.random() * 2 + 1;
-					scene.addObject( object );
+					scene.add( object );
 
 
 				}
 				}
 
 

+ 7 - 7
examples/webgl_interactive_voxelpainter.html

@@ -64,7 +64,7 @@
 				rollOverGeo = new THREE.CubeGeometry( 50, 50, 50 );
 				rollOverGeo = new THREE.CubeGeometry( 50, 50, 50 );
 				rollOverMaterial = new THREE.MeshBasicMaterial( { color: 0xff0000, opacity: 0.5, transparent: true } );
 				rollOverMaterial = new THREE.MeshBasicMaterial( { color: 0xff0000, opacity: 0.5, transparent: true } );
 				rollOverMesh = new THREE.Mesh( rollOverGeo, rollOverMaterial );
 				rollOverMesh = new THREE.Mesh( rollOverGeo, rollOverMaterial );
-				scene.addObject( rollOverMesh );
+				scene.add( rollOverMesh );
 
 
 
 
 				// cubes
 				// cubes
@@ -80,7 +80,7 @@
 
 
 				plane = new THREE.Mesh( new THREE.PlaneGeometry( 1000, 1000, 20, 20 ), new THREE.MeshBasicMaterial( { color: 0x555555, wireframe: true } ) );
 				plane = new THREE.Mesh( new THREE.PlaneGeometry( 1000, 1000, 20, 20 ), new THREE.MeshBasicMaterial( { color: 0x555555, wireframe: true } ) );
 				plane.rotation.x = - 90 * Math.PI / 180;
 				plane.rotation.x = - 90 * Math.PI / 180;
-				scene.addObject( plane );
+				scene.add( plane );
 
 
 				mouse2D = new THREE.Vector3( 0, 10000, 0.5 );
 				mouse2D = new THREE.Vector3( 0, 10000, 0.5 );
 				ray = new THREE.Ray( camera.position, null );
 				ray = new THREE.Ray( camera.position, null );
@@ -88,21 +88,21 @@
 				// Lights
 				// Lights
 
 
 				var ambientLight = new THREE.AmbientLight( 0x606060 );
 				var ambientLight = new THREE.AmbientLight( 0x606060 );
-				scene.addLight( ambientLight );
+				scene.add( ambientLight );
 
 
 				var directionalLight = new THREE.DirectionalLight( 0xffffff );
 				var directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				var directionalLight = new THREE.DirectionalLight( 0x808080 );
 				var directionalLight = new THREE.DirectionalLight( 0x808080 );
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				renderer = new THREE.WebGLRenderer( { antialias: true } );
 				renderer = new THREE.WebGLRenderer( { antialias: true } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );
@@ -176,7 +176,7 @@
 
 
 						if ( intersector.object != plane ) {
 						if ( intersector.object != plane ) {
 
 
-							scene.removeObject( intersector.object );
+							scene.remove( intersector.object );
 
 
 						}
 						}
 
 
@@ -191,7 +191,7 @@
 						voxel.position.copy( voxelPosition );
 						voxel.position.copy( voxelPosition );
 						voxel.matrixAutoUpdate = false;
 						voxel.matrixAutoUpdate = false;
 						voxel.updateMatrix();
 						voxel.updateMatrix();
-						scene.addObject( voxel );
+						scene.add( voxel );
 
 
 					}
 					}
 
 

+ 8 - 18
examples/webgl_lights_pointlights.html

@@ -77,48 +77,38 @@
 
 
 					object = new THREE.Mesh( geometry, new THREE.MeshPhongMaterial( { ambient: 0x555555, color: 0x555555, specular: 0xffffff, shininess: 50, shading: THREE.SmoothShading }  )  );
 					object = new THREE.Mesh( geometry, new THREE.MeshPhongMaterial( { ambient: 0x555555, color: 0x555555, specular: 0xffffff, shininess: 50, shading: THREE.SmoothShading }  )  );
 					object.scale.x = object.scale.y = object.scale.z = 0.80;
 					object.scale.x = object.scale.y = object.scale.z = 0.80;
-					scene.addObject( object );
+					scene.add( object );
 
 
 					loader.statusDomElement.style.display = "none";
 					loader.statusDomElement.style.display = "none";
 
 
 				};
 				};
 
 
-				//loader.load( { model: "obj/walt/WaltHead_slim.js", callback: callback } );
 				loader.load( { model: "obj/walt/WaltHead_bin.js", callback: callback } );
 				loader.load( { model: "obj/walt/WaltHead_bin.js", callback: callback } );
 
 
-				/*
-				var directionalLight = new THREE.DirectionalLight( 0x111111, 0.9 );
-				directionalLight.position.x = 1;
-				directionalLight.position.y = 1;
-				directionalLight.position.z = 2;
-				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
-				*/
-
-				scene.addLight( new THREE.AmbientLight( 0x00000 ) );
+				scene.add( new THREE.AmbientLight( 0x00000 ) );
 
 
 				light1 = new THREE.PointLight( 0xff0040, 2, 50 );
 				light1 = new THREE.PointLight( 0xff0040, 2, 50 );
-				scene.addLight( light1 );
+				scene.add( light1 );
 
 
 				light2 = new THREE.PointLight( 0x0040ff, 2, 50 );
 				light2 = new THREE.PointLight( 0x0040ff, 2, 50 );
-				scene.addLight( light2 );
+				scene.add( light2 );
 
 
 				light3 = new THREE.PointLight( 0x80ff80, 2, 50 );
 				light3 = new THREE.PointLight( 0x80ff80, 2, 50 );
-				scene.addLight( light3 );
+				scene.add( light3 );
 
 
 				var sphere = new THREE.SphereGeometry( 0.5, 16, 8 );
 				var sphere = new THREE.SphereGeometry( 0.5, 16, 8 );
 
 
 				var l1 = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color: 0xff0040 } ) );
 				var l1 = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color: 0xff0040 } ) );
 				l1.position = light1.position;
 				l1.position = light1.position;
-				scene.addObject( l1 );
+				scene.add( l1 );
 
 
 				var l2 = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color: 0x0040ff } ) );
 				var l2 = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color: 0x0040ff } ) );
 				l2.position = light2.position;
 				l2.position = light2.position;
-				scene.addObject( l2 );
+				scene.add( l2 );
 
 
 				var l3 = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color: 0x80ff80 } ) );
 				var l3 = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color: 0x80ff80 } ) );
 				l3.position = light3.position;
 				l3.position = light3.position;
-				scene.addObject( l3 );
+				scene.add( l3 );
 
 
 				renderer = new THREE.WebGLRenderer();
 				renderer = new THREE.WebGLRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 1 - 1
examples/webgl_lines_colors.html

@@ -135,7 +135,7 @@
 					line.position.x = p[ 2 ][ 0 ];
 					line.position.x = p[ 2 ][ 0 ];
 					line.position.y = p[ 2 ][ 1 ];
 					line.position.y = p[ 2 ][ 1 ];
 					line.position.z = p[ 2 ][ 2 ];
 					line.position.z = p[ 2 ][ 2 ];
-					scene.addObject( line );
+					scene.add( line );
 
 
 				}
 				}
 
 

+ 1 - 1
examples/webgl_lines_cubes.html

@@ -112,7 +112,7 @@
 					line.position.x = p[ 2 ][ 0 ];
 					line.position.x = p[ 2 ][ 0 ];
 					line.position.y = p[ 2 ][ 1 ];
 					line.position.y = p[ 2 ][ 1 ];
 					line.position.z = p[ 2 ][ 2 ];
 					line.position.z = p[ 2 ][ 2 ];
-					scene.addObject( line );
+					scene.add( line );
 
 
 				}
 				}
 
 

+ 1 - 1
examples/webgl_lines_sphere.html

@@ -111,7 +111,7 @@
 					line.originalScale = p[ 0 ];
 					line.originalScale = p[ 0 ];
 					line.rotation.y = Math.random() * Math.PI;
 					line.rotation.y = Math.random() * Math.PI;
 					line.updateMatrix();
 					line.updateMatrix();
-					scene.addObject( line );
+					scene.add( line );
 
 
 				}
 				}
 
 

+ 1 - 1
examples/webgl_lines_splines.html

@@ -137,7 +137,7 @@
 					line.position.x = p[ 2 ][ 0 ];
 					line.position.x = p[ 2 ][ 0 ];
 					line.position.y = p[ 2 ][ 1 ];
 					line.position.y = p[ 2 ][ 1 ];
 					line.position.z = p[ 2 ][ 2 ];
 					line.position.z = p[ 2 ][ 2 ];
-					scene.addObject( line );
+					scene.add( line );
 
 
 				}
 				}
 
 

+ 3 - 3
examples/webgl_lod.html

@@ -74,12 +74,12 @@
 
 
 				var light = new THREE.PointLight( 0xff2200 );
 				var light = new THREE.PointLight( 0xff2200 );
 				light.position.set( 0, 0, 0 );
 				light.position.set( 0, 0, 0 );
-				scene.addLight( light );
+				scene.add( light );
 
 
 				var light = new THREE.DirectionalLight( 0xffffff );
 				var light = new THREE.DirectionalLight( 0xffffff );
 				light.position.set( 0, 0, 1 );
 				light.position.set( 0, 0, 1 );
 				light.position.normalize();
 				light.position.normalize();
-				scene.addLight( light );
+				scene.add( light );
 
 
 				var material = new THREE.MeshLambertMaterial( { color: 0xffffff, wireframe: true } );
 				var material = new THREE.MeshLambertMaterial( { color: 0xffffff, wireframe: true } );
 
 
@@ -113,7 +113,7 @@
 					lod.position.z = 10000 * ( 0.5 - Math.random() );
 					lod.position.z = 10000 * ( 0.5 - Math.random() );
 					lod.updateMatrix();
 					lod.updateMatrix();
 					lod.matrixAutoUpdate = false;
 					lod.matrixAutoUpdate = false;
-					scene.addObject( lod );
+					scene.add( lod );
 
 
 				}
 				}
 
 

+ 3 - 3
examples/webgl_lod_text.html

@@ -89,12 +89,12 @@
 
 
 				var light = new THREE.PointLight( 0xff2200 );
 				var light = new THREE.PointLight( 0xff2200 );
 				light.position.set( 0, 0, 0 );
 				light.position.set( 0, 0, 0 );
-				scene.addLight( light );
+				scene.add( light );
 
 
 				var light = new THREE.DirectionalLight( 0xffffff );
 				var light = new THREE.DirectionalLight( 0xffffff );
 				light.position.set( 0, 0, 1 );
 				light.position.set( 0, 0, 1 );
 				light.position.normalize();
 				light.position.normalize();
-				scene.addLight( light );
+				scene.add( light );
 
 
 				var wireMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, opacity: 0.5, wireframe: true } );
 				var wireMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, opacity: 0.5, wireframe: true } );
 				
 				
@@ -154,7 +154,7 @@
 					lod.position.z = 10000 * ( 0.5 - Math.random() );
 					lod.position.z = 10000 * ( 0.5 - Math.random() );
 					lod.updateMatrix();
 					lod.updateMatrix();
 					lod.matrixAutoUpdate = false;
 					lod.matrixAutoUpdate = false;
-					scene.addObject( lod );
+					scene.add( lod );
 
 
 				}
 				}
 
 

+ 6 - 6
examples/webgl_materials.html

@@ -63,7 +63,7 @@
 				}
 				}
 
 
 				var line = new THREE.Line( geometry, line_material, THREE.LinePieces );
 				var line = new THREE.Line( geometry, line_material, THREE.LinePieces );
-				scene.addObject( line );
+				scene.add( line );
 
 
 				// Materials
 				// Materials
 
 
@@ -123,26 +123,26 @@
 
 
 					objects.push( sphere );
 					objects.push( sphere );
 
 
-					scene.addObject( sphere );
+					scene.add( sphere );
 
 
 				}
 				}
 
 
 				particleLight = new THREE.Mesh( new THREE.SphereGeometry( 4, 8, 8 ), new THREE.MeshBasicMaterial( { color: 0xffffff } ) );
 				particleLight = new THREE.Mesh( new THREE.SphereGeometry( 4, 8, 8 ), new THREE.MeshBasicMaterial( { color: 0xffffff } ) );
-				scene.addObject( particleLight );
+				scene.add( particleLight );
 
 
 				// Lights
 				// Lights
 
 
-				scene.addLight( new THREE.AmbientLight( 0x202020 ) );
+				scene.add( new THREE.AmbientLight( 0x202020 ) );
 
 
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.x = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.y = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.z = Math.random() - 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				pointLight = new THREE.PointLight( 0xffffff, 1 );
 				pointLight = new THREE.PointLight( 0xffffff, 1 );
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				renderer = new THREE.WebGLRenderer();
 				renderer = new THREE.WebGLRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 6 - 6
examples/webgl_materials_cars.html

@@ -174,27 +174,27 @@
 				// LIGHTS
 				// LIGHTS
 
 
 				var ambient = new THREE.AmbientLight( 0x555555 );
 				var ambient = new THREE.AmbientLight( 0x555555 );
-				scene.addLight( ambient );
+				scene.add( ambient );
 
 
 				directionalLight = new THREE.DirectionalLight( 0xffffff, 2 );
 				directionalLight = new THREE.DirectionalLight( 0xffffff, 2 );
 				directionalLight.position.x = 2;
 				directionalLight.position.x = 2;
 				directionalLight.position.y = 1.2;
 				directionalLight.position.y = 1.2;
 				directionalLight.position.z = 10;
 				directionalLight.position.z = 10;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				directionalLight = new THREE.DirectionalLight( 0xffffff, 1 );
 				directionalLight = new THREE.DirectionalLight( 0xffffff, 1 );
 				directionalLight.position.x = - 2;
 				directionalLight.position.x = - 2;
 				directionalLight.position.y = 1.2;
 				directionalLight.position.y = 1.2;
 				directionalLight.position.z = - 10;
 				directionalLight.position.z = - 10;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				pointLight = new THREE.PointLight( 0xffaa00, 2 );
 				pointLight = new THREE.PointLight( 0xffaa00, 2 );
 				pointLight.position.x = 2000;
 				pointLight.position.x = 2000;
 				pointLight.position.y = 1200;
 				pointLight.position.y = 1200;
 				pointLight.position.z = 10000;
 				pointLight.position.z = 10000;
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				// Skybox
 				// Skybox
 
 
@@ -210,7 +210,7 @@
 				} ),
 				} ),
 
 
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
-				sceneCube.addObject( mesh );
+				sceneCube.add( mesh );
 
 
 				//
 				//
 
 
@@ -573,7 +573,7 @@
 				mesh.rotation.y = r[ 1 ];
 				mesh.rotation.y = r[ 1 ];
 				mesh.rotation.z = r[ 2 ];
 				mesh.rotation.z = r[ 2 ];
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				CARS[ car ].object = mesh;
 				CARS[ car ].object = mesh;
 
 

+ 6 - 6
examples/webgl_materials_cars_anaglyph.html

@@ -170,27 +170,27 @@
 				// LIGHTS
 				// LIGHTS
 
 
 				var ambient = new THREE.AmbientLight( 0x555555 );
 				var ambient = new THREE.AmbientLight( 0x555555 );
-				scene.addLight( ambient );
+				scene.add( ambient );
 
 
 				directionalLight = new THREE.DirectionalLight( 0xffffff, 2 );
 				directionalLight = new THREE.DirectionalLight( 0xffffff, 2 );
 				directionalLight.position.x = 2;
 				directionalLight.position.x = 2;
 				directionalLight.position.y = 1.2;
 				directionalLight.position.y = 1.2;
 				directionalLight.position.z = 10;
 				directionalLight.position.z = 10;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				directionalLight = new THREE.DirectionalLight( 0xffffff, 1 );
 				directionalLight = new THREE.DirectionalLight( 0xffffff, 1 );
 				directionalLight.position.x = - 2;
 				directionalLight.position.x = - 2;
 				directionalLight.position.y = 1.2;
 				directionalLight.position.y = 1.2;
 				directionalLight.position.z = - 10;
 				directionalLight.position.z = - 10;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				pointLight = new THREE.PointLight( 0xffaa00, 2 );
 				pointLight = new THREE.PointLight( 0xffaa00, 2 );
 				pointLight.position.x = 2000;
 				pointLight.position.x = 2000;
 				pointLight.position.y = 1200;
 				pointLight.position.y = 1200;
 				pointLight.position.z = 10000;
 				pointLight.position.z = 10000;
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				// Skybox
 				// Skybox
 
 
@@ -206,7 +206,7 @@
 				} ),
 				} ),
 
 
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				//
 				//
 
 
@@ -568,7 +568,7 @@
 				mesh.rotation.y = r[ 1 ];
 				mesh.rotation.y = r[ 1 ];
 				mesh.rotation.z = r[ 2 ];
 				mesh.rotation.z = r[ 2 ];
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				CARS[ car ].object = mesh;
 				CARS[ car ].object = mesh;
 
 

+ 5 - 5
examples/webgl_materials_cars_camaro.html

@@ -76,20 +76,20 @@
 				// LIGHTS
 				// LIGHTS
 
 
 				var ambient = new THREE.AmbientLight( 0x555555 );
 				var ambient = new THREE.AmbientLight( 0x555555 );
-				scene.addLight( ambient );
+				scene.add( ambient );
 
 
 				directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight.position.x = 1;
 				directionalLight.position.x = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.z = 0.5;
 				directionalLight.position.z = 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				pointLight = new THREE.PointLight( 0xffaa00 );
 				pointLight = new THREE.PointLight( 0xffaa00 );
 				pointLight.position.x = 0;
 				pointLight.position.x = 0;
 				pointLight.position.y = 0;
 				pointLight.position.y = 0;
 				pointLight.position.z = 0;
 				pointLight.position.z = 0;
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 
 
 				sphere = new THREE.SphereGeometry( 100, 16, 8, 1 );
 				sphere = new THREE.SphereGeometry( 100, 16, 8, 1 );
@@ -98,7 +98,7 @@
 				lightMesh.position = pointLight.position;
 				lightMesh.position = pointLight.position;
 				lightMesh.overdraw = true;
 				lightMesh.overdraw = true;
 				lightMesh.updateMatrix();
 				lightMesh.updateMatrix();
-				scene.addObject(lightMesh);
+				scene.add(lightMesh);
 
 
 
 
 				webglRenderer = new THREE.WebGLRenderer();
 				webglRenderer = new THREE.WebGLRenderer();
@@ -190,7 +190,7 @@
 				var mesh = new THREE.Mesh( geometry, m );
 				var mesh = new THREE.Mesh( geometry, m );
 				mesh.rotation.y = 1;
 				mesh.rotation.y = 1;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				createButtons( materials.body, geometry );
 				createButtons( materials.body, geometry );
 
 

+ 5 - 5
examples/webgl_materials_cars_camaro_crosseyed.html

@@ -79,20 +79,20 @@
 				// LIGHTS
 				// LIGHTS
 
 
 				var ambient = new THREE.AmbientLight( 0x555555 );
 				var ambient = new THREE.AmbientLight( 0x555555 );
-				scene.addLight( ambient );
+				scene.add( ambient );
 
 
 				directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight.position.x = 1;
 				directionalLight.position.x = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.z = 0.5;
 				directionalLight.position.z = 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				pointLight = new THREE.PointLight( 0xffaa00 );
 				pointLight = new THREE.PointLight( 0xffaa00 );
 				pointLight.position.x = 0;
 				pointLight.position.x = 0;
 				pointLight.position.y = 0;
 				pointLight.position.y = 0;
 				pointLight.position.z = 0;
 				pointLight.position.z = 0;
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 
 
 				sphere = new THREE.SphereGeometry( 100, 16, 8, 1 );
 				sphere = new THREE.SphereGeometry( 100, 16, 8, 1 );
@@ -101,7 +101,7 @@
 				lightMesh.position = pointLight.position;
 				lightMesh.position = pointLight.position;
 				lightMesh.overdraw = true;
 				lightMesh.overdraw = true;
 				lightMesh.updateMatrix();
 				lightMesh.updateMatrix();
-				scene.addObject(lightMesh);
+				scene.add(lightMesh);
 
 
 
 
 				webglRenderer = new THREE.CrosseyedWebGLRenderer( { separation: 20, antialias: true } );
 				webglRenderer = new THREE.CrosseyedWebGLRenderer( { separation: 20, antialias: true } );
@@ -195,7 +195,7 @@
 				var mesh = new THREE.Mesh( geometry, m );
 				var mesh = new THREE.Mesh( geometry, m );
 				mesh.rotation.y = 1;
 				mesh.rotation.y = 1;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				createButtons( materials.body, geometry );
 				createButtons( materials.body, geometry );
 
 

+ 7 - 7
examples/webgl_materials_cubemap.html

@@ -84,17 +84,17 @@
 				// LIGHTS
 				// LIGHTS
 
 
 				var ambient = new THREE.AmbientLight( 0xffffff );
 				var ambient = new THREE.AmbientLight( 0xffffff );
-				scene.addLight( ambient );
+				scene.add( ambient );
 
 
 				pointLight = new THREE.PointLight( 0xffffff, 2 );
 				pointLight = new THREE.PointLight( 0xffffff, 2 );
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				// light representation
 				// light representation
 				sphere = new THREE.SphereGeometry( 100, 16, 8 );
 				sphere = new THREE.SphereGeometry( 100, 16, 8 );
 				lightMesh = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color:0xffaa00 } ) );
 				lightMesh = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color:0xffaa00 } ) );
 				lightMesh.position = pointLight.position;
 				lightMesh.position = pointLight.position;
 				lightMesh.scale.x = lightMesh.scale.y = lightMesh.scale.z = 0.05;
 				lightMesh.scale.x = lightMesh.scale.y = lightMesh.scale.z = 0.05;
-				scene.addObject(lightMesh);
+				scene.add(lightMesh);
 
 
 				var path = "textures/cube/SwedishRoyalCastle/";
 				var path = "textures/cube/SwedishRoyalCastle/";
 				var format = '.jpg';
 				var format = '.jpg';
@@ -126,7 +126,7 @@
 				} ),
 				} ),
 
 
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 10, 10, 10, 1, 1, 1, null, true ), material );
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 10, 10, 10, 1, 1, 1, null, true ), material );
-				sceneCube.addObject( mesh );
+				sceneCube.add( mesh );
 
 
 				//
 				//
 
 
@@ -155,19 +155,19 @@
 				var mesh = new THREE.Mesh( geometry, m1 );
 				var mesh = new THREE.Mesh( geometry, m1 );
 				mesh.position.z = - 100;
 				mesh.position.z = - 100;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				var mesh = new THREE.Mesh( geometry, m2 );
 				var mesh = new THREE.Mesh( geometry, m2 );
 				mesh.position.x = - 900;
 				mesh.position.x = - 900;
 				mesh.position.z = - 100;
 				mesh.position.z = - 100;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				var mesh = new THREE.Mesh( geometry, m3 );
 				var mesh = new THREE.Mesh( geometry, m3 );
 				mesh.position.x = 900;
 				mesh.position.x = 900;
 				mesh.position.z = - 100;
 				mesh.position.z = - 100;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				loader.statusDomElement.style.display = "none";
 				loader.statusDomElement.style.display = "none";
 
 

+ 2 - 2
examples/webgl_materials_cubemap_balls_reflection.html

@@ -97,7 +97,7 @@
 					mesh.position.y = Math.random() * 10000 - 5000;
 					mesh.position.y = Math.random() * 10000 - 5000;
 					mesh.position.z = Math.random() * 10000 - 5000;
 					mesh.position.z = Math.random() * 10000 - 5000;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = Math.random() * 3 + 1;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = Math.random() * 3 + 1;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 					spheres.push( mesh );
 					spheres.push( mesh );
 
 
@@ -117,7 +117,7 @@
 				} ),
 				} ),
 
 
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
-				sceneCube.addObject( mesh );
+				sceneCube.add( mesh );
 
 
 				//
 				//
 
 

+ 2 - 2
examples/webgl_materials_cubemap_balls_reflection_anaglyph.html

@@ -93,7 +93,7 @@
 					mesh.position.y = Math.random() * 10000 - 5000;
 					mesh.position.y = Math.random() * 10000 - 5000;
 					mesh.position.z = Math.random() * 10000 - 5000;
 					mesh.position.z = Math.random() * 10000 - 5000;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = Math.random() * 3 + 1;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = Math.random() * 3 + 1;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 					spheres.push( mesh );
 					spheres.push( mesh );
 
 
@@ -113,7 +113,7 @@
 				} ),
 				} ),
 
 
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				//
 				//
 
 

+ 2 - 2
examples/webgl_materials_cubemap_balls_refraction.html

@@ -96,7 +96,7 @@
 					mesh.position.y = Math.random() * 10000 - 5000;
 					mesh.position.y = Math.random() * 10000 - 5000;
 					mesh.position.z = Math.random() * 10000 - 5000;
 					mesh.position.z = Math.random() * 10000 - 5000;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = Math.random() * 3 + 1;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = Math.random() * 3 + 1;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 					spheres.push( mesh );
 					spheres.push( mesh );
 
 
@@ -116,7 +116,7 @@
 				} ),
 				} ),
 
 
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
-				sceneCube.addObject( mesh );
+				sceneCube.add( mesh );
 
 
 				//
 				//
 
 

+ 2 - 2
examples/webgl_materials_cubemap_balls_refraction_crosseyed.html

@@ -95,7 +95,7 @@
 					mesh.position.y = Math.random() * 10000 - 5000;
 					mesh.position.y = Math.random() * 10000 - 5000;
 					mesh.position.z = Math.random() * 10000 - 5000;
 					mesh.position.z = Math.random() * 10000 - 5000;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = Math.random() * 3 + 1;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = Math.random() * 3 + 1;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 					spheres.push( mesh );
 					spheres.push( mesh );
 
 
@@ -115,7 +115,7 @@
 				} ),
 				} ),
 
 
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				//
 				//
 
 

+ 2 - 2
examples/webgl_materials_cubemap_escher.html

@@ -85,7 +85,7 @@
 
 
 				var mesh = new THREE.Mesh( geometry, material );
 				var mesh = new THREE.Mesh( geometry, material );
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 16;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 16;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				// Skybox
 				// Skybox
 
 
@@ -101,7 +101,7 @@
 				} ),
 				} ),
 
 
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 6000, 6000, 6000, 1, 1, 1, null, true ), material );
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 6000, 6000, 6000, 1, 1, 1, null, true ), material );
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				//
 				//
 
 

+ 7 - 7
examples/webgl_materials_cubemap_refraction.html

@@ -82,10 +82,10 @@
 				// LIGHTS
 				// LIGHTS
 
 
 				var ambient = new THREE.AmbientLight( 0xffffff );
 				var ambient = new THREE.AmbientLight( 0xffffff );
-				scene.addLight( ambient );
+				scene.add( ambient );
 
 
 				pointLight = new THREE.PointLight( 0xffffff, 2 );
 				pointLight = new THREE.PointLight( 0xffffff, 2 );
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				// light representation
 				// light representation
 
 
@@ -93,7 +93,7 @@
 				lightMesh = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color:0xffaa00 } ) );
 				lightMesh = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color:0xffaa00 } ) );
 				lightMesh.position = pointLight.position;
 				lightMesh.position = pointLight.position;
 				lightMesh.scale.x = lightMesh.scale.y = lightMesh.scale.z = 0.05;
 				lightMesh.scale.x = lightMesh.scale.y = lightMesh.scale.z = 0.05;
-				scene.addObject(lightMesh);
+				scene.add(lightMesh);
 
 
 				// material samples
 				// material samples
 
 
@@ -123,7 +123,7 @@
 				} ),
 				} ),
 
 
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
-				sceneCube.addObject( mesh );
+				sceneCube.add( mesh );
 
 
 				//
 				//
 
 
@@ -154,19 +154,19 @@
 				var mesh = new THREE.Mesh( geometry, m1 );
 				var mesh = new THREE.Mesh( geometry, m1 );
 				mesh.position.z = z;
 				mesh.position.z = z;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				var mesh = new THREE.Mesh( geometry, m2 );
 				var mesh = new THREE.Mesh( geometry, m2 );
 				mesh.position.x = - 900;
 				mesh.position.x = - 900;
 				mesh.position.z = z;
 				mesh.position.z = z;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				var mesh = new THREE.Mesh( geometry, m3 );
 				var mesh = new THREE.Mesh( geometry, m3 );
 				mesh.position.x = 900;
 				mesh.position.x = 900;
 				mesh.position.z = z;
 				mesh.position.z = z;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = s;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				loader.statusDomElement.style.display = "none";
 				loader.statusDomElement.style.display = "none";
 
 

+ 1 - 1
examples/webgl_materials_grass.html

@@ -50,7 +50,7 @@
 					mesh.materials[0].map.needsUpdate = true;
 					mesh.materials[0].map.needsUpdate = true;
 					mesh.rotation.x = - 90 * ( Math.PI / 180 );
 					mesh.rotation.x = - 90 * ( Math.PI / 180 );
 					mesh.position.y = i * 0.25;
 					mesh.position.y = i * 0.25;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 				}
 				}
 
 

+ 6 - 6
examples/webgl_materials_normalmap.html

@@ -92,18 +92,18 @@
 				// LIGHTS
 				// LIGHTS
 
 
 				ambientLight = new THREE.AmbientLight( 0x111111 );
 				ambientLight = new THREE.AmbientLight( 0x111111 );
-				scene.addLight( ambientLight );
+				scene.add( ambientLight );
 
 
 				pointLight = new THREE.PointLight( 0xffff55 );
 				pointLight = new THREE.PointLight( 0xffff55 );
 				pointLight.position.z = 10000;
 				pointLight.position.z = 10000;
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				directionalLight = new THREE.DirectionalLight( 0xaaaa88 );
 				directionalLight = new THREE.DirectionalLight( 0xaaaa88 );
 				directionalLight.position.x = 1;
 				directionalLight.position.x = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.z = 0.5;
 				directionalLight.position.z = 0.5;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				// light representation
 				// light representation
 
 
@@ -111,7 +111,7 @@
 				lightMesh = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color: 0xffaa00 } ) );
 				lightMesh = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color: 0xffaa00 } ) );
 				lightMesh.position = pointLight.position;
 				lightMesh.position = pointLight.position;
 				lightMesh.scale.x = lightMesh.scale.y = lightMesh.scale.z = 0.05;
 				lightMesh.scale.x = lightMesh.scale.y = lightMesh.scale.z = 0.05;
-				scene.addObject(lightMesh);
+				scene.add(lightMesh);
 
 
 				// common material parameters
 				// common material parameters
 
 
@@ -176,12 +176,12 @@
 				mesh1 = new THREE.Mesh( geometry, material1 );
 				mesh1 = new THREE.Mesh( geometry, material1 );
 				mesh1.position.x = - scale * 12;
 				mesh1.position.x = - scale * 12;
 				mesh1.scale.set( scale, scale, scale );
 				mesh1.scale.set( scale, scale, scale );
-				scene.addObject( mesh1 );
+				scene.add( mesh1 );
 
 
 				mesh2 = new THREE.Mesh( geometry, material2 );
 				mesh2 = new THREE.Mesh( geometry, material2 );
 				mesh2.position.x = scale * 12;
 				mesh2.position.x = scale * 12;
 				mesh2.scale.set( scale, scale, scale );
 				mesh2.scale.set( scale, scale, scale );
-				scene.addObject( mesh2 );
+				scene.add( mesh2 );
 
 
 				loader.statusDomElement.style.display = "none";
 				loader.statusDomElement.style.display = "none";
 
 

+ 4 - 4
examples/webgl_materials_normalmap2.html

@@ -95,19 +95,19 @@
 				// LIGHTS
 				// LIGHTS
 
 
 				ambientLight = new THREE.AmbientLight( 0x444444 );
 				ambientLight = new THREE.AmbientLight( 0x444444 );
-				scene.addLight( ambientLight );
+				scene.add( ambientLight );
 
 
 				pointLight = new THREE.PointLight( 0xffffff );
 				pointLight = new THREE.PointLight( 0xffffff );
 				pointLight.position.z = 600;
 				pointLight.position.z = 600;
 
 
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight.position.x = 1;
 				directionalLight.position.x = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.y = 1;
 				directionalLight.position.z = - 1;
 				directionalLight.position.z = - 1;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				// material parameters
 				// material parameters
 
 
@@ -164,7 +164,7 @@
 				mesh1 = new THREE.Mesh( geometry, material );
 				mesh1 = new THREE.Mesh( geometry, material );
 				mesh1.position.y = - 50;
 				mesh1.position.y = - 50;
 				mesh1.scale.x = mesh1.scale.y = mesh1.scale.z = scale;
 				mesh1.scale.x = mesh1.scale.y = mesh1.scale.z = scale;
-				scene.addObject( mesh1 );
+				scene.add( mesh1 );
 
 
 				loader.statusDomElement.style.display = "none";
 				loader.statusDomElement.style.display = "none";
 
 

+ 5 - 5
examples/webgl_materials_shaders.html

@@ -86,7 +86,7 @@
 
 
 				mesh.overdraw = true;
 				mesh.overdraw = true;
 
 
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 			}
 			}
 
 
@@ -104,15 +104,15 @@
 				// LIGHTS
 				// LIGHTS
 
 
 				var ambient = new THREE.AmbientLight( 0x101010 );
 				var ambient = new THREE.AmbientLight( 0x101010 );
-				scene.addLight( ambient );
+				scene.add( ambient );
 
 
 				directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight = new THREE.DirectionalLight( 0xffffff );
 				directionalLight.position.set( 1, 1, 2 );
 				directionalLight.position.set( 1, 1, 2 );
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
+				scene.add( directionalLight );
 
 
 				pointLight = new THREE.PointLight( 0xffffff );
 				pointLight = new THREE.PointLight( 0xffffff );
-				scene.addLight( pointLight );
+				scene.add( pointLight );
 
 
 				// light representation
 				// light representation
 
 
@@ -121,7 +121,7 @@
 				lightMesh.scale.set( 0.05, 0.05, 0.05 );
 				lightMesh.scale.set( 0.05, 0.05, 0.05 );
 				lightMesh.position = pointLight.position;
 				lightMesh.position = pointLight.position;
 				lightMesh.overdraw = true;
 				lightMesh.overdraw = true;
-				scene.addObject( lightMesh );
+				scene.add( lightMesh );
 
 
 				// material samples
 				// material samples
 
 

+ 2 - 2
examples/webgl_materials_shaders_fresnel.html

@@ -107,7 +107,7 @@
 					mesh.position.y = Math.random() * 10000 - 5000;
 					mesh.position.y = Math.random() * 10000 - 5000;
 					mesh.position.z = Math.random() * 10000 - 5000;
 					mesh.position.z = Math.random() * 10000 - 5000;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = Math.random() * 3 + 1;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = Math.random() * 3 + 1;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 					spheres.push( mesh );
 					spheres.push( mesh );
 
 
@@ -129,7 +129,7 @@
 				} ),
 				} ),
 
 
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
 				mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000, 1, 1, 1, null, true ), material );
-				sceneCube.addObject( mesh );
+				sceneCube.add( mesh );
 
 
 				//
 				//
 
 

+ 5 - 5
examples/webgl_materials_texture_filters.html

@@ -147,8 +147,8 @@
 					texturePainting2.image = image;
 					texturePainting2.image = image;
 					texturePainting2.needsUpdate = true;
 					texturePainting2.needsUpdate = true;
 
 
-					scene.addObject( meshCanvas );
-					scene2.addObject( meshCanvas2 );
+					scene.add( meshCanvas );
+					scene2.add( meshCanvas2 );
 
 
 					var geometry = new THREE.PlaneGeometry( 100, 100 ),
 					var geometry = new THREE.PlaneGeometry( 100, 100 ),
 						mesh = new THREE.Mesh( geometry, materialPainting ),
 						mesh = new THREE.Mesh( geometry, materialPainting ),
@@ -162,14 +162,14 @@
 						zmesh.scale.x = image.width / 100;
 						zmesh.scale.x = image.width / 100;
 						zmesh.scale.y = image.height / 100;
 						zmesh.scale.y = image.height / 100;
 
 
-						zscene.addObject( zmesh );
+						zscene.add( zmesh );
 
 
 						var meshFrame = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { color: 0x000000, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 5 } )  );
 						var meshFrame = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { color: 0x000000, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 5 } )  );
 
 
 						meshFrame.scale.x = 1.1 * image.width / 100;
 						meshFrame.scale.x = 1.1 * image.width / 100;
 						meshFrame.scale.y = 1.1 * image.height / 100;
 						meshFrame.scale.y = 1.1 * image.height / 100;
 
 
-						zscene.addObject( meshFrame );
+						zscene.add( meshFrame );
 
 
 						var meshShadow = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { color: 0x000000, opacity: 0.9, transparent: true } )  );
 						var meshShadow = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { color: 0x000000, opacity: 0.9, transparent: true } )  );
 
 
@@ -177,7 +177,7 @@
 						meshShadow.scale.x = 1.1 * image.width / 100;
 						meshShadow.scale.x = 1.1 * image.width / 100;
 						meshShadow.scale.y = 1.1 * image.height / 100;
 						meshShadow.scale.y = 1.1 * image.height / 100;
 						meshShadow.rotation.x = -Math.PI / 2;
 						meshShadow.rotation.x = -Math.PI / 2;
-						zscene.addObject( meshShadow );
+						zscene.add( meshShadow );
 
 
 						meshShadow.position.y = - 1.1 * image.height/2;
 						meshShadow.position.y = - 1.1 * image.height/2;
 
 

+ 2 - 2
examples/webgl_materials_video.html

@@ -97,7 +97,7 @@
 				var light = new THREE.DirectionalLight( 0xffffff );
 				var light = new THREE.DirectionalLight( 0xffffff );
 				light.position.set( 0.5, 1, 1 );
 				light.position.set( 0.5, 1, 1 );
 				light.position.normalize();
 				light.position.normalize();
-				scene.addLight( light );
+				scene.add( light );
 
 
 				renderer = new THREE.WebGLRenderer( { antialias: false } );
 				renderer = new THREE.WebGLRenderer( { antialias: false } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );
@@ -160,7 +160,7 @@
 
 
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
 
 
-					scene.addObject(mesh);
+					scene.add(mesh);
 
 
 					mesh.dx = 0.001 * ( 0.5 - Math.random() );
 					mesh.dx = 0.001 * ( 0.5 - Math.random() );
 					mesh.dy = 0.001 * ( 0.5 - Math.random() );
 					mesh.dy = 0.001 * ( 0.5 - Math.random() );

+ 3 - 3
examples/webgl_morphtargets.html

@@ -103,10 +103,10 @@
 
 
 				var light = new THREE.PointLight( 0xff2200 );
 				var light = new THREE.PointLight( 0xff2200 );
 				light.position.set( 100, 100, 100 );
 				light.position.set( 100, 100, 100 );
-				scene.addLight( light );
+				scene.add( light );
 
 
 				var light = new THREE.AmbientLight( 0x333333 );
 				var light = new THREE.AmbientLight( 0x333333 );
-				scene.addLight( light );
+				scene.add( light );
 
 
 
 
 				var geometry = new THREE.CubeGeometry( 100, 100, 100 );
 				var geometry = new THREE.CubeGeometry( 100, 100, 100 );
@@ -138,7 +138,7 @@
 
 
 				mesh = new THREE.Mesh( geometry, material );
 				mesh = new THREE.Mesh( geometry, material );
 
 
-				scene.addChild( mesh );
+				scene.add( mesh );
 
 
 
 
 				renderer = new THREE.WebGLRenderer( { clearColor:0x222222, clearAlpha: 1 } );
 				renderer = new THREE.WebGLRenderer( { clearColor:0x222222, clearAlpha: 1 } );

+ 3 - 3
examples/webgl_morphtargets_horse.html

@@ -52,21 +52,21 @@
 				light.position.y = 1;
 				light.position.y = 1;
 				light.position.z = 1;
 				light.position.z = 1;
 				light.position.normalize();
 				light.position.normalize();
-				scene.addLight( light );
+				scene.add( light );
 
 
 				var light = new THREE.DirectionalLight( 0xffefef, 2 );
 				var light = new THREE.DirectionalLight( 0xffefef, 2 );
 				light.position.x = - 1;
 				light.position.x = - 1;
 				light.position.y = - 1;
 				light.position.y = - 1;
 				light.position.z = - 1;
 				light.position.z = - 1;
 				light.position.normalize();
 				light.position.normalize();
-				scene.addLight( light );
+				scene.add( light );
 
 
 				var loader = new THREE.JSONLoader( true );
 				var loader = new THREE.JSONLoader( true );
 				loader.load( { model: "models/animated/horse.js", callback: function( geometry ) {
 				loader.load( { model: "models/animated/horse.js", callback: function( geometry ) {
 
 
 					mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( { color: 0x606060, morphTargets: true } ) );
 					mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( { color: 0x606060, morphTargets: true } ) );
 					mesh.scale.set( 1.5, 1.5, 1.5 );
 					mesh.scale.set( 1.5, 1.5, 1.5 );
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 				} } );
 				} } );
 
 

+ 7 - 7
examples/webgl_multiple_canvases_complex.html

@@ -129,7 +129,7 @@
 					light = new THREE.DirectionalLight( 0xffffff );
 					light = new THREE.DirectionalLight( 0xffffff );
 					light.position.set( 0, 0, 1 );
 					light.position.set( 0, 0, 1 );
 					light.position.normalize();
 					light.position.normalize();
-					scene.addLight( light );
+					scene.add( light );
 
 
 					var shadowMaterial = new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/shadow.png' ) } );
 					var shadowMaterial = new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/shadow.png' ) } );
 					var shadowGeo = new THREE.PlaneGeometry( 300, 300, 1, 1 );
 					var shadowGeo = new THREE.PlaneGeometry( 300, 300, 1, 1 );
@@ -137,19 +137,19 @@
 					mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 					mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 					mesh.position.y = - 250;
 					mesh.position.y = - 250;
 					mesh.rotation.x = - 90 * Math.PI / 180;
 					mesh.rotation.x = - 90 * Math.PI / 180;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 					mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 					mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 					mesh.position.y = - 250;
 					mesh.position.y = - 250;
 					mesh.position.x = - 400;
 					mesh.position.x = - 400;
 					mesh.rotation.x = - 90 * Math.PI / 180;
 					mesh.rotation.x = - 90 * Math.PI / 180;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 					mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 					mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 					mesh.position.y = - 250;
 					mesh.position.y = - 250;
 					mesh.position.x = 400;
 					mesh.position.x = 400;
 					mesh.rotation.x = - 90 * Math.PI / 180;
 					mesh.rotation.x = - 90 * Math.PI / 180;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 					var faceIndices = [ 'a', 'b', 'c', 'd' ];
 					var faceIndices = [ 'a', 'b', 'c', 'd' ];
 
 
@@ -204,19 +204,19 @@
 					mesh.position.x = -400;
 					mesh.position.x = -400;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 200;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 200;
 					mesh.rotation.x = -1.87;
 					mesh.rotation.x = -1.87;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 					mesh2 = new THREE.Mesh( geometry2, materials  );
 					mesh2 = new THREE.Mesh( geometry2, materials  );
 					mesh2.position.x = 400;
 					mesh2.position.x = 400;
 					mesh2.rotation.x = 0;
 					mesh2.rotation.x = 0;
 					mesh2.scale = mesh.scale;
 					mesh2.scale = mesh.scale;
-					scene.addObject( mesh2 );
+					scene.add( mesh2 );
 
 
 					mesh3 = new THREE.Mesh( geometry3, materials  );
 					mesh3 = new THREE.Mesh( geometry3, materials  );
 					mesh3.position.x = 0;
 					mesh3.position.x = 0;
 					mesh3.rotation.x = 0;
 					mesh3.rotation.x = 0;
 					mesh3.scale = mesh.scale;
 					mesh3.scale = mesh.scale;
-					scene.addObject( mesh3 );
+					scene.add( mesh3 );
 
 
 					renderer = new THREE.WebGLRenderer( { antialias: true } );
 					renderer = new THREE.WebGLRenderer( { antialias: true } );
 					renderer.setSize( container.clientWidth, container.clientHeight );
 					renderer.setSize( container.clientWidth, container.clientHeight );

+ 7 - 7
examples/webgl_multiple_canvases_grid.html

@@ -145,7 +145,7 @@
 					light = new THREE.DirectionalLight( 0xffffff );
 					light = new THREE.DirectionalLight( 0xffffff );
 					light.position.set( 0, 0, 1 );
 					light.position.set( 0, 0, 1 );
 					light.position.normalize();
 					light.position.normalize();
-					scene.addLight( light );
+					scene.add( light );
 
 
 					var shadowMaterial = new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/shadow.png' ) } );
 					var shadowMaterial = new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/shadow.png' ) } );
 					var shadowGeo = new THREE.PlaneGeometry( 300, 300, 1, 1 );
 					var shadowGeo = new THREE.PlaneGeometry( 300, 300, 1, 1 );
@@ -153,19 +153,19 @@
 					mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 					mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 					mesh.position.y = - 250;
 					mesh.position.y = - 250;
 					mesh.rotation.x = - 90 * Math.PI / 180;
 					mesh.rotation.x = - 90 * Math.PI / 180;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 					mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 					mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 					mesh.position.y = - 250;
 					mesh.position.y = - 250;
 					mesh.position.x = - 400;
 					mesh.position.x = - 400;
 					mesh.rotation.x = - 90 * Math.PI / 180;
 					mesh.rotation.x = - 90 * Math.PI / 180;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 					mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 					mesh = new THREE.Mesh( shadowGeo, shadowMaterial );
 					mesh.position.y = - 250;
 					mesh.position.y = - 250;
 					mesh.position.x = 400;
 					mesh.position.x = 400;
 					mesh.rotation.x = - 90 * Math.PI / 180;
 					mesh.rotation.x = - 90 * Math.PI / 180;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 					var faceIndices = [ 'a', 'b', 'c', 'd' ];
 					var faceIndices = [ 'a', 'b', 'c', 'd' ];
 
 
@@ -220,19 +220,19 @@
 					mesh.position.x = -400;
 					mesh.position.x = -400;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 200;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 200;
 					mesh.rotation.x = -1.87;
 					mesh.rotation.x = -1.87;
-					scene.addObject( mesh );
+					scene.add( mesh );
 
 
 					mesh2 = new THREE.Mesh( geometry2, materials  );
 					mesh2 = new THREE.Mesh( geometry2, materials  );
 					mesh2.position.x = 400;
 					mesh2.position.x = 400;
 					mesh2.rotation.x = 0;
 					mesh2.rotation.x = 0;
 					mesh2.scale = mesh.scale;
 					mesh2.scale = mesh.scale;
-					scene.addObject( mesh2 );
+					scene.add( mesh2 );
 
 
 					mesh3 = new THREE.Mesh( geometry3, materials  );
 					mesh3 = new THREE.Mesh( geometry3, materials  );
 					mesh3.position.x = 0;
 					mesh3.position.x = 0;
 					mesh3.rotation.x = 0;
 					mesh3.rotation.x = 0;
 					mesh3.scale = mesh.scale;
 					mesh3.scale = mesh.scale;
-					scene.addObject( mesh3 );
+					scene.add( mesh3 );
 
 
 					renderer = new THREE.WebGLRenderer( { antialias: true } );
 					renderer = new THREE.WebGLRenderer( { antialias: true } );
 					renderer.setSize( container.clientWidth, container.clientHeight );
 					renderer.setSize( container.clientWidth, container.clientHeight );

+ 7 - 10
examples/webgl_objconvert_test.html

@@ -116,7 +116,7 @@
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 10;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 10;
 				mesh.doubleSided = true;
 				mesh.doubleSided = true;
 				mesh.updateMatrix();
 				mesh.updateMatrix();
-				scene.addObject(mesh);
+				scene.add(mesh);
 
 
 				// SPHERES
 				// SPHERES
 
 
@@ -132,7 +132,7 @@
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 0.25 * (Math.random() + 0.5);
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 0.25 * (Math.random() + 0.5);
 					mesh.overdraw = true;
 					mesh.overdraw = true;
 					mesh.updateMatrix();
 					mesh.updateMatrix();
-					scene.addObject(mesh);
+					scene.add(mesh);
 
 
 				}
 				}
 
 
@@ -140,16 +140,13 @@
 				// LIGHTS
 				// LIGHTS
 
 
 				var ambient = new THREE.AmbientLight( 0x221100 );
 				var ambient = new THREE.AmbientLight( 0x221100 );
-				scene.addLight( ambient );
+				scene.add( ambient );
 
 
 				var directionalLight = new THREE.DirectionalLight( 0xffeedd );
 				var directionalLight = new THREE.DirectionalLight( 0xffeedd );
 				directionalLight.position.y = -70;
 				directionalLight.position.y = -70;
 				directionalLight.position.z = 100;
 				directionalLight.position.z = 100;
 				directionalLight.position.normalize();
 				directionalLight.position.normalize();
-				scene.addLight( directionalLight );
-
-				var pointLight = new THREE.PointLight( 0xff0000, 1 );
-				//scene.addLight( pointLight );
+				scene.add( directionalLight );
 
 
 
 
 				if ( render_gl ) {
 				if ( render_gl ) {
@@ -201,7 +198,7 @@
 				zmesh.scale.x = zmesh.scale.y = zmesh.scale.z = 3;
 				zmesh.scale.x = zmesh.scale.y = zmesh.scale.z = 3;
 				zmesh.overdraw = true;
 				zmesh.overdraw = true;
 				zmesh.updateMatrix();
 				zmesh.updateMatrix();
-				scene.addObject(zmesh);
+				scene.add(zmesh);
 
 
 				createMaterialsPalette( geometry.materials, 100, b );
 				createMaterialsPalette( geometry.materials, 100, b );
 
 
@@ -220,7 +217,7 @@
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
 					mesh.doubleSided = true;
 					mesh.doubleSided = true;
 					mesh.updateMatrix();
 					mesh.updateMatrix();
-					scene.addObject(mesh);
+					scene.add(mesh);
 
 
 					// number
 					// number
 
 
@@ -243,7 +240,7 @@
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
 					mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
 					mesh.doubleSided = true;
 					mesh.doubleSided = true;
 					mesh.updateMatrix();
 					mesh.updateMatrix();
-					scene.addObject(mesh);
+					scene.add(mesh);
 
 
 				}
 				}
 
 

+ 1 - 1
examples/webgl_panorama_equirectangular.html

@@ -61,7 +61,7 @@
 
 
 				mesh = new THREE.Mesh( new THREE.SphereGeometry( 500, 60, 40 ), new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/2294472375_24a3b8ef46_o.jpg' ) } ) );
 				mesh = new THREE.Mesh( new THREE.SphereGeometry( 500, 60, 40 ), new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/2294472375_24a3b8ef46_o.jpg' ) } ) );
 				mesh.scale.x = -1;
 				mesh.scale.x = -1;
-				scene.addObject( mesh );
+				scene.add( mesh );
 
 
 				renderer = new THREE.WebGLRenderer();
 				renderer = new THREE.WebGLRenderer();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 2 - 2
examples/webgl_particles_billboards.html

@@ -87,13 +87,13 @@
 				particles = new THREE.ParticleSystem( geometry, material );
 				particles = new THREE.ParticleSystem( geometry, material );
 				particles.sortParticles = true;
 				particles.sortParticles = true;
 				particles.updateMatrix();
 				particles.updateMatrix();
-				scene.addObject( particles );
+				scene.add( particles );
 
 
 				var light = new THREE.DirectionalLight( 0xffffff );
 				var light = new THREE.DirectionalLight( 0xffffff );
 				light.position.x = 0;
 				light.position.x = 0;
 				light.position.y = 0;
 				light.position.y = 0;
 				light.position.z = 1;
 				light.position.z = 1;
-				scene.addLight( light );
+				scene.add( light );
 
 
 				renderer = new THREE.WebGLRenderer( { clearAlpha: 1 });
 				renderer = new THREE.WebGLRenderer( { clearAlpha: 1 });
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

+ 2 - 2
examples/webgl_particles_billboards_colors.html

@@ -91,13 +91,13 @@
 				particles = new THREE.ParticleSystem( geometry, material );
 				particles = new THREE.ParticleSystem( geometry, material );
 				particles.sortParticles = true;
 				particles.sortParticles = true;
 				particles.updateMatrix();
 				particles.updateMatrix();
-				scene.addObject( particles );
+				scene.add( particles );
 
 
 				var light = new THREE.DirectionalLight( 0xffffff );
 				var light = new THREE.DirectionalLight( 0xffffff );
 				light.position.x = 0;
 				light.position.x = 0;
 				light.position.y = 0;
 				light.position.y = 0;
 				light.position.z = 1;
 				light.position.z = 1;
-				scene.addLight( light );
+				scene.add( light );
 
 
 				renderer = new THREE.WebGLRenderer( { clearAlpha: 1 } );
 				renderer = new THREE.WebGLRenderer( { clearAlpha: 1 } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor