Browse Source

Merge remote-tracking branch 'remotes/mrdoob/dev' into dev

alteredq 13 năm trước cách đây
mục cha
commit
e19f442f30
58 tập tin đã thay đổi với 699 bổ sung871 xóa
  1. 90 58
      README.md
  2. 28 28
      build/Three.js
  3. 1 1
      build/custom/ThreeCanvas.js
  4. 1 1
      build/custom/ThreeDOM.js
  5. 28 28
      build/custom/ThreeExtras.js
  6. 1 1
      build/custom/ThreeSVG.js
  7. 1 1
      build/custom/ThreeWebGL.js
  8. 7 7
      docs/api/cameras/OrthographicCamera.html
  9. 7 7
      docs/api/cameras/PerspectiveCamera.html
  10. 5 5
      docs/api/core/Clock.html
  11. 8 8
      docs/api/core/Color.html
  12. 46 8
      docs/api/core/Face3.html
  13. 0 86
      docs/api/core/Face3.rst
  14. 68 7
      docs/api/core/Face4.html
  15. 0 90
      docs/api/core/Face4.rst
  16. 9 5
      docs/api/core/Frustum.html
  17. 147 4
      docs/api/core/Geometry.html
  18. 0 198
      docs/api/core/Geometry.rst
  19. 45 8
      docs/api/core/Math.html
  20. 0 60
      docs/api/core/Math.rst
  21. 12 4
      docs/api/core/Matrix3.html
  22. 0 38
      docs/api/core/Matrix3.rst
  23. 89 5
      docs/api/core/Matrix4.html
  24. 1 1
      docs/api/core/Projector.html
  25. 0 14
      docs/api/core/Projector.rst
  26. 1 1
      docs/api/core/Ray.html
  27. 0 14
      docs/api/core/Ray.rst
  28. 1 1
      docs/api/core/Rectangle.html
  29. 0 14
      docs/api/core/Rectangle.rst
  30. 1 1
      docs/api/core/Spline.html
  31. 0 14
      docs/api/core/Spline.rst
  32. 24 7
      docs/api/core/UV.html
  33. 0 37
      docs/api/core/UV.rst
  34. 2 10
      docs/api/core/Vertex.html
  35. 0 14
      docs/api/core/Vertex.rst
  36. 2 0
      docs/api/lights/AmbientLight.html
  37. 2 0
      docs/api/lights/DirectionalLight.html
  38. 2 0
      docs/api/lights/PointLight.html
  39. 2 0
      docs/api/lights/SpotLight.html
  40. 2 0
      docs/api/materials/LineBasicMaterial.html
  41. 2 0
      docs/api/materials/MeshBasicMaterial.html
  42. 2 0
      docs/api/materials/MeshDepthMaterial.html
  43. 2 0
      docs/api/materials/MeshFaceMaterial.html
  44. 2 0
      docs/api/materials/MeshLambertMaterial.html
  45. 2 0
      docs/api/materials/MeshNormalMaterial.html
  46. 2 0
      docs/api/materials/MeshPhongMaterial.html
  47. 2 0
      docs/api/materials/ParticleBasicMaterial.html
  48. 2 0
      docs/api/materials/ParticleCanvasMaterial.html
  49. 2 0
      docs/api/materials/ParticleDOMMaterial.html
  50. 2 0
      docs/api/materials/ShaderMaterial.html
  51. 18 8
      docs/index.html
  52. 6 15
      examples/misc_camera_path.html
  53. 7 14
      examples/misc_camera_roll.html
  54. 4 10
      examples/misc_camera_trackball.html
  55. 2 2
      examples/webgl_loader_ctm.html
  56. 1 1
      src/Three.js
  57. 2 17
      src/extras/loaders/ColladaLoader.js
  58. 6 18
      src/extras/loaders/UTF8Loader.js

+ 90 - 58
README.md

@@ -15,69 +15,70 @@ More? [#three.js on irc.freenode.net](http://webchat.freenode.net/?channels=thre
 
 #### WebGL (Context 3D) ####
 
-<a href="http://mrdoob.github.com/three.js/examples/webgl_panorama_equirectangular.html"><img src="http://mrdoob.github.com/three.js/assets/examples/44_equirectangular.png" width="104" height="78" alt="equirectangular"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_texture_filters.html"><img src="http://mrdoob.github.com/three.js/assets/examples/42_scissors.png" width="104" height="78" alt="scissors"></a>
-<a href="http://mrdoob.github.com/three.js/examples/misc_lookat.html"><img src="http://mrdoob.github.com/three.js/assets/examples/41_lookat.png" width="104" height="78" alt="lookat"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_video.html"><img src="http://mrdoob.github.com/three.js/assets/examples/40_video.png" width="104" height="78" alt="video"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_postprocessing_dof.html"><img src="http://mrdoob.github.com/three.js/assets/examples/39_dof.png" width="104" height="78" alt="dof"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_ribbons.html"><img src="http://mrdoob.github.com/three.js/assets/examples/38_ribbon.png" width="104" height="78" alt="ribbon"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_geometry_colors.html"><img src="http://mrdoob.github.com/three.js/assets/examples/37_vertexcolors.png" width="104" height="78" alt="vertexcolors"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_particles_billboards_colors.html"><img src="http://mrdoob.github.com/three.js/assets/examples/36_particles.png" width="104" height="78" alt="particles"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_lines_colors.html"><img src="http://mrdoob.github.com/three.js/assets/examples/35_lines.png" width="104" height="78" alt="lines"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_shader.html"><img src="http://mrdoob.github.com/three.js/assets/examples/34_shader.png" width="104" height="78" alt="shader"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_normalmap2.html"><img src="http://mrdoob.github.com/three.js/assets/examples/33_materials_normalmap2.png" width="104" height="78" alt="materials_normalmap2"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_grass.html"><img src="http://mrdoob.github.com/three.js/assets/examples/32_materials_grass.png" width="104" height="78" alt="materials_grass"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_normalmap.html"><img src="http://mrdoob.github.com/three.js/assets/examples/31_materials_normalmap.png" width="104" height="78" alt="materials_normalmap"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_geometry_terrain.html"><img src="http://mrdoob.github.com/three.js/assets/examples/30_geometry_terrain_gl.png" width="104" height="78" alt="geometry_terrain_gl"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_geometry_minecraft_ao.html"><img src="http://mrdoob.github.com/three.js/assets/examples/29_geometry_minecraft.png" width="104" height="78" alt="geometry_minecraft"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_shaders_fresnel.html"><img src="http://mrdoob.github.com/three.js/assets/examples/28_materials_shaders_fresnel.png" width="104" height="78" alt="materials_shader_fresnel"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_cars.html"><img src="http://mrdoob.github.com/three.js/assets/examples/25_materials_cars.png" width="104" height="78" alt="materials_cars"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_cubemap_refraction.html"><img src="http://mrdoob.github.com/three.js/assets/examples/18_materials_cubemap_refraction.png" width="104" height="78" alt="materials_cubemap_refraction"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_cubemap_balls_reflection.html"><img src="http://mrdoob.github.com/three.js/assets/examples/15_materials_cubemap_balls_reflection.png" width="104" height="78" alt="materials_cubemap_balls_reflection"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_cubemap_balls_refraction.html"><img src="http://mrdoob.github.com/three.js/assets/examples/16_materials_cubemap_balls_refraction.png" width="104" height="78" alt="materials_cubemap_balls_refraction"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_cubemap_escher.html"><img src="http://mrdoob.github.com/three.js/assets/examples/17_materials_cubemap_escher.png" width="104" height="78" alt="materials_cubemap_escher"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_cubemap.html"><img src="http://mrdoob.github.com/three.js/assets/examples/14_materials_cubemap.png" width="104" height="78" alt="materials_cubemap"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_materials.html"><img src="http://mrdoob.github.com/three.js/assets/examples/20_materials_gl.png" width="104" height="78" alt="materials_gl"></a>
-<a href="http://mrdoob.github.com/three.js/examples/webgl_geometry_large_mesh.html"><img src="http://mrdoob.github.com/three.js/assets/examples/12_large_mesh.png" width="104" height="78" alt="large_mesh"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_panorama_equirectangular.html"><img src="http://mrdoob.github.com/three.js/assets/examples/44_equirectangular.png" width="102" height="77" alt="equirectangular"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_texture_filters.html"><img src="http://mrdoob.github.com/three.js/assets/examples/42_scissors.png" width="102" height="77" alt="scissors"></a>
+<a href="http://mrdoob.github.com/three.js/examples/misc_lookat.html"><img src="http://mrdoob.github.com/three.js/assets/examples/41_lookat.png" width="102" height="77" alt="lookat"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_video.html"><img src="http://mrdoob.github.com/three.js/assets/examples/40_video.png" width="102" height="77" alt="video"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_postprocessing_dof.html"><img src="http://mrdoob.github.com/three.js/assets/examples/39_dof.png" width="102" height="77" alt="dof"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_ribbons.html"><img src="http://mrdoob.github.com/three.js/assets/examples/38_ribbon.png" width="102" height="77" alt="ribbon"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_geometry_colors.html"><img src="http://mrdoob.github.com/three.js/assets/examples/37_vertexcolors.png" width="102" height="77" alt="vertexcolors"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_particles_billboards_colors.html"><img src="http://mrdoob.github.com/three.js/assets/examples/36_particles.png" width="102" height="77" alt="particles"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_lines_colors.html"><img src="http://mrdoob.github.com/three.js/assets/examples/35_lines.png" width="102" height="77" alt="lines"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_shader.html"><img src="http://mrdoob.github.com/three.js/assets/examples/34_shader.png" width="102" height="77" alt="shader"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_normalmap2.html"><img src="http://mrdoob.github.com/three.js/assets/examples/33_materials_normalmap2.png" width="102" height="77" alt="materials_normalmap2"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_grass.html"><img src="http://mrdoob.github.com/three.js/assets/examples/32_materials_grass.png" width="102" height="77" alt="materials_grass"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_normalmap.html"><img src="http://mrdoob.github.com/three.js/assets/examples/31_materials_normalmap.png" width="102" height="77" alt="materials_normalmap"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_geometry_terrain.html"><img src="http://mrdoob.github.com/three.js/assets/examples/30_geometry_terrain_gl.png" width="102" height="77" alt="geometry_terrain_gl"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_geometry_minecraft_ao.html"><img src="http://mrdoob.github.com/three.js/assets/examples/29_geometry_minecraft.png" width="102" height="77" alt="geometry_minecraft"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_shaders_fresnel.html"><img src="http://mrdoob.github.com/three.js/assets/examples/28_materials_shaders_fresnel.png" width="102" height="77" alt="materials_shader_fresnel"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_cars.html"><img src="http://mrdoob.github.com/three.js/assets/examples/25_materials_cars.png" width="102" height="77" alt="materials_cars"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_cubemap_refraction.html"><img src="http://mrdoob.github.com/three.js/assets/examples/18_materials_cubemap_refraction.png" width="102" height="77" alt="materials_cubemap_refraction"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_cubemap_balls_reflection.html"><img src="http://mrdoob.github.com/three.js/assets/examples/15_materials_cubemap_balls_reflection.png" width="102" height="77" alt="materials_cubemap_balls_reflection"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_cubemap_balls_refraction.html"><img src="http://mrdoob.github.com/three.js/assets/examples/16_materials_cubemap_balls_refraction.png" width="102" height="77" alt="materials_cubemap_balls_refraction"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_cubemap_escher.html"><img src="http://mrdoob.github.com/three.js/assets/examples/17_materials_cubemap_escher.png" width="102" height="77" alt="materials_cubemap_escher"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_materials_cubemap.html"><img src="http://mrdoob.github.com/three.js/assets/examples/14_materials_cubemap.png" width="102" height="77" alt="materials_cubemap"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_materials.html"><img src="http://mrdoob.github.com/three.js/assets/examples/20_materials_gl.png" width="102" height="77" alt="materials_gl"></a>
+<a href="http://mrdoob.github.com/three.js/examples/webgl_geometry_large_mesh.html"><img src="http://mrdoob.github.com/three.js/assets/examples/12_large_mesh.png" width="102" height="77" alt="large_mesh"></a>
 
 
 #### Canvas (Context 2D) ####
 
-<a href="http://mrdoob.github.com/three.js/examples/canvas_materials_reflection.html"><img src="http://mrdoob.github.com/three.js/assets/examples/27_materials_reflection.png" width="104" height="78" alt="materials_reflection"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_materials.html"><img src="http://mrdoob.github.com/three.js/assets/examples/13_materials.png" width="104" height="78" alt="materials"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_materials_depth.html"><img src="http://mrdoob.github.com/three.js/assets/examples/19_materials_depth.png" width="104" height="78" alt="materials_depth"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_materials_normal.html"><img src="http://mrdoob.github.com/three.js/assets/examples/22_materials_normal.png" width="104" height="78" alt="materials_normal"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_lights_pointlights.html"><img src="http://mrdoob.github.com/three.js/assets/examples/09_walthead.png" width="104" height="78" alt="lights_pointlights"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_interactive_cubes.html"><img src="http://mrdoob.github.com/three.js/assets/examples/11_interactive.png" width="104" height="78" alt="interactive_cubes"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_camera_orthographic.html"><img src="http://mrdoob.github.com/three.js/assets/examples/10_orthographic.png" width="104" height="78" alt="camera_ortographic"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_geometry_birds.html"><img src="http://mrdoob.github.com/three.js/assets/examples/08_birds.png" width="104" height="78" alt="geometry_birds"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_geometry_earth.html"><img src="http://mrdoob.github.com/three.js/assets/examples/07_earth.png" width="104" height="78" alt="geometry_earth"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_geometry_terrain.html"><img src="http://mrdoob.github.com/three.js/assets/examples/06_terrain.png" width="104" height="78" alt="geometry_terrain"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_materials_video.html"><img src="http://mrdoob.github.com/three.js/assets/examples/24_materials_video.png" width="104" height="78" alt="materials_video"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_geometry_panorama.html"><img src="http://mrdoob.github.com/three.js/assets/examples/04_vr.png" width="104" height="78" alt="geometry_panorama"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_geometry_cube.html"><img src="http://mrdoob.github.com/three.js/assets/examples/03_cube.png" width="104" height="78" alt="geometry_cube"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_particles_sprites.html"><img src="http://mrdoob.github.com/three.js/assets/examples/26_particles_sprites.png" width="104" height="78" alt="particles_sprites"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_particles_random.html"><img src="http://mrdoob.github.com/three.js/assets/examples/02_random.png" width="104" height="78" alt="particles_random"></a>
-<a href="http://mrdoob.github.com/three.js/examples/canvas_particles_waves.html"><img src="http://mrdoob.github.com/three.js/assets/examples/01_waves.png" width="104" height="78" alt="particles_wave"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_materials_reflection.html"><img src="http://mrdoob.github.com/three.js/assets/examples/27_materials_reflection.png" width="102" height="77" alt="materials_reflection"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_materials.html"><img src="http://mrdoob.github.com/three.js/assets/examples/13_materials.png" width="102" height="77" alt="materials"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_materials_depth.html"><img src="http://mrdoob.github.com/three.js/assets/examples/19_materials_depth.png" width="102" height="77" alt="materials_depth"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_materials_normal.html"><img src="http://mrdoob.github.com/three.js/assets/examples/22_materials_normal.png" width="102" height="77" alt="materials_normal"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_lights_pointlights.html"><img src="http://mrdoob.github.com/three.js/assets/examples/09_walthead.png" width="102" height="77" alt="lights_pointlights"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_interactive_cubes.html"><img src="http://mrdoob.github.com/three.js/assets/examples/11_interactive.png" width="102" height="77" alt="interactive_cubes"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_camera_orthographic.html"><img src="http://mrdoob.github.com/three.js/assets/examples/10_orthographic.png" width="102" height="77" alt="camera_ortographic"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_geometry_birds.html"><img src="http://mrdoob.github.com/three.js/assets/examples/08_birds.png" width="102" height="77" alt="geometry_birds"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_geometry_earth.html"><img src="http://mrdoob.github.com/three.js/assets/examples/07_earth.png" width="102" height="77" alt="geometry_earth"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_geometry_terrain.html"><img src="http://mrdoob.github.com/three.js/assets/examples/06_terrain.png" width="102" height="77" alt="geometry_terrain"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_materials_video.html"><img src="http://mrdoob.github.com/three.js/assets/examples/24_materials_video.png" width="102" height="77" alt="materials_video"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_geometry_panorama.html"><img src="http://mrdoob.github.com/three.js/assets/examples/04_vr.png" width="102" height="77" alt="geometry_panorama"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_geometry_cube.html"><img src="http://mrdoob.github.com/three.js/assets/examples/03_cube.png" width="102" height="77" alt="geometry_cube"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_particles_sprites.html"><img src="http://mrdoob.github.com/three.js/assets/examples/26_particles_sprites.png" width="102" height="77" alt="particles_sprites"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_particles_random.html"><img src="http://mrdoob.github.com/three.js/assets/examples/02_random.png" width="102" height="77" alt="particles_random"></a>
+<a href="http://mrdoob.github.com/three.js/examples/canvas_particles_waves.html"><img src="http://mrdoob.github.com/three.js/assets/examples/01_waves.png" width="102" height="77" alt="particles_wave"></a>
 
 
 ### Featured projects ###
 
-<a href="http://dl.dropbox.com/u/6213850/WebGL/nyanCat/nyan.html"><img src="http://mrdoob.github.com/three.js/assets/projects/23_nyan.png" width="104" height="78" alt="Nyan Cat"></a>
-<a href="http://idflood.github.com/ThreeNodes.js/public/index.html"><img src="http://mrdoob.github.com/three.js/assets/projects/22_threenodes.png" width="104" height="78" alt="ThreeNodes"></a>
-<a href="http://www.adidas.com/football/uk/pages/f50/"><img src="http://mrdoob.github.com/three.js/assets/projects/21_f50.png" width="104" height="78" alt="f60"></a>
-<a href="http://lights.elliegoulding.com/"><img src="http://mrdoob.github.com/three.js/assets/projects/20_lights.png" width="104" height="78" alt="Lights"></a>
-<a href="http://inear.se/beanstalk/"><img src="http://mrdoob.github.com/three.js/assets/projects/19_beanstalk.png" width="104" height="78" alt="Infinite beanstalk"></a>
-<a href="http://superfad.com/missioncontrol/"><img src="http://mrdoob.github.com/three.js/assets/projects/18_missioncontrol.png" width="104" height="78" alt="Mission Control"></a>
-<a href="http://ro.me/"><img src="http://mrdoob.github.com/three.js/assets/projects/17_rome.png" width="104" height="78" alt="ROME"></a>
-<a href="http://data-arts.appspot.com/globe"><img src="http://mrdoob.github.com/three.js/assets/projects/16_globe.png" width="104" height="78" alt="Globe"></a>
-<a href="http://lab.aerotwist.com/webgl/photoparticles/"><img src="http://mrdoob.github.com/three.js/assets/projects/15_photoparticles.png" width="104" height="78" alt="Photoparticles"></a>
-<a href="http://plumegraph.org/"><img src="http://mrdoob.github.com/three.js/assets/projects/14_plumegraph.png" width="104" height="78" alt="Plumegraph"></a>
-<a href="http://helloracer.com/webgl/"><img src="http://mrdoob.github.com/three.js/assets/projects/13_helloracer.png" width="104" height="78" alt="HelloRacer"></a>
-<a href="http://www.omiod.com/games/fastkat.php"><img src="http://mrdoob.github.com/three.js/assets/projects/12_fastkat.png" width="104" height="78" alt="FastKat"></a>
-<a href="http://mrdoob.com/projects/voxels/"><img src="http://mrdoob.github.com/three.js/assets/projects/10_voxels.png" width="104" height="78" alt="Voxels"></a>
-<a href="http://thewildernessdowntown.com/"><img src="http://mrdoob.github.com/three.js/assets/projects/09_arcadefire.png" width="104" height="78" alt="The Wilderness Downtown"></a>
-<a href="http://xplsv.com/prods/demos/xplsv_orsotheysay/"><img src="http://mrdoob.github.com/three.js/assets/projects/07_orsotheysay.png" width="104" height="78" alt="Or so they say..."></a>
+<a href="http://triggerrally.com/"><img src="http://mrdoob.github.com/three.js/assets/projects/26_triggerrally.png" width="102" height="77" alt="Trigger Rally"></a>
+<a href="http://yagiz.me/zombiesvscow/"><img src="http://mrdoob.github.com/three.js/assets/projects/25_zombiesvscow.png" width="102" height="77" alt="Zombies vs Cow"></a>
+<a href="http://blackjk3.github.com/threefab/"><img src="http://mrdoob.github.com/three.js/assets/projects/24_threefab.png" width="102" height="77" alt="ThreeFab"></a>
+<a href="http://dl.dropbox.com/u/6213850/WebGL/nyanCat/nyan.html"><img src="http://mrdoob.github.com/three.js/assets/projects/23_nyan.png" width="102" height="77" alt="Nyan Cat"></a>
+<a href="http://idflood.github.com/ThreeNodes.js/public/index.html"><img src="http://mrdoob.github.com/three.js/assets/projects/22_threenodes.png" width="102" height="77" alt="ThreeNodes"></a>
+<a href="http://www.adidas.com/football/uk/pages/f50/"><img src="http://mrdoob.github.com/three.js/assets/projects/21_f50.png" width="102" height="77" alt="f60"></a>
+<a href="http://lights.elliegoulding.com/"><img src="http://mrdoob.github.com/three.js/assets/projects/20_lights.png" width="102" height="77" alt="Lights"></a>
+<a href="http://inear.se/beanstalk/"><img src="http://mrdoob.github.com/three.js/assets/projects/19_beanstalk.png" width="102" height="77" alt="Infinite beanstalk"></a>
+<a href="http://superfad.com/missioncontrol/"><img src="http://mrdoob.github.com/three.js/assets/projects/18_missioncontrol.png" width="102" height="77" alt="Mission Control"></a>
+<a href="http://ro.me/"><img src="http://mrdoob.github.com/three.js/assets/projects/17_rome.png" width="102" height="77" alt="ROME"></a>
+<a href="http://data-arts.appspot.com/globe"><img src="http://mrdoob.github.com/three.js/assets/projects/16_globe.png" width="102" height="77" alt="Globe"></a>
+<a href="http://helloracer.com/webgl/"><img src="http://mrdoob.github.com/three.js/assets/projects/13_helloracer.png" width="102" height="77" alt="HelloRacer"></a>
+<a href="http://www.omiod.com/games/fastkat.php"><img src="http://mrdoob.github.com/three.js/assets/projects/12_fastkat.png" width="102" height="77" alt="FastKat"></a>
+<a href="http://mrdoob.com/projects/voxels/"><img src="http://mrdoob.github.com/three.js/assets/projects/10_voxels.png" width="102" height="77" alt="Voxels"></a>
+<a href="http://thewildernessdowntown.com/"><img src="http://mrdoob.github.com/three.js/assets/projects/09_arcadefire.png" width="102" height="77" alt="The Wilderness Downtown"></a>
+<a href="http://xplsv.com/prods/demos/xplsv_orsotheysay/"><img src="http://mrdoob.github.com/three.js/assets/projects/07_orsotheysay.png" width="102" height="77" alt="Or so they say..."></a>
 
 
 ### Usage ###
@@ -143,12 +144,43 @@ This code creates a camera, then creates a scene, adds a cube on it, creates a &
 
 ### Change Log ###
 
-2012 02 25 - **r48** (393,602 KB, gzip: 99,416 KB)
+2012 03 04 - **r48** (393,626 KB, gzip: 99,395 KB)
 
 * Added camera support to `ColladaLoader`. ([jbaicoianu](http://github.com/jbaicoianu))
-* More `ColladaLoader` improvements. ([mrdoob](http://github.com/mrdoob), [AddictArts](http://github.com/AddictArts), )
-* Updated `IcosahedronGeometry` and `OctahedronGeometry` with @timothypratley's `PolyhedronGeometry` code which also brings `TetrahedronGeometry`. ([mrdoob](http://github.com/mrdoob))
+* More `ColladaLoader` improvements. ([mrdoob](http://github.com/mrdoob), [AddictArts](http://github.com/AddictArts), [kduong](http://github.com/kduong))
+* Updated `IcosahedronGeometry` and `OctahedronGeometry` with [timothypratley](http://github.com/timothypratley)'s `PolyhedronGeometry` code which also brings `TetrahedronGeometry`. ([mrdoob](http://github.com/mrdoob))
 * `LOD` should now behave as expected from anywhere in the scene graph. ([mrdoob](http://github.com/mrdoob))
+* Added `THREE.REVISION`. ([mrdoob](http://github.com/mrdoob))
+* Fixed cancelRequestAnimationFrame polyfill. ([also](http://github.com/also))
+* Improvements to convert_obj_three.py. ([alteredq](http://github.com/alteredq))
+* Fixes to `Geometry`'s `.computeBoundingBox` and `.computeBoundingSphere`. ([alteredq](http://github.com/alteredq))
+* Refactored ShadowMap shader. ([alteredq](http://github.com/alteredq))
+* Fixed handling of meshes with multiple materials in `SceneLoader`. ([alteredq](http://github.com/alteredq))
+* Changed `Material`'s default ambient color to 0xffffff. ([alteredq](http://github.com/alteredq))
+* Added normals support to `MorphTarget`. ([alteredq](http://github.com/alteredq))
+* Added `.setFrameRange` and `.setAnimationLabel` to `MorphAnimMesh`. ([alteredq](http://github.com/alteredq))
+* Added handling of named animation sequences to `MorphAnimMesh`. ([alteredq](http://github.com/alteredq))
+* Extended `MorphAnimMesh` to be able to play animations backwards. ([alteredq](http://github.com/alteredq))
+* Added `.generateDataTexture` to `ImageUtils`. ([alteredq](http://github.com/alteredq))
+* Removed hierarchy support and `.intersectScene()` from `Ray`. ([mrdoob](http://github.com/mrdoob))
+* Added `.triangulateQuads` to `GeometryUtils`. ([alteredq](http://github.com/alteredq))
+* `Projector` and `WebGLRenderer` now handles doubleSided lighting properly. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
+* Fixed `MorphAnimMesh` playback bug where the last frame didn't display. ([alteredq](http://github.com/alteredq))
+* `TrackballControls` implements `EventTarget`. ([mrdoob](http://github.com/mrdoob))
+* Added `.clone` to `Vertex`, `Face3` and `Face4`. ([alteredq](http://github.com/alteredq))
+* Added `.explode` and `.tessellate` to `GeometryUtils`. ([alteredq](http://github.com/alteredq))
+* Added `.lerpSelf` to `Vector2`, `Vector3` and `UV`. ([alteredq](http://github.com/alteredq))
+* Fixed `DOMRenderer` by using single-materials. ([ajorkowski ](http://github.com/ajorkowski ))
+* Added `.setPrecision` to `Ray`. ([mrdoob](http://github.com/mrdoob))
+* Blender exporter now honors the "Flip YZ" option. ([rectalogic](http://github.com/rectalogic))
+* Added `NoBlending` to `Material` and `WebGLRenderer`. ([kovleouf](http://github.com/kovleouf))
+* Added `.applyMatrix` to `Object3D`. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
+* Added `.attach` and `.detach` to `SceneUtils` to retain position in space. ([alteredq](http://github.com/alteredq))
+* Added `.sign` to `Math`. ([alteredq](http://github.com/alteredq))
+* Implemented sphinx based documentation. ([ivankuzev](http://github.com/ivankuzev))
+* Documented part of the API. ([ivankuzev](http://github.com/ivankuzev) and [alteredq](http://github.com/alteredq))
+* Replaced sphinx based documentation with compilation-less sytem. ([mrdoob](http://github.com/mrdoob))
+* Added default material to `Mesh`, `Line` and `ParticleSystem`. ([mrdoob](http://github.com/mrdoob))
 
 
 2012 01 14 - **r47** (378,169 KB, gzip: 96,015 KB)

+ 28 - 28
build/Three.js

@@ -1,5 +1,5 @@
 // Three.js - http://github.com/mrdoob/three.js
-'use strict';var THREE=THREE||{REVISION:"48dev"};if(!self.Int32Array)self.Int32Array=Array,self.Float32Array=Array;
+'use strict';var THREE=THREE||{REVISION:"49dev"};if(!self.Int32Array)self.Int32Array=Array,self.Float32Array=Array;
 (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];if(!window.requestAnimationFrame)window.requestAnimationFrame=function(b){var c=(new Date).getTime(),f=Math.max(0,16-(c-a)),g=window.setTimeout(function(){b(c+f)},f);a=c+f;return g};if(!window.cancelAnimationFrame)window.cancelAnimationFrame=
 function(a){clearTimeout(a)}})();THREE.Clock=function(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1};THREE.Clock.prototype.start=function(){this.oldTime=this.startTime=Date.now();this.running=!0};THREE.Clock.prototype.stop=function(){this.getElapsedTime();this.running=!1};THREE.Clock.prototype.getElapsedTime=function(){return this.elapsedTime+=this.getDelta()};
 THREE.Clock.prototype.getDelta=function(){var a=0;this.autoStart&&!this.running&&this.start();if(this.running){var b=Date.now(),a=0.0010*(b-this.oldTime);this.oldTime=b;this.elapsedTime+=a}return a};THREE.Color=function(a){void 0!==a&&this.setHex(a);return this};
@@ -186,7 +186,7 @@ ba.r=Math.max(0,Math.min(j.color.r*ba.r,1)),ba.g=Math.max(0,Math.min(j.color.g*b
 Math.min(j.color.g*N.g,1)),N.b=Math.max(0,Math.min(j.color.b*N.b,1)),w(K,O,y,l,$,C,E,S),j.wireframe?Mb(N,j.wireframeLinewidth,j.wireframeLinecap,j.wireframeLinejoin):Gb(N)):(w(K,O,y,l,$,C,E,S),j.wireframe?Mb(j.color,j.wireframeLinewidth,j.wireframeLinecap,j.wireframeLinejoin):Gb(j.color));else if(j instanceof THREE.MeshNormalMaterial)N.r=hc(T.normalWorld.x),N.g=hc(T.normalWorld.y),N.b=hc(T.normalWorld.z),w(K,O,y,l,$,C,E,S),j.wireframe?Mb(N,j.wireframeLinewidth,j.wireframeLinecap,j.wireframeLinejoin):
 Gb(N);else if(j instanceof THREE.MeshDepthMaterial)Ka=k.near,Ga=k.far,aa.r=aa.g=aa.b=1-ac(a.positionScreen.z,Ka,Ga),U.r=U.g=U.b=1-ac(d.positionScreen.z,Ka,Ga),ba.r=ba.g=ba.b=1-ac(g.positionScreen.z,Ka,Ga),ea.r=ea.g=ea.b=1-ac(e.positionScreen.z,Ka,Ga),qa=Dc(aa,U,ba,ea),v(K,O,y,l,E,S),gc(K,O,y,l,E,S,0,0,1,0,0,1,qa),v(R,ca,$,C,ka,ia),gc(R,ca,$,C,ka,ia,1,0,1,1,0,1,qa)}function v(a,b,c,d,e,g){n.beginPath();n.moveTo(a,b);n.lineTo(c,d);n.lineTo(e,g);n.lineTo(a,b);n.closePath()}function w(a,b,c,d,e,g,f,Z){n.beginPath();
 n.moveTo(a,b);n.lineTo(c,d);n.lineTo(e,g);n.lineTo(f,Z);n.lineTo(a,b);n.closePath()}function Mb(a,b,c,e){if(A!=b)n.lineWidth=A=b;if(F!=c)n.lineCap=F=c;if(B!=e)n.lineJoin=B=e;d(a.getContextStyle());n.stroke();za.inflate(2*b)}function Gb(a){e(a.getContextStyle());n.fill()}function Vc(a,b,c,d,g,f,Z,h,l,i,j,T,k){if(0!=k.image.width){if(!0==k.needsUpdate||void 0==Ta[k.id]){var m=k.wrapS==THREE.RepeatWrapping,o=k.wrapT==THREE.RepeatWrapping;Ta[k.id]=n.createPattern(k.image,m&&o?"repeat":m&&!o?"repeat-x":
-!m&&o?"repeat-y":"no-repeat");k.needsUpdate=!1}e(Ta[k.id]);var m=k.offset.x/k.repeat.x,o=k.offset.y/k.repeat.y,Fb=k.image.width*k.repeat.x,p=k.image.height*k.repeat.y,Z=(Z+m)*Fb,h=(h+o)*p,c=c-a,d=d-b,g=g-a,f=f-b,l=(l+m)*Fb-Z,i=(i+o)*p-h,j=(j+m)*Fb-Z,T=(T+o)*p-h,m=l*T-j*i;if(0==m){if(void 0===Ja[k.id])b=document.createElement("canvas"),b.width=k.image.width,b.height=k.image.height,b=b.getContext("2d"),b.drawImage(k.image,0,0),Ja[k.id]=b.getImageData(0,0,k.image.width,k.image.height).data;b=Ja[k.id];
+!m&&o?"repeat-y":"no-repeat");k.needsUpdate=!1}e(Ta[k.id]);var m=k.offset.x/k.repeat.x,o=k.offset.y/k.repeat.y,p=k.image.width*k.repeat.x,Fb=k.image.height*k.repeat.y,Z=(Z+m)*p,h=(h+o)*Fb,c=c-a,d=d-b,g=g-a,f=f-b,l=(l+m)*p-Z,i=(i+o)*Fb-h,j=(j+m)*p-Z,T=(T+o)*Fb-h,m=l*T-j*i;if(0==m){if(void 0===Ja[k.id])b=document.createElement("canvas"),b.width=k.image.width,b.height=k.image.height,b=b.getContext("2d"),b.drawImage(k.image,0,0),Ja[k.id]=b.getImageData(0,0,k.image.width,k.image.height).data;b=Ja[k.id];
 Z=4*(Math.floor(Z)+Math.floor(h)*k.image.width);N.setRGB(b[Z]/255,b[Z+1]/255,b[Z+2]/255);Gb(N)}else m=1/m,k=(T*c-i*g)*m,i=(T*d-i*f)*m,c=(l*g-j*c)*m,d=(l*f-j*d)*m,a=a-k*Z-c*h,Z=b-i*Z-d*h,n.save(),n.transform(k,i,c,d,a,Z),n.fill(),n.restore()}}function gc(a,b,c,d,e,g,f,Z,h,l,i,j,T){var k,m;k=T.width-1;m=T.height-1;f*=k;Z*=m;c-=a;d-=b;e-=a;g-=b;h=h*k-f;l=l*m-Z;i=i*k-f;j=j*m-Z;m=1/(h*j-i*l);k=(j*c-l*e)*m;l=(j*d-l*g)*m;c=(h*e-i*c)*m;d=(h*g-i*d)*m;a=a-k*f-c*Z;b=b-l*f-d*Z;n.save();n.transform(k,l,c,d,a,
 b);n.clip();n.drawImage(T,0,0);n.restore()}function Dc(a,b,c,d){var e=~~(255*a.r),g=~~(255*a.g),a=~~(255*a.b),f=~~(255*b.r),Z=~~(255*b.g),b=~~(255*b.b),h=~~(255*c.r),l=~~(255*c.g),c=~~(255*c.b),i=~~(255*d.r),j=~~(255*d.g),d=~~(255*d.b);eb[0]=0>e?0:255<e?255:e;eb[1]=0>g?0:255<g?255:g;eb[2]=0>a?0:255<a?255:a;eb[4]=0>f?0:255<f?255:f;eb[5]=0>Z?0:255<Z?255:Z;eb[6]=0>b?0:255<b?255:b;eb[8]=0>h?0:255<h?255:h;eb[9]=0>l?0:255<l?255:l;eb[10]=0>c?0:255<c?255:c;eb[12]=0>i?0:255<i?255:i;eb[13]=0>j?0:255<j?255:
 j;eb[14]=0>d?0:255<d?255:d;Fb.putImageData(Uc,0,0);Cc.drawImage(T,0,0);return pc}function ac(a,b,c){a=(a-b)/(c-b);return a*a*(3-2*a)}function hc(a){a=0.5*(a+1);return 0>a?0:1<a?1:a}function Nb(a,b){var c=b.x-a.x,d=b.y-a.y,e=c*c+d*d;0!=e&&(e=1/Math.sqrt(e),c*=e,d*=e,b.x+=c,b.y+=d,a.x-=c,a.y-=d)}var Ec,fd,Pa,jb;this.autoClear?this.clear():n.setTransform(1,0,0,-1,o,p);f.info.render.vertices=0;f.info.render.faces=0;g=j.projectScene(a,k,this.sortElements);h=g.elements;i=g.lights;(Ea=0<i.length)&&m(i);
@@ -659,31 +659,31 @@ c.iterateNext();d;)this.instance_material.push((new p).parse(d)),d=c.iterateNext
 null))for(b=a.iterateNext();b;)this.instance_material.push((new p).parse(b)),b=a.iterateNext();break}}return this};r.prototype.parse=function(a){this.id=a.getAttribute("id");for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "mesh":this.mesh=(new s(this)).parse(c)}}return this};s.prototype.parse=function(a){this.primitives=[];var b;for(b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "source":var d=c.getAttribute("id");void 0==Ja[d]&&(Ja[d]=
 (new F(d)).parse(c));break;case "vertices":this.vertices=(new v).parse(c);break;case "triangles":this.primitives.push((new w).parse(c));break;case "polygons":console.warn("polygon holes not yet supported!");case "polylist":this.primitives.push((new t).parse(c))}}this.geometry3js=new THREE.Geometry;a=Ja[this.vertices.input.POSITION.source].data;for(b=0;b<a.length;b+=3)this.geometry3js.vertices.push(new THREE.Vertex(N(a,b)));for(b=0;b<this.primitives.length;b++)a=this.primitives[b],a.setVertices(this.vertices),
 this.handlePrimitive(a,this.geometry3js);this.geometry3js.computeCentroids();this.geometry3js.computeFaceNormals();this.geometry3js.calcNormals&&(this.geometry3js.computeVertexNormals(),delete this.geometry3js.calcNormals);this.geometry3js.computeBoundingBox();return this};s.prototype.handlePrimitive=function(a,b){var c=0,d,e,f=a.p,g=a.inputs,h,i,j,k,l=0,m=3,n=0,o=[];for(d=0;d<g.length;d++){h=g[d];var q=h.offset+1,n=n<q?q:n;switch(h.semantic){case "TEXCOORD":o.push(h.set)}}for(;c<f.length;){var p=
-[],r=[],q={},s=[];a.vcount&&(m=a.vcount[l++]);for(d=0;d<m;d++)for(e=0;e<g.length;e++)switch(h=g[e],k=Ja[h.source],i=a.vcount?f[c+d]:f[c+d*n+h.offset],j=k.accessor.params.length,j*=i,h.semantic){case "VERTEX":p.push(i);break;case "NORMAL":r.push(N(k.data,j));break;case "TEXCOORD":void 0===q[h.set]&&(q[h.set]=[]);q[h.set].push(new THREE.UV(k.data[j],1-k.data[j+1]));break;case "COLOR":s.push((new THREE.Color).setRGB(k.data[j],k.data[j+1],k.data[j+2]))}e=null;d=[];if(0==r.length)if(h=this.vertices.input.NORMAL){k=
-Ja[h.source];j=k.accessor.params.length;h=0;for(i=p.length;h<i;h++)r.push(N(k.data,p[h]*j))}else b.calcNormals=!0;if(3===m)d.push(new THREE.Face3(p[0],p[1],p[2],r,s.length?s:new THREE.Color));else if(4===m)d.push(new THREE.Face4(p[0],p[1],p[2],p[3],r,s.length?s:new THREE.Color));else if(4<m&&Ea.subdivideFaces){s=s.length?s:new THREE.Color;for(e=1;e<m-1;)d.push(new THREE.Face3(p[0],p[e],p[e+1],[r[0],r[e++],r[e]],s))}if(d.length){h=0;for(i=d.length;h<i;h++){e=d[h];e.daeMaterial=a.material;b.faces.push(e);
-for(e=0;e<o.length;e++)p=q[o[e]],p=4<m?[p[0],p[h+1],p[h+2]]:4===m?[p[0],p[1],p[2],p[3]]:[p[0],p[1],p[2]],b.faceVertexUvs[e]||(b.faceVertexUvs[e]=[]),b.faceVertexUvs[e].push(p)}}else console.log("dropped face with vcount "+m+" for geometry with id: "+b.id);c=a.vcount?c+m:c+n*m}};t.prototype=new w;t.prototype.constructor=t;w.prototype.setVertices=function(a){for(var b=0;b<this.inputs.length;b++)if(this.inputs[b].source==a.id){this.inputs[b].source=a.input.POSITION.source;for(var c in a.input)"POSITION"!=
-c&&this.inputs.push(a.input[c])}};w.prototype.parse=function(a){this.inputs=[];this.material=a.getAttribute("material");this.count=ka(a,"count",0);for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "input":this.inputs.push((new A).parse(a.childNodes[b]));break;case "vcount":this.vcount=R(c.textContent);break;case "p":this.p=R(c.textContent)}}return this};u.prototype.parse=function(a){this.params=[];this.source=a.getAttribute("source");this.count=ka(a,"count",0);this.stride=
-ka(a,"stride",0);for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if("param"==c.nodeName){var d={};d.name=c.getAttribute("name");d.type=c.getAttribute("type");this.params.push(d)}}return this};v.prototype.parse=function(a){this.id=a.getAttribute("id");for(var b=0;b<a.childNodes.length;b++)if("input"==a.childNodes[b].nodeName){var c=(new A).parse(a.childNodes[b]);this.input[c.semantic]=c}return this};A.prototype.parse=function(a){this.semantic=a.getAttribute("semantic");this.source=a.getAttribute("source").replace(/^#/,
-"");this.set=ka(a,"set",-1);this.offset=ka(a,"offset",0);if("TEXCOORD"==this.semantic&&0>this.set)this.set=0;return this};F.prototype.parse=function(a){this.id=a.getAttribute("id");for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "bool_array":for(var d=ca(c.textContent),e=[],f=0,g=d.length;f<g;f++)e.push("true"==d[f]||"1"==d[f]?!0:!1);this.data=e;this.type=c.nodeName;break;case "float_array":this.data=S(c.textContent);this.type=c.nodeName;break;case "int_array":this.data=
-R(c.textContent);this.type=c.nodeName;break;case "IDREF_array":case "Name_array":this.data=ca(c.textContent);this.type=c.nodeName;break;case "technique_common":for(d=0;d<c.childNodes.length;d++)if("accessor"==c.childNodes[d].nodeName){this.accessor=(new u).parse(c.childNodes[d]);break}}}return this};F.prototype.read=function(){var a=[],b=this.accessor.params[0];switch(b.type){case "IDREF":case "Name":case "name":case "float":return this.data;case "float4x4":for(b=0;b<this.data.length;b+=16){var c=
-this.data.slice(b,b+16),c=aa(c);a.push(c)}break;default:console.log("ColladaLoader: Source: Read dont know how to read "+b.type+".")}return a};B.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");for(var b=0;b<a.childNodes.length;b++)if("instance_effect"==a.childNodes[b].nodeName){this.instance_effect=(new L).parse(a.childNodes[b]);break}return this};D.prototype.isColor=function(){return null==this.texture};D.prototype.isTexture=function(){return null!=this.texture};
-D.prototype.parse=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "color":c=S(c.textContent);this.color=new THREE.Color(0);this.color.setRGB(c[0],c[1],c[2]);this.color.a=c[3];break;case "texture":this.texture=c.getAttribute("texture"),this.texcoord=c.getAttribute("texcoord"),this.texOpts={offsetU:0,offsetV:0,repeatU:1,repeatV:1,wrapU:1,wrapV:1},this.parseTexture(c)}}return this};D.prototype.parseTexture=function(a){if(!a.childNodes)return this;
-a.childNodes[1]&&"extra"===a.childNodes[1].nodeName&&(a=a.childNodes[1],a.childNodes[1]&&"technique"===a.childNodes[1].nodeName&&(a=a.childNodes[1]));for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "offsetU":case "offsetV":case "repeatU":case "repeatV":this.texOpts[c.nodeName]=parseFloat(c.textContent);break;case "wrapU":case "wrapV":this.texOpts[c.nodeName]=parseInt(c.textContent);break;default:this.texOpts[c.nodeName]=c.textContent}}return this};H.prototype.parse=
-function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "ambient":case "emission":case "diffuse":case "specular":case "transparent":this[c.nodeName]=(new D).parse(c);break;case "shininess":case "reflectivity":case "transparency":var d;d=U.evaluate(".//dae:float",c,E,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null);for(var e=d.iterateNext(),f=[];e;)f.push(e),e=d.iterateNext();d=f;0<d.length&&(this[c.nodeName]=parseFloat(d[0].textContent))}}this.create();
-return this};H.prototype.create=function(){var a={},b=void 0!==this.transparency&&1>this.transparency,c;for(c in this)switch(c){case "ambient":case "emission":case "diffuse":case "specular":var d=this[c];if(d instanceof D)if(d.isTexture()){if(this.effect.sampler&&this.effect.surface&&this.effect.sampler.source==this.effect.surface.sid){var e=Ka[this.effect.surface.init_from];if(e)e=THREE.ImageUtils.loadTexture(Sa+e.init_from),e.wrapS=d.texOpts.wrapU?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,
-e.wrapT=d.texOpts.wrapV?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,e.offset.x=d.texOpts.offsetU,e.offset.y=d.texOpts.offsetV,e.repeat.x=d.texOpts.repeatU,e.repeat.y=d.texOpts.repeatV,a.map=e}}else"diffuse"==c?a.color=d.color.getHex():b||(a[c]=d.color.getHex());break;case "shininess":case "reflectivity":a[c]=this[c];break;case "transparency":if(b)a.transparent=!0,a.opacity=this[c],b=!0}a.shading=za;return this.material=new THREE.MeshLambertMaterial(a)};I.prototype.parse=function(a){for(var b=0;b<
-a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "init_from":this.init_from=c.textContent;break;case "format":this.format=c.textContent;break;default:console.log("unhandled Surface prop: "+c.nodeName)}}return this};Q.prototype.parse=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "source":this.source=c.textContent;break;case "minfilter":this.minfilter=c.textContent;break;case "magfilter":this.magfilter=
-c.textContent;break;case "mipfilter":this.mipfilter=c.textContent;break;case "wrap_s":this.wrap_s=c.textContent;break;case "wrap_t":this.wrap_t=c.textContent;break;default:console.log("unhandled Sampler2D prop: "+c.nodeName)}}return this};P.prototype.create=function(){if(null==this.shader)return null};P.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");this.shader=null;for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "profile_COMMON":this.parseTechnique(this.parseProfileCOMMON(c))}}return this};
-P.prototype.parseNewparam=function(a){for(var b=a.getAttribute("sid"),c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];if(1==d.nodeType)switch(d.nodeName){case "surface":this.surface=(new I(this)).parse(d);this.surface.sid=b;break;case "sampler2D":this.sampler=(new Q(this)).parse(d);this.sampler.sid=b;break;case "extra":break;default:console.log(d.nodeName)}}};P.prototype.parseProfileCOMMON=function(a){for(var b,c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];if(1==d.nodeType)switch(d.nodeName){case "profile_COMMON":this.parseProfileCOMMON(d);
-break;case "technique":b=d;break;case "newparam":this.parseNewparam(d);break;case "extra":break;default:console.log(d.nodeName)}}return b};P.prototype.parseTechnique=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "constant":case "lambert":case "blinn":case "phong":this.shader=(new H(c.nodeName,this)).parse(c)}}};L.prototype.parse=function(a){this.url=a.getAttribute("url").replace(/^#/,"");return this};K.prototype.parse=function(a){this.id=
-a.getAttribute("id");this.name=a.getAttribute("name");this.source={};for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "source":c=(new F).parse(c);this.source[c.id]=c;break;case "sampler":this.sampler.push((new y(this)).parse(c));break;case "channel":this.channel.push((new O(this)).parse(c))}}return this};O.prototype.parse=function(a){this.source=a.getAttribute("source").replace(/^#/,"");this.target=a.getAttribute("target");var b=this.target.split("/");
-b.shift();var a=b.shift(),c=0<=a.indexOf("."),d=0<=a.indexOf("(");if(c)b=a.split("."),this.sid=b.shift(),this.member=b.shift();else if(d){b=a.split("(");this.sid=b.shift();for(var e=0;e<b.length;e++)b[e]=parseInt(b[e].replace(/\)/,""));this.arrIndices=b}else this.sid=a;this.fullSid=a;this.dotSyntax=c;this.arrSyntax=d;return this};y.prototype.parse=function(a){this.id=a.getAttribute("id");this.inputs=[];for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "input":this.inputs.push((new A).parse(c))}}return this};
-y.prototype.create=function(){for(var a=0;a<this.inputs.length;a++){var b=this.inputs[a],c=this.animation.source[b.source];switch(b.semantic){case "INPUT":this.input=c.read();break;case "OUTPUT":this.output=c.read();this.strideOut=c.accessor.stride;break;case "INTERPOLATION":this.interpolation=c.read();break;case "IN_TANGENT":break;case "OUT_TANGENT":break;default:console.log(b.semantic)}}this.duration=this.endTime=this.startTime=0;if(this.input.length){this.startTime=1E8;this.endTime=-1E8;for(a=
-0;a<this.input.length;a++)this.startTime=Math.min(this.startTime,this.input[a]),this.endTime=Math.max(this.endTime,this.input[a]);this.duration=this.endTime-this.startTime}};y.prototype.getData=function(a,b){var c;if(1<this.strideOut){c=[];for(var b=b*this.strideOut,d=0;d<this.strideOut;++d)c[d]=this.output[b+d];if(3===this.strideOut)switch(a){case "rotate":case "translate":ia(c,-1);break;case "scale":ia(c,1)}}else c=this.output[b];return c};l.prototype.addTarget=function(a,b,c,d){this.targets.push({sid:a,
-member:c,transform:b,data:d})};l.prototype.apply=function(a){for(var b=0;b<this.targets.length;++b){var c=this.targets[b];(!a||c.sid===a)&&c.transform.update(c.data,c.member)}};l.prototype.getTarget=function(a){for(var b=0;b<this.targets.length;++b)if(this.targets[b].sid===a)return this.targets[b];return null};l.prototype.hasTarget=function(a){for(var b=0;b<this.targets.length;++b)if(this.targets[b].sid===a)return!0;return!1};l.prototype.interpolate=function(a,b){for(var c=0;c<this.targets.length;++c){var d=
-this.targets[c],e=a.getTarget(d.sid);if(e){var f=(b-this.time)/(a.time-this.time),g=e.data,h=d.data;if(0>f||1<f)console.log("Key.interpolate: Warning! Scale out of bounds:"+f),f=0>f?0:1;if(h.length)for(var e=[],i=0;i<h.length;++i)e[i]=h[i]+(g[i]-h[i])*f;else e=h+(g-h)*f}else e=d.data;d.transform.update(e,d.member)}};$.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "optics":this.parseOptics(c)}}return this};
-$.prototype.parseOptics=function(a){for(var b=0;b<a.childNodes.length;b++)if("technique_common"==a.childNodes[b].nodeName)for(var c=a.childNodes[b],d=0;d<c.childNodes.length;d++)if("perspective"==c.childNodes[d].nodeName)for(var e=c.childNodes[d],f=0;f<e.childNodes.length;f++){var g=e.childNodes[f];switch(g.nodeName){case "xfov":this.fov=g.textContent;break;case "znear":this.znear=0.4;break;case "zfar":this.zfar=1E15;break;case "aspect_ratio":this.aspect_ratio=g.textContent}}return this};C.prototype.parse=
-function(a){this.url=a.getAttribute("url").replace(/^#/,"");return this};return{load:function(b,c,d){var e=0;if(document.implementation&&document.implementation.createDocument){var f=new XMLHttpRequest;f.overrideMimeType&&f.overrideMimeType("text/xml");f.onreadystatechange=function(){if(4==f.readyState){if(0==f.status||200==f.status)f.responseXML?(Ta=c,a(f.responseXML,void 0,b)):console.error("ColladaLoader: Empty or non-existing file ("+b+")")}else 3==f.readyState&&d&&(0==e&&(e=f.getResponseHeader("Content-Length")),
+[],r=[],q={},s=[];a.vcount&&(m=a.vcount[l++]);for(d=0;d<m;d++)for(e=0;e<g.length;e++)switch(h=g[e],k=Ja[h.source],i=f[c+d*n+h.offset],j=k.accessor.params.length,j*=i,h.semantic){case "VERTEX":p.push(i);break;case "NORMAL":r.push(N(k.data,j));break;case "TEXCOORD":void 0===q[h.set]&&(q[h.set]=[]);q[h.set].push(new THREE.UV(k.data[j],1-k.data[j+1]));break;case "COLOR":s.push((new THREE.Color).setRGB(k.data[j],k.data[j+1],k.data[j+2]))}e=null;d=[];if(0==r.length)if(h=this.vertices.input.NORMAL){k=Ja[h.source];
+j=k.accessor.params.length;h=0;for(i=p.length;h<i;h++)r.push(N(k.data,p[h]*j))}else b.calcNormals=!0;if(3===m)d.push(new THREE.Face3(p[0],p[1],p[2],r,s.length?s:new THREE.Color));else if(4===m)d.push(new THREE.Face4(p[0],p[1],p[2],p[3],r,s.length?s:new THREE.Color));else if(4<m&&Ea.subdivideFaces){s=s.length?s:new THREE.Color;for(e=1;e<m-1;)d.push(new THREE.Face3(p[0],p[e],p[e+1],[r[0],r[e++],r[e]],s))}if(d.length){h=0;for(i=d.length;h<i;h++){e=d[h];e.daeMaterial=a.material;b.faces.push(e);for(e=
+0;e<o.length;e++)p=q[o[e]],p=4<m?[p[0],p[h+1],p[h+2]]:4===m?[p[0],p[1],p[2],p[3]]:[p[0],p[1],p[2]],b.faceVertexUvs[e]||(b.faceVertexUvs[e]=[]),b.faceVertexUvs[e].push(p)}}else console.log("dropped face with vcount "+m+" for geometry with id: "+b.id);c+=n*m}};t.prototype=new w;t.prototype.constructor=t;w.prototype.setVertices=function(a){for(var b=0;b<this.inputs.length;b++)if(this.inputs[b].source==a.id)this.inputs[b].source=a.input.POSITION.source};w.prototype.parse=function(a){this.inputs=[];this.material=
+a.getAttribute("material");this.count=ka(a,"count",0);for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "input":this.inputs.push((new A).parse(a.childNodes[b]));break;case "vcount":this.vcount=R(c.textContent);break;case "p":this.p=R(c.textContent)}}return this};u.prototype.parse=function(a){this.params=[];this.source=a.getAttribute("source");this.count=ka(a,"count",0);this.stride=ka(a,"stride",0);for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if("param"==
+c.nodeName){var d={};d.name=c.getAttribute("name");d.type=c.getAttribute("type");this.params.push(d)}}return this};v.prototype.parse=function(a){this.id=a.getAttribute("id");for(var b=0;b<a.childNodes.length;b++)if("input"==a.childNodes[b].nodeName){var c=(new A).parse(a.childNodes[b]);this.input[c.semantic]=c}return this};A.prototype.parse=function(a){this.semantic=a.getAttribute("semantic");this.source=a.getAttribute("source").replace(/^#/,"");this.set=ka(a,"set",-1);this.offset=ka(a,"offset",0);
+if("TEXCOORD"==this.semantic&&0>this.set)this.set=0;return this};F.prototype.parse=function(a){this.id=a.getAttribute("id");for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "bool_array":for(var d=ca(c.textContent),e=[],f=0,g=d.length;f<g;f++)e.push("true"==d[f]||"1"==d[f]?!0:!1);this.data=e;this.type=c.nodeName;break;case "float_array":this.data=S(c.textContent);this.type=c.nodeName;break;case "int_array":this.data=R(c.textContent);this.type=c.nodeName;break;case "IDREF_array":case "Name_array":this.data=
+ca(c.textContent);this.type=c.nodeName;break;case "technique_common":for(d=0;d<c.childNodes.length;d++)if("accessor"==c.childNodes[d].nodeName){this.accessor=(new u).parse(c.childNodes[d]);break}}}return this};F.prototype.read=function(){var a=[],b=this.accessor.params[0];switch(b.type){case "IDREF":case "Name":case "name":case "float":return this.data;case "float4x4":for(b=0;b<this.data.length;b+=16){var c=this.data.slice(b,b+16),c=aa(c);a.push(c)}break;default:console.log("ColladaLoader: Source: Read dont know how to read "+
+b.type+".")}return a};B.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");for(var b=0;b<a.childNodes.length;b++)if("instance_effect"==a.childNodes[b].nodeName){this.instance_effect=(new L).parse(a.childNodes[b]);break}return this};D.prototype.isColor=function(){return null==this.texture};D.prototype.isTexture=function(){return null!=this.texture};D.prototype.parse=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "color":c=
+S(c.textContent);this.color=new THREE.Color(0);this.color.setRGB(c[0],c[1],c[2]);this.color.a=c[3];break;case "texture":this.texture=c.getAttribute("texture"),this.texcoord=c.getAttribute("texcoord"),this.texOpts={offsetU:0,offsetV:0,repeatU:1,repeatV:1,wrapU:1,wrapV:1},this.parseTexture(c)}}return this};D.prototype.parseTexture=function(a){if(!a.childNodes)return this;a.childNodes[1]&&"extra"===a.childNodes[1].nodeName&&(a=a.childNodes[1],a.childNodes[1]&&"technique"===a.childNodes[1].nodeName&&
+(a=a.childNodes[1]));for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "offsetU":case "offsetV":case "repeatU":case "repeatV":this.texOpts[c.nodeName]=parseFloat(c.textContent);break;case "wrapU":case "wrapV":this.texOpts[c.nodeName]=parseInt(c.textContent);break;default:this.texOpts[c.nodeName]=c.textContent}}return this};H.prototype.parse=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "ambient":case "emission":case "diffuse":case "specular":case "transparent":this[c.nodeName]=
+(new D).parse(c);break;case "shininess":case "reflectivity":case "transparency":var d;d=U.evaluate(".//dae:float",c,E,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null);for(var e=d.iterateNext(),f=[];e;)f.push(e),e=d.iterateNext();d=f;0<d.length&&(this[c.nodeName]=parseFloat(d[0].textContent))}}this.create();return this};H.prototype.create=function(){var a={},b=void 0!==this.transparency&&1>this.transparency,c;for(c in this)switch(c){case "ambient":case "emission":case "diffuse":case "specular":var d=this[c];
+if(d instanceof D)if(d.isTexture()){if(this.effect.sampler&&this.effect.surface&&this.effect.sampler.source==this.effect.surface.sid){var e=Ka[this.effect.surface.init_from];if(e)e=THREE.ImageUtils.loadTexture(Sa+e.init_from),e.wrapS=d.texOpts.wrapU?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,e.wrapT=d.texOpts.wrapV?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,e.offset.x=d.texOpts.offsetU,e.offset.y=d.texOpts.offsetV,e.repeat.x=d.texOpts.repeatU,e.repeat.y=d.texOpts.repeatV,a.map=e}}else"diffuse"==
+c?a.color=d.color.getHex():b||(a[c]=d.color.getHex());break;case "shininess":case "reflectivity":a[c]=this[c];break;case "transparency":if(b)a.transparent=!0,a.opacity=this[c],b=!0}a.shading=za;return this.material=new THREE.MeshLambertMaterial(a)};I.prototype.parse=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "init_from":this.init_from=c.textContent;break;case "format":this.format=c.textContent;break;default:console.log("unhandled Surface prop: "+
+c.nodeName)}}return this};Q.prototype.parse=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "source":this.source=c.textContent;break;case "minfilter":this.minfilter=c.textContent;break;case "magfilter":this.magfilter=c.textContent;break;case "mipfilter":this.mipfilter=c.textContent;break;case "wrap_s":this.wrap_s=c.textContent;break;case "wrap_t":this.wrap_t=c.textContent;break;default:console.log("unhandled Sampler2D prop: "+c.nodeName)}}return this};
+P.prototype.create=function(){if(null==this.shader)return null};P.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");this.shader=null;for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "profile_COMMON":this.parseTechnique(this.parseProfileCOMMON(c))}}return this};P.prototype.parseNewparam=function(a){for(var b=a.getAttribute("sid"),c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];if(1==d.nodeType)switch(d.nodeName){case "surface":this.surface=
+(new I(this)).parse(d);this.surface.sid=b;break;case "sampler2D":this.sampler=(new Q(this)).parse(d);this.sampler.sid=b;break;case "extra":break;default:console.log(d.nodeName)}}};P.prototype.parseProfileCOMMON=function(a){for(var b,c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];if(1==d.nodeType)switch(d.nodeName){case "profile_COMMON":this.parseProfileCOMMON(d);break;case "technique":b=d;break;case "newparam":this.parseNewparam(d);break;case "extra":break;default:console.log(d.nodeName)}}return b};
+P.prototype.parseTechnique=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "constant":case "lambert":case "blinn":case "phong":this.shader=(new H(c.nodeName,this)).parse(c)}}};L.prototype.parse=function(a){this.url=a.getAttribute("url").replace(/^#/,"");return this};K.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");this.source={};for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];
+if(1==c.nodeType)switch(c.nodeName){case "source":c=(new F).parse(c);this.source[c.id]=c;break;case "sampler":this.sampler.push((new y(this)).parse(c));break;case "channel":this.channel.push((new O(this)).parse(c))}}return this};O.prototype.parse=function(a){this.source=a.getAttribute("source").replace(/^#/,"");this.target=a.getAttribute("target");var b=this.target.split("/");b.shift();var a=b.shift(),c=0<=a.indexOf("."),d=0<=a.indexOf("(");if(c)b=a.split("."),this.sid=b.shift(),this.member=b.shift();
+else if(d){b=a.split("(");this.sid=b.shift();for(var e=0;e<b.length;e++)b[e]=parseInt(b[e].replace(/\)/,""));this.arrIndices=b}else this.sid=a;this.fullSid=a;this.dotSyntax=c;this.arrSyntax=d;return this};y.prototype.parse=function(a){this.id=a.getAttribute("id");this.inputs=[];for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "input":this.inputs.push((new A).parse(c))}}return this};y.prototype.create=function(){for(var a=0;a<this.inputs.length;a++){var b=
+this.inputs[a],c=this.animation.source[b.source];switch(b.semantic){case "INPUT":this.input=c.read();break;case "OUTPUT":this.output=c.read();this.strideOut=c.accessor.stride;break;case "INTERPOLATION":this.interpolation=c.read();break;case "IN_TANGENT":break;case "OUT_TANGENT":break;default:console.log(b.semantic)}}this.duration=this.endTime=this.startTime=0;if(this.input.length){this.startTime=1E8;this.endTime=-1E8;for(a=0;a<this.input.length;a++)this.startTime=Math.min(this.startTime,this.input[a]),
+this.endTime=Math.max(this.endTime,this.input[a]);this.duration=this.endTime-this.startTime}};y.prototype.getData=function(a,b){var c;if(1<this.strideOut){c=[];for(var b=b*this.strideOut,d=0;d<this.strideOut;++d)c[d]=this.output[b+d];if(3===this.strideOut)switch(a){case "rotate":case "translate":ia(c,-1);break;case "scale":ia(c,1)}}else c=this.output[b];return c};l.prototype.addTarget=function(a,b,c,d){this.targets.push({sid:a,member:c,transform:b,data:d})};l.prototype.apply=function(a){for(var b=
+0;b<this.targets.length;++b){var c=this.targets[b];(!a||c.sid===a)&&c.transform.update(c.data,c.member)}};l.prototype.getTarget=function(a){for(var b=0;b<this.targets.length;++b)if(this.targets[b].sid===a)return this.targets[b];return null};l.prototype.hasTarget=function(a){for(var b=0;b<this.targets.length;++b)if(this.targets[b].sid===a)return!0;return!1};l.prototype.interpolate=function(a,b){for(var c=0;c<this.targets.length;++c){var d=this.targets[c],e=a.getTarget(d.sid);if(e){var f=(b-this.time)/
+(a.time-this.time),g=e.data,h=d.data;if(0>f||1<f)console.log("Key.interpolate: Warning! Scale out of bounds:"+f),f=0>f?0:1;if(h.length)for(var e=[],i=0;i<h.length;++i)e[i]=h[i]+(g[i]-h[i])*f;else e=h+(g-h)*f}else e=d.data;d.transform.update(e,d.member)}};$.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "optics":this.parseOptics(c)}}return this};$.prototype.parseOptics=
+function(a){for(var b=0;b<a.childNodes.length;b++)if("technique_common"==a.childNodes[b].nodeName)for(var c=a.childNodes[b],d=0;d<c.childNodes.length;d++)if("perspective"==c.childNodes[d].nodeName)for(var e=c.childNodes[d],f=0;f<e.childNodes.length;f++){var g=e.childNodes[f];switch(g.nodeName){case "xfov":this.fov=g.textContent;break;case "znear":this.znear=0.4;break;case "zfar":this.zfar=1E15;break;case "aspect_ratio":this.aspect_ratio=g.textContent}}return this};C.prototype.parse=function(a){this.url=
+a.getAttribute("url").replace(/^#/,"");return this};return{load:function(b,c,d){var e=0;if(document.implementation&&document.implementation.createDocument){var f=new XMLHttpRequest;f.overrideMimeType&&f.overrideMimeType("text/xml");f.onreadystatechange=function(){if(4==f.readyState){if(0==f.status||200==f.status)f.responseXML?(Ta=c,a(f.responseXML,void 0,b)):console.error("ColladaLoader: Empty or non-existing file ("+b+")")}else 3==f.readyState&&d&&(0==e&&(e=f.getResponseHeader("Content-Length")),
 d({total:e,loaded:f.responseText.length}))};f.open("GET",b,!0);f.send(null)}else alert("Don't know how to parse XML!")},parse:a,setPreferredShading:function(a){za=a},applySkin:e,geometries:ha,options:Ea}};THREE.JSONLoader=function(a){THREE.Loader.call(this,a)};THREE.JSONLoader.prototype=new THREE.Loader;THREE.JSONLoader.prototype.constructor=THREE.JSONLoader;THREE.JSONLoader.prototype.supr=THREE.Loader.prototype;
 THREE.JSONLoader.prototype.load=function(a,b,c){c=c?c:this.extractUrlBase(a);this.onLoadStart();this.loadAjaxJSON(this,a,b,c)};
 THREE.JSONLoader.prototype.loadAjaxJSON=function(a,b,c,d,e){var f=new XMLHttpRequest,g=0;f.onreadystatechange=function(){if(f.readyState===f.DONE)if(200===f.status||0===f.status){if(f.responseText){var h=JSON.parse(f.responseText);a.createModel(h,c,d)}else console.warn("THREE.JSONLoader: ["+b+"] seems to be unreachable or file there is empty");a.onLoadComplete()}else console.error("THREE.JSONLoader: Couldn't load ["+b+"] ["+f.status+"]");else f.readyState===f.LOADING?e&&(0===g&&(g=f.getResponseHeader("Content-Length")),
@@ -709,7 +709,7 @@ THREE[k.magFilter];if(k.repeat){n.repeat.set(k.repeat[0],k.repeat[1]);if(1!=k.re
 C.textures[r.parameters[D]];else if("shading"==D)r.parameters[D]="flat"==r.parameters[D]?THREE.FlatShading:THREE.SmoothShading;else if("blending"==D)r.parameters[D]=THREE[r.parameters[D]]?THREE[r.parameters[D]]:THREE.NormalBlending;else if("combine"==D)r.parameters[D]="MixOperation"==r.parameters[D]?THREE.MixOperation:THREE.MultiplyOperation;else if("vertexColors"==D)if("face"==r.parameters[D])r.parameters[D]=THREE.FaceColors;else if(r.parameters[D])r.parameters[D]=THREE.VertexColors;if(void 0!==
 r.parameters.opacity&&1>r.parameters.opacity)r.parameters.transparent=!0;if(r.parameters.normalMap){a=THREE.ShaderUtils.lib.normal;k=THREE.UniformsUtils.clone(a.uniforms);n=r.parameters.color;P=r.parameters.specular;c=r.parameters.ambient;K=r.parameters.shininess;k.tNormal.texture=C.textures[r.parameters.normalMap];if(r.parameters.normalMapFactor)k.uNormalScale.value=r.parameters.normalMapFactor;if(r.parameters.map)k.tDiffuse.texture=r.parameters.map,k.enableDiffuse.value=!0;if(r.parameters.lightMap)k.tAO.texture=
 r.parameters.lightMap,k.enableAO.value=!0;if(r.parameters.specularMap)k.tSpecular.texture=C.textures[r.parameters.specularMap],k.enableSpecular.value=!0;k.uDiffuseColor.value.setHex(n);k.uSpecularColor.value.setHex(P);k.uAmbientColor.value.setHex(c);k.uShininess.value=K;if(r.parameters.opacity)k.uOpacity.value=r.parameters.opacity;I=new THREE.ShaderMaterial({fragmentShader:a.fragmentShader,vertexShader:a.vertexShader,uniforms:k,lights:!0,fog:!0})}else I=new THREE[r.type](r.parameters);C.materials[q]=
-I}e();i.callbackSync(C);h()};THREE.UTF8Loader=function(){};THREE.UTF8Loader.prototype=new THREE.UTF8Loader;THREE.UTF8Loader.prototype.constructor=THREE.UTF8Loader;
+I}e();i.callbackSync(C);h()};THREE.UTF8Loader=function(){};
 THREE.UTF8Loader.prototype.load=function(a,b,c){var d=new XMLHttpRequest,e=void 0!==c.scale?c.scale:1,f=void 0!==c.offsetX?c.offsetX:0,g=void 0!==c.offsetY?c.offsetY:0,h=void 0!==c.offsetZ?c.offsetZ:0;d.onreadystatechange=function(){4==d.readyState?200==d.status||0==d.status?THREE.UTF8Loader.prototype.createModel(d.responseText,b,e,f,g,h):console.error("THREE.UTF8Loader: Couldn't load ["+a+"] ["+d.status+"]"):3!=d.readyState&&2==d.readyState&&d.getResponseHeader("Content-Length")};d.open("GET",a,
 !0);d.send(null)};THREE.UTF8Loader.prototype.decompressMesh=function(a){var b=a.charCodeAt(0);57344<=b&&(b-=2048);b++;for(var c=new Float32Array(8*b),d=1,e=0;8>e;e++){for(var f=0,g=0;g<b;++g){var h=a.charCodeAt(g+d),f=f+(h>>1^-(h&1));c[8*g+e]=f}d+=b}b=a.length-d;f=new Uint16Array(b);for(e=g=0;e<b;e++)h=a.charCodeAt(e+d),f[e]=g-h,0==h&&g++;return[c,f]};
 THREE.UTF8Loader.prototype.createModel=function(a,b,c,d,e,f){var g=function(){var b=this;b.materials=[];THREE.Geometry.call(this);var g=THREE.UTF8Loader.prototype.decompressMesh(a),j=[],k=[];(function(a,g,i){for(var j,k,r,s=a.length;i<s;i+=g)j=a[i],k=a[i+1],r=a[i+2],j=j/16383*c,k=k/16383*c,r=r/16383*c,j+=d,k+=e,r+=f,b.vertices.push(new THREE.Vertex(new THREE.Vector3(j,k,r)))})(g[0],8,0);(function(a,b,c){for(var d,e,f=a.length;c<f;c+=b)d=a[c],e=a[c+1],d/=1023,e/=1023,k.push(d,1-e)})(g[0],8,3);(function(a,

+ 1 - 1
build/custom/ThreeCanvas.js

@@ -1,5 +1,5 @@
 // ThreeCanvas.js - http://github.com/mrdoob/three.js
-'use strict';var THREE=THREE||{REVISION:"48dev"};if(!self.Int32Array)self.Int32Array=Array,self.Float32Array=Array;
+'use strict';var THREE=THREE||{REVISION:"49dev"};if(!self.Int32Array)self.Int32Array=Array,self.Float32Array=Array;
 (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];if(!window.requestAnimationFrame)window.requestAnimationFrame=function(b){var c=(new Date).getTime(),f=Math.max(0,16-(c-a)),g=window.setTimeout(function(){b(c+f)},f);a=c+f;return g};if(!window.cancelAnimationFrame)window.cancelAnimationFrame=
 function(a){clearTimeout(a)}})();THREE.Color=function(a){void 0!==a&&this.setHex(a);return this};
 THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},copyGammaToLinear:function(a){this.r=a.r*a.r;this.g=a.g*a.g;this.b=a.b*a.b;return this},copyLinearToGamma:function(a){this.r=Math.sqrt(a.r);this.g=Math.sqrt(a.g);this.b=Math.sqrt(a.b);return this},convertGammaToLinear:function(){var a=this.r,b=this.g,c=this.b;this.r=a*a;this.g=b*b;this.b=c*c;return this},convertLinearToGamma:function(){this.r=Math.sqrt(this.r);this.g=Math.sqrt(this.g);

+ 1 - 1
build/custom/ThreeDOM.js

@@ -1,5 +1,5 @@
 // ThreeDOM.js - http://github.com/mrdoob/three.js
-'use strict';var THREE=THREE||{REVISION:"48dev"};if(!self.Int32Array)self.Int32Array=Array,self.Float32Array=Array;
+'use strict';var THREE=THREE||{REVISION:"49dev"};if(!self.Int32Array)self.Int32Array=Array,self.Float32Array=Array;
 (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];if(!window.requestAnimationFrame)window.requestAnimationFrame=function(b){var c=(new Date).getTime(),f=Math.max(0,16-(c-a)),g=window.setTimeout(function(){b(c+f)},f);a=c+f;return g};if(!window.cancelAnimationFrame)window.cancelAnimationFrame=
 function(a){clearTimeout(a)}})();THREE.Color=function(a){void 0!==a&&this.setHex(a);return this};
 THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},copyGammaToLinear:function(a){this.r=a.r*a.r;this.g=a.g*a.g;this.b=a.b*a.b;return this},copyLinearToGamma:function(a){this.r=Math.sqrt(a.r);this.g=Math.sqrt(a.g);this.b=Math.sqrt(a.b);return this},convertGammaToLinear:function(){var a=this.r,b=this.g,c=this.b;this.r=a*a;this.g=b*b;this.b=c*c;return this},convertLinearToGamma:function(){this.r=Math.sqrt(this.r);this.g=Math.sqrt(this.g);

+ 28 - 28
build/custom/ThreeExtras.js

@@ -287,33 +287,33 @@ c,M,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null))for(var d=c.iterateNext();d;)th
 Q.evaluate(".//dae:instance_material",c,M,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null))for(b=a.iterateNext();b;)this.instance_material.push((new r).parse(b)),b=a.iterateNext();break}}return this};o.prototype.parse=function(a){this.id=a.getAttribute("id");for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "mesh":this.mesh=(new p(this)).parse(c)}}return this};p.prototype.parse=function(a){this.primitives=[];var b;for(b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];
 switch(c.nodeName){case "source":var d=c.getAttribute("id");void 0==Y[d]&&(Y[d]=(new z(d)).parse(c));break;case "vertices":this.vertices=(new u).parse(c);break;case "triangles":this.primitives.push((new t).parse(c));break;case "polygons":console.warn("polygon holes not yet supported!");case "polylist":this.primitives.push((new s).parse(c))}}this.geometry3js=new THREE.Geometry;a=Y[this.vertices.input.POSITION.source].data;for(b=0;b<a.length;b+=3)this.geometry3js.vertices.push(new THREE.Vertex(ca(a,
 b)));for(b=0;b<this.primitives.length;b++)a=this.primitives[b],a.setVertices(this.vertices),this.handlePrimitive(a,this.geometry3js);this.geometry3js.computeCentroids();this.geometry3js.computeFaceNormals();this.geometry3js.calcNormals&&(this.geometry3js.computeVertexNormals(),delete this.geometry3js.calcNormals);this.geometry3js.computeBoundingBox();return this};p.prototype.handlePrimitive=function(a,b){var c=0,d,e,f=a.p,g=a.inputs,h,i,j,k,l=0,m=3,n=0,q=[];for(d=0;d<g.length;d++){h=g[d];var o=h.offset+
-1,n=n<o?o:n;switch(h.semantic){case "TEXCOORD":q.push(h.set)}}for(;c<f.length;){var p=[],r=[],o={},s=[];a.vcount&&(m=a.vcount[l++]);for(d=0;d<m;d++)for(e=0;e<g.length;e++)switch(h=g[e],k=Y[h.source],i=a.vcount?f[c+d]:f[c+d*n+h.offset],j=k.accessor.params.length,j*=i,h.semantic){case "VERTEX":p.push(i);break;case "NORMAL":r.push(ca(k.data,j));break;case "TEXCOORD":void 0===o[h.set]&&(o[h.set]=[]);o[h.set].push(new THREE.UV(k.data[j],1-k.data[j+1]));break;case "COLOR":s.push((new THREE.Color).setRGB(k.data[j],
-k.data[j+1],k.data[j+2]))}e=null;d=[];if(0==r.length)if(h=this.vertices.input.NORMAL){k=Y[h.source];j=k.accessor.params.length;h=0;for(i=p.length;h<i;h++)r.push(ca(k.data,p[h]*j))}else b.calcNormals=!0;if(3===m)d.push(new THREE.Face3(p[0],p[1],p[2],r,s.length?s:new THREE.Color));else if(4===m)d.push(new THREE.Face4(p[0],p[1],p[2],p[3],r,s.length?s:new THREE.Color));else if(4<m&&R.subdivideFaces){s=s.length?s:new THREE.Color;for(e=1;e<m-1;)d.push(new THREE.Face3(p[0],p[e],p[e+1],[r[0],r[e++],r[e]],
-s))}if(d.length){h=0;for(i=d.length;h<i;h++){e=d[h];e.daeMaterial=a.material;b.faces.push(e);for(e=0;e<q.length;e++)p=o[q[e]],p=4<m?[p[0],p[h+1],p[h+2]]:4===m?[p[0],p[1],p[2],p[3]]:[p[0],p[1],p[2]],b.faceVertexUvs[e]||(b.faceVertexUvs[e]=[]),b.faceVertexUvs[e].push(p)}}else console.log("dropped face with vcount "+m+" for geometry with id: "+b.id);c=a.vcount?c+m:c+n*m}};s.prototype=new t;s.prototype.constructor=s;t.prototype.setVertices=function(a){for(var b=0;b<this.inputs.length;b++)if(this.inputs[b].source==
-a.id){this.inputs[b].source=a.input.POSITION.source;for(var c in a.input)"POSITION"!=c&&this.inputs.push(a.input[c])}};t.prototype.parse=function(a){this.inputs=[];this.material=a.getAttribute("material");this.count=X(a,"count",0);for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "input":this.inputs.push((new w).parse(a.childNodes[b]));break;case "vcount":this.vcount=N(c.textContent);break;case "p":this.p=N(c.textContent)}}return this};v.prototype.parse=function(a){this.params=
-[];this.source=a.getAttribute("source");this.count=X(a,"count",0);this.stride=X(a,"stride",0);for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if("param"==c.nodeName){var d={};d.name=c.getAttribute("name");d.type=c.getAttribute("type");this.params.push(d)}}return this};u.prototype.parse=function(a){this.id=a.getAttribute("id");for(var b=0;b<a.childNodes.length;b++)if("input"==a.childNodes[b].nodeName){var c=(new w).parse(a.childNodes[b]);this.input[c.semantic]=c}return this};w.prototype.parse=
-function(a){this.semantic=a.getAttribute("semantic");this.source=a.getAttribute("source").replace(/^#/,"");this.set=X(a,"set",-1);this.offset=X(a,"offset",0);if("TEXCOORD"==this.semantic&&0>this.set)this.set=0;return this};z.prototype.parse=function(a){this.id=a.getAttribute("id");for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "bool_array":for(var d=O(c.textContent),e=[],f=0,g=d.length;f<g;f++)e.push("true"==d[f]||"1"==d[f]?!0:!1);this.data=e;this.type=c.nodeName;
-break;case "float_array":this.data=L(c.textContent);this.type=c.nodeName;break;case "int_array":this.data=N(c.textContent);this.type=c.nodeName;break;case "IDREF_array":case "Name_array":this.data=O(c.textContent);this.type=c.nodeName;break;case "technique_common":for(d=0;d<c.childNodes.length;d++)if("accessor"==c.childNodes[d].nodeName){this.accessor=(new v).parse(c.childNodes[d]);break}}}return this};z.prototype.read=function(){var a=[],b=this.accessor.params[0];switch(b.type){case "IDREF":case "Name":case "name":case "float":return this.data;
-case "float4x4":for(b=0;b<this.data.length;b+=16){var c=this.data.slice(b,b+16),c=da(c);a.push(c)}break;default:console.log("ColladaLoader: Source: Read dont know how to read "+b.type+".")}return a};x.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");for(var b=0;b<a.childNodes.length;b++)if("instance_effect"==a.childNodes[b].nodeName){this.instance_effect=(new E).parse(a.childNodes[b]);break}return this};A.prototype.isColor=function(){return null==this.texture};
-A.prototype.isTexture=function(){return null!=this.texture};A.prototype.parse=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "color":c=L(c.textContent);this.color=new THREE.Color(0);this.color.setRGB(c[0],c[1],c[2]);this.color.a=c[3];break;case "texture":this.texture=c.getAttribute("texture"),this.texcoord=c.getAttribute("texcoord"),this.texOpts={offsetU:0,offsetV:0,repeatU:1,repeatV:1,wrapU:1,wrapV:1},this.parseTexture(c)}}return this};
-A.prototype.parseTexture=function(a){if(!a.childNodes)return this;a.childNodes[1]&&"extra"===a.childNodes[1].nodeName&&(a=a.childNodes[1],a.childNodes[1]&&"technique"===a.childNodes[1].nodeName&&(a=a.childNodes[1]));for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "offsetU":case "offsetV":case "repeatU":case "repeatV":this.texOpts[c.nodeName]=parseFloat(c.textContent);break;case "wrapU":case "wrapV":this.texOpts[c.nodeName]=parseInt(c.textContent);break;default:this.texOpts[c.nodeName]=
-c.textContent}}return this};D.prototype.parse=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "ambient":case "emission":case "diffuse":case "specular":case "transparent":this[c.nodeName]=(new A).parse(c);break;case "shininess":case "reflectivity":case "transparency":var d;d=Q.evaluate(".//dae:float",c,M,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null);for(var e=d.iterateNext(),f=[];e;)f.push(e),e=d.iterateNext();d=f;0<d.length&&(this[c.nodeName]=
-parseFloat(d[0].textContent))}}this.create();return this};D.prototype.create=function(){var a={},b=void 0!==this.transparency&&1>this.transparency,c;for(c in this)switch(c){case "ambient":case "emission":case "diffuse":case "specular":var d=this[c];if(d instanceof A)if(d.isTexture()){if(this.effect.sampler&&this.effect.surface&&this.effect.sampler.source==this.effect.surface.sid){var e=ea[this.effect.surface.init_from];if(e)e=THREE.ImageUtils.loadTexture(ma+e.init_from),e.wrapS=d.texOpts.wrapU?THREE.RepeatWrapping:
-THREE.ClampToEdgeWrapping,e.wrapT=d.texOpts.wrapV?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,e.offset.x=d.texOpts.offsetU,e.offset.y=d.texOpts.offsetV,e.repeat.x=d.texOpts.repeatU,e.repeat.y=d.texOpts.repeatV,a.map=e}}else"diffuse"==c?a.color=d.color.getHex():b||(a[c]=d.color.getHex());break;case "shininess":case "reflectivity":a[c]=this[c];break;case "transparency":if(b)a.transparent=!0,a.opacity=this[c],b=!0}a.shading=na;return this.material=new THREE.MeshLambertMaterial(a)};G.prototype.parse=
-function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "init_from":this.init_from=c.textContent;break;case "format":this.format=c.textContent;break;default:console.log("unhandled Surface prop: "+c.nodeName)}}return this};J.prototype.parse=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "source":this.source=c.textContent;break;case "minfilter":this.minfilter=c.textContent;break;
-case "magfilter":this.magfilter=c.textContent;break;case "mipfilter":this.mipfilter=c.textContent;break;case "wrap_s":this.wrap_s=c.textContent;break;case "wrap_t":this.wrap_t=c.textContent;break;default:console.log("unhandled Sampler2D prop: "+c.nodeName)}}return this};F.prototype.create=function(){if(null==this.shader)return null};F.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");this.shader=null;for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];
-if(1==c.nodeType)switch(c.nodeName){case "profile_COMMON":this.parseTechnique(this.parseProfileCOMMON(c))}}return this};F.prototype.parseNewparam=function(a){for(var b=a.getAttribute("sid"),c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];if(1==d.nodeType)switch(d.nodeName){case "surface":this.surface=(new G(this)).parse(d);this.surface.sid=b;break;case "sampler2D":this.sampler=(new J(this)).parse(d);this.sampler.sid=b;break;case "extra":break;default:console.log(d.nodeName)}}};F.prototype.parseProfileCOMMON=
-function(a){for(var b,c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];if(1==d.nodeType)switch(d.nodeName){case "profile_COMMON":this.parseProfileCOMMON(d);break;case "technique":b=d;break;case "newparam":this.parseNewparam(d);break;case "extra":break;default:console.log(d.nodeName)}}return b};F.prototype.parseTechnique=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "constant":case "lambert":case "blinn":case "phong":this.shader=
-(new D(c.nodeName,this)).parse(c)}}};E.prototype.parse=function(a){this.url=a.getAttribute("url").replace(/^#/,"");return this};C.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");this.source={};for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "source":c=(new z).parse(c);this.source[c.id]=c;break;case "sampler":this.sampler.push((new y(this)).parse(c));break;case "channel":this.channel.push((new H(this)).parse(c))}}return this};
-H.prototype.parse=function(a){this.source=a.getAttribute("source").replace(/^#/,"");this.target=a.getAttribute("target");var b=this.target.split("/");b.shift();var a=b.shift(),c=0<=a.indexOf("."),d=0<=a.indexOf("(");if(c)b=a.split("."),this.sid=b.shift(),this.member=b.shift();else if(d){b=a.split("(");this.sid=b.shift();for(var e=0;e<b.length;e++)b[e]=parseInt(b[e].replace(/\)/,""));this.arrIndices=b}else this.sid=a;this.fullSid=a;this.dotSyntax=c;this.arrSyntax=d;return this};y.prototype.parse=function(a){this.id=
-a.getAttribute("id");this.inputs=[];for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "input":this.inputs.push((new w).parse(c))}}return this};y.prototype.create=function(){for(var a=0;a<this.inputs.length;a++){var b=this.inputs[a],c=this.animation.source[b.source];switch(b.semantic){case "INPUT":this.input=c.read();break;case "OUTPUT":this.output=c.read();this.strideOut=c.accessor.stride;break;case "INTERPOLATION":this.interpolation=c.read();break;
-case "IN_TANGENT":break;case "OUT_TANGENT":break;default:console.log(b.semantic)}}this.duration=this.endTime=this.startTime=0;if(this.input.length){this.startTime=1E8;this.endTime=-1E8;for(a=0;a<this.input.length;a++)this.startTime=Math.min(this.startTime,this.input[a]),this.endTime=Math.max(this.endTime,this.input[a]);this.duration=this.endTime-this.startTime}};y.prototype.getData=function(a,b){var c;if(1<this.strideOut){c=[];for(var b=b*this.strideOut,d=0;d<this.strideOut;++d)c[d]=this.output[b+
-d];if(3===this.strideOut)switch(a){case "rotate":case "translate":P(c,-1);break;case "scale":P(c,1)}}else c=this.output[b];return c};I.prototype.addTarget=function(a,b,c,d){this.targets.push({sid:a,member:c,transform:b,data:d})};I.prototype.apply=function(a){for(var b=0;b<this.targets.length;++b){var c=this.targets[b];(!a||c.sid===a)&&c.transform.update(c.data,c.member)}};I.prototype.getTarget=function(a){for(var b=0;b<this.targets.length;++b)if(this.targets[b].sid===a)return this.targets[b];return null};
-I.prototype.hasTarget=function(a){for(var b=0;b<this.targets.length;++b)if(this.targets[b].sid===a)return!0;return!1};I.prototype.interpolate=function(a,b){for(var c=0;c<this.targets.length;++c){var d=this.targets[c],e=a.getTarget(d.sid);if(e){var f=(b-this.time)/(a.time-this.time),g=e.data,h=d.data;if(0>f||1<f)console.log("Key.interpolate: Warning! Scale out of bounds:"+f),f=0>f?0:1;if(h.length)for(var e=[],i=0;i<h.length;++i)e[i]=h[i]+(g[i]-h[i])*f;else e=h+(g-h)*f}else e=d.data;d.transform.update(e,
-d.member)}};K.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "optics":this.parseOptics(c)}}return this};K.prototype.parseOptics=function(a){for(var b=0;b<a.childNodes.length;b++)if("technique_common"==a.childNodes[b].nodeName)for(var c=a.childNodes[b],d=0;d<c.childNodes.length;d++)if("perspective"==c.childNodes[d].nodeName)for(var e=c.childNodes[d],f=0;f<
-e.childNodes.length;f++){var g=e.childNodes[f];switch(g.nodeName){case "xfov":this.fov=g.textContent;break;case "znear":this.znear=0.4;break;case "zfar":this.zfar=1E15;break;case "aspect_ratio":this.aspect_ratio=g.textContent}}return this};B.prototype.parse=function(a){this.url=a.getAttribute("url").replace(/^#/,"");return this};return{load:function(b,c,d){var e=0;if(document.implementation&&document.implementation.createDocument){var f=new XMLHttpRequest;f.overrideMimeType&&f.overrideMimeType("text/xml");
-f.onreadystatechange=function(){if(4==f.readyState){if(0==f.status||200==f.status)f.responseXML?(la=c,a(f.responseXML,void 0,b)):console.error("ColladaLoader: Empty or non-existing file ("+b+")")}else 3==f.readyState&&d&&(0==e&&(e=f.getResponseHeader("Content-Length")),d({total:e,loaded:f.responseText.length}))};f.open("GET",b,!0);f.send(null)}else alert("Don't know how to parse XML!")},parse:a,setPreferredShading:function(a){na=a},applySkin:f,geometries:U,options:R}};
-THREE.JSONLoader=function(a){THREE.Loader.call(this,a)};THREE.JSONLoader.prototype=new THREE.Loader;THREE.JSONLoader.prototype.constructor=THREE.JSONLoader;THREE.JSONLoader.prototype.supr=THREE.Loader.prototype;THREE.JSONLoader.prototype.load=function(a,b,c){c=c?c:this.extractUrlBase(a);this.onLoadStart();this.loadAjaxJSON(this,a,b,c)};
+1,n=n<o?o:n;switch(h.semantic){case "TEXCOORD":q.push(h.set)}}for(;c<f.length;){var p=[],r=[],o={},s=[];a.vcount&&(m=a.vcount[l++]);for(d=0;d<m;d++)for(e=0;e<g.length;e++)switch(h=g[e],k=Y[h.source],i=f[c+d*n+h.offset],j=k.accessor.params.length,j*=i,h.semantic){case "VERTEX":p.push(i);break;case "NORMAL":r.push(ca(k.data,j));break;case "TEXCOORD":void 0===o[h.set]&&(o[h.set]=[]);o[h.set].push(new THREE.UV(k.data[j],1-k.data[j+1]));break;case "COLOR":s.push((new THREE.Color).setRGB(k.data[j],k.data[j+
+1],k.data[j+2]))}e=null;d=[];if(0==r.length)if(h=this.vertices.input.NORMAL){k=Y[h.source];j=k.accessor.params.length;h=0;for(i=p.length;h<i;h++)r.push(ca(k.data,p[h]*j))}else b.calcNormals=!0;if(3===m)d.push(new THREE.Face3(p[0],p[1],p[2],r,s.length?s:new THREE.Color));else if(4===m)d.push(new THREE.Face4(p[0],p[1],p[2],p[3],r,s.length?s:new THREE.Color));else if(4<m&&R.subdivideFaces){s=s.length?s:new THREE.Color;for(e=1;e<m-1;)d.push(new THREE.Face3(p[0],p[e],p[e+1],[r[0],r[e++],r[e]],s))}if(d.length){h=
+0;for(i=d.length;h<i;h++){e=d[h];e.daeMaterial=a.material;b.faces.push(e);for(e=0;e<q.length;e++)p=o[q[e]],p=4<m?[p[0],p[h+1],p[h+2]]:4===m?[p[0],p[1],p[2],p[3]]:[p[0],p[1],p[2]],b.faceVertexUvs[e]||(b.faceVertexUvs[e]=[]),b.faceVertexUvs[e].push(p)}}else console.log("dropped face with vcount "+m+" for geometry with id: "+b.id);c+=n*m}};s.prototype=new t;s.prototype.constructor=s;t.prototype.setVertices=function(a){for(var b=0;b<this.inputs.length;b++)if(this.inputs[b].source==a.id)this.inputs[b].source=
+a.input.POSITION.source};t.prototype.parse=function(a){this.inputs=[];this.material=a.getAttribute("material");this.count=X(a,"count",0);for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "input":this.inputs.push((new w).parse(a.childNodes[b]));break;case "vcount":this.vcount=N(c.textContent);break;case "p":this.p=N(c.textContent)}}return this};v.prototype.parse=function(a){this.params=[];this.source=a.getAttribute("source");this.count=X(a,"count",0);this.stride=
+X(a,"stride",0);for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if("param"==c.nodeName){var d={};d.name=c.getAttribute("name");d.type=c.getAttribute("type");this.params.push(d)}}return this};u.prototype.parse=function(a){this.id=a.getAttribute("id");for(var b=0;b<a.childNodes.length;b++)if("input"==a.childNodes[b].nodeName){var c=(new w).parse(a.childNodes[b]);this.input[c.semantic]=c}return this};w.prototype.parse=function(a){this.semantic=a.getAttribute("semantic");this.source=a.getAttribute("source").replace(/^#/,
+"");this.set=X(a,"set",-1);this.offset=X(a,"offset",0);if("TEXCOORD"==this.semantic&&0>this.set)this.set=0;return this};z.prototype.parse=function(a){this.id=a.getAttribute("id");for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "bool_array":for(var d=O(c.textContent),e=[],f=0,g=d.length;f<g;f++)e.push("true"==d[f]||"1"==d[f]?!0:!1);this.data=e;this.type=c.nodeName;break;case "float_array":this.data=L(c.textContent);this.type=c.nodeName;break;case "int_array":this.data=
+N(c.textContent);this.type=c.nodeName;break;case "IDREF_array":case "Name_array":this.data=O(c.textContent);this.type=c.nodeName;break;case "technique_common":for(d=0;d<c.childNodes.length;d++)if("accessor"==c.childNodes[d].nodeName){this.accessor=(new v).parse(c.childNodes[d]);break}}}return this};z.prototype.read=function(){var a=[],b=this.accessor.params[0];switch(b.type){case "IDREF":case "Name":case "name":case "float":return this.data;case "float4x4":for(b=0;b<this.data.length;b+=16){var c=
+this.data.slice(b,b+16),c=da(c);a.push(c)}break;default:console.log("ColladaLoader: Source: Read dont know how to read "+b.type+".")}return a};x.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");for(var b=0;b<a.childNodes.length;b++)if("instance_effect"==a.childNodes[b].nodeName){this.instance_effect=(new E).parse(a.childNodes[b]);break}return this};A.prototype.isColor=function(){return null==this.texture};A.prototype.isTexture=function(){return null!=this.texture};
+A.prototype.parse=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "color":c=L(c.textContent);this.color=new THREE.Color(0);this.color.setRGB(c[0],c[1],c[2]);this.color.a=c[3];break;case "texture":this.texture=c.getAttribute("texture"),this.texcoord=c.getAttribute("texcoord"),this.texOpts={offsetU:0,offsetV:0,repeatU:1,repeatV:1,wrapU:1,wrapV:1},this.parseTexture(c)}}return this};A.prototype.parseTexture=function(a){if(!a.childNodes)return this;
+a.childNodes[1]&&"extra"===a.childNodes[1].nodeName&&(a=a.childNodes[1],a.childNodes[1]&&"technique"===a.childNodes[1].nodeName&&(a=a.childNodes[1]));for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];switch(c.nodeName){case "offsetU":case "offsetV":case "repeatU":case "repeatV":this.texOpts[c.nodeName]=parseFloat(c.textContent);break;case "wrapU":case "wrapV":this.texOpts[c.nodeName]=parseInt(c.textContent);break;default:this.texOpts[c.nodeName]=c.textContent}}return this};D.prototype.parse=
+function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "ambient":case "emission":case "diffuse":case "specular":case "transparent":this[c.nodeName]=(new A).parse(c);break;case "shininess":case "reflectivity":case "transparency":var d;d=Q.evaluate(".//dae:float",c,M,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null);for(var e=d.iterateNext(),f=[];e;)f.push(e),e=d.iterateNext();d=f;0<d.length&&(this[c.nodeName]=parseFloat(d[0].textContent))}}this.create();
+return this};D.prototype.create=function(){var a={},b=void 0!==this.transparency&&1>this.transparency,c;for(c in this)switch(c){case "ambient":case "emission":case "diffuse":case "specular":var d=this[c];if(d instanceof A)if(d.isTexture()){if(this.effect.sampler&&this.effect.surface&&this.effect.sampler.source==this.effect.surface.sid){var e=ea[this.effect.surface.init_from];if(e)e=THREE.ImageUtils.loadTexture(ma+e.init_from),e.wrapS=d.texOpts.wrapU?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,
+e.wrapT=d.texOpts.wrapV?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,e.offset.x=d.texOpts.offsetU,e.offset.y=d.texOpts.offsetV,e.repeat.x=d.texOpts.repeatU,e.repeat.y=d.texOpts.repeatV,a.map=e}}else"diffuse"==c?a.color=d.color.getHex():b||(a[c]=d.color.getHex());break;case "shininess":case "reflectivity":a[c]=this[c];break;case "transparency":if(b)a.transparent=!0,a.opacity=this[c],b=!0}a.shading=na;return this.material=new THREE.MeshLambertMaterial(a)};G.prototype.parse=function(a){for(var b=0;b<
+a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "init_from":this.init_from=c.textContent;break;case "format":this.format=c.textContent;break;default:console.log("unhandled Surface prop: "+c.nodeName)}}return this};J.prototype.parse=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "source":this.source=c.textContent;break;case "minfilter":this.minfilter=c.textContent;break;case "magfilter":this.magfilter=
+c.textContent;break;case "mipfilter":this.mipfilter=c.textContent;break;case "wrap_s":this.wrap_s=c.textContent;break;case "wrap_t":this.wrap_t=c.textContent;break;default:console.log("unhandled Sampler2D prop: "+c.nodeName)}}return this};F.prototype.create=function(){if(null==this.shader)return null};F.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");this.shader=null;for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "profile_COMMON":this.parseTechnique(this.parseProfileCOMMON(c))}}return this};
+F.prototype.parseNewparam=function(a){for(var b=a.getAttribute("sid"),c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];if(1==d.nodeType)switch(d.nodeName){case "surface":this.surface=(new G(this)).parse(d);this.surface.sid=b;break;case "sampler2D":this.sampler=(new J(this)).parse(d);this.sampler.sid=b;break;case "extra":break;default:console.log(d.nodeName)}}};F.prototype.parseProfileCOMMON=function(a){for(var b,c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];if(1==d.nodeType)switch(d.nodeName){case "profile_COMMON":this.parseProfileCOMMON(d);
+break;case "technique":b=d;break;case "newparam":this.parseNewparam(d);break;case "extra":break;default:console.log(d.nodeName)}}return b};F.prototype.parseTechnique=function(a){for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "constant":case "lambert":case "blinn":case "phong":this.shader=(new D(c.nodeName,this)).parse(c)}}};E.prototype.parse=function(a){this.url=a.getAttribute("url").replace(/^#/,"");return this};C.prototype.parse=function(a){this.id=
+a.getAttribute("id");this.name=a.getAttribute("name");this.source={};for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "source":c=(new z).parse(c);this.source[c.id]=c;break;case "sampler":this.sampler.push((new y(this)).parse(c));break;case "channel":this.channel.push((new H(this)).parse(c))}}return this};H.prototype.parse=function(a){this.source=a.getAttribute("source").replace(/^#/,"");this.target=a.getAttribute("target");var b=this.target.split("/");
+b.shift();var a=b.shift(),c=0<=a.indexOf("."),d=0<=a.indexOf("(");if(c)b=a.split("."),this.sid=b.shift(),this.member=b.shift();else if(d){b=a.split("(");this.sid=b.shift();for(var e=0;e<b.length;e++)b[e]=parseInt(b[e].replace(/\)/,""));this.arrIndices=b}else this.sid=a;this.fullSid=a;this.dotSyntax=c;this.arrSyntax=d;return this};y.prototype.parse=function(a){this.id=a.getAttribute("id");this.inputs=[];for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "input":this.inputs.push((new w).parse(c))}}return this};
+y.prototype.create=function(){for(var a=0;a<this.inputs.length;a++){var b=this.inputs[a],c=this.animation.source[b.source];switch(b.semantic){case "INPUT":this.input=c.read();break;case "OUTPUT":this.output=c.read();this.strideOut=c.accessor.stride;break;case "INTERPOLATION":this.interpolation=c.read();break;case "IN_TANGENT":break;case "OUT_TANGENT":break;default:console.log(b.semantic)}}this.duration=this.endTime=this.startTime=0;if(this.input.length){this.startTime=1E8;this.endTime=-1E8;for(a=
+0;a<this.input.length;a++)this.startTime=Math.min(this.startTime,this.input[a]),this.endTime=Math.max(this.endTime,this.input[a]);this.duration=this.endTime-this.startTime}};y.prototype.getData=function(a,b){var c;if(1<this.strideOut){c=[];for(var b=b*this.strideOut,d=0;d<this.strideOut;++d)c[d]=this.output[b+d];if(3===this.strideOut)switch(a){case "rotate":case "translate":P(c,-1);break;case "scale":P(c,1)}}else c=this.output[b];return c};I.prototype.addTarget=function(a,b,c,d){this.targets.push({sid:a,
+member:c,transform:b,data:d})};I.prototype.apply=function(a){for(var b=0;b<this.targets.length;++b){var c=this.targets[b];(!a||c.sid===a)&&c.transform.update(c.data,c.member)}};I.prototype.getTarget=function(a){for(var b=0;b<this.targets.length;++b)if(this.targets[b].sid===a)return this.targets[b];return null};I.prototype.hasTarget=function(a){for(var b=0;b<this.targets.length;++b)if(this.targets[b].sid===a)return!0;return!1};I.prototype.interpolate=function(a,b){for(var c=0;c<this.targets.length;++c){var d=
+this.targets[c],e=a.getTarget(d.sid);if(e){var f=(b-this.time)/(a.time-this.time),g=e.data,h=d.data;if(0>f||1<f)console.log("Key.interpolate: Warning! Scale out of bounds:"+f),f=0>f?0:1;if(h.length)for(var e=[],i=0;i<h.length;++i)e[i]=h[i]+(g[i]-h[i])*f;else e=h+(g-h)*f}else e=d.data;d.transform.update(e,d.member)}};K.prototype.parse=function(a){this.id=a.getAttribute("id");this.name=a.getAttribute("name");for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(1==c.nodeType)switch(c.nodeName){case "optics":this.parseOptics(c)}}return this};
+K.prototype.parseOptics=function(a){for(var b=0;b<a.childNodes.length;b++)if("technique_common"==a.childNodes[b].nodeName)for(var c=a.childNodes[b],d=0;d<c.childNodes.length;d++)if("perspective"==c.childNodes[d].nodeName)for(var e=c.childNodes[d],f=0;f<e.childNodes.length;f++){var g=e.childNodes[f];switch(g.nodeName){case "xfov":this.fov=g.textContent;break;case "znear":this.znear=0.4;break;case "zfar":this.zfar=1E15;break;case "aspect_ratio":this.aspect_ratio=g.textContent}}return this};B.prototype.parse=
+function(a){this.url=a.getAttribute("url").replace(/^#/,"");return this};return{load:function(b,c,d){var e=0;if(document.implementation&&document.implementation.createDocument){var f=new XMLHttpRequest;f.overrideMimeType&&f.overrideMimeType("text/xml");f.onreadystatechange=function(){if(4==f.readyState){if(0==f.status||200==f.status)f.responseXML?(la=c,a(f.responseXML,void 0,b)):console.error("ColladaLoader: Empty or non-existing file ("+b+")")}else 3==f.readyState&&d&&(0==e&&(e=f.getResponseHeader("Content-Length")),
+d({total:e,loaded:f.responseText.length}))};f.open("GET",b,!0);f.send(null)}else alert("Don't know how to parse XML!")},parse:a,setPreferredShading:function(a){na=a},applySkin:f,geometries:U,options:R}};THREE.JSONLoader=function(a){THREE.Loader.call(this,a)};THREE.JSONLoader.prototype=new THREE.Loader;THREE.JSONLoader.prototype.constructor=THREE.JSONLoader;THREE.JSONLoader.prototype.supr=THREE.Loader.prototype;
+THREE.JSONLoader.prototype.load=function(a,b,c){c=c?c:this.extractUrlBase(a);this.onLoadStart();this.loadAjaxJSON(this,a,b,c)};
 THREE.JSONLoader.prototype.loadAjaxJSON=function(a,b,c,d,f){var g=new XMLHttpRequest,e=0;g.onreadystatechange=function(){if(g.readyState===g.DONE)if(200===g.status||0===g.status){if(g.responseText){var h=JSON.parse(g.responseText);a.createModel(h,c,d)}else console.warn("THREE.JSONLoader: ["+b+"] seems to be unreachable or file there is empty");a.onLoadComplete()}else console.error("THREE.JSONLoader: Couldn't load ["+b+"] ["+g.status+"]");else g.readyState===g.LOADING?f&&(0===e&&(e=g.getResponseHeader("Content-Length")),
 f({total:e,loaded:g.responseText.length})):g.readyState===g.HEADERS_RECEIVED&&(e=g.getResponseHeader("Content-Length"))};g.open("GET",b,!0);g.overrideMimeType&&g.overrideMimeType("text/plain; charset=x-user-defined");g.setRequestHeader("Content-Type","text/plain");g.send(null)};
 THREE.JSONLoader.prototype.createModel=function(a,b,c){var d=new THREE.Geometry,f=void 0!==a.scale?1/a.scale:1;this.initMaterials(d,a.materials,c);(function(b){var c,f,i,k,j,q,l,n,r,m,o,p,s,t,v=a.faces;q=a.vertices;var u=a.normals,w=a.colors,z=0;for(c=0;c<a.uvs.length;c++)a.uvs[c].length&&z++;for(c=0;c<z;c++)d.faceUvs[c]=[],d.faceVertexUvs[c]=[];k=0;for(j=q.length;k<j;)l=new THREE.Vertex,l.position.x=q[k++]*b,l.position.y=q[k++]*b,l.position.z=q[k++]*b,d.vertices.push(l);k=0;for(j=v.length;k<j;){b=
@@ -337,7 +337,7 @@ THREE[j.magFilter];if(j.repeat){m.repeat.set(j.repeat[0],j.repeat[1]);if(1!=j.re
 B.textures[o.parameters[A]];else if("shading"==A)o.parameters[A]="flat"==o.parameters[A]?THREE.FlatShading:THREE.SmoothShading;else if("blending"==A)o.parameters[A]=THREE[o.parameters[A]]?THREE[o.parameters[A]]:THREE.NormalBlending;else if("combine"==A)o.parameters[A]="MixOperation"==o.parameters[A]?THREE.MixOperation:THREE.MultiplyOperation;else if("vertexColors"==A)if("face"==o.parameters[A])o.parameters[A]=THREE.FaceColors;else if(o.parameters[A])o.parameters[A]=THREE.VertexColors;if(void 0!==
 o.parameters.opacity&&1>o.parameters.opacity)o.parameters.transparent=!0;if(o.parameters.normalMap){a=THREE.ShaderUtils.lib.normal;j=THREE.UniformsUtils.clone(a.uniforms);m=o.parameters.color;F=o.parameters.specular;c=o.parameters.ambient;C=o.parameters.shininess;j.tNormal.texture=B.textures[o.parameters.normalMap];if(o.parameters.normalMapFactor)j.uNormalScale.value=o.parameters.normalMapFactor;if(o.parameters.map)j.tDiffuse.texture=o.parameters.map,j.enableDiffuse.value=!0;if(o.parameters.lightMap)j.tAO.texture=
 o.parameters.lightMap,j.enableAO.value=!0;if(o.parameters.specularMap)j.tSpecular.texture=B.textures[o.parameters.specularMap],j.enableSpecular.value=!0;j.uDiffuseColor.value.setHex(m);j.uSpecularColor.value.setHex(F);j.uAmbientColor.value.setHex(c);j.uShininess.value=C;if(o.parameters.opacity)j.uOpacity.value=o.parameters.opacity;G=new THREE.ShaderMaterial({fragmentShader:a.fragmentShader,vertexShader:a.vertexShader,uniforms:j,lights:!0,fog:!0})}else G=new THREE[o.type](o.parameters);B.materials[q]=
-G}f();i.callbackSync(B);h()};THREE.UTF8Loader=function(){};THREE.UTF8Loader.prototype=new THREE.UTF8Loader;THREE.UTF8Loader.prototype.constructor=THREE.UTF8Loader;
+G}f();i.callbackSync(B);h()};THREE.UTF8Loader=function(){};
 THREE.UTF8Loader.prototype.load=function(a,b,c){var d=new XMLHttpRequest,f=void 0!==c.scale?c.scale:1,g=void 0!==c.offsetX?c.offsetX:0,e=void 0!==c.offsetY?c.offsetY:0,h=void 0!==c.offsetZ?c.offsetZ:0;d.onreadystatechange=function(){4==d.readyState?200==d.status||0==d.status?THREE.UTF8Loader.prototype.createModel(d.responseText,b,f,g,e,h):console.error("THREE.UTF8Loader: Couldn't load ["+a+"] ["+d.status+"]"):3!=d.readyState&&2==d.readyState&&d.getResponseHeader("Content-Length")};d.open("GET",a,
 !0);d.send(null)};THREE.UTF8Loader.prototype.decompressMesh=function(a){var b=a.charCodeAt(0);57344<=b&&(b-=2048);b++;for(var c=new Float32Array(8*b),d=1,f=0;8>f;f++){for(var g=0,e=0;e<b;++e){var h=a.charCodeAt(e+d),g=g+(h>>1^-(h&1));c[8*e+f]=g}d+=b}b=a.length-d;g=new Uint16Array(b);for(f=e=0;f<b;f++)h=a.charCodeAt(f+d),g[f]=e-h,0==h&&e++;return[c,g]};
 THREE.UTF8Loader.prototype.createModel=function(a,b,c,d,f,g){var e=function(){var b=this;b.materials=[];THREE.Geometry.call(this);var e=THREE.UTF8Loader.prototype.decompressMesh(a),k=[],j=[];(function(a,e,i){for(var j,k,o,p=a.length;i<p;i+=e)j=a[i],k=a[i+1],o=a[i+2],j=j/16383*c,k=k/16383*c,o=o/16383*c,j+=d,k+=f,o+=g,b.vertices.push(new THREE.Vertex(new THREE.Vector3(j,k,o)))})(e[0],8,0);(function(a,b,c){for(var d,e,f=a.length;c<f;c+=b)d=a[c],e=a[c+1],d/=1023,e/=1023,j.push(d,1-e)})(e[0],8,3);(function(a,

+ 1 - 1
build/custom/ThreeSVG.js

@@ -1,5 +1,5 @@
 // ThreeSVG.js - http://github.com/mrdoob/three.js
-'use strict';var THREE=THREE||{REVISION:"48dev"};if(!self.Int32Array)self.Int32Array=Array,self.Float32Array=Array;
+'use strict';var THREE=THREE||{REVISION:"49dev"};if(!self.Int32Array)self.Int32Array=Array,self.Float32Array=Array;
 (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];if(!window.requestAnimationFrame)window.requestAnimationFrame=function(b){var c=(new Date).getTime(),f=Math.max(0,16-(c-a)),g=window.setTimeout(function(){b(c+f)},f);a=c+f;return g};if(!window.cancelAnimationFrame)window.cancelAnimationFrame=
 function(a){clearTimeout(a)}})();THREE.Color=function(a){void 0!==a&&this.setHex(a);return this};
 THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},copyGammaToLinear:function(a){this.r=a.r*a.r;this.g=a.g*a.g;this.b=a.b*a.b;return this},copyLinearToGamma:function(a){this.r=Math.sqrt(a.r);this.g=Math.sqrt(a.g);this.b=Math.sqrt(a.b);return this},convertGammaToLinear:function(){var a=this.r,b=this.g,c=this.b;this.r=a*a;this.g=b*b;this.b=c*c;return this},convertLinearToGamma:function(){this.r=Math.sqrt(this.r);this.g=Math.sqrt(this.g);

+ 1 - 1
build/custom/ThreeWebGL.js

@@ -1,5 +1,5 @@
 // ThreeWebGL.js - http://github.com/mrdoob/three.js
-'use strict';var THREE=THREE||{REVISION:"48dev"};if(!self.Int32Array)self.Int32Array=Array,self.Float32Array=Array;
+'use strict';var THREE=THREE||{REVISION:"49dev"};if(!self.Int32Array)self.Int32Array=Array,self.Float32Array=Array;
 (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];if(!window.requestAnimationFrame)window.requestAnimationFrame=function(b){var c=(new Date).getTime(),g=Math.max(0,16-(c-a)),h=window.setTimeout(function(){b(c+g)},g);a=c+g;return h};if(!window.cancelAnimationFrame)window.cancelAnimationFrame=
 function(a){clearTimeout(a)}})();THREE.Color=function(a){void 0!==a&&this.setHex(a);return this};
 THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},copyGammaToLinear:function(a){this.r=a.r*a.r;this.g=a.g*a.g;this.b=a.b*a.b;return this},copyLinearToGamma:function(a){this.r=Math.sqrt(a.r);this.g=Math.sqrt(a.g);this.b=Math.sqrt(a.b);return this},convertGammaToLinear:function(){var a=this.r,b=this.g,c=this.b;this.r=a*a;this.g=b*b;this.b=c*c;return this},convertLinearToGamma:function(){this.r=Math.sqrt(this.r);this.g=Math.sqrt(this.g);

+ 7 - 7
docs/api/cameras/OrthographicCamera.html

@@ -14,7 +14,7 @@ scene.add( camera );
 
 <h2>Constructor</h2>
 
-<h3>[name]( [page:Number left], [page:Number right], [page:Number top], [page:Number bottom], [page:Number near], [page:Number far] )</h3>
+<h3>[name]( [page:Float left], [page:Float right], [page:Float top], [page:Float bottom], [page:Float near], [page:Float far] )</h3>
 <div>
 left — Camera frustum left plane.<br />
 right — Camera frustum right plane.<br />
@@ -27,22 +27,22 @@ far — Camera frustum far plane.
 
 <h2>Properties</h2>
 
-<h3>.[page:Number left]</h3>
+<h3>.[page:Float left]</h3>
 <div>Camera frustum left plane.</div>
 
-<h3>.[page:Number right]</h3>
+<h3>.[page:Float right]</h3>
 <div>Camera frustum right plane.</div>
 
-<h3>.[page:Number left]</h3>
+<h3>.[page:Float left]</h3>
 <div>Camera frustum top plane.</div>
 
-<h3>.[page:Number right]</h3>
+<h3>.[page:Float right]</h3>
 <div>Camera frustum bottom plane.</div>
 
-<h3>.[page:Number near]</h3>
+<h3>.[page:Float near]</h3>
 <div>Camera frustum near plane.</div>
 
-<h3>.[page:Number far]</h3>
+<h3>.[page:Float far]</h3>
 <div>Camera frustum far plane.</div>
 
 

+ 7 - 7
docs/api/cameras/PerspectiveCamera.html

@@ -14,7 +14,7 @@ scene.add( camera );
 
 <h2>Constructor</h2>
 
-<h3>[name]( [page:Number fov], [page:Number aspect], [page:Number near], [page:Number far] )</h3>
+<h3>[name]( [page:Float fov], [page:Float aspect], [page:Float near], [page:Float far] )</h3>
 <div>
 fov — Camera frustum vertical field of view.<br />
 aspect — Camera frustum aspect ratio.<br />
@@ -25,22 +25,22 @@ far — Camera frustum far plane.
 
 <h2>Properties</h2>
 
-<h3>.[page:Number fov]</h3>
+<h3>.[page:Float fov]</h3>
 <div>Camera frustum vertical field of view.</div>
 
-<h3>.[page:Number aspect]</h3>
+<h3>.[page:Float aspect]</h3>
 <div>Camera frustum aspect ratio.</div>
 
-<h3>.[page:Number near]</h3>
+<h3>.[page:Float near]</h3>
 <div>Camera frustum near plane.</div>
 
-<h3>.[page:Number far]</h3>
+<h3>.[page:Float far]</h3>
 <div>Camera frustum far plane.</div>
 
 
 <h2>Methods</h2>
 
-<h3>.setLens( [page:Number focalLength], [page:Number frameSize] )</h3>
+<h3>.setLens( [page:Float focalLength], [page:Float frameSize] )</h3>
 <div>
 focalLength — focal length<br />
 frameSize — frame size
@@ -51,7 +51,7 @@ Uses focal length (in mm) to estimate and set FOV 35mm (fullframe) camera is use
 Formula based on <a href="http://www.bobatkins.com/photography/technical/field_of_view.html" target="_blank">http://www.bobatkins.com/photography/technical/field_of_view.html</a>
 </div>
 
-<h3>.setViewOffset( [page:Number fullWidth], [page:Number fullHeight], [page:Number x], [page:Number y], [page:Number width], [page:Number height] )</h3>
+<h3>.setViewOffset( [page:Float fullWidth], [page:Float fullHeight], [page:Float x], [page:Float y], [page:Float width], [page:Float height] )</h3>
 <div>
 fullWidth — full width of multiview setup<br />
 fullHeight — full height of multiview setup<br />

+ 5 - 5
docs/api/core/Clock.html

@@ -14,11 +14,11 @@ autoStart — Automatically start the clock.
 
 <h3>.[page:Boolean autoStart]</h3>
 
-<h3>.[page:Number startTime]</h3>
+<h3>.[page:Float startTime]</h3>
 
-<h3>.[page:Number oldTime]</h3>
+<h3>.[page:Float oldTime]</h3>
 
-<h3>.[page:Number elapsedTime]</h3>
+<h3>.[page:Float elapsedTime]</h3>
 
 <h3>.[page:Boolean running]</h3>
 
@@ -35,12 +35,12 @@ Start clock.
 Stop clock.
 </div>
 
-<h3>.getElapsedTime() [page:Number]</h3>
+<h3>.getElapsedTime() [page:Float]</h3>
 <div>
 Get milliseconds passed since the clock started.
 </div>
 
-<h3>.getDelta() [page:Number]</h3>
+<h3>.getDelta() [page:Float]</h3>
 <div>
 Get the milliseconds passed since the last call to this method.
 </div>

+ 8 - 8
docs/api/core/Color.html

@@ -12,24 +12,24 @@ Represents a color. See also [page:ColorUtils].
 
 <h2>Constructor</h2>
 
-<h3>[name]( [page:Number hex])</h3>
+<h3>[name]( [page:Integer hex])</h3>
 <div>
 hex — initial color in hexadecimal<br />
 </div>
 
 <h2>Properties</h2>
 
-<h3>.[page:Number r]</h3>
+<h3>.[page:Float r]</h3>
 <div>
 Red channel value between 0 and 1. Default is 1.
 </div>
 
-<h3>.[page:Number g]</h3>
+<h3>.[page:Float g]</h3>
 <div>
 Green channel value between 0 and 1. Default is 1.
 </div>
 
-<h3>.[page:Number b]</h3>
+<h3>.[page:Float b]</h3>
 <div>
 Blue channel value between 0 and 1. Default is 1.
 </div>
@@ -70,7 +70,7 @@ Converts this color from gamma to linear space.
 Converts this color from linear to gamma space.
 </div>
 
-<h3>.setRGB( [page:Number r], [page:Number g], [page:Number b] ) [page:this]</h3>
+<h3>.setRGB( [page:Float r], [page:Float g], [page:Float b] ) [page:this]</h3>
 <div>
 r — Red channel value between 0 and 1.<br />
 g — Green channel value between 0 and 1.<br />
@@ -80,7 +80,7 @@ b — Blue channel value between 0 and 1.
 Sets this color from RGB values.
 </div>
 
-<h3>.setHSV( [page:Number h], [page:Number s], [page:Number v] ) [page:this]</h3>
+<h3>.setHSV( [page:Float h], [page:Float s], [page:Float v] ) [page:this]</h3>
 <div>
 h — Hue channel value between 0 and 1.<br />
 s — Saturation value channel between 0 and 1.<br />
@@ -91,7 +91,7 @@ Sets this color from HSV values.<br />
 Based on MochiKit implementation by Bob Ippolito.
 </div>
 
-<h3>.setHex( [page:Number hex] ) [page:this]</h3>
+<h3>.setHex( [page:Integer hex] ) [page:this]</h3>
 <div>
 hex — Color in hexadecimal.<br />
 </div>
@@ -99,7 +99,7 @@ hex — Color in hexadecimal.<br />
 Sets this color from a hexadecimal value.
 </div>
 
-<h3>.getHex() [page:Number]</h3>
+<h3>.getHex() [page:Integer]</h3>
 <div>
 Returns the value of this color in hexadecimal.
 </div>

+ 46 - 8
docs/api/core/Face3.html

@@ -12,30 +12,68 @@ Triangle face.
 
 <h2>Constructor</h2>
 
-<h3>[name]( [page:Number a], [page:Number b], [page:Number c], [page:Vector3 normal], [page:Color color], [page:Number materialIndex] )</h3>
-
+<h3>[name]( [page:Integer a], [page:Integer b], [page:Integer c], [page:Vector3 normal], [page:Color color], [page:Integer materialIndex] )</h3>
+<div>
+a — Vertex A index.<br />
+b — Vertex B index.<br />
+c — Vertex C index.<br />
+normal — Face normal or array of vertex normals.<br />
+color — Face color or array of vertex colors.<br />
+materialIndex — Material index.
+</div>
 
 <h2>Properties</h2>
 
-<h3>.[page:Number a]</h3>
+<h3>.[page:Integer a]</h3>
+<div>
+Vertex A index.
+</div>
 
-<h3>.[page:Number b]</h3>
+<h3>.[page:Integer b]</h3>
+<div>
+Vertex B index.
+</div>
 
-<h3>.[page:Number c]</h3>
+<h3>.[page:Integer c]</h3>
+<div>
+Vertex C index.
+</div>
 
 <h3>.[page:Vector3 normal]</h3>
-
-<h3>.[page:Array vertexNormals]</h3>
+<div>
+Face normal.
+</div>
 
 <h3>.[page:Color color]</h3>
+<div>
+Face color.
+</div>
+
+<h3>.[page:Array vertexNormals]</h3>
+<div>
+Array of 3 vertex normals.
+</div>
 
 <h3>.[page:Array vertexColors]</h3>
+<div>
+Array of 3 vertex colors.
+</div>
 
 <h3>.[page:Array vertexTangets]</h3>
+<div>
+Array of 3 vertex tangets.
+</div>
+
 
-<h3>.[page:Number materialIndex]</h3>
+<h3>.[page:Integer materialIndex]</h3>
+<div>
+Material index (points to [page:Geometry Geometry.materials]).
+</div>
 
 <h3>.[page:Vector3 centroid]</h3>
+<div>
+Face centroid.
+</div>
 
 
 <h2>Source</h2>

+ 0 - 86
docs/api/core/Face3.rst

@@ -1,86 +0,0 @@
-Face3 - Triangle face
-------------------------
-
-.. ...............................................................................
-.. rubric:: Constructor
-.. ...............................................................................
-
-.. class:: Face3( a, b, c, normal, color, materialIndex )
-
-    Triangle face
-
-    (indices start from zero)
-
-    :param integer a: vertex A index
-    :param integer b: vertex B index
-    :param integer c: vertex C index
-    :param varying normal: face normal or array of vertex normals
-    :param varying color: face color or array of vertex colors
-    :param integer materialIndex: material index
-
-
-.. ...............................................................................
-.. rubric:: Attributes
-.. ...............................................................................
-
-.. attribute:: Face3.a
-
-    Vertex A index
-
-.. attribute:: Face3.b
-
-    Vertex B index
-
-.. attribute:: Face3.c
-
-    Vertex C index
-
-.. attribute:: Face3.normal
-
-    Face normal
-
-    :class:`Vector3` - default ``( 0, 0, 0 )``
-
-.. attribute:: Face3.color
-
-    Face color
-
-    :class:`Color` - default ``white``
-
-.. attribute:: Face3.centroid
-
-    Face centroid
-
-    :class:`Vector3` - default ``( 0, 0, 0 )``
-
-.. attribute:: Face3.vertexNormals
-
-    Array of 3 vertex normals
-
-    default ``[]``
-
-.. attribute:: Face3.vertexColors
-
-    Array of 3 vertex colors
-
-    default ``[]``
-
-.. attribute:: Face3.vertexTangents
-
-    Array of 3 vertex tangents
-
-    default ``[]``
-
-.. attribute:: Face3.materialIndex
-
-    Material index (points to :attr:`Geometry.materials` array)
-
-    default ``0``
-
-.. ...............................................................................
-.. rubric:: Example
-.. ...............................................................................
-
-::
-
-    var face = new THREE.Face3( 0, 1, 2, new THREE.Vector3( 0, 1, 0 ), new THREE.Color( 0xffaa00 ), 0 );

+ 68 - 7
docs/api/core/Face4.html

@@ -1,23 +1,84 @@
 <h1>[name]</h1>
 
-<div class="desc">todo</div>
+<div class="desc">
+Quad face.
+</div>
 
 
-<h2>Constructor</h2>
+<h2>Example</h2>
 
-<h3>[name]()</h3>
+<code>var face = new THREE.Face4( 0, 1, 2, 3, new THREE.Vector3( 0, 1, 0 ), new THREE.Color( 0xffaa00 ), 0 );</code>
 
 
+<h2>Constructor</h2>
+
+<h3>[name]( [page:Integer a], [page:Integer b], [page:Integer c], [page:Integer d], [page:Vector3 normal], [page:Color color], [page:Integer materialIndex] )</h3>
+<div>
+a — Vertex A index.<br />
+b — Vertex B index.<br />
+c — Vertex C index.<br />
+d — Vertex D index.<br />
+normal — Face normal or array of vertex normals.<br />
+color — Face color or array of vertex colors.<br />
+materialIndex — Material index.
+</div>
+
 <h2>Properties</h2>
 
-<h3>.[page:Vector3 todo]</h3>
+<h3>.[page:Integer a]</h3>
+<div>
+Vertex A index.
+</div>
+
+<h3>.[page:Integer b]</h3>
+<div>
+Vertex B index.
+</div>
 
+<h3>.[page:Integer c]</h3>
+<div>
+Vertex C index.
+</div>
 
-<h2>Methods</h2>
+<h3>.[page:Integer d]</h3>
+<div>
+Vertex D index.
+</div>
+
+<h3>.[page:Vector3 normal]</h3>
+<div>
+Face normal.
+</div>
+
+<h3>.[page:Color color]</h3>
+<div>
+Face color.
+</div>
+
+<h3>.[page:Array vertexNormals]</h3>
+<div>
+Array of 4 vertex normals.
+</div>
+
+<h3>.[page:Array vertexColors]</h3>
+<div>
+Array of 4 vertex colors.
+</div>
+
+<h3>.[page:Array vertexTangets]</h3>
+<div>
+Array of 4 vertex tangets.
+</div>
+
+
+<h3>.[page:Integer materialIndex]</h3>
+<div>
+Material index (points to [page:Geometry Geometry.materials]).
+</div>
 
-<h3>.todo( [page:Vector3 todo] )</h3>
+<h3>.[page:Vector3 centroid]</h3>
 <div>
-todo — todo<br />
+Face centroid.
 </div>
 
 

+ 0 - 90
docs/api/core/Face4.rst

@@ -1,90 +0,0 @@
-Face4 - Quad face
-------------------------
-
-.. ...............................................................................
-.. rubric:: Constructor
-.. ...............................................................................
-
-.. class:: Face4( a, b, c, d, normal, color, materialIndex )
-
-    Quad face
-
-    (indices start from zero)
-
-    :param integer a: vertex index
-    :param integer b: vertex index
-    :param integer c: vertex index
-    :param integer d: vertex index
-    :param varying normal: face normal or array of vertex normals
-    :param varying color: face color or array of vertex colors
-    :param integer materialIndex: material index
-
-
-.. ...............................................................................
-.. rubric:: Attributes
-.. ...............................................................................
-
-.. attribute:: Face4.a
-
-    Vertex A index
-
-.. attribute:: Face4.b
-
-    Vertex B index
-
-.. attribute:: Face4.c
-
-    Vertex C index
-
-.. attribute:: Face4.d
-
-    Vertex D index
-
-.. attribute:: Face4.normal
-
-    Face normal
-
-    :class:`Vector3` - default ``(0,0,0)``
-
-.. attribute:: Face4.color
-
-    Face color
-
-    :class:`Color` - default ``white``
-
-.. attribute:: Face4.centroid
-
-    :class:`Vector3` - default ``(0,0,0)``
-
-.. attribute:: Face4.vertexNormals
-
-    Array of 4 vertex normals
-
-    default ``[]``
-
-.. attribute:: Face4.vertexColors
-
-    Array of 4 vertex colors
-
-    default ``[]``
-
-.. attribute:: Face4.vertexTangents
-
-    Array of 4 vertex tangents
-
-    default ``[]``
-
-.. attribute:: Face4.materialIndex
-
-    Material index (points to :attr:`Geometry.materials` array)
-
-    default ``0``
-
-
-.. ...............................................................................
-.. rubric:: Example
-.. ...............................................................................
-
-::
-
-    var face = new THREE.Face4( 0, 1, 2, 3, new THREE.Vector3( 0, 1, 0 ), new THREE.Color( 0xffaa00 ), 0 );

+ 9 - 5
docs/api/core/Frustum.html

@@ -1,6 +1,6 @@
 <h1>[name]</h1>
 
-<div class="desc">todo</div>
+<div class="desc"></div>
 
 
 <h2>Constructor</h2>
@@ -10,17 +10,21 @@
 
 <h2>Properties</h2>
 
-<h3>.[page:Vector3 todo]</h3>
+<h3>.[page:Array planes]</h3>
+<div>
+Array of 6 [page:Vector4 vectors].
+</div>
 
 
 <h2>Methods</h2>
 
-<h3>.todo( [page:Vector3 todo] )</h3>
+<h3>.setFromMatrix( [page:Matrix4 matrix] )</h3>
+
+<h3>.contains( [page:Object3D object] ) [page:Boolean]</h3>
 <div>
-todo — todo<br />
+Checks whether the object is inside the Frustum.
 </div>
 
-
 <h2>Source</h2>
 
 <a href="https://github.com/mrdoob/three.js/blob/master/src/[path].js" target="_blank">src/[path].js</a>

+ 147 - 4
docs/api/core/Geometry.html

@@ -1,8 +1,28 @@
 <h1>[name]</h1>
 
-<div class="desc">todo</div>
+<div class="desc">Base class for geometries</div>
 
 
+<h2>Example</h2>
+
+<code>// geometry with random points
+
+var geometry = new THREE.Geometry()
+
+for ( var i = 0; i < 10000; i ++ ) {
+
+	var vertex = new THREE.Vertex();
+	vertex.position.x = Math.random() * 1000 - 500;
+	vertex.position.y = Math.random() * 1000 - 500;
+	vertex.position.z = Math.random() * 1000 - 500;
+
+	geometry.vertices.push( vertex );
+
+}
+
+geometry.computeBoundingSphere();
+</code>
+
 <h2>Constructor</h2>
 
 <h3>[name]()</h3>
@@ -10,14 +30,137 @@
 
 <h2>Properties</h2>
 
-<h3>.[page:Vector3 todo]</h3>
+<h3>.[page:Integer id]</h3>
+<div>
+Unique number of this geometry instance
+</div>
+
+<h3>.[page:Array vertices]</h3>
+<div>
+Array of [page:Vertex vertices].
+</div>
+
+<h3>.[page:Array colors]</h3>
+<div>
+Array of vertex [page:Color colors], matching number and order of vertices.<br />
+Used in [page:ParticleSystem], [page:Line] and [page:Ribbon].<br />
+[page:Mesh Meshes] use per-face-use-of-vertex colors embedded directly in faces.
+</div>
+
+<h3>.[page:Array materials]</h3>
+<div>
+Array of [page:Material materials].
+</div>
+
+<h3>.[page:Array faces]</h3>
+<div>
+Array of [page:Face3 triangles] or/and [page:Face4 quads].
+</div>
+
+<h3>.[page:Array faceUvs]</h3>
+<div>
+Array of face [page:UV] layers.<br />
+Each UV layer is an array of [page:UV] matching order and number of faces.
+</div>
+
+<h3>.[page:Array faceVertexUvs]</h3>
+<div>
+Array of face [page:UV] layers.<br />
+Each UV layer is an array of [page:UV] matching order and number of vertices in faces.
+</div>
+
+<h3>.[page:Array morphTargets]</h3>
+<div>
+Array of morph targets. Each morph target is JS object:
+<code>{ name: "targetName", vertices: [ new THREE.Vertex(), ... ] }</code>
+Morph vertices match number and order of primary vertices.
+</div>
+
+<h3>.[page:Array morphColors]</h3>
+<div>
+Array of morph colors. Morph colors have similar structure as morph targets, each color set is JS object:
+<code>morphColor = { name: "colorName", colors: [ new THREE.Color(), ... ] }</code>
+Morph colors can match either number and order of faces (face colors) or number of vertices (vertex colors).
+</div>
+
+<h3>.[page:Array skinWeights]</h3>
+<div>
+Array of skinning weights, matching number and order of vertices.
+</div>
+
+<h3>.[page:Array skinIndices]</h3>
+<div>
+Array of skinning indices, matching number and order of vertices.
+</div>
+
+<h3>.[page:Object boundingBox]</h3>
+<div>
+Bounding box.
+<code>{ min: new THREE.Vector3(), max: new THREE.Vector3() }</code>
+</div>
+
+<h3>.[page:Object boundingSphere]</h3>
+<div>
+Bounding sphere.
+<code>{ radius: float }</code>
+</div>
+
+<h3>.[page:Boolean hasTangents]</h3>
+<div>
+True if geometry has tangents. Set in [page:Geometry Geometry.computeTangents].
+</div>
+
+<h3>.[page:Boolean dynamic]</h3>
+<div>
+Set to <strong>true</strong> if attribute buffers will need to change in runtime (using "dirty" flags).<br/>
+Unless set to true internal typed arrays corresponding to buffers will be deleted once sent to GPU.
+</div>
 
 
 <h2>Methods</h2>
 
-<h3>.todo( [page:Vector3 todo] )</h3>
+<h3>.applyMatrix( [page:Matrix4 matrix] )</h3>
+<div>
+Bakes matrix transform directly into vertex coordinates.
+</div>
+
+<h3>.computeCentroids()</h3>
+<div>
+Computes centroids for all faces.
+</div>
+
+<h3>.computeFaceNormals()</h3>
+<div>
+Computes face normals.
+</div>
+
+<h3>.computeVertexNormals()</h3>
+<div>
+Computes vertex normals by averaging face normals.<br />
+Face normals must be existing / computed beforehand.
+</div>
+
+<h3>.computeTangents()</h3>
+<div>
+Computes vertex tangents.<br />
+Based on <a href="http://www.terathon.com/code/tangent.html" target="_blank">http://www.terathon.com/code/tangent.html</a><br />
+Geometry must have vertex [page:UV UVs] (layer 0 will be used).
+</div>
+
+<h3>.computeBoundingBox()</h3>
+<div>
+Computes bounding box of the geometry, updating [page:Geometry Geometry.boundingBox] attribute.
+</div>
+
+<h3>.computeBoundingSphere()</h3>
+<div>
+Computes bounding sphere of the geometry, updating [page:Geometry Geometry.boundingSphere] attribute.
+</div>
+
+<h3>.mergeVertices()</h3>
 <div>
-todo — todo<br />
+Checks for duplicate vertices using hashmap.<br />
+Duplicated vertices are removed and faces' vertices are updated.
 </div>
 
 

+ 0 - 198
docs/api/core/Geometry.rst

@@ -1,198 +0,0 @@
-Geometry - Base class for geometries
-----------------------------------------
-
-.. ...............................................................................
-.. rubric:: Constructor
-.. ...............................................................................
-
-.. class:: Geometry()
-
-    Base class for geometries
-
-    Encapsulates unique instances of vertex buffer objects in :class:`WebGLRenderer`
-
-
-.. ...............................................................................
-.. rubric:: Attributes
-.. ...............................................................................
-
-.. attribute:: Geometry.id
-
-    Unique number of this geometry instance
-
-.. attribute:: Geometry.boundingBox
-
-    Bounding box
-
-    ::
-
-        boundingBox = { min: new THREE.Vector3(), max: new THREE.Vector3() }
-
-.. attribute:: Geometry.boundingSphere
-
-    Bounding sphere
-
-    ::
-
-        boundingSphere = { radius: float }
-
-.. attribute:: Geometry.materials
-
-    Array of :class:`materials <Material>`
-
-    Used with models containing multiple materials in a single geometry (with pass-through :class:`MeshFaceMaterial`)
-
-    Face indices index into this array.
-
-
-.. ...............................................................................
-.. rubric:: Attribute buffers
-.. ...............................................................................
-
-.. attribute:: Geometry.faces
-
-    Array of faces (:class:`Face3`, :class:`Face4`)
-
-.. attribute:: Geometry.vertices
-
-    Array of :class:`vertices <Vertex>`
-
-    Face indices index into this array.
-
-.. attribute:: Geometry.colors
-
-   Array of vertex :class:`colors <Color>`, matching number and order of vertices.
-
-   Used in :class:`ParticleSystem`, :class:`Line` and :class:`Ribbon`.
-
-   :class:`Meshes <Mesh>` use per-face-use-of-vertex colors embedded directly in faces.
-
-.. attribute:: Geometry.faceUvs
-
-    Array of face UV layers.
-    Each UV layer is an array of :class:`UV` matching order and number of faces.
-
-.. attribute:: Geometry.faceVertexUvs
-
-    Array of vertex UV layers.
-    Each UV layer is an array of :class:`UV` matching order and number of vertices in faces.
-
-.. attribute:: Geometry.morphTargets
-
-    Array of morph targets.
-    Each morph target is JS object:
-
-    ::
-
-        morphTarget = { name: "targetName", vertices: [ new THREE.Vertex(), ... ] }
-
-    Morph vertices match number and order of primary vertices.
-
-.. attribute:: Geometry.morphColors
-
-    Array of morph colors.
-    Morph colors have similar structure as morph targets, each color set is JS object:
-
-    ::
-
-        morphColor = { name: "colorName", colors: [ new THREE.Color(), ... ] }
-
-    Morph colors can match either number and order of faces (face colors) or number of vertices (vertex colors).
-
-.. attribute:: Geometry.skinWeights
-
-    Array of skinning weights (:class:`Vector4`), matching number and order of vertices.
-
-.. attribute:: Geometry.skinIndices
-
-    Array of skinning indices (:class:`Vector4`), matching number and order of vertices.
-
-
-.. ...............................................................................
-.. rubric:: Flags
-.. ...............................................................................
-
-.. attribute:: Geometry.hasTangents
-
-    True if geometry has tangents. Set in :func:`Geometry.computeTangents`
-
-    ``default false``
-
-.. attribute:: Geometry.dynamic
-
-    Set to `true` if attribute buffers will need to change in runtime (using ``dirty`` flags).
-
-    Unless set to true internal typed arrays corresponding to buffers will be deleted once sent to GPU.
-
-    ``default false``
-
-
-.. ...............................................................................
-.. rubric:: Methods
-.. ...............................................................................
-
-.. function:: Geometry.applyMatrix( matrix )
-
-    Bakes matrix transform directly into vertex coordinates
-
-    :param Matrix4 matrix: matrix transform
-
-.. function:: Geometry.computeCentroids()
-
-    Computes centroids for all faces
-
-.. function:: Geometry.computeFaceNormals()
-
-    Computes face normals
-
-.. function:: Geometry.computeVertexNormals()
-
-    Computes vertex normals by averaging face normals.
-
-    Face normals must be existing / computed beforehand.
-
-.. function:: Geometry.computeTangents()
-
-    Computes vertex tangents
-
-    Based on http://www.terathon.com/code/tangent.html
-
-    Geometry must have vertex UVs (layer 0 will be used).
-
-.. function:: Geometry.computeBoundingBox()
-
-    Computes bounding box of the geometry, updating :attr:`Geometry.boundingBox` attribute.
-
-.. function:: Geometry.computeBoundingSphere()
-
-    Computes bounding sphere of the geometry, updating :attr:`Geometry.boundingSphere` attribute.
-
-.. function:: Geometry.mergeVertices()
-
-    Checks for duplicate vertices using hashmap.
-    Duplicated vertices are removed and faces' vertices are updated.
-
-.. ...............................................................................
-.. rubric:: Example
-.. ...............................................................................
-
-::
-
-    // geometry with random points
-    // (useful for example with ParticleSystem)
-
-    var n = 10000;
-    var geometry = new THREE.Geometry()
-    for ( var i = 0; i < n; i ++ ) {
-
-        var x = THREE.MathUtils.randFloatSpread( 1000 );
-        var y = THREE.MathUtils.randFloatSpread( 1000 );
-        var z = THREE.MathUtils.randFloatSpread( 1000 );
-        var position = new THREE.Vector3( x, y, z );
-        var vertex = new THREE.Vertex( position );
-
-        geometry.vertices.push( vertex );
-
-    }
-
-    geometry.computeBoundingSphere();

+ 45 - 8
docs/api/core/Math.html

@@ -1,23 +1,60 @@
 <h1>[name]</h1>
 
-<div class="desc">todo</div>
+<div class="desc">Math utility functions</div>
 
 
-<h2>Constructor</h2>
+<h2>Methods</h2>
 
-<h3>[name]()</h3>
+<h3>.clamp( [page:Float x], [page:Float a], [page:Float b] ) [page:Float]</h3>
+<div>
+x — Value to be clamped.<br />
+a — Minimum value<br />
+b — Maximum value.
+</div>
+<div>
+Clamps the <strong>x</strong> to be between <strong>a</strong> and <strong>b</strong>.
+</div>
 
+<h3>.clampBottom( [page:Float x], [page:Float a] ) [page:Float]</h3>
+<div>
+x — Value to be clamped.<br />
+a — Minimum value
+</div>
+<div>
+Clamps the <strong>x</strong> to be larger than <strong>a</strong>.
+</div>
 
-<h2>Properties</h2>
+<h3>.mapLinear( [page:Float x], [page:Float a] ) [page:Float]</h3>
+<div>
+x — Value to be mapped.<br />
+a1 — Minimum value for range A.<br />
+a2 — Maximum value for range A.<br />
+b1 — Minimum value for range B.<br />
+b2 — Maximum value for range B.
+</div>
+<div>
+Linear mapping of <strong>x</strong> from range [<strong>a1</strong>, <strong>a2</strong>] to range [<strong>b1</strong>, <strong>b2</strong>].
+</div>
 
-<h3>.[page:Vector3 todo]</h3>
+<h3>.random16() [page:Float]</h3>
+<div>
+Random float from 0 to 1 with 16 bits of randomness.<br />
+Standard Math.random() creates repetitive patterns when applied over larger space.
+</div>
 
+<h3>.randInt( [page:Integer low], [page:Integer high] ) [page:Integer]</h3>
+<div>
+Random integer from <strong>low</strong> to <strong>high</strong> interval.
+</div>
 
-<h2>Methods</h2>
+<h3>.randFloat( [page:Float low], [page:Float high] ) [page:Float]</h3>
+<div>
+Random float from <strong>low</strong> to <strong>high</strong> interval.
+</div>
 
-<h3>.todo( [page:Vector3 todo] )</h3>
+<h3>.randFloatSpread( [page:Float range] ) [page:Float]</h3>
 <div>
-todo — todo<br />
+Random float from <strong>- range / 2</strong> to <strong>range / 2</strong> interval.
 </div>
 
 

+ 0 - 60
docs/api/core/Math.rst

@@ -1,60 +0,0 @@
-Math - Math utility functions
------------------------------
-
-.. ...............................................................................
-.. rubric:: Methods
-.. ...............................................................................
-
-.. function:: Math.clamp( x, a, b )
-
-    Clamps the x to be between a and b
-
-    :param float x: value to be clamped
-    :param float a: minimum value
-    :param float b: maximum value
-    :returns: Clamped value
-    :rtype: float
-
-.. function:: Math.clampBottom( x, a )
-
-    Clamps the x to be larger than a
-
-    :param float x: value to be clamped
-    :param float a: minimum value
-    :returns: Clamped value
-    :rtype: float
-
-.. function:: Math.mapLinear( x, a1, a2, b1, b2 )
-
-    Linear mapping of x from range <a1, a2> to range <b1, b2>
-
-    :param float x: value to be mapped
-    :param float a1: minimum value for range A
-    :param float a2: maximum value for range A
-    :param float b1: minimum value for range B
-    :param float b2: maximum value for range B
-    :returns: mapped value
-    :rtype: float
-
-.. function:: Math.random16()
-
-    Random float from <0, 1> with 16 bits of randomness
-    (standard Math.random() creates repetitive patterns when applied over larger space)
-
-    :returns: Random float from <0, 1> with 16 bits of randomness
-    :rtype: float
-
-.. function:: Math.randInt( low, high )
-
-    :returns: Random integer from *low* to *high* interval
-    :rtype: integer
-
-.. function:: Math.randFloat( low, high )
-
-    :returns: Random float from *low* to *high* interval
-    :rtype: float
-
-.. function:: Math.randFloatSpread( range )
-
-    :returns: Random float from -range/2 to range/2 interval
-    :rtype: float

+ 12 - 4
docs/api/core/Matrix3.html

@@ -1,6 +1,6 @@
 <h1>[name]</h1>
 
-<div class="desc">todo</div>
+<div class="desc">A 3x3 matrix.</div>
 
 
 <h2>Constructor</h2>
@@ -10,14 +10,22 @@
 
 <h2>Properties</h2>
 
-<h3>.[page:Vector3 todo]</h3>
+<h3>.[page:Array m]</h3>
+<div>
+Array with matrix values.
+</div>
 
 
 <h2>Methods</h2>
 
-<h3>.todo( [page:Vector3 todo] )</h3>
+<h3>.transpose() [page:Matrix3]</h3>
+<div>
+Transposes this matrix in place.
+</div>
+
+<h3>.transposeIntoArray( [page:Array r] ) [page:Array]</h3>
 <div>
-todo — todo<br />
+Transposes this matrix into supplied array.
 </div>
 
 

+ 0 - 38
docs/api/core/Matrix3.rst

@@ -1,38 +0,0 @@
-Matrix3 - A 3x3 matrix
-----------------------
-
-.. ...............................................................................
-.. rubric:: Constructor
-.. ...............................................................................
-
-.. class:: Matrix3()
-
-    A 3x3 matrix
-
-.. ...............................................................................
-.. rubric:: Attributes
-.. ...............................................................................
-
-.. attribute:: Matrix3.m
-
-    Array with matrix values
-
-.. ...............................................................................
-.. rubric:: Methods
-.. ...............................................................................
-
-.. function:: Matrix3.transpose()
-
-    Transposes this matrix in place
-
-    :returns: This matrix
-    :rtype: :class:`Matrix3`
-
-.. function:: Matrix3.transposeIntoArray( r )
-
-    Transposes this matrix into supplied array ``r``
-
-    This matrix is unmodified
-
-    :returns: This matrix
-    :rtype: :class:`Matrix3`

+ 89 - 5
docs/api/core/Matrix4.html

@@ -1,23 +1,107 @@
 <h1>[name]</h1>
 
-<div class="desc">todo</div>
+<div class="desc">A 4x4 Matrix.</div>
+
+
+<h2>Example</h2>
+
+<code>// Simple rig for rotating around 3 axes
+
+var m = new THREE.Matrix4();
+
+var m1 = new THREE.Matrix4();
+var m2 = new THREE.Matrix4();
+var m3 = new THREE.Matrix4();
+
+var alpha = 0;
+var beta = Math.PI;
+var gamma = Math.PI/2;
+
+m1.setRotationX( alpha );
+m2.setRotationY( beta );
+m3.setRotationZ( gamma );
+
+m.multiply( m1, m2 );
+m.multiplySelf( m3 );
+</code>
 
 
 <h2>Constructor</h2>
 
-<h3>[name]()</h3>
+<h3>[name]( [page:Float n11], [page:Float n12], [page:Float n13], [page:Float n14], [page:Float n21], [page:Float n22], [page:Float n23], [page:Float n24], [page:Float n31], [page:Float n32], [page:Float n33], [page:Float n34], [page:Float n41], [page:Float n42], [page:Float n43], [page:Float n44] )</h3>
 
 
 <h2>Properties</h2>
 
-<h3>.[page:Vector3 todo]</h3>
+<h3>.[page:Float n11]</h3>
+
+<h3>.[page:Float n12]</h3>
+
+<h3>.[page:Float n13]</h3>
+
+<h3>.[page:Float n14]</h3>
+
+<h3>.[page:Float n21]</h3>
+
+<h3>.[page:Float n22]</h3>
+
+<h3>.[page:Float n23]</h3>
+
+<h3>.[page:Float n24]</h3>
+
+<h3>.[page:Float n31]</h3>
+
+<h3>.[page:Float n32]</h3>
+
+<h3>.[page:Float n33]</h3>
+
+<h3>.[page:Float n34]</h3>
+
+<h3>.[page:Float n41]</h3>
+
+<h3>.[page:Float n42]</h3>
+
+<h3>.[page:Float n43]</h3>
+
+<h3>.[page:Float n44]</h3>
 
 
 <h2>Methods</h2>
 
-<h3>.todo( [page:Vector3 todo] )</h3>
+<h3>.set( [page:Float n11], [page:Float n12], [page:Float n13], [page:Float n14], [page:Float n21], [page:Float n22], [page:Float n23], [page:Float n24], [page:Float n31], [page:Float n32], [page:Float n33], [page:Float n34], [page:Float n41], [page:Float n42], [page:Float n43], [page:Float n44] ) [page:Matrix4]</h3>
+<div>
+Sets all fields of this matrix.
+</div>
+
+<h3>.identity() [page:Matrix4]</h3>
+<div>
+Resets this matrix to identity.
+</div>
+
+<h3>.copy( [page:Matrix4 m] ) [page:Matrix4]</h3>
+<div>
+Copies a matrix <strong>m</strong> into this matrix.
+</div>
+
+<h3>.lookAt( [page:Vector3 eye], [page:Vector3 center], [page:Vector3 up], ) [page:Matrix4]</h3>
+<div>
+Constructs a rotation matrix, looking from <strong>eye</strong> towards <strong>center</strong> with defined <strong>up</strong> vector.
+</div>
+
+<h3>.multiply( [page:Matrix4 a], [page:Matrix4 b] ) [page:Matrix4]</h3>
+<div>
+Sets this matrix to <strong>a * b</strong>.
+</div>
+
+<h3>.multiplySelf( [page:Matrix4 m] ) [page:Matrix4]</h3>
+<div>
+Multiplies this matrix by <strong>m</strong>.
+</div>
+
+<h3>.multiplyToArray( [page:Matrix4 a], [page:Matrix4 b], [page:Array r] ) [page:Matrix4]</h3>
 <div>
-todo — todo<br />
+Sets this matrix to <strong>a * b</strong> and sets result into flat array <strong>r</strong>.<br />
+Destination array can be regular Array or TypedArray.
 </div>
 
 

+ 1 - 1
docs/api/core/Projector.html

@@ -1,6 +1,6 @@
 <h1>[name]</h1>
 
-<div class="desc">todo</div>
+<div class="desc">Projecting points between spaces.</div>
 
 
 <h2>Constructor</h2>

+ 0 - 14
docs/api/core/Projector.rst

@@ -1,14 +0,0 @@
-Projector - Utilities for projecting primitives between spaces
---------------------------------------------------------------
-
-.. rubric:: Constructor
-
-.. class:: Projector()
-
-    Utilities for projecting primitives between spaces
-    
-.. rubric:: Attributes
-
-.. rubric:: Method
-
-.. rubric:: Example(s)

+ 1 - 1
docs/api/core/Ray.html

@@ -1,6 +1,6 @@
 <h1>[name]</h1>
 
-<div class="desc">todo</div>
+<div class="desc">Representation of a ray in space.</div>
 
 
 <h2>Constructor</h2>

+ 0 - 14
docs/api/core/Ray.rst

@@ -1,14 +0,0 @@
-Ray - Representation of a ray in space
---------------------------------------
-
-.. rubric:: Constructor
-
-.. class:: Ray()
-
-    Representation of a ray in space
-    
-.. rubric:: Attributes
-
-.. rubric:: Method
-
-.. rubric:: Example(s)

+ 1 - 1
docs/api/core/Rectangle.html

@@ -1,6 +1,6 @@
 <h1>[name]</h1>
 
-<div class="desc">todo</div>
+<div class="desc">Represents a 2D rectangle.</div>
 
 
 <h2>Constructor</h2>

+ 0 - 14
docs/api/core/Rectangle.rst

@@ -1,14 +0,0 @@
-Rectangle - Represents a 2D rectangle
--------------------------------------
-
-.. rubric:: Constructor
-
-.. class:: Rectangle()
-
-    Represents a 2D rectangle
-    
-.. rubric:: Attributes
-
-.. rubric:: Method
-
-.. rubric:: Example(s)

+ 1 - 1
docs/api/core/Spline.html

@@ -1,6 +1,6 @@
 <h1>[name]</h1>
 
-<div class="desc">todo</div>
+<div class="desc">Represents a spline.</div>
 
 
 <h2>Constructor</h2>

+ 0 - 14
docs/api/core/Spline.rst

@@ -1,14 +0,0 @@
-Spline - Represents a spline
-----------------------------
-
-.. rubric:: Constructor
-
-.. class:: Spline()
-
-    Represents a spline
-   
-.. rubric:: Attributes
-
-.. rubric:: Method
-
-.. rubric:: Example(s)

+ 24 - 7
docs/api/core/UV.html

@@ -1,24 +1,41 @@
 <h1>[name]</h1>
 
-<div class="desc">todo</div>
+<div class="desc">A texture coordinate.</div>
+
+<h2>Example</h2>
+
+<code>var uv = new THREE.UV( 0, 1 );</code>
 
 
 <h2>Constructor</h2>
 
-<h3>[name]()</h3>
+<h3>[name]( [page:Float u], [page:Float v] )</h3>
+<div>
+u — Horizontal coordinate.<br />
+v — Vertical coordinate.<br />
+</div>
 
 
 <h2>Properties</h2>
 
-<h3>.[page:Vector3 todo]</h3>
+<h3>.[page:Float u]</h3>
+<div>
+Horizontal coordinate.<br />
+</div>
+
+<h3>.[page:Float v]</h3>
+<div>
+Vertical coordinate.<br />
+</div>
 
 
 <h2>Methods</h2>
 
-<h3>.todo( [page:Vector3 todo] )</h3>
-<div>
-todo — todo<br />
-</div>
+<h3>.set( [page:Float u], [page:Float v] )</h3>
+
+<h3>.copy( [page:UV uv] )</h3>
+
+<h3>.clone() [page:UV]</h3>
 
 
 <h2>Source</h2>

+ 0 - 37
docs/api/core/UV.rst

@@ -1,37 +0,0 @@
-UV - A texture coordinate
-------------------------------------
-
-.. ...............................................................................
-.. rubric:: Constructor
-.. ...............................................................................
-
-.. class:: UV( u, v )
-
-    A texture coordinate
-
-    :param float u: u coordinate
-    :param float v: v coordinate
-
-.. ...............................................................................
-.. rubric:: Attributes
-.. ...............................................................................
-
-.. attribute:: UV.u
-.. attribute:: UV.v
-
-.. ...............................................................................
-.. rubric:: Method
-.. ...............................................................................
-
-.. function:: UV.set( u, v )
-.. function:: UV.copy( uv )
-.. function:: UV.clone( )
-
-
-.. ...............................................................................
-.. rubric:: Example
-.. ...............................................................................
-
-::
-
-    var uv = new THREE.UV( 0, 1 );

+ 2 - 10
docs/api/core/Vertex.html

@@ -1,6 +1,6 @@
 <h1>[name]</h1>
 
-<div class="desc">todo</div>
+<div class="desc"></div>
 
 
 <h2>Constructor</h2>
@@ -10,15 +10,7 @@
 
 <h2>Properties</h2>
 
-<h3>.[page:Vector3 todo]</h3>
-
-
-<h2>Methods</h2>
-
-<h3>.todo( [page:Vector3 todo] )</h3>
-<div>
-todo — todo<br />
-</div>
+<h3>.[page:Vector3 position]</h3>
 
 
 <h2>Source</h2>

+ 0 - 14
docs/api/core/Vertex.rst

@@ -1,14 +0,0 @@
-Vertex - Represents a vertex in space
--------------------------------------
-
-.. rubric:: Constructor
-
-.. class:: Vertex()
-
-    Represents a vertex in space
-    
-.. rubric:: Attributes
-
-.. rubric:: Method
-
-.. rubric:: Example(s)

+ 2 - 0
docs/api/lights/AmbientLight.html

@@ -1,3 +1,5 @@
+[page:Light] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/lights/DirectionalLight.html

@@ -1,3 +1,5 @@
+[page:Light] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/lights/PointLight.html

@@ -1,3 +1,5 @@
+[page:Light] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/lights/SpotLight.html

@@ -1,3 +1,5 @@
+[page:Light] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/materials/LineBasicMaterial.html

@@ -1,3 +1,5 @@
+[page:Material] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/materials/MeshBasicMaterial.html

@@ -1,3 +1,5 @@
+[page:Material] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/materials/MeshDepthMaterial.html

@@ -1,3 +1,5 @@
+[page:Material] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/materials/MeshFaceMaterial.html

@@ -1,3 +1,5 @@
+[page:Material] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/materials/MeshLambertMaterial.html

@@ -1,3 +1,5 @@
+[page:Material] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/materials/MeshNormalMaterial.html

@@ -1,3 +1,5 @@
+[page:Material] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/materials/MeshPhongMaterial.html

@@ -1,3 +1,5 @@
+[page:Material] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/materials/ParticleBasicMaterial.html

@@ -1,3 +1,5 @@
+[page:Material] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/materials/ParticleCanvasMaterial.html

@@ -1,3 +1,5 @@
+[page:Material] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/materials/ParticleDOMMaterial.html

@@ -1,3 +1,5 @@
+[page:Material] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 2 - 0
docs/api/materials/ShaderMaterial.html

@@ -1,3 +1,5 @@
+[page:Material] &rarr;
+
 <h1>[name]</h1>
 
 <div class="desc">todo</div>

+ 18 - 8
docs/index.html

@@ -30,9 +30,16 @@
 			}
 
 				#panel h1 {
+					color: #444;
+					font-size: 25px;
+					margin-top: 25px;
+					margin-left: 20px;
+				}
+
+				#panel h2 {
 					color: #999;
 					font-size: 16px;
-					margin-top: 16px;
+					margin-top: 20px;
 					margin-left: 20px;
 				}
 
@@ -95,12 +102,15 @@
 		<div id="viewer"></div>
 
 		<script>
+			var REVISION = '49dev';
+
 			var panel = document.getElementById( 'panel' );
 			var viewer = document.getElementById( 'viewer' );
 
 			var pages = {
-				"Array": "Array",
-				"Number": "Number"
+				"Integer": "Integer",
+				"Float": "Float",
+				"Array": "Array"
 			};
 
 			var list = {
@@ -135,9 +145,9 @@
 				],
 
 				"Lights": [
+					{ name: "Light", path: "lights/Light" },
 					{ name: "AmbientLight", path: "lights/AmbientLight" },
 					{ name: "DirectionalLight", path: "lights/DirectionalLight" },
-					{ name: "Light", path: "lights/Light" },
 					{ name: "PointLight", path: "lights/PointLight" },
 					{ name: "SpotLight", path: "lights/SpotLight" }
 				],
@@ -263,10 +273,10 @@
 				],
 
 				"Extras / Loaders": [
+					{ name: "Loader", path: "extras/loaders/Loader" },
 					{ name: "BinaryLoader", path: "extras/loaders/BinaryLoader" },
 					{ name: "ColladaLoader", path: "extras/loaders/ColladaLoader" },
 					{ name: "JSONLoader", path: "extras/loaders/JSONLoader" },
-					{ name: "Loader", path: "extras/loaders/Loader" },
 					{ name: "SceneLoader", path: "extras/loaders/SceneLoader" },
 					{ name: "UTF8Loader", path: "extras/loaders/UTF8Loader" }
 				],
@@ -299,11 +309,11 @@
 
 			};
 
-			var html = '';
+			var html = '<h1>three.js <span style="font-size: 50%; vertical-align: super;">r' + REVISION + '</span></h1>';
 
 			for ( var category in list ) {
 
-				html += '<h1>' + category + '</h1>';
+				html += '<h2>' + category + '</h2>';
 
 				html += '<ul>';
 
@@ -341,7 +351,7 @@
 						text = text.replace(/\[name\]/gi, name);
 						text = text.replace(/\[path\]/gi, path);
 						text = text.replace(/\[page:(\w+)\]/gi, "<a href=\"javascript:goTo('$1')\" title=\"$1\">$1</a>" );
-						text = text.replace(/\[page:(\w+) (\w+)\]/gi, "<a href=\"javascript:goTo('$1')\" title=\"$1\">$2</a>" );
+						text = text.replace(/\[page:(\w+) ([\w|\.]+)\]/gi, "<a href=\"javascript:goTo('$1')\" title=\"$1\">$2</a>" );
 
 						viewer.innerHTML = '<br>' + text + '<br><br>';
 

+ 6 - 15
examples/misc_camera_path.html

@@ -85,24 +85,15 @@
 
 				// world
 
-				var cube = new THREE.CubeGeometry( 20, 60, 20 );
-
-				cube.vertices[ 0 ].position.multiplyScalar( 0.01 );
-				cube.vertices[ 1 ].position.multiplyScalar( 0.01 );
-				cube.vertices[ 4 ].position.multiplyScalar( 0.01 );
-				cube.vertices[ 5 ].position.multiplyScalar( 0.01 );
-
-				var material =  new THREE.MeshLambertMaterial( { color:0xffffff } );
+				var geometry = new THREE.CylinderGeometry( 0, 10, 30, 4, 1 );
+				var material =  new THREE.MeshLambertMaterial( { color:0xffffff, shading: THREE.FlatShading } );
 
 				for ( var i = 0; i < 500; i ++ ) {
 
-					var mesh = new THREE.Mesh( cube, material );
-					mesh.position.set(
-						( Math.random() - 0.5 ) * 1000,
-						( Math.random() - 0.5 ) * 1000,
-						( Math.random() - 0.5 ) * 1000
-					);
-
+					var mesh = new THREE.Mesh( geometry, material );
+					mesh.position.x = ( Math.random() - 0.5 ) * 1000;
+					mesh.position.y = ( Math.random() - 0.5 ) * 1000;
+					mesh.position.z = ( Math.random() - 0.5 ) * 1000;
 					mesh.updateMatrix();
 					mesh.matrixAutoUpdate = false;
 					scene.add( mesh );

+ 7 - 14
examples/misc_camera_roll.html

@@ -75,22 +75,15 @@
 
 				// world
 
-				var cube = new THREE.CubeGeometry( 20, 60, 20 );
+				var geometry = new THREE.CylinderGeometry( 0, 10, 30, 4, 1 );
+				var material =  new THREE.MeshLambertMaterial( { color:0xffffff, shading: THREE.FlatShading } );
 
-				cube.vertices[ 0 ].position.multiplyScalar( 0.01 );
-				cube.vertices[ 1 ].position.multiplyScalar( 0.01 );
-				cube.vertices[ 4 ].position.multiplyScalar( 0.01 );
-				cube.vertices[ 5 ].position.multiplyScalar( 0.01 );
-
-				var material =  new THREE.MeshLambertMaterial( { color:0xffffff } );
-
-				for( var i = 0; i < 500; i++ ) {
-
-					var mesh = new THREE.Mesh( cube, material );
-					mesh.position.set(( Math.random() - 0.5 ) * 1000,
-									  ( Math.random() - 0.5 ) * 1000,
-									  ( Math.random() - 0.5 ) * 1000 );
+				for ( var i = 0; i < 500; i ++ ) {
 
+					var mesh = new THREE.Mesh( geometry, material );
+					mesh.position.x = ( Math.random() - 0.5 ) * 1000;
+					mesh.position.y = ( Math.random() - 0.5 ) * 1000;
+					mesh.position.z = ( Math.random() - 0.5 ) * 1000;
 					mesh.updateMatrix();
 					mesh.matrixAutoUpdate = false;
 					scene.add( mesh );

+ 4 - 10
examples/misc_camera_trackball.html

@@ -85,18 +85,12 @@
 
 				// world
 
-				var cube = new THREE.CubeGeometry( 20, 60, 20 );
+				var geometry = new THREE.CylinderGeometry( 0, 10, 30, 4, 1 );
+				var material =  new THREE.MeshLambertMaterial( { color:0xffffff, shading: THREE.FlatShading } );
 
-				cube.vertices[ 0 ].position.multiplyScalar( 0.01 );
-				cube.vertices[ 1 ].position.multiplyScalar( 0.01 );
-				cube.vertices[ 4 ].position.multiplyScalar( 0.01 );
-				cube.vertices[ 5 ].position.multiplyScalar( 0.01 );
+				for ( var i = 0; i < 500; i ++ ) {
 
-				var material =  new THREE.MeshLambertMaterial( { color: 0xffffff } );
-
-				for( var i = 0; i < 500; i ++ ) {
-
-					var mesh = new THREE.Mesh( cube, material );
+					var mesh = new THREE.Mesh( geometry, material );
 					mesh.position.x = ( Math.random() - 0.5 ) * 1000;
 					mesh.position.y = ( Math.random() - 0.5 ) * 1000;
 					mesh.position.z = ( Math.random() - 0.5 ) * 1000;

+ 2 - 2
examples/webgl_loader_ctm.html

@@ -141,8 +141,8 @@
 
 				}
 
-				var useWorker = true
-					useBuffers = true;
+				var useWorker = true;
+				var useBuffers = true;
 
 				var loader = new THREE.CTMLoader( renderer.context );
 

+ 1 - 1
src/Three.js

@@ -2,7 +2,7 @@
  * @author mr.doob / http://mrdoob.com/
  */
 
-var THREE = THREE || { REVISION: '48dev' };
+var THREE = THREE || { REVISION: '49dev' };
 
 if ( ! self.Int32Array ) {
 

+ 2 - 17
src/extras/loaders/ColladaLoader.js

@@ -2288,12 +2288,7 @@ THREE.ColladaLoader = function () {
 					input = inputs[ k ];
 					source = sources[ input.source ];
 
-					if ( primitive.vcount ){
-						index = p[ i + j ];
-					} else {
-						index = p[ i + ( j * maxOffset ) + input.offset ];
-					}
-
+					index = p[ i + ( j * maxOffset ) + input.offset ];
 					numParams = source.accessor.params.length;
 					idx32 = index * numParams;
 
@@ -2430,11 +2425,7 @@ THREE.ColladaLoader = function () {
 
 			}
 
-			if ( primitive.vcount ){
-				i += vcount;
-			} else {
-				i += maxOffset * vcount;
-			}
+			i += maxOffset * vcount;
 
 		}
 
@@ -2466,12 +2457,6 @@ THREE.ColladaLoader = function () {
 
 				this.inputs[ i ].source = vertices.input[ 'POSITION' ].source;
 
-				for(var key in vertices.input){
-					if(key != 'POSITION'){
-						var input = vertices.input[key];
-						this.inputs.push(input);
-					}
-				}
 			}
 
 		}

+ 6 - 18
src/extras/loaders/UTF8Loader.js

@@ -13,29 +13,17 @@
  * @author won3d / http://twitter.com/won3d
  */
 
-THREE.UTF8Loader = function () {
+THREE.UTF8Loader = function () {};
 
-};
-
-THREE.UTF8Loader.prototype = new THREE.UTF8Loader();
-THREE.UTF8Loader.prototype.constructor = THREE.UTF8Loader;
-
-
-// Load UTF8 compressed models generated by objcompress
-//  - parameters
-//		- url (required)
-//		- callback (required)
-//		- metaData (optional)
-
-THREE.UTF8Loader.prototype.load = function ( url, callback, metaData ) {
+THREE.UTF8Loader.prototype.load = function ( url, callback, metadata ) {
 
 	var xhr = new XMLHttpRequest(),
 		callbackProgress = null,
 
-		scale = metaData.scale !== undefined ? metaData.scale : 1,
-		offsetX = metaData.offsetX !== undefined ? metaData.offsetX : 0,
-		offsetY = metaData.offsetY !== undefined ? metaData.offsetY : 0,
-		offsetZ = metaData.offsetZ !== undefined ? metaData.offsetZ : 0;
+		scale = metadata.scale !== undefined ? metadata.scale : 1,
+		offsetX = metadata.offsetX !== undefined ? metadata.offsetX : 0,
+		offsetY = metadata.offsetY !== undefined ? metadata.offsetY : 0,
+		offsetZ = metadata.offsetZ !== undefined ? metadata.offsetZ : 0;
 
 	var length = 0;