浏览代码

Refactored everything to use CamelCase naming for properties. Plus some smaller fixes here and there.

Went through all examples, all should work.

JSON files exported from Blender / converted from OBJ files still use underscored property names internally. I don't know, should these also be changed?
alteredq 14 年之前
父节点
当前提交
cf2e8c1bbf
共有 72 个文件被更改,包括 731 次插入820 次删除
  1. 87 87
      build/Three.js
  2. 26 26
      build/custom/ThreeCanvas.js
  3. 1 1
      build/custom/ThreeDOM.js
  4. 9 9
      build/custom/ThreeExtras.js
  5. 21 21
      build/custom/ThreeSVG.js
  6. 57 57
      build/custom/ThreeWebGL.js
  7. 1 1
      examples/canvas_materials.html
  8. 1 1
      examples/canvas_materials_reflection.html
  9. 4 4
      examples/canvas_materials_video.html
  10. 1 1
      examples/canvas_sandbox.html
  11. 0 143
      examples/js/CameraControl.js
  12. 2 2
      examples/js/ShaderExtras.js
  13. 5 5
      examples/misc_materials_multimaterials.html
  14. 7 7
      examples/misc_sound.html
  15. 2 2
      examples/misc_uqbiquity_test.html
  16. 15 15
      examples/scenes/test_scene.js
  17. 1 1
      examples/webgl_geometry_blenderexport_colors.html
  18. 1 1
      examples/webgl_geometry_colors.html
  19. 2 2
      examples/webgl_geometry_dynamic.html
  20. 1 1
      examples/webgl_geometry_minecraft.html
  21. 1 1
      examples/webgl_geometry_minecraft_ao.html
  22. 1 1
      examples/webgl_geometry_terrain.html
  23. 1 1
      examples/webgl_geometry_terrain2.html
  24. 1 1
      examples/webgl_geometry_terrain_fog.html
  25. 4 4
      examples/webgl_hdr.html
  26. 6 6
      examples/webgl_lines_colors.html
  27. 25 25
      examples/webgl_materials_cars.html
  28. 12 12
      examples/webgl_materials_cars_camaro.html
  29. 4 4
      examples/webgl_materials_cubemap.html
  30. 1 1
      examples/webgl_materials_cubemap_balls_reflection.html
  31. 1 1
      examples/webgl_materials_cubemap_balls_refraction.html
  32. 1 1
      examples/webgl_materials_cubemap_escher.html
  33. 3 3
      examples/webgl_materials_cubemap_refraction.html
  34. 1 1
      examples/webgl_materials_normalmap.html
  35. 1 1
      examples/webgl_materials_normalmap2.html
  36. 1 1
      examples/webgl_materials_shaders_fresnel.html
  37. 7 7
      examples/webgl_materials_video.html
  38. 1 1
      examples/webgl_particles_billboards_colors.html
  39. 1 1
      examples/webgl_particles_sprites.html
  40. 13 13
      examples/webgl_postprocessing.html
  41. 5 5
      examples/webgl_postprocessing_dof.html
  42. 7 7
      examples/webgl_ribbons.html
  43. 6 6
      examples/webgl_rtt.html
  44. 8 8
      examples/webgl_sandbox.html
  45. 4 4
      examples/webgl_shader.html
  46. 4 4
      examples/webgl_shader2.html
  47. 4 4
      src/cameras/Camera.js
  48. 35 18
      src/cameras/QuakeCamera.js
  49. 14 10
      src/extras/SceneUtils.js
  50. 20 15
      src/extras/ShaderUtils.js
  51. 3 3
      src/extras/io/Loader.js
  52. 3 3
      src/extras/primitives/Cube.js
  53. 1 0
      src/extras/primitives/Icosahedron.js
  54. 59 36
      src/extras/primitives/LathedObject.js
  55. 3 3
      src/extras/primitives/Plane.js
  56. 3 3
      src/extras/primitives/Sphere.js
  57. 6 6
      src/materials/LineBasicMaterial.js
  58. 23 23
      src/materials/MeshBasicMaterial.js
  59. 6 6
      src/materials/MeshDepthMaterial.js
  60. 22 22
      src/materials/MeshLambertMaterial.js
  61. 6 6
      src/materials/MeshNormalMaterial.js
  62. 22 22
      src/materials/MeshPhongMaterial.js
  63. 19 19
      src/materials/MeshShaderMaterial.js
  64. 6 6
      src/materials/ParticleBasicMaterial.js
  65. 4 4
      src/materials/RenderTarget.js
  66. 6 6
      src/materials/Texture.js
  67. 4 0
      src/materials/Uniforms.js
  68. 8 8
      src/renderers/CanvasRenderer.js
  69. 2 2
      src/renderers/SVGRenderer.js
  70. 62 62
      src/renderers/WebGLRenderer.js
  71. 25 25
      src/renderers/WebGLRenderer2.js
  72. 1 1
      utils/exporters/blender/2.56/scripts/op/io_mesh_threejs/export_threejs.py

文件差异内容过多而无法显示
+ 87 - 87
build/Three.js


+ 26 - 26
build/custom/ThreeCanvas.js

@@ -48,7 +48,7 @@ b,c){if(this.visible){this.matrixAutoUpdate&&(b|=this.updateMatrix());if(b||this
 THREE.Quaternion.prototype={set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this},setFromEuler:function(a){var b=0.5*Math.PI/360,c=a.x*b,d=a.y*b,e=a.z*b;a=Math.cos(d);d=Math.sin(d);b=Math.cos(-e);e=Math.sin(-e);var f=Math.cos(c);c=Math.sin(c);var h=a*b,j=d*e;this.w=h*f-j*c;this.x=h*c+j*f;this.y=d*b*f+a*e*c;this.z=a*e*f-d*b*c;return this},calculateW:function(){this.w=-Math.sqrt(Math.abs(1-this.x*this.x-this.y*this.y-this.z*this.z));return this},inverse:function(){this.x*=-1;this.y*=
 -1;this.z*=-1;return this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);if(a==0)this.w=this.z=this.y=this.x=0;else{a=1/a;this.x*=a;this.y*=a;this.z*=a;this.w*=a}return this},multiplySelf:function(a){var b=this.x,c=this.y,d=this.z,e=this.w,f=a.x,h=a.y,j=a.z;a=a.w;this.x=b*a+e*f+c*j-d*h;this.y=c*a+e*h+d*f-b*j;this.z=d*a+e*j+b*h-c*f;this.w=e*a-b*f-c*h-d*j;return this},
 multiplyVector3:function(a,b){b||(b=a);var c=a.x,d=a.y,e=a.z,f=this.x,h=this.y,j=this.z,g=this.w,i=g*c+h*e-j*d,l=g*d+j*c-f*e,m=g*e+f*d-h*c;c=-f*c-h*d-j*e;b.x=i*g+c*-f+l*-j-m*-h;b.y=l*g+c*-h+m*-f-i*-j;b.z=m*g+c*-j+i*-h-l*-f;return b}};
-THREE.Quaternion.slerp=function(a,b,c,d){var e=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(e)>=1){c.w=a.w;c.x=a.x;c.y=a.y;c.z=a.z;return c}var f=Math.acos(e),h=Math.sqrt(1-e*e);if(Math.abs(h)<0.001){c.w=0.5*(a.w+b.w);c.x=0.5*(a.x+b.x);c.y=0.5*(a.y+b.y);c.z=0.5*(a.z+b.z);return c}e=Math.sin((1-d)*f)/h;d=Math.sin(d*f)/h;c.w=a.w*e+b.w*d;c.x=a.x*e+b.x*d;c.y=a.y*e+b.y*d;c.z=a.z*e+b.z*d;return c};
+THREE.Quaternion.slerp=function(a,b,c,d){var e=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(e)>=1){c.w=a.w;c.x=a.x;c.y=a.y;c.z=a.z;return c}var f=Math.acos(e),h=Math.sqrt(1-e*e);if(Math.abs(h)<0.0010){c.w=0.5*(a.w+b.w);c.x=0.5*(a.x+b.x);c.y=0.5*(a.y+b.y);c.z=0.5*(a.z+b.z);return c}e=Math.sin((1-d)*f)/h;d=Math.sin(d*f)/h;c.w=a.w*e+b.w*d;c.x=a.x*e+b.x*d;c.y=a.y*e+b.y*d;c.z=a.z*e+b.z*d;return c};
 THREE.Vertex=function(a,b){this.position=a||new THREE.Vector3;this.positionWorld=new THREE.Vector3;this.positionScreen=new THREE.Vector4;this.normal=b||new THREE.Vector3;this.normalWorld=new THREE.Vector3;this.normalScreen=new THREE.Vector3;this.tangent=new THREE.Vector4;this.__visible=!0};
 THREE.Face3=function(a,b,c,d,e){this.a=a;this.b=b;this.c=c;this.centroid=new THREE.Vector3;this.normal=d instanceof THREE.Vector3?d:new THREE.Vector3;this.vertexNormals=d instanceof Array?d:[];this.materials=e instanceof Array?e:[e]};THREE.Face4=function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.d=d;this.centroid=new THREE.Vector3;this.normal=e instanceof THREE.Vector3?e:new THREE.Vector3;this.vertexNormals=e instanceof Array?e:[];this.materials=f instanceof Array?f:[f]};
 THREE.UV=function(a,b){this.set(a||0,b||0)};THREE.UV.prototype={set:function(a,b){this.u=a;this.v=b;return this},copy:function(a){this.set(a.u,a.v);return this}};THREE.Geometry=function(){this.id="Geometry"+THREE.GeometryIdCounter++;this.vertices=[];this.faces=[];this.uvs=[];this.uvs2=[];this.colors=[];this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.geometryChunks={};this.hasTangents=!1};
@@ -72,25 +72,25 @@ THREE.Camera.prototype.frustumContains=function(a){var b=a.matrixWorld.n14,c=a.m
 if(b+f<-this.screenCenterY)return!1;if(b-f>this.screenCenterY)return!1;a.positionScreen.set(l,b,h,f);return!0};THREE.Light=function(a){THREE.Object3D.call(this);this.color=new THREE.Color(a)};THREE.Light.prototype=new THREE.Object3D;THREE.Light.prototype.constructor=THREE.Light;THREE.Light.prototype.supr=THREE.Object3D.prototype;THREE.AmbientLight=function(a){THREE.Light.call(this,a)};THREE.AmbientLight.prototype=new THREE.Light;THREE.AmbientLight.prototype.constructor=THREE.AmbientLight;
 THREE.DirectionalLight=function(a,b){THREE.Light.call(this,a);this.position=new THREE.Vector3(0,1,0);this.intensity=b||1};THREE.DirectionalLight.prototype=new THREE.Light;THREE.DirectionalLight.prototype.constructor=THREE.DirectionalLight;THREE.PointLight=function(a,b){THREE.Light.call(this,a);this.position=new THREE.Vector3;this.intensity=b||1};THREE.PointLight.prototype=new THREE.Light;THREE.PointLight.prototype.constructor=THREE.PointLight;THREE.FlatShading=0;THREE.SmoothShading=1;
 THREE.NormalBlending=0;THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;THREE.BillboardBlending=3;THREE.ReverseSubtractiveBlending=4;THREE.MaterialCounter={value:0};THREE.CubeReflectionMapping=function(){};THREE.CubeRefractionMapping=function(){};THREE.LatitudeReflectionMapping=function(){};THREE.LatitudeRefractionMapping=function(){};THREE.SphericalReflectionMapping=function(){};THREE.SphericalRefractionMapping=function(){};THREE.UVMapping=function(){};
-THREE.LineBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.blending=THREE.NormalBlending;this.depth_test=!0;this.linewidth=1;this.linejoin=this.linecap="round";this.vertex_colors=!1;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.linewidth!==undefined)this.linewidth=
-a.linewidth;if(a.linecap!==undefined)this.linecap=a.linecap;if(a.linejoin!==undefined)this.linejoin=a.linejoin;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors}};
-THREE.MeshBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.env_map=this.light_map=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refraction_ratio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;this.wireframe_linejoin=this.wireframe_linecap="round";this.vertex_colors=!1;this.skinning=!1;if(a){a.color!==
-undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.light_map!==undefined)this.light_map=a.light_map;if(a.env_map!==undefined)this.env_map=a.env_map;if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refraction_ratio!==undefined)this.refraction_ratio=a.refraction_ratio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==
-undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==undefined)this.wireframe_linewidth=a.wireframe_linewidth;if(a.wireframe_linecap!==undefined)this.wireframe_linecap=a.wireframe_linecap;if(a.wireframe_linejoin!==undefined)this.wireframe_linejoin=a.wireframe_linejoin;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors;if(a.skinning!==undefined)this.skinning=a.skinning}};
-THREE.MeshLambertMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.env_map=this.light_map=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refraction_ratio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;this.wireframe_linejoin=this.wireframe_linecap="round";this.vertex_colors=!1;this.skinning=!1;if(a){a.color!==
-undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.light_map!==undefined)this.light_map=a.light_map;if(a.env_map!==undefined)this.env_map=a.env_map;if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refraction_ratio!==undefined)this.refraction_ratio=a.refraction_ratio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==
-undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==undefined)this.wireframe_linewidth=a.wireframe_linewidth;if(a.wireframe_linecap!==undefined)this.wireframe_linecap=a.wireframe_linecap;if(a.wireframe_linejoin!==undefined)this.wireframe_linejoin=a.wireframe_linejoin;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors;if(a.skinning!==undefined)this.skinning=a.skinning}};
-THREE.MeshPhongMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.ambient=new THREE.Color(328965);this.specular=new THREE.Color(1118481);this.shininess=30;this.opacity=1;this.env_map=this.light_map=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refraction_ratio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;this.wireframe_linejoin=
-this.wireframe_linecap="round";this.vertex_colors=!1;this.skinning=!1;if(a){if(a.color!==undefined)this.color=new THREE.Color(a.color);if(a.ambient!==undefined)this.ambient=new THREE.Color(a.ambient);if(a.specular!==undefined)this.specular=new THREE.Color(a.specular);if(a.shininess!==undefined)this.shininess=a.shininess;if(a.opacity!==undefined)this.opacity=a.opacity;if(a.light_map!==undefined)this.light_map=a.light_map;if(a.map!==undefined)this.map=a.map;if(a.env_map!==undefined)this.env_map=a.env_map;
-if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refraction_ratio!==undefined)this.refraction_ratio=a.refraction_ratio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==undefined)this.wireframe_linewidth=a.wireframe_linewidth;
-if(a.wireframe_linecap!==undefined)this.wireframe_linecap=a.wireframe_linecap;if(a.wireframe_linejoin!==undefined)this.wireframe_linejoin=a.wireframe_linejoin;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors;if(a.skinning!==undefined)this.skinning=a.skinning}};
-THREE.MeshDepthMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.opacity=1;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;if(a){if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==
-undefined)this.wireframe_linewidth=a.wireframe_linewidth}};
-THREE.MeshNormalMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.opacity=1;this.shading=THREE.FlatShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;if(a){if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==
-undefined)this.wireframe_linewidth=a.wireframe_linewidth}};THREE.MeshFaceMaterial=function(){};
-THREE.ParticleBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.map=null;this.size=1;this.blending=THREE.NormalBlending;this.depth_test=!0;this.offset=new THREE.Vector2;this.vertex_colors=!1;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.size!==undefined)this.size=a.size;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==
-undefined)this.depth_test=a.depth_test;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors}};THREE.ParticleCircleMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.blending=THREE.NormalBlending;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.blending!==undefined)this.blending=a.blending}};
-THREE.Texture=function(a,b,c,d,e,f){this.image=a;this.mapping=b!==undefined?b:new THREE.UVMapping;this.wrap_s=c!==undefined?c:THREE.ClampToEdgeWrapping;this.wrap_t=d!==undefined?d:THREE.ClampToEdgeWrapping;this.mag_filter=e!==undefined?e:THREE.LinearFilter;this.min_filter=f!==undefined?f:THREE.LinearMipMapLinearFilter;this.needsUpdate=!1};THREE.Texture.prototype={clone:function(){return new THREE.Texture(this.image,this.mapping,this.wrap_s,this.wrap_t,this.mag_filter,this.min_filter)}};
+THREE.LineBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.blending=THREE.NormalBlending;this.depthTest=!0;this.linewidth=1;this.linejoin=this.linecap="round";this.vertexColors=!1;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.linewidth!==undefined)this.linewidth=
+a.linewidth;if(a.linecap!==undefined)this.linecap=a.linecap;if(a.linejoin!==undefined)this.linejoin=a.linejoin;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors}};
+THREE.MeshBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.envMap=this.lightMap=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexColors=!1;this.skinning=!1;if(a){a.color!==undefined&&
+this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.lightMap!==undefined)this.lightMap=a.lightMap;if(a.envMap!==undefined)this.envMap=a.envMap;if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refractionRatio!==undefined)this.refractionRatio=a.refractionRatio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=
+a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==undefined)this.wireframeLinewidth=a.wireframeLinewidth;if(a.wireframeLinecap!==undefined)this.wireframeLinecap=a.wireframeLinecap;if(a.wireframeLinejoin!==undefined)this.wireframeLinejoin=a.wireframeLinejoin;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors;if(a.skinning!==undefined)this.skinning=a.skinning}};
+THREE.MeshLambertMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.envMap=this.lightMap=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexColors=!1;this.skinning=!1;if(a){a.color!==undefined&&
+this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.lightMap!==undefined)this.lightMap=a.lightMap;if(a.envMap!==undefined)this.envMap=a.envMap;if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refractionRatio!==undefined)this.refractionRatio=a.refractionRatio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=
+a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==undefined)this.wireframeLinewidth=a.wireframeLinewidth;if(a.wireframeLinecap!==undefined)this.wireframeLinecap=a.wireframeLinecap;if(a.wireframeLinejoin!==undefined)this.wireframeLinejoin=a.wireframeLinejoin;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors;if(a.skinning!==undefined)this.skinning=a.skinning}};
+THREE.MeshPhongMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.ambient=new THREE.Color(328965);this.specular=new THREE.Color(1118481);this.shininess=30;this.opacity=1;this.envMap=this.lightMap=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=
+this.wireframeLinecap="round";this.vertexColors=!1;this.skinning=!1;if(a){if(a.color!==undefined)this.color=new THREE.Color(a.color);if(a.ambient!==undefined)this.ambient=new THREE.Color(a.ambient);if(a.specular!==undefined)this.specular=new THREE.Color(a.specular);if(a.shininess!==undefined)this.shininess=a.shininess;if(a.opacity!==undefined)this.opacity=a.opacity;if(a.lightMap!==undefined)this.lightMap=a.lightMap;if(a.map!==undefined)this.map=a.map;if(a.envMap!==undefined)this.envMap=a.envMap;if(a.combine!==
+undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refractionRatio!==undefined)this.refractionRatio=a.refractionRatio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==undefined)this.wireframeLinewidth=a.wireframeLinewidth;if(a.wireframeLinecap!==
+undefined)this.wireframeLinecap=a.wireframeLinecap;if(a.wireframeLinejoin!==undefined)this.wireframeLinejoin=a.wireframeLinejoin;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors;if(a.skinning!==undefined)this.skinning=a.skinning}};
+THREE.MeshDepthMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.opacity=1;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;if(a){if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==
+undefined)this.wireframeLinewidth=a.wireframeLinewidth}};
+THREE.MeshNormalMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.opacity=1;this.shading=THREE.FlatShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;if(a){if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==
+undefined)this.wireframeLinewidth=a.wireframeLinewidth}};THREE.MeshFaceMaterial=function(){};
+THREE.ParticleBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.map=null;this.size=1;this.blending=THREE.NormalBlending;this.depthTest=!0;this.offset=new THREE.Vector2;this.vertexColors=!1;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.size!==undefined)this.size=a.size;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==
+undefined)this.depthTest=a.depthTest;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors}};THREE.ParticleCircleMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.blending=THREE.NormalBlending;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.blending!==undefined)this.blending=a.blending}};
+THREE.Texture=function(a,b,c,d,e,f){this.image=a;this.mapping=b!==undefined?b:new THREE.UVMapping;this.wrapS=c!==undefined?c:THREE.ClampToEdgeWrapping;this.wrapT=d!==undefined?d:THREE.ClampToEdgeWrapping;this.magFilter=e!==undefined?e:THREE.LinearFilter;this.minFilter=f!==undefined?f:THREE.LinearMipMapLinearFilter;this.needsUpdate=!1};THREE.Texture.prototype={clone:function(){return new THREE.Texture(this.image,this.mapping,this.wrapS,this.wrapT,this.magFilter,this.minFilter)}};
 THREE.MultiplyOperation=0;THREE.MixOperation=1;THREE.RepeatWrapping=0;THREE.ClampToEdgeWrapping=1;THREE.MirroredRepeatWrapping=2;THREE.NearestFilter=3;THREE.NearestMipMapNearestFilter=4;THREE.NearestMipMapLinearFilter=5;THREE.LinearFilter=6;THREE.LinearMipMapNearestFilter=7;THREE.LinearMipMapLinearFilter=8;THREE.ByteType=9;THREE.UnsignedByteType=10;THREE.ShortType=11;THREE.UnsignedShortType=12;THREE.IntType=13;THREE.UnsignedIntType=14;THREE.FloatType=15;THREE.AlphaFormat=16;THREE.RGBFormat=17;
 THREE.RGBAFormat=18;THREE.LuminanceFormat=19;THREE.LuminanceAlphaFormat=20;THREE.Particle=function(a){THREE.Object3D.call(this);this.materials=a instanceof Array?a:[a];this.matrixAutoUpdate=!1};THREE.Particle.prototype=new THREE.Object3D;THREE.Particle.prototype.constructor=THREE.Particle;THREE.Line=function(a,b,c){THREE.Object3D.call(this);this.geometry=a;this.materials=b instanceof Array?b:[b];this.type=c!=undefined?c:THREE.LineStrip};THREE.LineStrip=0;THREE.LinePieces=1;THREE.Line.prototype=new THREE.Object3D;
 THREE.Line.prototype.constructor=THREE.Line;THREE.Mesh=function(a,b){THREE.Object3D.call(this);this.geometry=a;this.materials=b&&b.length?b:[b];this.flipSided=!1;this.doubleSided=!1;this.overdraw=!1;if(this.geometry){this.geometry.boundingSphere||this.geometry.computeBoundingSphere();this.boundRadius=a.boundingSphere.radius}};THREE.Mesh.prototype=new THREE.Object3D;THREE.Mesh.prototype.constructor=THREE.Mesh;THREE.Mesh.prototype.supr=THREE.Object3D.prototype;
@@ -127,13 +127,13 @@ v[n];p=z.color;if(z instanceof THREE.AmbientLight){aa.r+=p.r;aa.g+=p.g;aa.b+=p.b
 M=z.dot(R)*X;if(M>0){p.r+=W.r*M;p.g+=W.g*M;p.b+=W.b*M}}}}function Na(n,G,z){if(z.opacity!=0){a(z.opacity);b(z.blending);var p,v,M,W,X,Z;if(z instanceof THREE.ParticleBasicMaterial){if(z.map){W=z.map.image;X=W.width>>1;Z=W.height>>1;v=G.scale.x*j;M=G.scale.y*g;z=v*X;p=M*Z;H.set(n.x-z,n.y-p,n.x+z,n.y+p);if($.instersects(H)){i.save();i.translate(n.x,n.y);i.rotate(-G.rotation);i.scale(v,-M);i.translate(-X,-Z);i.drawImage(W,0,0);i.restore()}}}else if(z instanceof THREE.ParticleCircleMaterial){if(U){Q.r=
 aa.r+na.r+oa.r;Q.g=aa.g+na.g+oa.g;Q.b=aa.b+na.b+oa.b;u.r=z.color.r*Q.r;u.g=z.color.g*Q.g;u.b=z.color.b*Q.b;u.updateStyleString()}else u.__styleString=z.color.__styleString;z=G.scale.x*j;p=G.scale.y*g;H.set(n.x-z,n.y-p,n.x+z,n.y+p);if($.instersects(H)){v=u.__styleString;if(t!=v)i.fillStyle=t=v;i.save();i.translate(n.x,n.y);i.rotate(-G.rotation);i.scale(z,p);i.beginPath();i.arc(0,0,1,0,La,!0);i.closePath();i.fill();i.restore()}}}}function Oa(n,G,z,p){if(p.opacity!=0){a(p.opacity);b(p.blending);i.beginPath();
 i.moveTo(n.positionScreen.x,n.positionScreen.y);i.lineTo(G.positionScreen.x,G.positionScreen.y);i.closePath();if(p instanceof THREE.LineBasicMaterial){u.__styleString=p.color.__styleString;n=p.linewidth;if(r!=n)i.lineWidth=r=n;n=u.__styleString;if(s!=n)i.strokeStyle=s=n;i.stroke();H.inflate(p.linewidth*2)}}}function Ha(n,G,z,p,v,M){if(v.opacity!=0){a(v.opacity);b(v.blending);I=n.positionScreen.x;F=n.positionScreen.y;N=G.positionScreen.x;A=G.positionScreen.y;w=z.positionScreen.x;K=z.positionScreen.y;
-i.beginPath();i.moveTo(I,F);i.lineTo(N,A);i.lineTo(w,K);i.lineTo(I,F);i.closePath();if(v instanceof THREE.MeshBasicMaterial)if(v.map)v.map.mapping instanceof THREE.UVMapping&&ua(I,F,N,A,w,K,v.map.image,p.uvs[0].u,p.uvs[0].v,p.uvs[1].u,p.uvs[1].v,p.uvs[2].u,p.uvs[2].v);else if(v.env_map){if(v.env_map.mapping instanceof THREE.SphericalReflectionMapping){n=da.matrixWorld;R.copy(p.vertexNormalsWorld[0]);Y=(R.x*n.n11+R.y*n.n12+R.z*n.n13)*0.5+0.5;J=-(R.x*n.n21+R.y*n.n22+R.z*n.n23)*0.5+0.5;R.copy(p.vertexNormalsWorld[1]);
-ja=(R.x*n.n11+R.y*n.n12+R.z*n.n13)*0.5+0.5;ka=-(R.x*n.n21+R.y*n.n22+R.z*n.n23)*0.5+0.5;R.copy(p.vertexNormalsWorld[2]);la=(R.x*n.n11+R.y*n.n12+R.z*n.n13)*0.5+0.5;ma=-(R.x*n.n21+R.y*n.n22+R.z*n.n23)*0.5+0.5;ua(I,F,N,A,w,K,v.env_map.image,Y,J,ja,ka,la,ma)}}else v.wireframe?za(v.color.__styleString,v.wireframe_linewidth):Aa(v.color.__styleString);else if(v instanceof THREE.MeshLambertMaterial){if(v.map&&!v.wireframe){v.map.mapping instanceof THREE.UVMapping&&ua(I,F,N,A,w,K,v.map.image,p.uvs[0].u,p.uvs[0].v,
+i.beginPath();i.moveTo(I,F);i.lineTo(N,A);i.lineTo(w,K);i.lineTo(I,F);i.closePath();if(v instanceof THREE.MeshBasicMaterial)if(v.map)v.map.mapping instanceof THREE.UVMapping&&ua(I,F,N,A,w,K,v.map.image,p.uvs[0].u,p.uvs[0].v,p.uvs[1].u,p.uvs[1].v,p.uvs[2].u,p.uvs[2].v);else if(v.envMap){if(v.envMap.mapping instanceof THREE.SphericalReflectionMapping){n=da.matrixWorld;R.copy(p.vertexNormalsWorld[0]);Y=(R.x*n.n11+R.y*n.n12+R.z*n.n13)*0.5+0.5;J=-(R.x*n.n21+R.y*n.n22+R.z*n.n23)*0.5+0.5;R.copy(p.vertexNormalsWorld[1]);
+ja=(R.x*n.n11+R.y*n.n12+R.z*n.n13)*0.5+0.5;ka=-(R.x*n.n21+R.y*n.n22+R.z*n.n23)*0.5+0.5;R.copy(p.vertexNormalsWorld[2]);la=(R.x*n.n11+R.y*n.n12+R.z*n.n13)*0.5+0.5;ma=-(R.x*n.n21+R.y*n.n22+R.z*n.n23)*0.5+0.5;ua(I,F,N,A,w,K,v.envMap.image,Y,J,ja,ka,la,ma)}}else v.wireframe?za(v.color.__styleString,v.wireframeLinewidth):Aa(v.color.__styleString);else if(v instanceof THREE.MeshLambertMaterial){if(v.map&&!v.wireframe){v.map.mapping instanceof THREE.UVMapping&&ua(I,F,N,A,w,K,v.map.image,p.uvs[0].u,p.uvs[0].v,
 p.uvs[1].u,p.uvs[1].v,p.uvs[2].u,p.uvs[2].v);b(THREE.SubtractiveBlending)}if(U)if(!v.wireframe&&v.shading==THREE.SmoothShading&&p.vertexNormalsWorld.length==3){L.r=E.r=y.r=aa.r;L.g=E.g=y.g=aa.g;L.b=E.b=y.b=aa.b;ya(M,p.v1.positionWorld,p.vertexNormalsWorld[0],L);ya(M,p.v2.positionWorld,p.vertexNormalsWorld[1],E);ya(M,p.v3.positionWorld,p.vertexNormalsWorld[2],y);B.r=(E.r+y.r)*0.5;B.g=(E.g+y.g)*0.5;B.b=(E.b+y.b)*0.5;P=Ia(L,E,y,B);ua(I,F,N,A,w,K,P,0,0,1,0,0,1)}else{Q.r=aa.r;Q.g=aa.g;Q.b=aa.b;ya(M,p.centroidWorld,
-p.normalWorld,Q);u.r=v.color.r*Q.r;u.g=v.color.g*Q.g;u.b=v.color.b*Q.b;u.updateStyleString();v.wireframe?za(u.__styleString,v.wireframe_linewidth):Aa(u.__styleString)}else v.wireframe?za(v.color.__styleString,v.wireframe_linewidth):Aa(v.color.__styleString)}else if(v instanceof THREE.MeshDepthMaterial){T=da.near;x=da.far;L.r=L.g=L.b=1-Da(n.positionScreen.z,T,x);E.r=E.g=E.b=1-Da(G.positionScreen.z,T,x);y.r=y.g=y.b=1-Da(z.positionScreen.z,T,x);B.r=(E.r+y.r)*0.5;B.g=(E.g+y.g)*0.5;B.b=(E.b+y.b)*0.5;P=
-Ia(L,E,y,B);ua(I,F,N,A,w,K,P,0,0,1,0,0,1)}else if(v instanceof THREE.MeshNormalMaterial){u.r=Ea(p.normalWorld.x);u.g=Ea(p.normalWorld.y);u.b=Ea(p.normalWorld.z);u.updateStyleString();v.wireframe?za(u.__styleString,v.wireframe_linewidth):Aa(u.__styleString)}}}function za(n,G){if(s!=n)i.strokeStyle=s=n;if(r!=G)i.lineWidth=r=G;i.stroke();H.inflate(G*2)}function Aa(n){if(t!=n)i.fillStyle=t=n;i.fill()}function ua(n,G,z,p,v,M,W,X,Z,ga,ca,ha,va){var ea,ia;ea=W.width-1;ia=W.height-1;X*=ea;Z*=ia;ga*=ea;ca*=
-ia;ha*=ea;va*=ia;z-=n;p-=G;v-=n;M-=G;ga-=X;ca-=Z;ha-=X;va-=Z;ea=ga*va-ha*ca;if(ea!=0){ia=1/ea;ea=(va*z-ca*v)*ia;ca=(va*p-ca*M)*ia;z=(ga*v-ha*z)*ia;p=(ga*M-ha*p)*ia;n=n-ea*X-z*Z;G=G-ca*X-p*Z;i.save();i.transform(ea,ca,z,p,n,G);i.clip();i.drawImage(W,0,0);i.restore()}}function Ia(n,G,z,p){var v=~~(n.r*255),M=~~(n.g*255);n=~~(n.b*255);var W=~~(G.r*255),X=~~(G.g*255);G=~~(G.b*255);var Z=~~(z.r*255),ga=~~(z.g*255);z=~~(z.b*255);var ca=~~(p.r*255),ha=~~(p.g*255);p=~~(p.b*255);ba[0]=v<0?0:v>255?255:v;ba[1]=
-M<0?0:M>255?255:M;ba[2]=n<0?0:n>255?255:n;ba[4]=W<0?0:W>255?255:W;ba[5]=X<0?0:X>255?255:X;ba[6]=G<0?0:G>255?255:G;ba[8]=Z<0?0:Z>255?255:Z;ba[9]=ga<0?0:ga>255?255:ga;ba[10]=z<0?0:z>255?255:z;ba[12]=ca<0?0:ca>255?255:ca;ba[13]=ha<0?0:ha>255?255:ha;ba[14]=p<0?0:p>255?255:p;sa.putImageData(Ca,0,0);xa.drawImage(ra,0,0);return ta}function Da(n,G,z){n=(n-G)/(z-G);return n*n*(3-2*n)}function Ea(n){n=(n+1)*0.5;return n<0?0:n>1?1:n}function Fa(n,G){var z=G.x-n.x,p=G.y-n.y,v=1/Math.sqrt(z*z+p*p);z*=v;p*=v;G.x+=
+p.normalWorld,Q);u.r=v.color.r*Q.r;u.g=v.color.g*Q.g;u.b=v.color.b*Q.b;u.updateStyleString();v.wireframe?za(u.__styleString,v.wireframeLinewidth):Aa(u.__styleString)}else v.wireframe?za(v.color.__styleString,v.wireframeLinewidth):Aa(v.color.__styleString)}else if(v instanceof THREE.MeshDepthMaterial){T=da.near;x=da.far;L.r=L.g=L.b=1-Da(n.positionScreen.z,T,x);E.r=E.g=E.b=1-Da(G.positionScreen.z,T,x);y.r=y.g=y.b=1-Da(z.positionScreen.z,T,x);B.r=(E.r+y.r)*0.5;B.g=(E.g+y.g)*0.5;B.b=(E.b+y.b)*0.5;P=Ia(L,
+E,y,B);ua(I,F,N,A,w,K,P,0,0,1,0,0,1)}else if(v instanceof THREE.MeshNormalMaterial){u.r=Ea(p.normalWorld.x);u.g=Ea(p.normalWorld.y);u.b=Ea(p.normalWorld.z);u.updateStyleString();v.wireframe?za(u.__styleString,v.wireframeLinewidth):Aa(u.__styleString)}}}function za(n,G){if(s!=n)i.strokeStyle=s=n;if(r!=G)i.lineWidth=r=G;i.stroke();H.inflate(G*2)}function Aa(n){if(t!=n)i.fillStyle=t=n;i.fill()}function ua(n,G,z,p,v,M,W,X,Z,ga,ca,ha,va){var ea,ia;ea=W.width-1;ia=W.height-1;X*=ea;Z*=ia;ga*=ea;ca*=ia;ha*=
+ea;va*=ia;z-=n;p-=G;v-=n;M-=G;ga-=X;ca-=Z;ha-=X;va-=Z;ea=ga*va-ha*ca;if(ea!=0){ia=1/ea;ea=(va*z-ca*v)*ia;ca=(va*p-ca*M)*ia;z=(ga*v-ha*z)*ia;p=(ga*M-ha*p)*ia;n=n-ea*X-z*Z;G=G-ca*X-p*Z;i.save();i.transform(ea,ca,z,p,n,G);i.clip();i.drawImage(W,0,0);i.restore()}}function Ia(n,G,z,p){var v=~~(n.r*255),M=~~(n.g*255);n=~~(n.b*255);var W=~~(G.r*255),X=~~(G.g*255);G=~~(G.b*255);var Z=~~(z.r*255),ga=~~(z.g*255);z=~~(z.b*255);var ca=~~(p.r*255),ha=~~(p.g*255);p=~~(p.b*255);ba[0]=v<0?0:v>255?255:v;ba[1]=M<0?
+0:M>255?255:M;ba[2]=n<0?0:n>255?255:n;ba[4]=W<0?0:W>255?255:W;ba[5]=X<0?0:X>255?255:X;ba[6]=G<0?0:G>255?255:G;ba[8]=Z<0?0:Z>255?255:Z;ba[9]=ga<0?0:ga>255?255:ga;ba[10]=z<0?0:z>255?255:z;ba[12]=ca<0?0:ca>255?255:ca;ba[13]=ha<0?0:ha>255?255:ha;ba[14]=p<0?0:p>255?255:p;sa.putImageData(Ca,0,0);xa.drawImage(ra,0,0);return ta}function Da(n,G,z){n=(n-G)/(z-G);return n*n*(3-2*n)}function Ea(n){n=(n+1)*0.5;return n<0?0:n>1?1:n}function Fa(n,G){var z=G.x-n.x,p=G.y-n.y,v=1/Math.sqrt(z*z+p*p);z*=v;p*=v;G.x+=
 z;G.y+=p;n.x-=z;n.y-=p}var Ba,Ja,S,fa,qa,Ga,Ka,wa;this.autoClear?this.clear():i.setTransform(1,0,0,-1,j,g);c=d.projectScene(V,da,this.sortElements);(U=V.lights.length>0)&&Ma(V);Ba=0;for(Ja=c.length;Ba<Ja;Ba++){S=c[Ba];H.empty();if(S instanceof THREE.RenderableParticle){k=S;k.x*=j;k.y*=g;fa=0;for(qa=S.materials.length;fa<qa;fa++)Na(k,S,S.materials[fa],V)}else if(S instanceof THREE.RenderableLine){k=S.v1;D=S.v2;k.positionScreen.x*=j;k.positionScreen.y*=g;D.positionScreen.x*=j;D.positionScreen.y*=g;
 H.addPoint(k.positionScreen.x,k.positionScreen.y);H.addPoint(D.positionScreen.x,D.positionScreen.y);if($.instersects(H)){fa=0;for(qa=S.materials.length;fa<qa;)Oa(k,D,S,S.materials[fa++],V)}}else if(S instanceof THREE.RenderableFace3){k=S.v1;D=S.v2;C=S.v3;k.positionScreen.x*=j;k.positionScreen.y*=g;D.positionScreen.x*=j;D.positionScreen.y*=g;C.positionScreen.x*=j;C.positionScreen.y*=g;if(S.overdraw){Fa(k.positionScreen,D.positionScreen);Fa(D.positionScreen,C.positionScreen);Fa(C.positionScreen,k.positionScreen)}H.add3Points(k.positionScreen.x,
 k.positionScreen.y,D.positionScreen.x,D.positionScreen.y,C.positionScreen.x,C.positionScreen.y);if($.instersects(H)){fa=0;for(qa=S.meshMaterials.length;fa<qa;){wa=S.meshMaterials[fa++];if(wa instanceof THREE.MeshFaceMaterial){Ga=0;for(Ka=S.faceMaterials.length;Ga<Ka;)(wa=S.faceMaterials[Ga++])&&Ha(k,D,C,S,wa,V)}else Ha(k,D,C,S,wa,V)}}}O.addRectangle(H)}i.setTransform(1,0,0,1,0,0)}};

+ 1 - 1
build/custom/ThreeDOM.js

@@ -48,7 +48,7 @@ b,c){if(this.visible){this.matrixAutoUpdate&&(b|=this.updateMatrix());if(b||this
 THREE.Quaternion.prototype={set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this},setFromEuler:function(a){var b=0.5*Math.PI/360,c=a.x*b,d=a.y*b,e=a.z*b;a=Math.cos(d);d=Math.sin(d);b=Math.cos(-e);e=Math.sin(-e);var f=Math.cos(c);c=Math.sin(c);var g=a*b,i=d*e;this.w=g*f-i*c;this.x=g*c+i*f;this.y=d*b*f+a*e*c;this.z=a*e*f-d*b*c;return this},calculateW:function(){this.w=-Math.sqrt(Math.abs(1-this.x*this.x-this.y*this.y-this.z*this.z));return this},inverse:function(){this.x*=-1;this.y*=
 -1;this.z*=-1;return this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);if(a==0)this.w=this.z=this.y=this.x=0;else{a=1/a;this.x*=a;this.y*=a;this.z*=a;this.w*=a}return this},multiplySelf:function(a){var b=this.x,c=this.y,d=this.z,e=this.w,f=a.x,g=a.y,i=a.z;a=a.w;this.x=b*a+e*f+c*i-d*g;this.y=c*a+e*g+d*f-b*i;this.z=d*a+e*i+b*g-c*f;this.w=e*a-b*f-c*g-d*i;return this},
 multiplyVector3:function(a,b){b||(b=a);var c=a.x,d=a.y,e=a.z,f=this.x,g=this.y,i=this.z,h=this.w,j=h*c+g*e-i*d,l=h*d+i*c-f*e,m=h*e+f*d-g*c;c=-f*c-g*d-i*e;b.x=j*h+c*-f+l*-i-m*-g;b.y=l*h+c*-g+m*-f-j*-i;b.z=m*h+c*-i+j*-g-l*-f;return b}};
-THREE.Quaternion.slerp=function(a,b,c,d){var e=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(e)>=1){c.w=a.w;c.x=a.x;c.y=a.y;c.z=a.z;return c}var f=Math.acos(e),g=Math.sqrt(1-e*e);if(Math.abs(g)<0.001){c.w=0.5*(a.w+b.w);c.x=0.5*(a.x+b.x);c.y=0.5*(a.y+b.y);c.z=0.5*(a.z+b.z);return c}e=Math.sin((1-d)*f)/g;d=Math.sin(d*f)/g;c.w=a.w*e+b.w*d;c.x=a.x*e+b.x*d;c.y=a.y*e+b.y*d;c.z=a.z*e+b.z*d;return c};
+THREE.Quaternion.slerp=function(a,b,c,d){var e=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(e)>=1){c.w=a.w;c.x=a.x;c.y=a.y;c.z=a.z;return c}var f=Math.acos(e),g=Math.sqrt(1-e*e);if(Math.abs(g)<0.0010){c.w=0.5*(a.w+b.w);c.x=0.5*(a.x+b.x);c.y=0.5*(a.y+b.y);c.z=0.5*(a.z+b.z);return c}e=Math.sin((1-d)*f)/g;d=Math.sin(d*f)/g;c.w=a.w*e+b.w*d;c.x=a.x*e+b.x*d;c.y=a.y*e+b.y*d;c.z=a.z*e+b.z*d;return c};
 THREE.Vertex=function(a,b){this.position=a||new THREE.Vector3;this.positionWorld=new THREE.Vector3;this.positionScreen=new THREE.Vector4;this.normal=b||new THREE.Vector3;this.normalWorld=new THREE.Vector3;this.normalScreen=new THREE.Vector3;this.tangent=new THREE.Vector4;this.__visible=!0};
 THREE.Face3=function(a,b,c,d,e){this.a=a;this.b=b;this.c=c;this.centroid=new THREE.Vector3;this.normal=d instanceof THREE.Vector3?d:new THREE.Vector3;this.vertexNormals=d instanceof Array?d:[];this.materials=e instanceof Array?e:[e]};THREE.Face4=function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.d=d;this.centroid=new THREE.Vector3;this.normal=e instanceof THREE.Vector3?e:new THREE.Vector3;this.vertexNormals=e instanceof Array?e:[];this.materials=f instanceof Array?f:[f]};
 THREE.UV=function(a,b){this.set(a||0,b||0)};THREE.UV.prototype={set:function(a,b){this.u=a;this.v=b;return this},copy:function(a){this.set(a.u,a.v);return this}};

文件差异内容过多而无法显示
+ 9 - 9
build/custom/ThreeExtras.js


+ 21 - 21
build/custom/ThreeSVG.js

@@ -48,7 +48,7 @@ b,c){if(this.visible){this.matrixAutoUpdate&&(b|=this.updateMatrix());if(b||this
 THREE.Quaternion.prototype={set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this},setFromEuler:function(a){var b=0.5*Math.PI/360,c=a.x*b,d=a.y*b,e=a.z*b;a=Math.cos(d);d=Math.sin(d);b=Math.cos(-e);e=Math.sin(-e);var f=Math.cos(c);c=Math.sin(c);var g=a*b,i=d*e;this.w=g*f-i*c;this.x=g*c+i*f;this.y=d*b*f+a*e*c;this.z=a*e*f-d*b*c;return this},calculateW:function(){this.w=-Math.sqrt(Math.abs(1-this.x*this.x-this.y*this.y-this.z*this.z));return this},inverse:function(){this.x*=-1;this.y*=
 -1;this.z*=-1;return this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);if(a==0)this.w=this.z=this.y=this.x=0;else{a=1/a;this.x*=a;this.y*=a;this.z*=a;this.w*=a}return this},multiplySelf:function(a){var b=this.x,c=this.y,d=this.z,e=this.w,f=a.x,g=a.y,i=a.z;a=a.w;this.x=b*a+e*f+c*i-d*g;this.y=c*a+e*g+d*f-b*i;this.z=d*a+e*i+b*g-c*f;this.w=e*a-b*f-c*g-d*i;return this},
 multiplyVector3:function(a,b){b||(b=a);var c=a.x,d=a.y,e=a.z,f=this.x,g=this.y,i=this.z,h=this.w,j=h*c+g*e-i*d,n=h*d+i*c-f*e,m=h*e+f*d-g*c;c=-f*c-g*d-i*e;b.x=j*h+c*-f+n*-i-m*-g;b.y=n*h+c*-g+m*-f-j*-i;b.z=m*h+c*-i+j*-g-n*-f;return b}};
-THREE.Quaternion.slerp=function(a,b,c,d){var e=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(e)>=1){c.w=a.w;c.x=a.x;c.y=a.y;c.z=a.z;return c}var f=Math.acos(e),g=Math.sqrt(1-e*e);if(Math.abs(g)<0.001){c.w=0.5*(a.w+b.w);c.x=0.5*(a.x+b.x);c.y=0.5*(a.y+b.y);c.z=0.5*(a.z+b.z);return c}e=Math.sin((1-d)*f)/g;d=Math.sin(d*f)/g;c.w=a.w*e+b.w*d;c.x=a.x*e+b.x*d;c.y=a.y*e+b.y*d;c.z=a.z*e+b.z*d;return c};
+THREE.Quaternion.slerp=function(a,b,c,d){var e=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(e)>=1){c.w=a.w;c.x=a.x;c.y=a.y;c.z=a.z;return c}var f=Math.acos(e),g=Math.sqrt(1-e*e);if(Math.abs(g)<0.0010){c.w=0.5*(a.w+b.w);c.x=0.5*(a.x+b.x);c.y=0.5*(a.y+b.y);c.z=0.5*(a.z+b.z);return c}e=Math.sin((1-d)*f)/g;d=Math.sin(d*f)/g;c.w=a.w*e+b.w*d;c.x=a.x*e+b.x*d;c.y=a.y*e+b.y*d;c.z=a.z*e+b.z*d;return c};
 THREE.Vertex=function(a,b){this.position=a||new THREE.Vector3;this.positionWorld=new THREE.Vector3;this.positionScreen=new THREE.Vector4;this.normal=b||new THREE.Vector3;this.normalWorld=new THREE.Vector3;this.normalScreen=new THREE.Vector3;this.tangent=new THREE.Vector4;this.__visible=!0};
 THREE.Face3=function(a,b,c,d,e){this.a=a;this.b=b;this.c=c;this.centroid=new THREE.Vector3;this.normal=d instanceof THREE.Vector3?d:new THREE.Vector3;this.vertexNormals=d instanceof Array?d:[];this.materials=e instanceof Array?e:[e]};THREE.Face4=function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.d=d;this.centroid=new THREE.Vector3;this.normal=e instanceof THREE.Vector3?e:new THREE.Vector3;this.vertexNormals=e instanceof Array?e:[];this.materials=f instanceof Array?f:[f]};
 THREE.UV=function(a,b){this.set(a||0,b||0)};THREE.UV.prototype={set:function(a,b){this.u=a;this.v=b;return this},copy:function(a){this.set(a.u,a.v);return this}};THREE.Geometry=function(){this.id="Geometry"+THREE.GeometryIdCounter++;this.vertices=[];this.faces=[];this.uvs=[];this.uvs2=[];this.colors=[];this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.geometryChunks={};this.hasTangents=!1};
@@ -72,24 +72,24 @@ THREE.Camera.prototype.frustumContains=function(a){var b=a.matrixWorld.n14,c=a.m
 if(b+f<-this.screenCenterY)return!1;if(b-f>this.screenCenterY)return!1;a.positionScreen.set(n,b,g,f);return!0};THREE.Light=function(a){THREE.Object3D.call(this);this.color=new THREE.Color(a)};THREE.Light.prototype=new THREE.Object3D;THREE.Light.prototype.constructor=THREE.Light;THREE.Light.prototype.supr=THREE.Object3D.prototype;THREE.AmbientLight=function(a){THREE.Light.call(this,a)};THREE.AmbientLight.prototype=new THREE.Light;THREE.AmbientLight.prototype.constructor=THREE.AmbientLight;
 THREE.DirectionalLight=function(a,b){THREE.Light.call(this,a);this.position=new THREE.Vector3(0,1,0);this.intensity=b||1};THREE.DirectionalLight.prototype=new THREE.Light;THREE.DirectionalLight.prototype.constructor=THREE.DirectionalLight;THREE.PointLight=function(a,b){THREE.Light.call(this,a);this.position=new THREE.Vector3;this.intensity=b||1};THREE.PointLight.prototype=new THREE.Light;THREE.PointLight.prototype.constructor=THREE.PointLight;THREE.FlatShading=0;THREE.SmoothShading=1;
 THREE.NormalBlending=0;THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;THREE.BillboardBlending=3;THREE.ReverseSubtractiveBlending=4;THREE.MaterialCounter={value:0};
-THREE.LineBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.blending=THREE.NormalBlending;this.depth_test=!0;this.linewidth=1;this.linejoin=this.linecap="round";this.vertex_colors=!1;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.linewidth!==undefined)this.linewidth=
-a.linewidth;if(a.linecap!==undefined)this.linecap=a.linecap;if(a.linejoin!==undefined)this.linejoin=a.linejoin;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors}};
-THREE.MeshBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.env_map=this.light_map=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refraction_ratio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;this.wireframe_linejoin=this.wireframe_linecap="round";this.vertex_colors=!1;this.skinning=!1;if(a){a.color!==
-undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.light_map!==undefined)this.light_map=a.light_map;if(a.env_map!==undefined)this.env_map=a.env_map;if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refraction_ratio!==undefined)this.refraction_ratio=a.refraction_ratio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==
-undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==undefined)this.wireframe_linewidth=a.wireframe_linewidth;if(a.wireframe_linecap!==undefined)this.wireframe_linecap=a.wireframe_linecap;if(a.wireframe_linejoin!==undefined)this.wireframe_linejoin=a.wireframe_linejoin;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors;if(a.skinning!==undefined)this.skinning=a.skinning}};
-THREE.MeshLambertMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.env_map=this.light_map=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refraction_ratio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;this.wireframe_linejoin=this.wireframe_linecap="round";this.vertex_colors=!1;this.skinning=!1;if(a){a.color!==
-undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.light_map!==undefined)this.light_map=a.light_map;if(a.env_map!==undefined)this.env_map=a.env_map;if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refraction_ratio!==undefined)this.refraction_ratio=a.refraction_ratio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==
-undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==undefined)this.wireframe_linewidth=a.wireframe_linewidth;if(a.wireframe_linecap!==undefined)this.wireframe_linecap=a.wireframe_linecap;if(a.wireframe_linejoin!==undefined)this.wireframe_linejoin=a.wireframe_linejoin;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors;if(a.skinning!==undefined)this.skinning=a.skinning}};
-THREE.MeshPhongMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.ambient=new THREE.Color(328965);this.specular=new THREE.Color(1118481);this.shininess=30;this.opacity=1;this.env_map=this.light_map=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refraction_ratio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;this.wireframe_linejoin=
-this.wireframe_linecap="round";this.vertex_colors=!1;this.skinning=!1;if(a){if(a.color!==undefined)this.color=new THREE.Color(a.color);if(a.ambient!==undefined)this.ambient=new THREE.Color(a.ambient);if(a.specular!==undefined)this.specular=new THREE.Color(a.specular);if(a.shininess!==undefined)this.shininess=a.shininess;if(a.opacity!==undefined)this.opacity=a.opacity;if(a.light_map!==undefined)this.light_map=a.light_map;if(a.map!==undefined)this.map=a.map;if(a.env_map!==undefined)this.env_map=a.env_map;
-if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refraction_ratio!==undefined)this.refraction_ratio=a.refraction_ratio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==undefined)this.wireframe_linewidth=a.wireframe_linewidth;
-if(a.wireframe_linecap!==undefined)this.wireframe_linecap=a.wireframe_linecap;if(a.wireframe_linejoin!==undefined)this.wireframe_linejoin=a.wireframe_linejoin;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors;if(a.skinning!==undefined)this.skinning=a.skinning}};
-THREE.MeshDepthMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.opacity=1;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;if(a){if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==
-undefined)this.wireframe_linewidth=a.wireframe_linewidth}};
-THREE.MeshNormalMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.opacity=1;this.shading=THREE.FlatShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;if(a){if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==
-undefined)this.wireframe_linewidth=a.wireframe_linewidth}};THREE.MeshFaceMaterial=function(){};
-THREE.ParticleBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.map=null;this.size=1;this.blending=THREE.NormalBlending;this.depth_test=!0;this.offset=new THREE.Vector2;this.vertex_colors=!1;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.size!==undefined)this.size=a.size;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==
-undefined)this.depth_test=a.depth_test;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors}};THREE.ParticleCircleMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.blending=THREE.NormalBlending;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.blending!==undefined)this.blending=a.blending}};
+THREE.LineBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.blending=THREE.NormalBlending;this.depthTest=!0;this.linewidth=1;this.linejoin=this.linecap="round";this.vertexColors=!1;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.linewidth!==undefined)this.linewidth=
+a.linewidth;if(a.linecap!==undefined)this.linecap=a.linecap;if(a.linejoin!==undefined)this.linejoin=a.linejoin;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors}};
+THREE.MeshBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.envMap=this.lightMap=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexColors=!1;this.skinning=!1;if(a){a.color!==undefined&&
+this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.lightMap!==undefined)this.lightMap=a.lightMap;if(a.envMap!==undefined)this.envMap=a.envMap;if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refractionRatio!==undefined)this.refractionRatio=a.refractionRatio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=
+a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==undefined)this.wireframeLinewidth=a.wireframeLinewidth;if(a.wireframeLinecap!==undefined)this.wireframeLinecap=a.wireframeLinecap;if(a.wireframeLinejoin!==undefined)this.wireframeLinejoin=a.wireframeLinejoin;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors;if(a.skinning!==undefined)this.skinning=a.skinning}};
+THREE.MeshLambertMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.envMap=this.lightMap=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexColors=!1;this.skinning=!1;if(a){a.color!==undefined&&
+this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.lightMap!==undefined)this.lightMap=a.lightMap;if(a.envMap!==undefined)this.envMap=a.envMap;if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refractionRatio!==undefined)this.refractionRatio=a.refractionRatio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=
+a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==undefined)this.wireframeLinewidth=a.wireframeLinewidth;if(a.wireframeLinecap!==undefined)this.wireframeLinecap=a.wireframeLinecap;if(a.wireframeLinejoin!==undefined)this.wireframeLinejoin=a.wireframeLinejoin;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors;if(a.skinning!==undefined)this.skinning=a.skinning}};
+THREE.MeshPhongMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.ambient=new THREE.Color(328965);this.specular=new THREE.Color(1118481);this.shininess=30;this.opacity=1;this.envMap=this.lightMap=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=
+this.wireframeLinecap="round";this.vertexColors=!1;this.skinning=!1;if(a){if(a.color!==undefined)this.color=new THREE.Color(a.color);if(a.ambient!==undefined)this.ambient=new THREE.Color(a.ambient);if(a.specular!==undefined)this.specular=new THREE.Color(a.specular);if(a.shininess!==undefined)this.shininess=a.shininess;if(a.opacity!==undefined)this.opacity=a.opacity;if(a.lightMap!==undefined)this.lightMap=a.lightMap;if(a.map!==undefined)this.map=a.map;if(a.envMap!==undefined)this.envMap=a.envMap;if(a.combine!==
+undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refractionRatio!==undefined)this.refractionRatio=a.refractionRatio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==undefined)this.wireframeLinewidth=a.wireframeLinewidth;if(a.wireframeLinecap!==
+undefined)this.wireframeLinecap=a.wireframeLinecap;if(a.wireframeLinejoin!==undefined)this.wireframeLinejoin=a.wireframeLinejoin;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors;if(a.skinning!==undefined)this.skinning=a.skinning}};
+THREE.MeshDepthMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.opacity=1;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;if(a){if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==
+undefined)this.wireframeLinewidth=a.wireframeLinewidth}};
+THREE.MeshNormalMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.opacity=1;this.shading=THREE.FlatShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;if(a){if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==
+undefined)this.wireframeLinewidth=a.wireframeLinewidth}};THREE.MeshFaceMaterial=function(){};
+THREE.ParticleBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.map=null;this.size=1;this.blending=THREE.NormalBlending;this.depthTest=!0;this.offset=new THREE.Vector2;this.vertexColors=!1;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.size!==undefined)this.size=a.size;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==
+undefined)this.depthTest=a.depthTest;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors}};THREE.ParticleCircleMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.blending=THREE.NormalBlending;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.blending!==undefined)this.blending=a.blending}};
 THREE.Particle=function(a){THREE.Object3D.call(this);this.materials=a instanceof Array?a:[a];this.matrixAutoUpdate=!1};THREE.Particle.prototype=new THREE.Object3D;THREE.Particle.prototype.constructor=THREE.Particle;THREE.Line=function(a,b,c){THREE.Object3D.call(this);this.geometry=a;this.materials=b instanceof Array?b:[b];this.type=c!=undefined?c:THREE.LineStrip};THREE.LineStrip=0;THREE.LinePieces=1;THREE.Line.prototype=new THREE.Object3D;THREE.Line.prototype.constructor=THREE.Line;
 THREE.Mesh=function(a,b){THREE.Object3D.call(this);this.geometry=a;this.materials=b&&b.length?b:[b];this.flipSided=!1;this.doubleSided=!1;this.overdraw=!1;if(this.geometry){this.geometry.boundingSphere||this.geometry.computeBoundingSphere();this.boundRadius=a.boundingSphere.radius}};THREE.Mesh.prototype=new THREE.Object3D;THREE.Mesh.prototype.constructor=THREE.Mesh;THREE.Mesh.prototype.supr=THREE.Object3D.prototype;
 THREE.Bone=function(a){THREE.Object3D.call(this);this.skin=a;this.skinMatrix=new THREE.Matrix4;this.hasNoneBoneChildren=!1};THREE.Bone.prototype=new THREE.Object3D;THREE.Bone.prototype.constructor=THREE.Bone;THREE.Bone.prototype.supr=THREE.Object3D.prototype;
@@ -119,9 +119,9 @@ C.w);j=m[n]=m[n]||new THREE.RenderableLine;j.v1.positionScreen.copy(y);j.v2.posi
 Math.abs(l.y-(t.y+v.projectionMatrix.n22)/(t.w+v.projectionMatrix.n24));l.materials=A.materials;E.push(l);o++}}}}I&&E.sort(a);return E};this.unprojectVector=function(z,v){var I=THREE.Matrix4.makeInvert(v.matrixWorld);I.multiplySelf(THREE.Matrix4.makeInvert(v.projectionMatrix));I.multiplyVector3(z);return z}};
 THREE.SVGRenderer=function(){function a(F,A,O){var Q,B,w,M;Q=0;for(B=F.lights.length;Q<B;Q++){w=F.lights[Q];if(w instanceof THREE.DirectionalLight){M=A.normalWorld.dot(w.position)*w.intensity;if(M>0){O.r+=w.color.r*M;O.g+=w.color.g*M;O.b+=w.color.b*M}}else if(w instanceof THREE.PointLight){I.sub(w.position,A.centroidWorld);I.normalize();M=A.normalWorld.dot(I)*w.intensity;if(M>0){O.r+=w.color.r*M;O.g+=w.color.g*M;O.b+=w.color.b*M}}}}function b(F,A,O,Q,B,w){u=d(D++);u.setAttribute("d","M "+F.positionScreen.x+
 " "+F.positionScreen.y+" L "+A.positionScreen.x+" "+A.positionScreen.y+" L "+O.positionScreen.x+","+O.positionScreen.y+"z");if(B instanceof THREE.MeshBasicMaterial)p.__styleString=B.color.__styleString;else if(B instanceof THREE.MeshLambertMaterial)if(H){y.r=C.r;y.g=C.g;y.b=C.b;a(w,Q,y);p.r=B.color.r*y.r;p.g=B.color.g*y.g;p.b=B.color.b*y.b;p.updateStyleString()}else p.__styleString=B.color.__styleString;else if(B instanceof THREE.MeshDepthMaterial){v=1-B.__2near/(B.__farPlusNear-Q.z*B.__farMinusNear);
-p.setRGB(v,v,v)}else B instanceof THREE.MeshNormalMaterial&&p.setRGB(e(Q.normalWorld.x),e(Q.normalWorld.y),e(Q.normalWorld.z));B.wireframe?u.setAttribute("style","fill: none; stroke: "+p.__styleString+"; stroke-width: "+B.wireframe_linewidth+"; stroke-opacity: "+B.opacity+"; stroke-linecap: "+B.wireframe_linecap+"; stroke-linejoin: "+B.wireframe_linejoin):u.setAttribute("style","fill: "+p.__styleString+"; fill-opacity: "+B.opacity);i.appendChild(u)}function c(F,A,O,Q,B,w,M){u=d(D++);u.setAttribute("d",
+p.setRGB(v,v,v)}else B instanceof THREE.MeshNormalMaterial&&p.setRGB(e(Q.normalWorld.x),e(Q.normalWorld.y),e(Q.normalWorld.z));B.wireframe?u.setAttribute("style","fill: none; stroke: "+p.__styleString+"; stroke-width: "+B.wireframeLinewidth+"; stroke-opacity: "+B.opacity+"; stroke-linecap: "+B.wireframeLinecap+"; stroke-linejoin: "+B.wireframeLinejoin):u.setAttribute("style","fill: "+p.__styleString+"; fill-opacity: "+B.opacity);i.appendChild(u)}function c(F,A,O,Q,B,w,M){u=d(D++);u.setAttribute("d",
 "M "+F.positionScreen.x+" "+F.positionScreen.y+" L "+A.positionScreen.x+" "+A.positionScreen.y+" L "+O.positionScreen.x+","+O.positionScreen.y+" L "+Q.positionScreen.x+","+Q.positionScreen.y+"z");if(w instanceof THREE.MeshBasicMaterial)p.__styleString=w.color.__styleString;else if(w instanceof THREE.MeshLambertMaterial)if(H){y.r=C.r;y.g=C.g;y.b=C.b;a(M,B,y);p.r=w.color.r*y.r;p.g=w.color.g*y.g;p.b=w.color.b*y.b;p.updateStyleString()}else p.__styleString=w.color.__styleString;else if(w instanceof THREE.MeshDepthMaterial){v=
-1-w.__2near/(w.__farPlusNear-B.z*w.__farMinusNear);p.setRGB(v,v,v)}else w instanceof THREE.MeshNormalMaterial&&p.setRGB(e(B.normalWorld.x),e(B.normalWorld.y),e(B.normalWorld.z));w.wireframe?u.setAttribute("style","fill: none; stroke: "+p.__styleString+"; stroke-width: "+w.wireframe_linewidth+"; stroke-opacity: "+w.opacity+"; stroke-linecap: "+w.wireframe_linecap+"; stroke-linejoin: "+w.wireframe_linejoin):u.setAttribute("style","fill: "+p.__styleString+"; fill-opacity: "+w.opacity);i.appendChild(u)}
+1-w.__2near/(w.__farPlusNear-B.z*w.__farMinusNear);p.setRGB(v,v,v)}else w instanceof THREE.MeshNormalMaterial&&p.setRGB(e(B.normalWorld.x),e(B.normalWorld.y),e(B.normalWorld.z));w.wireframe?u.setAttribute("style","fill: none; stroke: "+p.__styleString+"; stroke-width: "+w.wireframeLinewidth+"; stroke-opacity: "+w.opacity+"; stroke-linecap: "+w.wireframeLinecap+"; stroke-linejoin: "+w.wireframeLinejoin):u.setAttribute("style","fill: "+p.__styleString+"; fill-opacity: "+w.opacity);i.appendChild(u)}
 function d(F){if(E[F]==null){E[F]=document.createElementNS("http://www.w3.org/2000/svg","path");N==0&&E[F].setAttribute("shape-rendering","crispEdges")}return E[F]}function e(F){return F<0?Math.min((1+F)*0.5,0.5):0.5+Math.min(F*0.5,0.5)}var f=null,g=new THREE.Projector,i=document.createElementNS("http://www.w3.org/2000/svg","svg"),h,j,n,m,l,o,q,s,t=new THREE.Rectangle,k=new THREE.Rectangle,H=!1,p=new THREE.Color(16777215),y=new THREE.Color(16777215),C=new THREE.Color(0),L=new THREE.Color(0),z=new THREE.Color(0),
 v,I=new THREE.Vector3,E=[],K=[],J=[],u,D,S,x,N=1;this.domElement=i;this.autoClear=!0;this.sortObjects=!0;this.sortElements=!0;this.setQuality=function(F){switch(F){case "high":N=1;break;case "low":N=0}};this.setSize=function(F,A){h=F;j=A;n=h/2;m=j/2;i.setAttribute("viewBox",-n+" "+-m+" "+h+" "+j);i.setAttribute("width",h);i.setAttribute("height",j);t.set(-n,-m,n,m)};this.clear=function(){for(;i.childNodes.length>0;)i.removeChild(i.childNodes[0])};this.render=function(F,A){var O,Q,B,w,M,P,r,G;this.autoClear&&
 this.clear();f=g.projectScene(F,A,this.sortElements);x=S=D=0;if(H=F.lights.length>0){r=F.lights;C.setRGB(0,0,0);L.setRGB(0,0,0);z.setRGB(0,0,0);O=0;for(Q=r.length;O<Q;O++){B=r[O];w=B.color;if(B instanceof THREE.AmbientLight){C.r+=w.r;C.g+=w.g;C.b+=w.b}else if(B instanceof THREE.DirectionalLight){L.r+=w.r;L.g+=w.g;L.b+=w.b}else if(B instanceof THREE.PointLight){z.r+=w.r;z.g+=w.g;z.b+=w.b}}}O=0;for(Q=f.length;O<Q;O++){r=f[O];k.empty();if(r instanceof THREE.RenderableParticle){l=r;l.x*=n;l.y*=-m;B=0;

+ 57 - 57
build/custom/ThreeWebGL.js

@@ -49,7 +49,7 @@ b,d){if(this.visible){this.matrixAutoUpdate&&(b|=this.updateMatrix());if(b||this
 THREE.Quaternion.prototype={set:function(a,b,d,e){this.x=a;this.y=b;this.z=d;this.w=e;return this},setFromEuler:function(a){var b=0.5*Math.PI/360,d=a.x*b,e=a.y*b,g=a.z*b;a=Math.cos(e);e=Math.sin(e);b=Math.cos(-g);g=Math.sin(-g);var i=Math.cos(d);d=Math.sin(d);var j=a*b,m=e*g;this.w=j*i-m*d;this.x=j*d+m*i;this.y=e*b*i+a*g*d;this.z=a*g*i-e*b*d;return this},calculateW:function(){this.w=-Math.sqrt(Math.abs(1-this.x*this.x-this.y*this.y-this.z*this.z));return this},inverse:function(){this.x*=-1;this.y*=
 -1;this.z*=-1;return this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);if(a==0)this.w=this.z=this.y=this.x=0;else{a=1/a;this.x*=a;this.y*=a;this.z*=a;this.w*=a}return this},multiplySelf:function(a){var b=this.x,d=this.y,e=this.z,g=this.w,i=a.x,j=a.y,m=a.z;a=a.w;this.x=b*a+g*i+d*m-e*j;this.y=d*a+g*j+e*i-b*m;this.z=e*a+g*m+b*j-d*i;this.w=g*a-b*i-d*j-e*m;return this},
 multiplyVector3:function(a,b){b||(b=a);var d=a.x,e=a.y,g=a.z,i=this.x,j=this.y,m=this.z,k=this.w,s=k*d+j*g-m*e,w=k*e+m*d-i*g,x=k*g+i*e-j*d;d=-i*d-j*e-m*g;b.x=s*k+d*-i+w*-m-x*-j;b.y=w*k+d*-j+x*-i-s*-m;b.z=x*k+d*-m+s*-j-w*-i;return b}};
-THREE.Quaternion.slerp=function(a,b,d,e){var g=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(g)>=1){d.w=a.w;d.x=a.x;d.y=a.y;d.z=a.z;return d}var i=Math.acos(g),j=Math.sqrt(1-g*g);if(Math.abs(j)<0.001){d.w=0.5*(a.w+b.w);d.x=0.5*(a.x+b.x);d.y=0.5*(a.y+b.y);d.z=0.5*(a.z+b.z);return d}g=Math.sin((1-e)*i)/j;e=Math.sin(e*i)/j;d.w=a.w*g+b.w*e;d.x=a.x*g+b.x*e;d.y=a.y*g+b.y*e;d.z=a.z*g+b.z*e;return d};
+THREE.Quaternion.slerp=function(a,b,d,e){var g=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(g)>=1){d.w=a.w;d.x=a.x;d.y=a.y;d.z=a.z;return d}var i=Math.acos(g),j=Math.sqrt(1-g*g);if(Math.abs(j)<0.0010){d.w=0.5*(a.w+b.w);d.x=0.5*(a.x+b.x);d.y=0.5*(a.y+b.y);d.z=0.5*(a.z+b.z);return d}g=Math.sin((1-e)*i)/j;e=Math.sin(e*i)/j;d.w=a.w*g+b.w*e;d.x=a.x*g+b.x*e;d.y=a.y*g+b.y*e;d.z=a.z*g+b.z*e;return d};
 THREE.Vertex=function(a,b){this.position=a||new THREE.Vector3;this.positionWorld=new THREE.Vector3;this.positionScreen=new THREE.Vector4;this.normal=b||new THREE.Vector3;this.normalWorld=new THREE.Vector3;this.normalScreen=new THREE.Vector3;this.tangent=new THREE.Vector4;this.__visible=!0};
 THREE.Face3=function(a,b,d,e,g){this.a=a;this.b=b;this.c=d;this.centroid=new THREE.Vector3;this.normal=e instanceof THREE.Vector3?e:new THREE.Vector3;this.vertexNormals=e instanceof Array?e:[];this.materials=g instanceof Array?g:[g]};THREE.Face4=function(a,b,d,e,g,i){this.a=a;this.b=b;this.c=d;this.d=e;this.centroid=new THREE.Vector3;this.normal=g instanceof THREE.Vector3?g:new THREE.Vector3;this.vertexNormals=g instanceof Array?g:[];this.materials=i instanceof Array?i:[i]};
 THREE.UV=function(a,b){this.set(a||0,b||0)};THREE.UV.prototype={set:function(a,b){this.u=a;this.v=b;return this},copy:function(a){this.set(a.u,a.v);return this}};THREE.Geometry=function(){this.id="Geometry"+THREE.GeometryIdCounter++;this.vertices=[];this.faces=[];this.uvs=[];this.uvs2=[];this.colors=[];this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.geometryChunks={};this.hasTangents=!1};
@@ -73,31 +73,31 @@ THREE.Camera.prototype.frustumContains=function(a){var b=a.matrixWorld.n14,d=a.m
 if(b+i<-this.screenCenterY)return!1;if(b-i>this.screenCenterY)return!1;a.positionScreen.set(w,b,j,i);return!0};THREE.Light=function(a){THREE.Object3D.call(this);this.color=new THREE.Color(a)};THREE.Light.prototype=new THREE.Object3D;THREE.Light.prototype.constructor=THREE.Light;THREE.Light.prototype.supr=THREE.Object3D.prototype;THREE.AmbientLight=function(a){THREE.Light.call(this,a)};THREE.AmbientLight.prototype=new THREE.Light;THREE.AmbientLight.prototype.constructor=THREE.AmbientLight;
 THREE.DirectionalLight=function(a,b){THREE.Light.call(this,a);this.position=new THREE.Vector3(0,1,0);this.intensity=b||1};THREE.DirectionalLight.prototype=new THREE.Light;THREE.DirectionalLight.prototype.constructor=THREE.DirectionalLight;THREE.PointLight=function(a,b){THREE.Light.call(this,a);this.position=new THREE.Vector3;this.intensity=b||1};THREE.PointLight.prototype=new THREE.Light;THREE.PointLight.prototype.constructor=THREE.PointLight;THREE.FlatShading=0;THREE.SmoothShading=1;
 THREE.NormalBlending=0;THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;THREE.BillboardBlending=3;THREE.ReverseSubtractiveBlending=4;THREE.MaterialCounter={value:0};THREE.CubeReflectionMapping=function(){};THREE.CubeRefractionMapping=function(){};THREE.LatitudeReflectionMapping=function(){};THREE.LatitudeRefractionMapping=function(){};THREE.SphericalReflectionMapping=function(){};THREE.SphericalRefractionMapping=function(){};THREE.UVMapping=function(){};
-THREE.LineBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.blending=THREE.NormalBlending;this.depth_test=!0;this.linewidth=1;this.linejoin=this.linecap="round";this.vertex_colors=!1;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.linewidth!==undefined)this.linewidth=
-a.linewidth;if(a.linecap!==undefined)this.linecap=a.linecap;if(a.linejoin!==undefined)this.linejoin=a.linejoin;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors}};
-THREE.MeshBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.env_map=this.light_map=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refraction_ratio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;this.wireframe_linejoin=this.wireframe_linecap="round";this.vertex_colors=!1;this.skinning=!1;if(a){a.color!==
-undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.light_map!==undefined)this.light_map=a.light_map;if(a.env_map!==undefined)this.env_map=a.env_map;if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refraction_ratio!==undefined)this.refraction_ratio=a.refraction_ratio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==
-undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==undefined)this.wireframe_linewidth=a.wireframe_linewidth;if(a.wireframe_linecap!==undefined)this.wireframe_linecap=a.wireframe_linecap;if(a.wireframe_linejoin!==undefined)this.wireframe_linejoin=a.wireframe_linejoin;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors;if(a.skinning!==undefined)this.skinning=a.skinning}};
-THREE.MeshLambertMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.env_map=this.light_map=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refraction_ratio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;this.wireframe_linejoin=this.wireframe_linecap="round";this.vertex_colors=!1;this.skinning=!1;if(a){a.color!==
-undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.light_map!==undefined)this.light_map=a.light_map;if(a.env_map!==undefined)this.env_map=a.env_map;if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refraction_ratio!==undefined)this.refraction_ratio=a.refraction_ratio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==
-undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==undefined)this.wireframe_linewidth=a.wireframe_linewidth;if(a.wireframe_linecap!==undefined)this.wireframe_linecap=a.wireframe_linecap;if(a.wireframe_linejoin!==undefined)this.wireframe_linejoin=a.wireframe_linejoin;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors;if(a.skinning!==undefined)this.skinning=a.skinning}};
-THREE.MeshPhongMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.ambient=new THREE.Color(328965);this.specular=new THREE.Color(1118481);this.shininess=30;this.opacity=1;this.env_map=this.light_map=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refraction_ratio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;this.wireframe_linejoin=
-this.wireframe_linecap="round";this.vertex_colors=!1;this.skinning=!1;if(a){if(a.color!==undefined)this.color=new THREE.Color(a.color);if(a.ambient!==undefined)this.ambient=new THREE.Color(a.ambient);if(a.specular!==undefined)this.specular=new THREE.Color(a.specular);if(a.shininess!==undefined)this.shininess=a.shininess;if(a.opacity!==undefined)this.opacity=a.opacity;if(a.light_map!==undefined)this.light_map=a.light_map;if(a.map!==undefined)this.map=a.map;if(a.env_map!==undefined)this.env_map=a.env_map;
-if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refraction_ratio!==undefined)this.refraction_ratio=a.refraction_ratio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==undefined)this.wireframe_linewidth=a.wireframe_linewidth;
-if(a.wireframe_linecap!==undefined)this.wireframe_linecap=a.wireframe_linecap;if(a.wireframe_linejoin!==undefined)this.wireframe_linejoin=a.wireframe_linejoin;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors;if(a.skinning!==undefined)this.skinning=a.skinning}};
-THREE.MeshDepthMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.opacity=1;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;if(a){if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==
-undefined)this.wireframe_linewidth=a.wireframe_linewidth}};
-THREE.MeshNormalMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.opacity=1;this.shading=THREE.FlatShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;if(a){if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==
-undefined)this.wireframe_linewidth=a.wireframe_linewidth}};THREE.MeshFaceMaterial=function(){};
-THREE.MeshShaderMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.vertex_shader=this.fragment_shader="void main() {}";this.uniforms={};this.opacity=1;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depth_test=!0;this.wireframe=!1;this.wireframe_linewidth=1;this.wireframe_linejoin=this.wireframe_linecap="round";this.vertex_colors=!1;this.skinning=!1;if(a){if(a.fragment_shader!==undefined)this.fragment_shader=a.fragment_shader;if(a.vertex_shader!==undefined)this.vertex_shader=
-a.vertex_shader;if(a.uniforms!==undefined)this.uniforms=a.uniforms;if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==undefined)this.depth_test=a.depth_test;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframe_linewidth!==undefined)this.wireframe_linewidth=a.wireframe_linewidth;if(a.wireframe_linecap!==undefined)this.wireframe_linecap=a.wireframe_linecap;if(a.wireframe_linejoin!==
-undefined)this.wireframe_linejoin=a.wireframe_linejoin;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors;if(a.skinning!==undefined)this.skinning=a.skinning}};
-THREE.ParticleBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.map=null;this.size=1;this.blending=THREE.NormalBlending;this.depth_test=!0;this.offset=new THREE.Vector2;this.vertex_colors=!1;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.size!==undefined)this.size=a.size;if(a.blending!==undefined)this.blending=a.blending;if(a.depth_test!==
-undefined)this.depth_test=a.depth_test;if(a.vertex_colors!==undefined)this.vertex_colors=a.vertex_colors}};THREE.ParticleCircleMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.blending=THREE.NormalBlending;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.blending!==undefined)this.blending=a.blending}};
-THREE.Texture=function(a,b,d,e,g,i){this.image=a;this.mapping=b!==undefined?b:new THREE.UVMapping;this.wrap_s=d!==undefined?d:THREE.ClampToEdgeWrapping;this.wrap_t=e!==undefined?e:THREE.ClampToEdgeWrapping;this.mag_filter=g!==undefined?g:THREE.LinearFilter;this.min_filter=i!==undefined?i:THREE.LinearMipMapLinearFilter;this.needsUpdate=!1};THREE.Texture.prototype={clone:function(){return new THREE.Texture(this.image,this.mapping,this.wrap_s,this.wrap_t,this.mag_filter,this.min_filter)}};
+THREE.LineBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.blending=THREE.NormalBlending;this.depthTest=!0;this.linewidth=1;this.linejoin=this.linecap="round";this.vertexColors=!1;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.linewidth!==undefined)this.linewidth=
+a.linewidth;if(a.linecap!==undefined)this.linecap=a.linecap;if(a.linejoin!==undefined)this.linejoin=a.linejoin;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors}};
+THREE.MeshBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.envMap=this.lightMap=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexColors=!1;this.skinning=!1;if(a){a.color!==undefined&&
+this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.lightMap!==undefined)this.lightMap=a.lightMap;if(a.envMap!==undefined)this.envMap=a.envMap;if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refractionRatio!==undefined)this.refractionRatio=a.refractionRatio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=
+a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==undefined)this.wireframeLinewidth=a.wireframeLinewidth;if(a.wireframeLinecap!==undefined)this.wireframeLinecap=a.wireframeLinecap;if(a.wireframeLinejoin!==undefined)this.wireframeLinejoin=a.wireframeLinejoin;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors;if(a.skinning!==undefined)this.skinning=a.skinning}};
+THREE.MeshLambertMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.envMap=this.lightMap=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexColors=!1;this.skinning=!1;if(a){a.color!==undefined&&
+this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.lightMap!==undefined)this.lightMap=a.lightMap;if(a.envMap!==undefined)this.envMap=a.envMap;if(a.combine!==undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refractionRatio!==undefined)this.refractionRatio=a.refractionRatio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=
+a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==undefined)this.wireframeLinewidth=a.wireframeLinewidth;if(a.wireframeLinecap!==undefined)this.wireframeLinecap=a.wireframeLinecap;if(a.wireframeLinejoin!==undefined)this.wireframeLinejoin=a.wireframeLinejoin;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors;if(a.skinning!==undefined)this.skinning=a.skinning}};
+THREE.MeshPhongMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.ambient=new THREE.Color(328965);this.specular=new THREE.Color(1118481);this.shininess=30;this.opacity=1;this.envMap=this.lightMap=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=
+this.wireframeLinecap="round";this.vertexColors=!1;this.skinning=!1;if(a){if(a.color!==undefined)this.color=new THREE.Color(a.color);if(a.ambient!==undefined)this.ambient=new THREE.Color(a.ambient);if(a.specular!==undefined)this.specular=new THREE.Color(a.specular);if(a.shininess!==undefined)this.shininess=a.shininess;if(a.opacity!==undefined)this.opacity=a.opacity;if(a.lightMap!==undefined)this.lightMap=a.lightMap;if(a.map!==undefined)this.map=a.map;if(a.envMap!==undefined)this.envMap=a.envMap;if(a.combine!==
+undefined)this.combine=a.combine;if(a.reflectivity!==undefined)this.reflectivity=a.reflectivity;if(a.refractionRatio!==undefined)this.refractionRatio=a.refractionRatio;if(a.fog!==undefined)this.fog=a.fog;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==undefined)this.wireframeLinewidth=a.wireframeLinewidth;if(a.wireframeLinecap!==
+undefined)this.wireframeLinecap=a.wireframeLinecap;if(a.wireframeLinejoin!==undefined)this.wireframeLinejoin=a.wireframeLinejoin;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors;if(a.skinning!==undefined)this.skinning=a.skinning}};
+THREE.MeshDepthMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.opacity=1;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;if(a){if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==
+undefined)this.wireframeLinewidth=a.wireframeLinewidth}};
+THREE.MeshNormalMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.opacity=1;this.shading=THREE.FlatShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;if(a){if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==
+undefined)this.wireframeLinewidth=a.wireframeLinewidth}};THREE.MeshFaceMaterial=function(){};
+THREE.MeshShaderMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.vertexShader=this.fragmentShader="void main() {}";this.uniforms={};this.opacity=1;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.depthTest=!0;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexColors=!1;this.skinning=!1;if(a){if(a.fragmentShader!==undefined)this.fragmentShader=a.fragmentShader;if(a.vertexShader!==undefined)this.vertexShader=
+a.vertexShader;if(a.uniforms!==undefined)this.uniforms=a.uniforms;if(a.opacity!==undefined)this.opacity=a.opacity;if(a.shading!==undefined)this.shading=a.shading;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==undefined)this.depthTest=a.depthTest;if(a.wireframe!==undefined)this.wireframe=a.wireframe;if(a.wireframeLinewidth!==undefined)this.wireframeLinewidth=a.wireframeLinewidth;if(a.wireframeLinecap!==undefined)this.wireframeLinecap=a.wireframeLinecap;if(a.wireframeLinejoin!==
+undefined)this.wireframeLinejoin=a.wireframeLinejoin;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors;if(a.skinning!==undefined)this.skinning=a.skinning}};
+THREE.ParticleBasicMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.map=null;this.size=1;this.blending=THREE.NormalBlending;this.depthTest=!0;this.offset=new THREE.Vector2;this.vertexColors=!1;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.map!==undefined)this.map=a.map;if(a.size!==undefined)this.size=a.size;if(a.blending!==undefined)this.blending=a.blending;if(a.depthTest!==
+undefined)this.depthTest=a.depthTest;if(a.vertexColors!==undefined)this.vertexColors=a.vertexColors}};THREE.ParticleCircleMaterial=function(a){this.id=THREE.MaterialCounter.value++;this.color=new THREE.Color(16777215);this.opacity=1;this.blending=THREE.NormalBlending;if(a){a.color!==undefined&&this.color.setHex(a.color);if(a.opacity!==undefined)this.opacity=a.opacity;if(a.blending!==undefined)this.blending=a.blending}};
+THREE.Texture=function(a,b,d,e,g,i){this.image=a;this.mapping=b!==undefined?b:new THREE.UVMapping;this.wrapS=d!==undefined?d:THREE.ClampToEdgeWrapping;this.wrapT=e!==undefined?e:THREE.ClampToEdgeWrapping;this.magFilter=g!==undefined?g:THREE.LinearFilter;this.minFilter=i!==undefined?i:THREE.LinearMipMapLinearFilter;this.needsUpdate=!1};THREE.Texture.prototype={clone:function(){return new THREE.Texture(this.image,this.mapping,this.wrapS,this.wrapT,this.magFilter,this.minFilter)}};
 THREE.MultiplyOperation=0;THREE.MixOperation=1;THREE.RepeatWrapping=0;THREE.ClampToEdgeWrapping=1;THREE.MirroredRepeatWrapping=2;THREE.NearestFilter=3;THREE.NearestMipMapNearestFilter=4;THREE.NearestMipMapLinearFilter=5;THREE.LinearFilter=6;THREE.LinearMipMapNearestFilter=7;THREE.LinearMipMapLinearFilter=8;THREE.ByteType=9;THREE.UnsignedByteType=10;THREE.ShortType=11;THREE.UnsignedShortType=12;THREE.IntType=13;THREE.UnsignedIntType=14;THREE.FloatType=15;THREE.AlphaFormat=16;THREE.RGBFormat=17;
 THREE.RGBAFormat=18;THREE.LuminanceFormat=19;THREE.LuminanceAlphaFormat=20;
-THREE.RenderTarget=function(a,b,d){this.width=a;this.height=b;d=d||{};this.wrap_s=d.wrap_s!==undefined?d.wrap_s:THREE.ClampToEdgeWrapping;this.wrap_t=d.wrap_t!==undefined?d.wrap_t:THREE.ClampToEdgeWrapping;this.mag_filter=d.mag_filter!==undefined?d.mag_filter:THREE.LinearFilter;this.min_filter=d.min_filter!==undefined?d.min_filter:THREE.LinearMipMapLinearFilter;this.format=d.format!==undefined?d.format:THREE.RGBFormat;this.type=d.type!==undefined?d.type:THREE.UnsignedByteType};
+THREE.RenderTarget=function(a,b,d){this.width=a;this.height=b;d=d||{};this.wrapS=d.wrapS!==undefined?d.wrapS:THREE.ClampToEdgeWrapping;this.wrapT=d.wrapT!==undefined?d.wrapT:THREE.ClampToEdgeWrapping;this.magFilter=d.magFilter!==undefined?d.magFilter:THREE.LinearFilter;this.minFilter=d.minFilter!==undefined?d.minFilter:THREE.LinearMipMapLinearFilter;this.format=d.format!==undefined?d.format:THREE.RGBFormat;this.type=d.type!==undefined?d.type:THREE.UnsignedByteType};
 var Uniforms={clone:function(a){var b,d,e,g={};for(b in a){g[b]={};for(d in a[b]){e=a[b][d];g[b][d]=e instanceof THREE.Color||e instanceof THREE.Vector3||e instanceof THREE.Texture?e.clone():e}}return g},merge:function(a){var b,d,e,g={};for(b=0;b<a.length;b++){e=this.clone(a[b]);for(d in e)g[d]=e[d]}return g}};THREE.Particle=function(a){THREE.Object3D.call(this);this.materials=a instanceof Array?a:[a];this.matrixAutoUpdate=!1};THREE.Particle.prototype=new THREE.Object3D;
 THREE.Particle.prototype.constructor=THREE.Particle;THREE.ParticleSystem=function(a,b){THREE.Object3D.call(this);this.geometry=a;this.materials=b instanceof Array?b:[b];this.sortParticles=!1};THREE.ParticleSystem.prototype=new THREE.Object3D;THREE.ParticleSystem.prototype.constructor=THREE.ParticleSystem;THREE.Line=function(a,b,d){THREE.Object3D.call(this);this.geometry=a;this.materials=b instanceof Array?b:[b];this.type=d!=undefined?d:THREE.LineStrip};THREE.LineStrip=0;THREE.LinePieces=1;
 THREE.Line.prototype=new THREE.Object3D;THREE.Line.prototype.constructor=THREE.Line;THREE.Mesh=function(a,b){THREE.Object3D.call(this);this.geometry=a;this.materials=b&&b.length?b:[b];this.flipSided=!1;this.doubleSided=!1;this.overdraw=!1;if(this.geometry){this.geometry.boundingSphere||this.geometry.computeBoundingSphere();this.boundRadius=a.boundingSphere.radius}};THREE.Mesh.prototype=new THREE.Object3D;THREE.Mesh.prototype.constructor=THREE.Mesh;THREE.Mesh.prototype.supr=THREE.Object3D.prototype;
@@ -115,22 +115,22 @@ THREE.Scene.prototype.removeChildRecurse=function(a){if(a instanceof THREE.Light
 THREE.Scene.prototype.removeObject=THREE.Scene.prototype.removeChild;THREE.Scene.prototype.addLight=THREE.Scene.prototype.addChild;THREE.Scene.prototype.removeLight=THREE.Scene.prototype.removeChild;THREE.Fog=function(a,b,d){this.color=new THREE.Color(a);this.near=b||1;this.far=d||1E3};THREE.FogExp2=function(a,b){this.color=new THREE.Color(a);this.density=b||2.5E-4};
 THREE.SoundRenderer=function(){this.volume=1;this.domElement=document.createElement("div");this.domElement.id="THREESound";this.cameraPosition=new THREE.Vector3;this.soundPosition=new THREE.Vector3;this.render=function(a,b,d){d&&a.update(undefined,!1,b);d=a.sounds;var e,g=d.length;for(e=0;e<g;e++){a=d[e];this.soundPosition.set(a.matrixWorld.n14,a.matrixWorld.n24,a.matrixWorld.n34);this.soundPosition.subSelf(b.position);if(a.isPlaying&&a.isLoaded){a.isAddedToDOM||a.addToDOM(this.domElement);a.calculateVolumeAndPan(this.soundPosition)}}}};
 THREE.WebGLRenderer=function(a){function b(f,o,n){var h,l,v,r=f.vertices,q=r.length,t=f.colors,G=t.length,F=f.__vertexArray,I=f.__colorArray,S=f.__sortArray,y=f.__dirtyVertices,M=f.__dirtyColors;if(n.sortParticles){qa.multiplySelf(n.matrixWorld);for(h=0;h<q;h++){l=r[h].position;Aa.copy(l);qa.multiplyVector3(Aa);S[h]=[Aa.z,h]}S.sort(function(ea,Z){return Z[0]-ea[0]});for(h=0;h<q;h++){l=r[S[h][1]].position;v=h*3;F[v]=l.x;F[v+1]=l.y;F[v+2]=l.z}for(h=0;h<G;h++){v=h*3;color=t[S[h][1]];I[v]=color.r;I[v+
-1]=color.g;I[v+2]=color.b}}else{if(y)for(h=0;h<q;h++){l=r[h].position;v=h*3;F[v]=l.x;F[v+1]=l.y;F[v+2]=l.z}if(M)for(h=0;h<G;h++){color=t[h];v=h*3;I[v]=color.r;I[v+1]=color.g;I[v+2]=color.b}}if(y||n.sortParticles){c.bindBuffer(c.ARRAY_BUFFER,f.__webGLVertexBuffer);c.bufferData(c.ARRAY_BUFFER,F,o)}if(M||n.sortParticles){c.bindBuffer(c.ARRAY_BUFFER,f.__webGLColorBuffer);c.bufferData(c.ARRAY_BUFFER,I,o)}}function d(f,o){f.fragment_shader=o.fragment_shader;f.vertex_shader=o.vertex_shader;f.uniforms=Uniforms.clone(o.uniforms)}
+1]=color.g;I[v+2]=color.b}}else{if(y)for(h=0;h<q;h++){l=r[h].position;v=h*3;F[v]=l.x;F[v+1]=l.y;F[v+2]=l.z}if(M)for(h=0;h<G;h++){color=t[h];v=h*3;I[v]=color.r;I[v+1]=color.g;I[v+2]=color.b}}if(y||n.sortParticles){c.bindBuffer(c.ARRAY_BUFFER,f.__webGLVertexBuffer);c.bufferData(c.ARRAY_BUFFER,F,o)}if(M||n.sortParticles){c.bindBuffer(c.ARRAY_BUFFER,f.__webGLColorBuffer);c.bufferData(c.ARRAY_BUFFER,I,o)}}function d(f,o){f.fragmentShader=o.fragmentShader;f.vertexShader=o.vertexShader;f.uniforms=Uniforms.clone(o.uniforms)}
 function e(f,o,n,h,l){h.program||ca.initMaterial(h,o,n);var v=h.program,r=v.uniforms,q=h.uniforms;if(v!=aa){c.useProgram(v);aa=v;c.uniformMatrix4fv(r.projectionMatrix,!1,va)}if(n&&(h instanceof THREE.MeshBasicMaterial||h instanceof THREE.MeshLambertMaterial||h instanceof THREE.MeshPhongMaterial||h instanceof THREE.LineBasicMaterial||h instanceof THREE.ParticleBasicMaterial)){q.fogColor.value.setHex(n.color.hex);if(n instanceof THREE.Fog){q.fogNear.value=n.near;q.fogFar.value=n.far}else if(n instanceof
 THREE.FogExp2)q.fogDensity.value=n.density}if(h instanceof THREE.MeshPhongMaterial||h instanceof THREE.MeshLambertMaterial){var t,G,F=0,I=0,S=0,y,M,ea,Z=ca.lights,Q=Z.directional.colors,O=Z.directional.positions,N=Z.point.colors,ra=Z.point.positions,u=0,ma=0;n=G=G=0;for(t=o.length;n<t;n++){G=o[n];y=G.color;M=G.position;ea=G.intensity;if(G instanceof THREE.AmbientLight){F+=y.r;I+=y.g;S+=y.b}else if(G instanceof THREE.DirectionalLight){G=u*3;Q[G]=y.r*ea;Q[G+1]=y.g*ea;Q[G+2]=y.b*ea;O[G]=M.x;O[G+1]=M.y;
 O[G+2]=M.z;u+=1}else if(G instanceof THREE.PointLight){G=ma*3;N[G]=y.r*ea;N[G+1]=y.g*ea;N[G+2]=y.b*ea;ra[G]=M.x;ra[G+1]=M.y;ra[G+2]=M.z;ma+=1}}for(n=u*3;n<Q.length;n++)Q[n]=0;for(n=ma*3;n<N.length;n++)N[n]=0;Z.point.length=ma;Z.directional.length=u;Z.ambient[0]=F;Z.ambient[1]=I;Z.ambient[2]=S;o=ca.lights;q.enableLighting.value=o.directional.length+o.point.length;q.ambientLightColor.value=o.ambient;q.directionalLightColor.value=o.directional.colors;q.directionalLightDirection.value=o.directional.positions;
-q.pointLightColor.value=o.point.colors;q.pointLightPosition.value=o.point.positions}if(h instanceof THREE.MeshBasicMaterial||h instanceof THREE.MeshLambertMaterial||h instanceof THREE.MeshPhongMaterial){q.diffuse.value.setRGB(h.color.r*h.opacity,h.color.g*h.opacity,h.color.b*h.opacity);q.opacity.value=h.opacity;q.map.texture=h.map;q.light_map.texture=h.light_map;q.env_map.texture=h.env_map;q.reflectivity.value=h.reflectivity;q.refraction_ratio.value=h.refraction_ratio;q.combine.value=h.combine;q.useRefract.value=
-h.env_map&&h.env_map.mapping instanceof THREE.CubeRefractionMapping}if(h instanceof THREE.LineBasicMaterial){q.diffuse.value.setRGB(h.color.r*h.opacity,h.color.g*h.opacity,h.color.b*h.opacity);q.opacity.value=h.opacity}else if(h instanceof THREE.ParticleBasicMaterial){q.psColor.value.setRGB(h.color.r*h.opacity,h.color.g*h.opacity,h.color.b*h.opacity);q.opacity.value=h.opacity;q.size.value=h.size;q.map.texture=h.map}else if(h instanceof THREE.MeshPhongMaterial){q.ambient.value.setRGB(h.ambient.r,h.ambient.g,
+q.pointLightColor.value=o.point.colors;q.pointLightPosition.value=o.point.positions}if(h instanceof THREE.MeshBasicMaterial||h instanceof THREE.MeshLambertMaterial||h instanceof THREE.MeshPhongMaterial){q.diffuse.value.setRGB(h.color.r*h.opacity,h.color.g*h.opacity,h.color.b*h.opacity);q.opacity.value=h.opacity;q.map.texture=h.map;q.lightMap.texture=h.lightMap;q.envMap.texture=h.envMap;q.reflectivity.value=h.reflectivity;q.refractionRatio.value=h.refractionRatio;q.combine.value=h.combine;q.useRefract.value=
+h.envMap&&h.envMap.mapping instanceof THREE.CubeRefractionMapping}if(h instanceof THREE.LineBasicMaterial){q.diffuse.value.setRGB(h.color.r*h.opacity,h.color.g*h.opacity,h.color.b*h.opacity);q.opacity.value=h.opacity}else if(h instanceof THREE.ParticleBasicMaterial){q.psColor.value.setRGB(h.color.r*h.opacity,h.color.g*h.opacity,h.color.b*h.opacity);q.opacity.value=h.opacity;q.size.value=h.size;q.map.texture=h.map}else if(h instanceof THREE.MeshPhongMaterial){q.ambient.value.setRGB(h.ambient.r,h.ambient.g,
 h.ambient.b);q.specular.value.setRGB(h.specular.r,h.specular.g,h.specular.b);q.shininess.value=h.shininess}else if(h instanceof THREE.MeshDepthMaterial){q.mNear.value=f.near;q.mFar.value=f.far;q.opacity.value=h.opacity}else if(h instanceof THREE.MeshNormalMaterial)q.opacity.value=h.opacity;for(var ka in q)if(F=v.uniforms[ka]){n=q[ka];t=n.type;o=n.value;if(t=="i")c.uniform1i(F,o);else if(t=="f")c.uniform1f(F,o);else if(t=="fv1")c.uniform1fv(F,o);else if(t=="fv")c.uniform3fv(F,o);else if(t=="v2")c.uniform2f(F,
 o.x,o.y);else if(t=="v3")c.uniform3f(F,o.x,o.y,o.z);else if(t=="c")c.uniform3f(F,o.r,o.g,o.b);else if(t=="t"){c.uniform1i(F,o);if(n=n.texture)if(n.image instanceof Array&&n.image.length==6){if(n.image.length==6){if(n.needsUpdate){if(!n.image.__webGLTextureCube)n.image.__webGLTextureCube=c.createTexture();c.bindTexture(c.TEXTURE_CUBE_MAP,n.image.__webGLTextureCube);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);
 c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_MAG_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_MIN_FILTER,c.LINEAR_MIPMAP_LINEAR);for(t=0;t<6;++t)c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,n.image[t]);c.generateMipmap(c.TEXTURE_CUBE_MAP);c.bindTexture(c.TEXTURE_CUBE_MAP,null);n.needsUpdate=!1}c.activeTexture(c.TEXTURE0+o);c.bindTexture(c.TEXTURE_CUBE_MAP,n.image.__webGLTextureCube)}}else{if(n.needsUpdate){if(n.__wasSetOnce){c.bindTexture(c.TEXTURE_2D,
-n.__webGLTexture);c.texSubImage2D(c.TEXTURE_2D,0,0,0,c.RGBA,c.UNSIGNED_BYTE,n.image);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,L(n.wrap_s));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,L(n.wrap_t));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,L(n.mag_filter));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,L(n.min_filter));c.generateMipmap(c.TEXTURE_2D);c.bindTexture(c.TEXTURE_2D,null)}else{n.__webGLTexture=c.createTexture();c.bindTexture(c.TEXTURE_2D,n.__webGLTexture);c.texImage2D(c.TEXTURE_2D,
-0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,n.image);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,L(n.wrap_s));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,L(n.wrap_t));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,L(n.mag_filter));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,L(n.min_filter));c.generateMipmap(c.TEXTURE_2D);c.bindTexture(c.TEXTURE_2D,null);n.__wasSetOnce=!0}n.needsUpdate=!1}c.activeTexture(c.TEXTURE0+o);c.bindTexture(c.TEXTURE_2D,n.__webGLTexture)}}}c.uniformMatrix4fv(r.modelViewMatrix,
-!1,l._modelViewMatrixArray);c.uniformMatrix3fv(r.normalMatrix,!1,l._normalMatrixArray);(h instanceof THREE.MeshShaderMaterial||h instanceof THREE.MeshPhongMaterial||h.env_map)&&c.uniform3f(r.cameraPosition,f.position.x,f.position.y,f.position.z);(h instanceof THREE.MeshShaderMaterial||h.env_map||h.skinning)&&c.uniformMatrix4fv(r.objectMatrix,!1,l._objectMatrixArray);(h instanceof THREE.MeshPhongMaterial||h instanceof THREE.MeshLambertMaterial||h instanceof THREE.MeshShaderMaterial||h.skinning)&&c.uniformMatrix4fv(r.viewMatrix,
+n.__webGLTexture);c.texSubImage2D(c.TEXTURE_2D,0,0,0,c.RGBA,c.UNSIGNED_BYTE,n.image);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,L(n.wrapS));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,L(n.wrapT));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,L(n.magFilter));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,L(n.minFilter));c.generateMipmap(c.TEXTURE_2D);c.bindTexture(c.TEXTURE_2D,null)}else{n.__webGLTexture=c.createTexture();c.bindTexture(c.TEXTURE_2D,n.__webGLTexture);c.texImage2D(c.TEXTURE_2D,
+0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,n.image);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,L(n.wrapS));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,L(n.wrapT));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,L(n.magFilter));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,L(n.minFilter));c.generateMipmap(c.TEXTURE_2D);c.bindTexture(c.TEXTURE_2D,null);n.__wasSetOnce=!0}n.needsUpdate=!1}c.activeTexture(c.TEXTURE0+o);c.bindTexture(c.TEXTURE_2D,n.__webGLTexture)}}}c.uniformMatrix4fv(r.modelViewMatrix,
+!1,l._modelViewMatrixArray);c.uniformMatrix3fv(r.normalMatrix,!1,l._normalMatrixArray);(h instanceof THREE.MeshShaderMaterial||h instanceof THREE.MeshPhongMaterial||h.envMap)&&c.uniform3f(r.cameraPosition,f.position.x,f.position.y,f.position.z);(h instanceof THREE.MeshShaderMaterial||h.envMap||h.skinning)&&c.uniformMatrix4fv(r.objectMatrix,!1,l._objectMatrixArray);(h instanceof THREE.MeshPhongMaterial||h instanceof THREE.MeshLambertMaterial||h instanceof THREE.MeshShaderMaterial||h.skinning)&&c.uniformMatrix4fv(r.viewMatrix,
 !1,Ha);if(h.skinning){c.uniformMatrix4fv(r.cameraInverseMatrix,!1,wa);c.uniformMatrix4fv(r.boneGlobalMatrices,!1,l.boneMatrices)}return v}function g(f,o,n,h,l,v){f=e(f,o,n,h,v).attributes;c.bindBuffer(c.ARRAY_BUFFER,l.__webGLVertexBuffer);c.vertexAttribPointer(f.position,3,c.FLOAT,!1,0,0);if(f.color>=0){c.bindBuffer(c.ARRAY_BUFFER,l.__webGLColorBuffer);c.vertexAttribPointer(f.color,3,c.FLOAT,!1,0,0)}if(f.normal>=0){c.bindBuffer(c.ARRAY_BUFFER,l.__webGLNormalBuffer);c.vertexAttribPointer(f.normal,
 3,c.FLOAT,!1,0,0)}if(f.tangent>=0){c.bindBuffer(c.ARRAY_BUFFER,l.__webGLTangentBuffer);c.vertexAttribPointer(f.tangent,4,c.FLOAT,!1,0,0)}if(f.uv>=0)if(l.__webGLUVBuffer){c.bindBuffer(c.ARRAY_BUFFER,l.__webGLUVBuffer);c.vertexAttribPointer(f.uv,2,c.FLOAT,!1,0,0);c.enableVertexAttribArray(f.uv)}else c.disableVertexAttribArray(f.uv);if(f.uv2>=0)if(l.__webGLUV2Buffer){c.bindBuffer(c.ARRAY_BUFFER,l.__webGLUV2Buffer);c.vertexAttribPointer(f.uv2,2,c.FLOAT,!1,0,0);c.enableVertexAttribArray(f.uv2)}else c.disableVertexAttribArray(f.uv2);
 if(h.skinning&&f.skinVertexA>=0&&f.skinVertexB>=0&&f.skinIndex>=0&&f.skinWeight>=0){c.bindBuffer(c.ARRAY_BUFFER,l.__webGLSkinVertexABuffer);c.vertexAttribPointer(f.skinVertexA,4,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,l.__webGLSkinVertexBBuffer);c.vertexAttribPointer(f.skinVertexB,4,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,l.__webGLSkinIndicesBuffer);c.vertexAttribPointer(f.skinIndex,4,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,l.__webGLSkinWeightsBuffer);c.vertexAttribPointer(f.skinWeight,
-4,c.FLOAT,!1,0,0)}if(v instanceof THREE.Mesh)if(h.wireframe){c.lineWidth(h.wireframe_linewidth);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,l.__webGLLineBuffer);c.drawElements(c.LINES,l.__webGLLineCount,c.UNSIGNED_SHORT,0)}else{c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,l.__webGLFaceBuffer);c.drawElements(c.TRIANGLES,l.__webGLFaceCount,c.UNSIGNED_SHORT,0)}else if(v instanceof THREE.Line){v=v.type==THREE.LineStrip?c.LINE_STRIP:c.LINES;c.lineWidth(h.linewidth);c.drawArrays(v,0,l.__webGLLineCount)}else if(v instanceof
+4,c.FLOAT,!1,0,0)}if(v instanceof THREE.Mesh)if(h.wireframe){c.lineWidth(h.wireframeLinewidth);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,l.__webGLLineBuffer);c.drawElements(c.LINES,l.__webGLLineCount,c.UNSIGNED_SHORT,0)}else{c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,l.__webGLFaceBuffer);c.drawElements(c.TRIANGLES,l.__webGLFaceCount,c.UNSIGNED_SHORT,0)}else if(v instanceof THREE.Line){v=v.type==THREE.LineStrip?c.LINE_STRIP:c.LINES;c.lineWidth(h.linewidth);c.drawArrays(v,0,l.__webGLLineCount)}else if(v instanceof
 THREE.ParticleSystem)c.drawArrays(c.POINTS,0,l.__webGLParticleCount);else v instanceof THREE.Ribbon&&c.drawArrays(c.TRIANGLE_STRIP,0,l.__webGLVertexCount)}function i(f,o){if(!f.__webGLVertexBuffer)f.__webGLVertexBuffer=c.createBuffer();if(!f.__webGLNormalBuffer)f.__webGLNormalBuffer=c.createBuffer();if(f.hasPos){c.bindBuffer(c.ARRAY_BUFFER,f.__webGLVertexBuffer);c.bufferData(c.ARRAY_BUFFER,f.positionArray,c.DYNAMIC_DRAW);c.enableVertexAttribArray(o.attributes.position);c.vertexAttribPointer(o.attributes.position,
 3,c.FLOAT,!1,0,0)}if(f.hasNormal){c.bindBuffer(c.ARRAY_BUFFER,f.__webGLNormalBuffer);c.bufferData(c.ARRAY_BUFFER,f.normalArray,c.DYNAMIC_DRAW);c.enableVertexAttribArray(o.attributes.normal);c.vertexAttribPointer(o.attributes.normal,3,c.FLOAT,!1,0,0)}c.drawArrays(c.TRIANGLES,0,f.count);f.count=0}function j(f){if(ga!=f.doubleSided){f.doubleSided?c.disable(c.CULL_FACE):c.enable(c.CULL_FACE);ga=f.doubleSided}if(da!=f.flipSided){f.flipSided?c.frontFace(c.CW):c.frontFace(c.CCW);da=f.flipSided}}function m(f){if(na!=
 f){f?c.enable(c.DEPTH_TEST):c.disable(c.DEPTH_TEST);na=f}}function k(f){$[0].set(f.n41-f.n11,f.n42-f.n12,f.n43-f.n13,f.n44-f.n14);$[1].set(f.n41+f.n11,f.n42+f.n12,f.n43+f.n13,f.n44+f.n14);$[2].set(f.n41+f.n21,f.n42+f.n22,f.n43+f.n23,f.n44+f.n24);$[3].set(f.n41-f.n21,f.n42-f.n22,f.n43-f.n23,f.n44-f.n24);$[4].set(f.n41-f.n31,f.n42-f.n32,f.n43-f.n33,f.n44-f.n34);$[5].set(f.n41+f.n31,f.n42+f.n32,f.n43+f.n33,f.n44+f.n34);var o;for(f=0;f<6;f++){o=$[f];o.divideScalar(Math.sqrt(o.x*o.x+o.y*o.y+o.z*o.z))}}
@@ -138,23 +138,23 @@ function s(f){for(var o=f.matrixWorld,n=-f.geometry.boundingSphere.radius*Math.m
 q=f.opaque,t=f.transparent;t.count=0;f=q.count=0;for(h=v.materials.length;f<h;f++){o=v.materials[f];if(o instanceof THREE.MeshFaceMaterial){o=0;for(n=r.materials.length;o<n;o++)(l=r.materials[o])&&(l.opacity&&l.opacity<1||l.blending!=THREE.NormalBlending?w(t,l):w(q,l))}else{l=o;l.opacity&&l.opacity<1||l.blending!=THREE.NormalBlending?w(t,l):w(q,l)}}}function A(f,o){return o.z-f.z}function E(f,o,n,h,l){if(o[n]==undefined){f.push({buffer:h,object:l,opaque:{list:[],count:0},transparent:{list:[],count:0}});
 o[n]=1}}function H(f,o){f._modelViewMatrix.multiplyToArray(o.matrixWorld,f.matrixWorld,f._modelViewMatrixArray);THREE.Matrix4.makeInvert3x3(f._modelViewMatrix).transposeIntoArray(f._normalMatrixArray)}function K(f){if(f!=ja){switch(f){case THREE.AdditiveBlending:c.blendEquation(c.FUNC_ADD);c.blendFunc(c.ONE,c.ONE);break;case THREE.SubtractiveBlending:c.blendFunc(c.DST_COLOR,c.ZERO);break;case THREE.BillboardBlending:c.blendEquation(c.FUNC_ADD);c.blendFunc(c.SRC_ALPHA,c.ONE_MINUS_SRC_ALPHA);break;
 case THREE.ReverseSubtractiveBlending:c.blendEquation(c.FUNC_REVERSE_SUBTRACT);c.blendFunc(c.ONE,c.ONE);break;default:c.blendEquation(c.FUNC_ADD);c.blendFunc(c.ONE,c.ONE_MINUS_SRC_ALPHA)}ja=f}}function J(f,o){if(f&&!f.__webGLFramebuffer){f.__webGLFramebuffer=c.createFramebuffer();f.__webGLRenderbuffer=c.createRenderbuffer();f.__webGLTexture=c.createTexture();c.bindRenderbuffer(c.RENDERBUFFER,f.__webGLRenderbuffer);c.renderbufferStorage(c.RENDERBUFFER,c.DEPTH_COMPONENT16,f.width,f.height);c.bindTexture(c.TEXTURE_2D,
-f.__webGLTexture);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,L(f.wrap_s));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,L(f.wrap_t));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,L(f.mag_filter));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,L(f.min_filter));c.texImage2D(c.TEXTURE_2D,0,L(f.format),f.width,f.height,0,L(f.format),L(f.type),null);c.bindFramebuffer(c.FRAMEBUFFER,f.__webGLFramebuffer);c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,f.__webGLTexture,0);
-c.framebufferRenderbuffer(c.FRAMEBUFFER,c.DEPTH_ATTACHMENT,c.RENDERBUFFER,f.__webGLRenderbuffer);c.bindTexture(c.TEXTURE_2D,null);c.bindRenderbuffer(c.RENDERBUFFER,null);c.bindFramebuffer(c.FRAMEBUFFER,null)}var n,h,l;if(f){n=f.__webGLFramebuffer;h=f.width;l=f.height}else{n=null;h=P.width;l=P.height}if(n!=ba){c.bindFramebuffer(c.FRAMEBUFFER,n);c.viewport(0,0,h,l);o&&c.clear(c.COLOR_BUFFER_BIT|c.DEPTH_BUFFER_BIT);ba=n}}function R(f,o){var n;if(f=="fragment")n=c.createShader(c.FRAGMENT_SHADER);else f==
-"vertex"&&(n=c.createShader(c.VERTEX_SHADER));c.shaderSource(n,o);c.compileShader(n);if(!c.getShaderParameter(n,c.COMPILE_STATUS)){alert(c.getShaderInfoLog(n));return null}return n}function L(f){switch(f){case THREE.RepeatWrapping:return c.REPEAT;case THREE.ClampToEdgeWrapping:return c.CLAMP_TO_EDGE;case THREE.MirroredRepeatWrapping:return c.MIRRORED_REPEAT;case THREE.NearestFilter:return c.NEAREST;case THREE.NearestMipMapNearestFilter:return c.NEAREST_MIPMAP_NEAREST;case THREE.NearestMipMapLinearFilter:return c.NEAREST_MIPMAP_LINEAR;
-case THREE.LinearFilter:return c.LINEAR;case THREE.LinearMipMapNearestFilter:return c.LINEAR_MIPMAP_NEAREST;case THREE.LinearMipMapLinearFilter:return c.LINEAR_MIPMAP_LINEAR;case THREE.ByteType:return c.BYTE;case THREE.UnsignedByteType:return c.UNSIGNED_BYTE;case THREE.ShortType:return c.SHORT;case THREE.UnsignedShortType:return c.UNSIGNED_SHORT;case THREE.IntType:return c.INT;case THREE.UnsignedShortType:return c.UNSIGNED_INT;case THREE.FloatType:return c.FLOAT;case THREE.AlphaFormat:return c.ALPHA;
-case THREE.RGBFormat:return c.RGB;case THREE.RGBAFormat:return c.RGBA;case THREE.LuminanceFormat:return c.LUMINANCE;case THREE.LuminanceAlphaFormat:return c.LUMINANCE_ALPHA}return 0}var P=document.createElement("canvas"),c,aa=null,ba=null,ca=this,ga=null,da=null,ja=null,na=null,$=[new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4],qa=new THREE.Matrix4,va=new Float32Array(16),wa=new Float32Array(16),Ha=new Float32Array(16),Aa=new THREE.Vector4,
-Ia=!0,Oa=new THREE.Color(0),Pa=0;if(a){if(a.antialias!==undefined)Ia=a.antialias;a.clearColor!==undefined&&Oa.setHex(a.clearColor);if(a.clearAlpha!==undefined)Pa=a.clearAlpha}this.domElement=P;this.autoClear=!0;this.sortObjects=!1;(function(f,o,n){try{c=P.getContext("experimental-webgl",{antialias:f})}catch(h){console.log(h)}if(!c)throw"cannot create webgl context";c.clearColor(0,0,0,1);c.clearDepth(1);c.enable(c.DEPTH_TEST);c.depthFunc(c.LEQUAL);c.frontFace(c.CCW);c.cullFace(c.BACK);c.enable(c.CULL_FACE);
-c.enable(c.BLEND);c.blendFunc(c.ONE,c.ONE_MINUS_SRC_ALPHA);c.clearColor(o.r,o.g,o.b,n);_cullEnabled=!0})(Ia,Oa,Pa);this.context=c;this.lights={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[]}};this.setSize=function(f,o){P.width=f;P.height=o;c.viewport(0,0,P.width,P.height)};this.setClearColorHex=function(f,o){var n=new THREE.Color(f);c.clearColor(n.r,n.g,n.b,o)};this.setClearColor=function(f,o){c.clearColor(f.r,f.g,f.b,o)};this.clear=function(){c.clear(c.COLOR_BUFFER_BIT|
-c.DEPTH_BUFFER_BIT)};this.initMaterial=function(f,o,n){var h,l;if(f instanceof THREE.MeshDepthMaterial)d(f,THREE.ShaderLib.depth);else if(f instanceof THREE.MeshNormalMaterial)d(f,THREE.ShaderLib.normal);else if(f instanceof THREE.MeshBasicMaterial)d(f,THREE.ShaderLib.basic);else if(f instanceof THREE.MeshLambertMaterial)d(f,THREE.ShaderLib.lambert);else if(f instanceof THREE.MeshPhongMaterial)d(f,THREE.ShaderLib.phong);else if(f instanceof THREE.LineBasicMaterial)d(f,THREE.ShaderLib.basic);else f instanceof
-THREE.ParticleBasicMaterial&&d(f,THREE.ShaderLib.particle_basic);var v,r,q,t;l=q=t=0;for(v=o.length;l<v;l++){r=o[l];r instanceof THREE.DirectionalLight&&q++;r instanceof THREE.PointLight&&t++}if(t+q<=4)o=q;else{o=Math.ceil(4*q/(t+q));t=4-o}l={directional:o,point:t};t=f.fragment_shader;o=f.vertex_shader;v={fog:n,map:f.map,env_map:f.env_map,light_map:f.light_map,vertex_colors:f.vertex_colors,skinning:f.skinning,maxDirLights:l.directional,maxPointLights:l.point};n=c.createProgram();l=["#ifdef GL_ES\nprecision highp float;\n#endif",
-"#define MAX_DIR_LIGHTS "+v.maxDirLights,"#define MAX_POINT_LIGHTS "+v.maxPointLights,v.fog?"#define USE_FOG":"",v.fog instanceof THREE.FogExp2?"#define FOG_EXP2":"",v.map?"#define USE_MAP":"",v.env_map?"#define USE_ENVMAP":"",v.light_map?"#define USE_LIGHTMAP":"",v.vertex_colors?"#define USE_COLOR":"","uniform mat4 viewMatrix;\nuniform vec3 cameraPosition;\n"].join("\n");v=[c.getParameter(c.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0?"#define VERTEX_TEXTURES":"","#define MAX_DIR_LIGHTS "+v.maxDirLights,"#define MAX_POINT_LIGHTS "+
-v.maxPointLights,v.map?"#define USE_MAP":"",v.env_map?"#define USE_ENVMAP":"",v.light_map?"#define USE_LIGHTMAP":"",v.vertex_colors?"#define USE_COLOR":"",v.skinning?"#define USE_SKINNING":"","uniform mat4 objectMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 cameraPosition;\nuniform mat4 cameraInverseMatrix;\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute vec2 uv;\nattribute vec2 uv2;\nattribute vec4 skinVertexA;\nattribute vec4 skinVertexB;\nattribute vec4 skinIndex;\nattribute vec4 skinWeight;\n"].join("\n");
+f.__webGLTexture);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,L(f.wrapS));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,L(f.wrapT));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,L(f.magFilter));c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,L(f.minFilter));c.texImage2D(c.TEXTURE_2D,0,L(f.format),f.width,f.height,0,L(f.format),L(f.type),null);c.bindFramebuffer(c.FRAMEBUFFER,f.__webGLFramebuffer);c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,f.__webGLTexture,0);c.framebufferRenderbuffer(c.FRAMEBUFFER,
+c.DEPTH_ATTACHMENT,c.RENDERBUFFER,f.__webGLRenderbuffer);c.bindTexture(c.TEXTURE_2D,null);c.bindRenderbuffer(c.RENDERBUFFER,null);c.bindFramebuffer(c.FRAMEBUFFER,null)}var n,h,l;if(f){n=f.__webGLFramebuffer;h=f.width;l=f.height}else{n=null;h=P.width;l=P.height}if(n!=ba){c.bindFramebuffer(c.FRAMEBUFFER,n);c.viewport(0,0,h,l);o&&c.clear(c.COLOR_BUFFER_BIT|c.DEPTH_BUFFER_BIT);ba=n}}function R(f,o){var n;if(f=="fragment")n=c.createShader(c.FRAGMENT_SHADER);else f=="vertex"&&(n=c.createShader(c.VERTEX_SHADER));
+c.shaderSource(n,o);c.compileShader(n);if(!c.getShaderParameter(n,c.COMPILE_STATUS)){alert(c.getShaderInfoLog(n));return null}return n}function L(f){switch(f){case THREE.RepeatWrapping:return c.REPEAT;case THREE.ClampToEdgeWrapping:return c.CLAMP_TO_EDGE;case THREE.MirroredRepeatWrapping:return c.MIRRORED_REPEAT;case THREE.NearestFilter:return c.NEAREST;case THREE.NearestMipMapNearestFilter:return c.NEAREST_MIPMAP_NEAREST;case THREE.NearestMipMapLinearFilter:return c.NEAREST_MIPMAP_LINEAR;case THREE.LinearFilter:return c.LINEAR;
+case THREE.LinearMipMapNearestFilter:return c.LINEAR_MIPMAP_NEAREST;case THREE.LinearMipMapLinearFilter:return c.LINEAR_MIPMAP_LINEAR;case THREE.ByteType:return c.BYTE;case THREE.UnsignedByteType:return c.UNSIGNED_BYTE;case THREE.ShortType:return c.SHORT;case THREE.UnsignedShortType:return c.UNSIGNED_SHORT;case THREE.IntType:return c.INT;case THREE.UnsignedShortType:return c.UNSIGNED_INT;case THREE.FloatType:return c.FLOAT;case THREE.AlphaFormat:return c.ALPHA;case THREE.RGBFormat:return c.RGB;case THREE.RGBAFormat:return c.RGBA;
+case THREE.LuminanceFormat:return c.LUMINANCE;case THREE.LuminanceAlphaFormat:return c.LUMINANCE_ALPHA}return 0}var P=document.createElement("canvas"),c,aa=null,ba=null,ca=this,ga=null,da=null,ja=null,na=null,$=[new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4],qa=new THREE.Matrix4,va=new Float32Array(16),wa=new Float32Array(16),Ha=new Float32Array(16),Aa=new THREE.Vector4,Ia=!0,Oa=new THREE.Color(0),Pa=0;if(a){if(a.antialias!==undefined)Ia=
+a.antialias;a.clearColor!==undefined&&Oa.setHex(a.clearColor);if(a.clearAlpha!==undefined)Pa=a.clearAlpha}this.domElement=P;this.autoClear=!0;this.sortObjects=!1;(function(f,o,n){try{c=P.getContext("experimental-webgl",{antialias:f})}catch(h){console.log(h)}if(!c)throw"cannot create webgl context";c.clearColor(0,0,0,1);c.clearDepth(1);c.enable(c.DEPTH_TEST);c.depthFunc(c.LEQUAL);c.frontFace(c.CCW);c.cullFace(c.BACK);c.enable(c.CULL_FACE);c.enable(c.BLEND);c.blendFunc(c.ONE,c.ONE_MINUS_SRC_ALPHA);
+c.clearColor(o.r,o.g,o.b,n);_cullEnabled=!0})(Ia,Oa,Pa);this.context=c;this.lights={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[]}};this.setSize=function(f,o){P.width=f;P.height=o;c.viewport(0,0,P.width,P.height)};this.setClearColorHex=function(f,o){var n=new THREE.Color(f);c.clearColor(n.r,n.g,n.b,o)};this.setClearColor=function(f,o){c.clearColor(f.r,f.g,f.b,o)};this.clear=function(){c.clear(c.COLOR_BUFFER_BIT|c.DEPTH_BUFFER_BIT)};this.initMaterial=
+function(f,o,n){var h,l;if(f instanceof THREE.MeshDepthMaterial)d(f,THREE.ShaderLib.depth);else if(f instanceof THREE.MeshNormalMaterial)d(f,THREE.ShaderLib.normal);else if(f instanceof THREE.MeshBasicMaterial)d(f,THREE.ShaderLib.basic);else if(f instanceof THREE.MeshLambertMaterial)d(f,THREE.ShaderLib.lambert);else if(f instanceof THREE.MeshPhongMaterial)d(f,THREE.ShaderLib.phong);else if(f instanceof THREE.LineBasicMaterial)d(f,THREE.ShaderLib.basic);else f instanceof THREE.ParticleBasicMaterial&&
+d(f,THREE.ShaderLib.particle_basic);var v,r,q,t;l=q=t=0;for(v=o.length;l<v;l++){r=o[l];r instanceof THREE.DirectionalLight&&q++;r instanceof THREE.PointLight&&t++}if(t+q<=4)o=q;else{o=Math.ceil(4*q/(t+q));t=4-o}l={directional:o,point:t};t=f.fragmentShader;o=f.vertexShader;v={fog:n,map:f.map,envMap:f.envMap,lightMap:f.lightMap,vertexColors:f.vertexColors,skinning:f.skinning,maxDirLights:l.directional,maxPointLights:l.point};n=c.createProgram();l=["#ifdef GL_ES\nprecision highp float;\n#endif","#define MAX_DIR_LIGHTS "+
+v.maxDirLights,"#define MAX_POINT_LIGHTS "+v.maxPointLights,v.fog?"#define USE_FOG":"",v.fog instanceof THREE.FogExp2?"#define FOG_EXP2":"",v.map?"#define USE_MAP":"",v.envMap?"#define USE_ENVMAP":"",v.lightMap?"#define USE_LIGHTMAP":"",v.vertexColors?"#define USE_COLOR":"","uniform mat4 viewMatrix;\nuniform vec3 cameraPosition;\n"].join("\n");v=[c.getParameter(c.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0?"#define VERTEX_TEXTURES":"","#define MAX_DIR_LIGHTS "+v.maxDirLights,"#define MAX_POINT_LIGHTS "+v.maxPointLights,
+v.map?"#define USE_MAP":"",v.envMap?"#define USE_ENVMAP":"",v.lightMap?"#define USE_LIGHTMAP":"",v.vertexColors?"#define USE_COLOR":"",v.skinning?"#define USE_SKINNING":"","uniform mat4 objectMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 cameraPosition;\nuniform mat4 cameraInverseMatrix;\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute vec2 uv;\nattribute vec2 uv2;\nattribute vec4 skinVertexA;\nattribute vec4 skinVertexB;\nattribute vec4 skinIndex;\nattribute vec4 skinWeight;\n"].join("\n");
 c.attachShader(n,R("fragment",l+t));c.attachShader(n,R("vertex",v+o));c.linkProgram(n);c.getProgramParameter(n,c.LINK_STATUS)||alert("Could not initialise shaders\nVALIDATE_STATUS: "+c.getProgramParameter(n,c.VALIDATE_STATUS)+", gl error ["+c.getError()+"]");n.uniforms={};n.attributes={};f.program=n;n=["viewMatrix","modelViewMatrix","projectionMatrix","normalMatrix","objectMatrix","cameraPosition","cameraInverseMatrix","boneGlobalMatrices"];for(h in f.uniforms)n.push(h);h=f.program;t=0;for(o=n.length;t<
 o;t++){l=n[t];h.uniforms[l]=c.getUniformLocation(h,l)}h=f.program;n=["position","normal","uv","uv2","tangent","color","skinVertexA","skinVertexB","skinIndex","skinWeight"];t=0;for(o=n.length;t<o;t++){l=n[t];h.attributes[l]=c.getAttribLocation(h,l)}h=f.program.attributes;c.enableVertexAttribArray(h.position);h.color>=0&&c.enableVertexAttribArray(h.color);h.normal>=0&&c.enableVertexAttribArray(h.normal);h.tangent>=0&&c.enableVertexAttribArray(h.tangent);if(f.skinning&&h.skinVertexA>=0&&h.skinVertexB>=
 0&&h.skinIndex>=0&&h.skinWeight>=0){c.enableVertexAttribArray(h.skinVertexA);c.enableVertexAttribArray(h.skinVertexB);c.enableVertexAttribArray(h.skinIndex);c.enableVertexAttribArray(h.skinWeight)}};this.render=function(f,o,n,h){var l,v,r,q,t,G,F,I,S=f.lights,y=f.fog;o.matrixAutoUpdate&&o.update();o.matrixWorld.flattenToArray(Ha);o.projectionMatrix.flattenToArray(va);o.inverseMatrix.flattenToArray(wa);qa.multiply(o.projectionMatrix,o.matrixWorld);k(qa);THREE.AnimationHandler&&THREE.AnimationHandler.update();
 f.update(undefined,!1,o);this.initWebGLObjects(f,o);J(n,h!==undefined?h:!0);this.autoClear&&this.clear();t=f.__webGLObjects.length;for(h=0;h<t;h++){l=f.__webGLObjects[h];F=l.object;if(F.visible)if(!(F instanceof THREE.Mesh)||s(F)){F.matrixWorld.flattenToArray(F._objectMatrixArray);H(F,o);z(l);l.render=!0;if(this.sortObjects){Aa.copy(F.position);qa.multiplyVector3(Aa);l.z=Aa.z}}else l.render=!1;else l.render=!1}this.sortObjects&&f.__webGLObjects.sort(A);G=f.__webGLObjectsImmediate.length;for(h=0;h<
-G;h++){l=f.__webGLObjectsImmediate[h];F=l.object;if(F.visible){F.matrixAutoUpdate&&F.matrixWorld.flattenToArray(F._objectMatrixArray);H(F,o);x(l)}}K(THREE.NormalBlending);for(h=0;h<t;h++){l=f.__webGLObjects[h];if(l.render){F=l.object;I=l.buffer;r=l.opaque;j(F);for(l=0;l<r.count;l++){q=r.list[l];m(q.depth_test);g(o,S,y,q,I,F)}}}for(h=0;h<G;h++){l=f.__webGLObjectsImmediate[h];F=l.object;if(F.visible){r=l.opaque;j(F);for(l=0;l<r.count;l++){q=r.list[l];m(q.depth_test);v=e(o,S,y,q,F);F.render(function(M){i(M,
-v)})}}}for(h=0;h<t;h++){l=f.__webGLObjects[h];if(l.render){F=l.object;I=l.buffer;r=l.transparent;j(F);for(l=0;l<r.count;l++){q=r.list[l];K(q.blending);m(q.depth_test);g(o,S,y,q,I,F)}}}for(h=0;h<G;h++){l=f.__webGLObjectsImmediate[h];F=l.object;if(F.visible){r=l.transparent;j(F);for(l=0;l<r.count;l++){q=r.list[l];K(q.blending);m(q.depth_test);v=e(o,S,y,q,F);F.render(function(M){i(M,v)})}}}if(n&&n.min_filter!==THREE.NearestFilter&&n.min_filter!==THREE.LinearFilter){c.bindTexture(c.TEXTURE_2D,n.__webGLTexture);
+G;h++){l=f.__webGLObjectsImmediate[h];F=l.object;if(F.visible){F.matrixAutoUpdate&&F.matrixWorld.flattenToArray(F._objectMatrixArray);H(F,o);x(l)}}K(THREE.NormalBlending);for(h=0;h<t;h++){l=f.__webGLObjects[h];if(l.render){F=l.object;I=l.buffer;r=l.opaque;j(F);for(l=0;l<r.count;l++){q=r.list[l];m(q.depthTest);g(o,S,y,q,I,F)}}}for(h=0;h<G;h++){l=f.__webGLObjectsImmediate[h];F=l.object;if(F.visible){r=l.opaque;j(F);for(l=0;l<r.count;l++){q=r.list[l];m(q.depthTest);v=e(o,S,y,q,F);F.render(function(M){i(M,
+v)})}}}for(h=0;h<t;h++){l=f.__webGLObjects[h];if(l.render){F=l.object;I=l.buffer;r=l.transparent;j(F);for(l=0;l<r.count;l++){q=r.list[l];K(q.blending);m(q.depthTest);g(o,S,y,q,I,F)}}}for(h=0;h<G;h++){l=f.__webGLObjectsImmediate[h];F=l.object;if(F.visible){r=l.transparent;j(F);for(l=0;l<r.count;l++){q=r.list[l];K(q.blending);m(q.depthTest);v=e(o,S,y,q,F);F.render(function(M){i(M,v)})}}}if(n&&n.minFilter!==THREE.NearestFilter&&n.minFilter!==THREE.LinearFilter){c.bindTexture(c.TEXTURE_2D,n.__webGLTexture);
 c.generateMipmap(c.TEXTURE_2D);c.bindTexture(c.TEXTURE_2D,null)}};this.initWebGLObjects=function(f,o){var n,h,l;if(!f.__webGLObjects){f.__webGLObjects=[];f.__webGLObjectsMap={};f.__webGLObjectsImmediate=[]}n=0;for(h=f.objects.length;n<h;n++){l=f.objects[n];var v=f,r=o,q=void 0,t=void 0,G=void 0,F=void 0;t=l.geometry;if(v.__webGLObjectsMap[l.id]==undefined){v.__webGLObjectsMap[l.id]={};l._modelViewMatrix=new THREE.Matrix4;l._normalMatrixArray=new Float32Array(9);l._modelViewMatrixArray=new Float32Array(16);
 l._objectMatrixArray=new Float32Array(16);l.matrixWorld.flattenToArray(l._objectMatrixArray)}F=v.__webGLObjectsMap[l.id];objlist=v.__webGLObjects;if(l instanceof THREE.Mesh){for(q in t.geometryChunks){G=t.geometryChunks[q];if(!G.__webGLVertexBuffer){r=G;r.__webGLVertexBuffer=c.createBuffer();r.__webGLNormalBuffer=c.createBuffer();r.__webGLTangentBuffer=c.createBuffer();r.__webGLColorBuffer=c.createBuffer();r.__webGLUVBuffer=c.createBuffer();r.__webGLUV2Buffer=c.createBuffer();r.__webGLSkinVertexABuffer=
 c.createBuffer();r.__webGLSkinVertexBBuffer=c.createBuffer();r.__webGLSkinIndicesBuffer=c.createBuffer();r.__webGLSkinWeightsBuffer=c.createBuffer();r.__webGLFaceBuffer=c.createBuffer();r.__webGLLineBuffer=c.createBuffer();r=G;var I=l,S=void 0,y=void 0,M=0,ea=v=0,Z=I.geometry.faces,Q=r.faces;S=0;for(y=Q.length;S<y;S++){fi=Q[S];face=Z[fi];if(face instanceof THREE.Face3){M+=3;v+=1;ea+=3}else if(face instanceof THREE.Face4){M+=4;v+=2;ea+=4}}r.__vertexArray=new Float32Array(M*3);r.__normalArray=new Float32Array(M*
@@ -179,23 +179,23 @@ O=q.__dirtyColors;if(q.__dirtyVertices){for(y=0;y<Z;y++){I=M[y].position;r=y*3;Q
 c.createBuffer();q.__webGLColorBuffer=c.createBuffer();q=t;G=q.vertices.length;q.__vertexArray=new Float32Array(G*3);q.__colorArray=new Float32Array(G*3);q.__sortArray=[];q.__webGLParticleCount=G;t.__dirtyVertices=!0;t.__dirtyColors=!0}(t.__dirtyVertices||t.__dirtyColors||l.sortParticles)&&b(t,c.DYNAMIC_DRAW,l,r);E(objlist,F,0,t,l);t.__dirtyVertices=!1;t.__dirtyColors=!1}else if(THREE.MarchingCubes!==undefined&&l instanceof THREE.MarchingCubes){t=F;if(t[0]==undefined){v.__webGLObjectsImmediate.push({object:l,
 opaque:{list:[],count:0},transparent:{list:[],count:0}});t[0]=1}}}};this.removeObject=function(f,o){var n,h;for(n=f.__webGLObjects.length-1;n>=0;n--){h=f.__webGLObjects[n].object;o==h&&f.__webGLObjects.splice(n,1)}};this.setFaceCulling=function(f,o){if(f){!o||o=="ccw"?c.frontFace(c.CCW):c.frontFace(c.CW);if(f=="back")c.cullFace(c.BACK);else f=="front"?c.cullFace(c.FRONT):c.cullFace(c.FRONT_AND_BACK);c.enable(c.CULL_FACE)}else c.disable(c.CULL_FACE)};this.supportsVertexTextures=function(){return c.getParameter(c.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>
 0}};
-THREE.Snippets={fog_pars_fragment:"#ifdef USE_FOG\nuniform vec3 fogColor;\n#ifdef FOG_EXP2\nuniform float fogDensity;\n#else\nuniform float fogNear;\nuniform float fogFar;\n#endif\n#endif",fog_fragment:"#ifdef USE_FOG\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n#ifdef FOG_EXP2\nconst float LOG2 = 1.442695;\nfloat fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n#else\nfloat fogFactor = smoothstep( fogNear, fogFar, depth );\n#endif\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\nvarying vec3 vReflect;\nuniform float reflectivity;\nuniform samplerCube env_map;\nuniform int combine;\n#endif",
-envmap_fragment:"#ifdef USE_ENVMAP\nvec4 cubeColor = textureCube( env_map, vec3( -vReflect.x, vReflect.yz ) );\nif ( combine == 1 ) {\ngl_FragColor = vec4( mix( gl_FragColor.xyz, cubeColor.xyz, reflectivity ), opacity );\n} else {\ngl_FragColor = gl_FragColor * cubeColor;\n}\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\nvarying vec3 vReflect;\nuniform float refraction_ratio;\nuniform bool useRefract;\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\nvec4 mPosition = objectMatrix * vec4( position, 1.0 );\nvec3 nWorld = mat3( objectMatrix[0].xyz, objectMatrix[1].xyz, objectMatrix[2].xyz ) * normal;\nif ( useRefract ) {\nvReflect = refract( normalize( mPosition.xyz - cameraPosition ), normalize( nWorld.xyz ), refraction_ratio );\n} else {\nvReflect = reflect( normalize( mPosition.xyz - cameraPosition ), normalize( nWorld.xyz ) );\n}\n#endif",
-map_particle_pars_fragment:"#ifdef USE_MAP\nuniform sampler2D map;\n#endif",map_particle_fragment:"#ifdef USE_MAP\ngl_FragColor = gl_FragColor * texture2D( map, gl_PointCoord );\n#endif",map_pars_fragment:"#ifdef USE_MAP\nvarying vec2 vUv;\nuniform sampler2D map;\n#endif",map_pars_vertex:"#ifdef USE_MAP\nvarying vec2 vUv;\n#endif",map_fragment:"#ifdef USE_MAP\ngl_FragColor = gl_FragColor * texture2D( map, vUv );\n#endif",map_vertex:"#ifdef USE_MAP\nvUv = uv;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\nvarying vec2 vUv2;\nuniform sampler2D light_map;\n#endif",
-lightmap_pars_vertex:"#ifdef USE_LIGHTMAP\nvarying vec2 vUv2;\n#endif",lightmap_fragment:"#ifdef USE_LIGHTMAP\ngl_FragColor = gl_FragColor * texture2D( light_map, vUv2 );\n#endif",lightmap_vertex:"#ifdef USE_LIGHTMAP\nvUv2 = uv2;\n#endif",lights_pars_vertex:"uniform bool enableLighting;\nuniform vec3 ambientLightColor;\n#if MAX_DIR_LIGHTS > 0\nuniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ];\nuniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ];\n#endif\n#if MAX_POINT_LIGHTS > 0\nuniform vec3 pointLightColor[ MAX_POINT_LIGHTS ];\nuniform vec3 pointLightPosition[ MAX_POINT_LIGHTS ];\n#ifdef PHONG\nvarying vec3 vPointLightVector[ MAX_POINT_LIGHTS ];\n#endif\n#endif",
+THREE.Snippets={fog_pars_fragment:"#ifdef USE_FOG\nuniform vec3 fogColor;\n#ifdef FOG_EXP2\nuniform float fogDensity;\n#else\nuniform float fogNear;\nuniform float fogFar;\n#endif\n#endif",fog_fragment:"#ifdef USE_FOG\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n#ifdef FOG_EXP2\nconst float LOG2 = 1.442695;\nfloat fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n#else\nfloat fogFactor = smoothstep( fogNear, fogFar, depth );\n#endif\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\nvarying vec3 vReflect;\nuniform float reflectivity;\nuniform samplerCube envMap;\nuniform int combine;\n#endif",
+envmap_fragment:"#ifdef USE_ENVMAP\nvec4 cubeColor = textureCube( envMap, vec3( -vReflect.x, vReflect.yz ) );\nif ( combine == 1 ) {\ngl_FragColor = vec4( mix( gl_FragColor.xyz, cubeColor.xyz, reflectivity ), opacity );\n} else {\ngl_FragColor = gl_FragColor * cubeColor;\n}\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\nvarying vec3 vReflect;\nuniform float refractionRatio;\nuniform bool useRefract;\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\nvec4 mPosition = objectMatrix * vec4( position, 1.0 );\nvec3 nWorld = mat3( objectMatrix[0].xyz, objectMatrix[1].xyz, objectMatrix[2].xyz ) * normal;\nif ( useRefract ) {\nvReflect = refract( normalize( mPosition.xyz - cameraPosition ), normalize( nWorld.xyz ), refractionRatio );\n} else {\nvReflect = reflect( normalize( mPosition.xyz - cameraPosition ), normalize( nWorld.xyz ) );\n}\n#endif",
+map_particle_pars_fragment:"#ifdef USE_MAP\nuniform sampler2D map;\n#endif",map_particle_fragment:"#ifdef USE_MAP\ngl_FragColor = gl_FragColor * texture2D( map, gl_PointCoord );\n#endif",map_pars_fragment:"#ifdef USE_MAP\nvarying vec2 vUv;\nuniform sampler2D map;\n#endif",map_pars_vertex:"#ifdef USE_MAP\nvarying vec2 vUv;\n#endif",map_fragment:"#ifdef USE_MAP\ngl_FragColor = gl_FragColor * texture2D( map, vUv );\n#endif",map_vertex:"#ifdef USE_MAP\nvUv = uv;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\nvarying vec2 vUv2;\nuniform sampler2D lightMap;\n#endif",
+lightmap_pars_vertex:"#ifdef USE_LIGHTMAP\nvarying vec2 vUv2;\n#endif",lightmap_fragment:"#ifdef USE_LIGHTMAP\ngl_FragColor = gl_FragColor * texture2D( lightMap, vUv2 );\n#endif",lightmap_vertex:"#ifdef USE_LIGHTMAP\nvUv2 = uv2;\n#endif",lights_pars_vertex:"uniform bool enableLighting;\nuniform vec3 ambientLightColor;\n#if MAX_DIR_LIGHTS > 0\nuniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ];\nuniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ];\n#endif\n#if MAX_POINT_LIGHTS > 0\nuniform vec3 pointLightColor[ MAX_POINT_LIGHTS ];\nuniform vec3 pointLightPosition[ MAX_POINT_LIGHTS ];\n#ifdef PHONG\nvarying vec3 vPointLightVector[ MAX_POINT_LIGHTS ];\n#endif\n#endif",
 lights_vertex:"if ( !enableLighting ) {\nvLightWeighting = vec3( 1.0 );\n} else {\nvLightWeighting = ambientLightColor;\n#if MAX_DIR_LIGHTS > 0\nfor( int i = 0; i < MAX_DIR_LIGHTS; i++ ) {\nvec4 lDirection = viewMatrix * vec4( directionalLightDirection[ i ], 0.0 );\nfloat directionalLightWeighting = max( dot( transformedNormal, normalize( lDirection.xyz ) ), 0.0 );\nvLightWeighting += directionalLightColor[ i ] * directionalLightWeighting;\n}\n#endif\n#if MAX_POINT_LIGHTS > 0\nfor( int i = 0; i < MAX_POINT_LIGHTS; i++ ) {\nvec4 lPosition = viewMatrix * vec4( pointLightPosition[ i ], 1.0 );\nvec3 pointLightVector = normalize( lPosition.xyz - mvPosition.xyz );\nfloat pointLightWeighting = max( dot( transformedNormal, pointLightVector ), 0.0 );\nvLightWeighting += pointLightColor[ i ] * pointLightWeighting;\n#ifdef PHONG\nvPointLightVector[ i ] = pointLightVector;\n#endif\n}\n#endif\n}",
 lights_pars_fragment:"#if MAX_DIR_LIGHTS > 0\nuniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ];\n#endif\n#if MAX_POINT_LIGHTS > 0\nvarying vec3 vPointLightVector[ MAX_POINT_LIGHTS ];\n#endif\nvarying vec3 vViewPosition;\nvarying vec3 vNormal;",lights_fragment:"vec3 normal = normalize( vNormal );\nvec3 viewPosition = normalize( vViewPosition );\nvec4 mColor = vec4( diffuse, opacity );\nvec4 mSpecular = vec4( specular, opacity );\n#if MAX_POINT_LIGHTS > 0\nvec4 pointDiffuse  = vec4( 0.0 );\nvec4 pointSpecular = vec4( 0.0 );\nfor( int i = 0; i < MAX_POINT_LIGHTS; i++ ) {\nvec3 pointVector = normalize( vPointLightVector[ i ] );\nvec3 pointHalfVector = normalize( vPointLightVector[ i ] + vViewPosition );\nfloat pointDotNormalHalf = dot( normal, pointHalfVector );\nfloat pointDiffuseWeight = max( dot( normal, pointVector ), 0.0 );\nfloat pointSpecularWeight = 0.0;\nif ( pointDotNormalHalf >= 0.0 )\npointSpecularWeight = pow( pointDotNormalHalf, shininess );\npointDiffuse  += mColor * pointDiffuseWeight;\npointSpecular += mSpecular * pointSpecularWeight;\n}\n#endif\n#if MAX_DIR_LIGHTS > 0\nvec4 dirDiffuse  = vec4( 0.0 );\nvec4 dirSpecular = vec4( 0.0 );\nfor( int i = 0; i < MAX_DIR_LIGHTS; i++ ) {\nvec4 lDirection = viewMatrix * vec4( directionalLightDirection[ i ], 0.0 );\nvec3 dirVector = normalize( lDirection.xyz );\nvec3 dirHalfVector = normalize( lDirection.xyz + vViewPosition );\nfloat dirDotNormalHalf = dot( normal, dirHalfVector );\nfloat dirDiffuseWeight = max( dot( normal, dirVector ), 0.0 );\nfloat dirSpecularWeight = 0.0;\nif ( dirDotNormalHalf >= 0.0 )\ndirSpecularWeight = pow( dirDotNormalHalf, shininess );\ndirDiffuse  += mColor * dirDiffuseWeight;\ndirSpecular += mSpecular * dirSpecularWeight;\n}\n#endif\nvec4 totalLight = vec4( ambient, opacity );\n#if MAX_DIR_LIGHTS > 0\ntotalLight += dirDiffuse + dirSpecular;\n#endif\n#if MAX_POINT_LIGHTS > 0\ntotalLight += pointDiffuse + pointSpecular;\n#endif\ngl_FragColor = gl_FragColor * totalLight;",
 color_pars_fragment:"#ifdef USE_COLOR\nvarying vec3 vColor;\n#endif",color_fragment:"#ifdef USE_COLOR\ngl_FragColor = gl_FragColor * vec4( vColor, opacity );\n#endif",color_pars_vertex:"#ifdef USE_COLOR\nvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\nvColor = color;\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\nuniform mat4 boneGlobalMatrices[20];\n#endif",skinning_vertex:"#ifdef USE_SKINNING\ngl_Position  = ( boneGlobalMatrices[ int( skinIndex.x ) ] * skinVertexA ) * skinWeight.x;\ngl_Position += ( boneGlobalMatrices[ int( skinIndex.y ) ] * skinVertexB ) * skinWeight.y;\ngl_Position  = projectionMatrix * viewMatrix * objectMatrix * gl_Position;\n#else\ngl_Position = projectionMatrix * mvPosition;\n#endif"};
-THREE.UniformsLib={common:{diffuse:{type:"c",value:new THREE.Color(15658734)},opacity:{type:"f",value:1},map:{type:"t",value:0,texture:null},light_map:{type:"t",value:2,texture:null},env_map:{type:"t",value:1,texture:null},useRefract:{type:"i",value:0},reflectivity:{type:"f",value:1},refraction_ratio:{type:"f",value:0.98},combine:{type:"i",value:0},fogDensity:{type:"f",value:2.5E-4},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2E3},fogColor:{type:"c",value:new THREE.Color(16777215)}},lights:{enableLighting:{type:"i",
+THREE.UniformsLib={common:{diffuse:{type:"c",value:new THREE.Color(15658734)},opacity:{type:"f",value:1},map:{type:"t",value:0,texture:null},lightMap:{type:"t",value:2,texture:null},envMap:{type:"t",value:1,texture:null},useRefract:{type:"i",value:0},reflectivity:{type:"f",value:1},refractionRatio:{type:"f",value:0.98},combine:{type:"i",value:0},fogDensity:{type:"f",value:2.5E-4},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2E3},fogColor:{type:"c",value:new THREE.Color(16777215)}},lights:{enableLighting:{type:"i",
 value:1},ambientLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]},directionalLightColor:{type:"fv",value:[]},pointLightPosition:{type:"fv",value:[]},pointLightColor:{type:"fv",value:[]}},particle:{psColor:{type:"c",value:new THREE.Color(15658734)},opacity:{type:"f",value:1},size:{type:"f",value:1},map:{type:"t",value:0,texture:null},fogDensity:{type:"f",value:2.5E-4},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2E3},fogColor:{type:"c",value:new THREE.Color(16777215)}}};
-THREE.ShaderLib={depth:{uniforms:{mNear:{type:"f",value:1},mFar:{type:"f",value:2E3},opacity:{type:"f",value:1}},fragment_shader:"uniform float mNear;\nuniform float mFar;\nuniform float opacity;\nvoid main() {\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\nfloat color = 1.0 - smoothstep( mNear, mFar, depth );\ngl_FragColor = vec4( vec3( color ), opacity );\n}",vertex_shader:"void main() {\ngl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"},normal:{uniforms:{opacity:{type:"f",
-value:1}},fragment_shader:"uniform float opacity;\nvarying vec3 vNormal;\nvoid main() {\ngl_FragColor = vec4( 0.5 * normalize( vNormal ) + 0.5, opacity );\n}",vertex_shader:"varying vec3 vNormal;\nvoid main() {\nvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\nvNormal = normalize( normalMatrix * normal );\ngl_Position = projectionMatrix * mvPosition;\n}"},basic:{uniforms:THREE.UniformsLib.common,fragment_shader:["uniform vec3 diffuse;\nuniform float opacity;",THREE.Snippets.color_pars_fragment,
-THREE.Snippets.map_pars_fragment,THREE.Snippets.lightmap_pars_fragment,THREE.Snippets.envmap_pars_fragment,THREE.Snippets.fog_pars_fragment,"void main() {\ngl_FragColor = vec4( diffuse, opacity );",THREE.Snippets.map_fragment,THREE.Snippets.lightmap_fragment,THREE.Snippets.color_fragment,THREE.Snippets.envmap_fragment,THREE.Snippets.fog_fragment,"}"].join("\n"),vertex_shader:[THREE.Snippets.map_pars_vertex,THREE.Snippets.lightmap_pars_vertex,THREE.Snippets.envmap_pars_vertex,THREE.Snippets.color_pars_vertex,
-THREE.Snippets.skinning_pars_vertex,"void main() {\nvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",THREE.Snippets.map_vertex,THREE.Snippets.lightmap_vertex,THREE.Snippets.envmap_vertex,THREE.Snippets.color_vertex,THREE.Snippets.skinning_vertex,"}"].join("\n")},lambert:{uniforms:Uniforms.merge([THREE.UniformsLib.common,THREE.UniformsLib.lights]),fragment_shader:["uniform vec3 diffuse;\nuniform float opacity;\nvarying vec3 vLightWeighting;",THREE.Snippets.color_pars_fragment,THREE.Snippets.map_pars_fragment,
-THREE.Snippets.lightmap_pars_fragment,THREE.Snippets.envmap_pars_fragment,THREE.Snippets.fog_pars_fragment,"void main() {\ngl_FragColor = vec4( diffuse, opacity );\ngl_FragColor = gl_FragColor * vec4( vLightWeighting, 1.0 );",THREE.Snippets.map_fragment,THREE.Snippets.lightmap_fragment,THREE.Snippets.color_fragment,THREE.Snippets.envmap_fragment,THREE.Snippets.fog_fragment,"}"].join("\n"),vertex_shader:["varying vec3 vLightWeighting;",THREE.Snippets.map_pars_vertex,THREE.Snippets.lightmap_pars_vertex,
+THREE.ShaderLib={depth:{uniforms:{mNear:{type:"f",value:1},mFar:{type:"f",value:2E3},opacity:{type:"f",value:1}},fragmentShader:"uniform float mNear;\nuniform float mFar;\nuniform float opacity;\nvoid main() {\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\nfloat color = 1.0 - smoothstep( mNear, mFar, depth );\ngl_FragColor = vec4( vec3( color ), opacity );\n}",vertexShader:"void main() {\ngl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"},normal:{uniforms:{opacity:{type:"f",
+value:1}},fragmentShader:"uniform float opacity;\nvarying vec3 vNormal;\nvoid main() {\ngl_FragColor = vec4( 0.5 * normalize( vNormal ) + 0.5, opacity );\n}",vertexShader:"varying vec3 vNormal;\nvoid main() {\nvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\nvNormal = normalize( normalMatrix * normal );\ngl_Position = projectionMatrix * mvPosition;\n}"},basic:{uniforms:THREE.UniformsLib.common,fragmentShader:["uniform vec3 diffuse;\nuniform float opacity;",THREE.Snippets.color_pars_fragment,
+THREE.Snippets.map_pars_fragment,THREE.Snippets.lightmap_pars_fragment,THREE.Snippets.envmap_pars_fragment,THREE.Snippets.fog_pars_fragment,"void main() {\ngl_FragColor = vec4( diffuse, opacity );",THREE.Snippets.map_fragment,THREE.Snippets.lightmap_fragment,THREE.Snippets.color_fragment,THREE.Snippets.envmap_fragment,THREE.Snippets.fog_fragment,"}"].join("\n"),vertexShader:[THREE.Snippets.map_pars_vertex,THREE.Snippets.lightmap_pars_vertex,THREE.Snippets.envmap_pars_vertex,THREE.Snippets.color_pars_vertex,
+THREE.Snippets.skinning_pars_vertex,"void main() {\nvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",THREE.Snippets.map_vertex,THREE.Snippets.lightmap_vertex,THREE.Snippets.envmap_vertex,THREE.Snippets.color_vertex,THREE.Snippets.skinning_vertex,"}"].join("\n")},lambert:{uniforms:Uniforms.merge([THREE.UniformsLib.common,THREE.UniformsLib.lights]),fragmentShader:["uniform vec3 diffuse;\nuniform float opacity;\nvarying vec3 vLightWeighting;",THREE.Snippets.color_pars_fragment,THREE.Snippets.map_pars_fragment,
+THREE.Snippets.lightmap_pars_fragment,THREE.Snippets.envmap_pars_fragment,THREE.Snippets.fog_pars_fragment,"void main() {\ngl_FragColor = vec4( diffuse, opacity );\ngl_FragColor = gl_FragColor * vec4( vLightWeighting, 1.0 );",THREE.Snippets.map_fragment,THREE.Snippets.lightmap_fragment,THREE.Snippets.color_fragment,THREE.Snippets.envmap_fragment,THREE.Snippets.fog_fragment,"}"].join("\n"),vertexShader:["varying vec3 vLightWeighting;",THREE.Snippets.map_pars_vertex,THREE.Snippets.lightmap_pars_vertex,
 THREE.Snippets.envmap_pars_vertex,THREE.Snippets.lights_pars_vertex,THREE.Snippets.color_pars_vertex,THREE.Snippets.skinning_pars_vertex,"void main() {\nvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",THREE.Snippets.map_vertex,THREE.Snippets.lightmap_vertex,THREE.Snippets.envmap_vertex,THREE.Snippets.color_vertex,"vec3 transformedNormal = normalize( normalMatrix * normal );",THREE.Snippets.lights_vertex,THREE.Snippets.skinning_vertex,"}"].join("\n")},phong:{uniforms:Uniforms.merge([THREE.UniformsLib.common,
-THREE.UniformsLib.lights,{ambient:{type:"c",value:new THREE.Color(328965)},specular:{type:"c",value:new THREE.Color(1118481)},shininess:{type:"f",value:30}}]),fragment_shader:["uniform vec3 diffuse;\nuniform float opacity;\nuniform vec3 ambient;\nuniform vec3 specular;\nuniform float shininess;\nvarying vec3 vLightWeighting;",THREE.Snippets.color_pars_fragment,THREE.Snippets.map_pars_fragment,THREE.Snippets.lightmap_pars_fragment,THREE.Snippets.envmap_pars_fragment,THREE.Snippets.fog_pars_fragment,
-THREE.Snippets.lights_pars_fragment,"void main() {\ngl_FragColor = vec4( vLightWeighting, 1.0 );",THREE.Snippets.lights_fragment,THREE.Snippets.map_fragment,THREE.Snippets.lightmap_fragment,THREE.Snippets.color_fragment,THREE.Snippets.envmap_fragment,THREE.Snippets.fog_fragment,"}"].join("\n"),vertex_shader:["#define PHONG\nvarying vec3 vLightWeighting;\nvarying vec3 vViewPosition;\nvarying vec3 vNormal;",THREE.Snippets.map_pars_vertex,THREE.Snippets.lightmap_pars_vertex,THREE.Snippets.envmap_pars_vertex,
+THREE.UniformsLib.lights,{ambient:{type:"c",value:new THREE.Color(328965)},specular:{type:"c",value:new THREE.Color(1118481)},shininess:{type:"f",value:30}}]),fragmentShader:["uniform vec3 diffuse;\nuniform float opacity;\nuniform vec3 ambient;\nuniform vec3 specular;\nuniform float shininess;\nvarying vec3 vLightWeighting;",THREE.Snippets.color_pars_fragment,THREE.Snippets.map_pars_fragment,THREE.Snippets.lightmap_pars_fragment,THREE.Snippets.envmap_pars_fragment,THREE.Snippets.fog_pars_fragment,
+THREE.Snippets.lights_pars_fragment,"void main() {\ngl_FragColor = vec4( vLightWeighting, 1.0 );",THREE.Snippets.lights_fragment,THREE.Snippets.map_fragment,THREE.Snippets.lightmap_fragment,THREE.Snippets.color_fragment,THREE.Snippets.envmap_fragment,THREE.Snippets.fog_fragment,"}"].join("\n"),vertexShader:["#define PHONG\nvarying vec3 vLightWeighting;\nvarying vec3 vViewPosition;\nvarying vec3 vNormal;",THREE.Snippets.map_pars_vertex,THREE.Snippets.lightmap_pars_vertex,THREE.Snippets.envmap_pars_vertex,
 THREE.Snippets.lights_pars_vertex,THREE.Snippets.color_pars_vertex,THREE.Snippets.skinning_pars_vertex,"void main() {\nvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",THREE.Snippets.map_vertex,THREE.Snippets.lightmap_vertex,THREE.Snippets.envmap_vertex,THREE.Snippets.color_vertex,"#ifndef USE_ENVMAP\nvec4 mPosition = objectMatrix * vec4( position, 1.0 );\n#endif\nvViewPosition = cameraPosition - mPosition.xyz;\nvec3 transformedNormal = normalize( normalMatrix * normal );\nvNormal = transformedNormal;",
-THREE.Snippets.lights_vertex,THREE.Snippets.skinning_vertex,"}"].join("\n")},particle_basic:{uniforms:THREE.UniformsLib.particle,fragment_shader:["uniform vec3 psColor;\nuniform float opacity;",THREE.Snippets.color_pars_fragment,THREE.Snippets.map_particle_pars_fragment,THREE.Snippets.fog_pars_fragment,"void main() {\ngl_FragColor = vec4( psColor, opacity );",THREE.Snippets.map_particle_fragment,THREE.Snippets.color_fragment,THREE.Snippets.fog_fragment,"}"].join("\n"),vertex_shader:["uniform float size;",
+THREE.Snippets.lights_vertex,THREE.Snippets.skinning_vertex,"}"].join("\n")},particle_basic:{uniforms:THREE.UniformsLib.particle,fragmentShader:["uniform vec3 psColor;\nuniform float opacity;",THREE.Snippets.color_pars_fragment,THREE.Snippets.map_particle_pars_fragment,THREE.Snippets.fog_pars_fragment,"void main() {\ngl_FragColor = vec4( psColor, opacity );",THREE.Snippets.map_particle_fragment,THREE.Snippets.color_fragment,THREE.Snippets.fog_fragment,"}"].join("\n"),vertexShader:["uniform float size;",
 THREE.Snippets.color_pars_vertex,"void main() {",THREE.Snippets.color_vertex,"vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\ngl_PointSize = size;\n}"].join("\n")}};

+ 1 - 1
examples/canvas_materials.html

@@ -79,7 +79,7 @@
 					{ material: new THREE.MeshNormalMaterial(), overdraw: true, doubleSided: false },
 					{ material: new THREE.MeshBasicMaterial( { map: ImageUtils.loadTexture( 'textures/land_ocean_ice_cloud_2048.jpg' ) } ), overdraw: false, doubleSided: false },
 					{ material: new THREE.MeshLambertMaterial( { map: ImageUtils.loadTexture( 'textures/land_ocean_ice_cloud_2048.jpg' ) } ), overdraw: false, doubleSided: false },
-					{ material: new THREE.MeshBasicMaterial( { env_map: ImageUtils.loadTexture( 'textures/envmap.png', new THREE.SphericalReflectionMapping() ) } ), overdraw: false, doubleSided: false }
+					{ material: new THREE.MeshBasicMaterial( { envMap: ImageUtils.loadTexture( 'textures/envmap.png', new THREE.SphericalReflectionMapping() ) } ), overdraw: false, doubleSided: false }
 
 				];
 

+ 1 - 1
examples/canvas_materials_reflection.html

@@ -66,7 +66,7 @@
 				geometry = new WaltHead();
 				geometry.computeVertexNormals();
 
-				mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { env_map: ImageUtils.loadTexture( 'textures/metal.jpg', new THREE.SphericalReflectionMapping() ) } ) );
+				mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { envMap: ImageUtils.loadTexture( 'textures/metal.jpg', new THREE.SphericalReflectionMapping() ) } ) );
 				mesh.overdraw = true;
 				scene.addObject( mesh );
 

+ 4 - 4
examples/canvas_materials_video.html

@@ -80,8 +80,8 @@
 				imageContext.fillRect( 0, 0, 480, 204 );
 
 				texture = new THREE.Texture( image );
-				texture.min_filter = THREE.LinearFilter;
-				texture.mag_filter = THREE.LinearFilter;
+				texture.minFilter = THREE.LinearFilter;
+				texture.magFilter = THREE.LinearFilter;
 
 				var material = new THREE.MeshBasicMaterial( { map: texture } );
 
@@ -98,8 +98,8 @@
 				imageReflectionGradient.addColorStop( 1, 'rgba(240, 240, 240, 0.8)' );
 
 				textureReflection = new THREE.Texture( imageReflection );
-				textureReflection.min_filter = THREE.LinearFilter;
-				textureReflection.mag_filter = THREE.LinearFilter;
+				textureReflection.minFilter = THREE.LinearFilter;
+				textureReflection.magFilter = THREE.LinearFilter;
 				
 				var materialReflection = new THREE.MeshBasicMaterial( { map: textureReflection } );
 

+ 1 - 1
examples/canvas_sandbox.html

@@ -166,7 +166,7 @@
 				objects = [];
 
 				geometry = new Sphere( 100, 16, 8 );
-				material = new THREE.MeshBasicMaterial( { env_map: ImageUtils.loadTexture( 'textures/metal.jpg', new THREE.SphericalReflectionMapping() ) } );
+				material = new THREE.MeshBasicMaterial( { envMap: ImageUtils.loadTexture( 'textures/metal.jpg', new THREE.SphericalReflectionMapping() ) } );
 
 				for ( var i = 0; i < 10; i ++ ) {
 

+ 0 - 143
examples/js/CameraControl.js

@@ -1,143 +0,0 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- * @author alteredq / http://alteredqualia.com/
- * @author paulirish / http://paulirish.com/
- */
-
-function bind( scope, fn ) {
-	return function () {
-		fn.apply( scope, arguments );
-	};
-}
-
-CameraControlWASD = function ( camera, movement_speed, look_speed, nofly, look_vertical ) {
-
-	this.movement_speed = movement_speed !== undefined ? movement_speed : 1.0;
-	this.look_speed = look_speed !== undefined ? look_speed : 0.005;
-
-	this.nofly = nofly;
-	this.look_vertical = look_vertical;
-	
-	this.camera = camera;
-	
-	this.mouseX = 0;
-	this.mouseY = 0;
-	
-	this.lat = 0;
-	this.lon = 0;
-	this.phy = 0;
-	this.theta = 0;
-	
-	this.moveForward = false;
-	this.moveBackward = false;
-	this.moveLeft = false;
-	this.moveRight = false;
-	
-	this.windowHalfX = window.innerWidth / 2;
-	this.windowHalfY = window.innerHeight / 2;
-
-	this.onDocumentMouseDown = function ( event ) {
-		
-		event.preventDefault();
-		event.stopPropagation();
-
-		switch ( event.button ) {
-
-			case 0: this.moveForward = true; break;
-			case 2: this.moveBackward = true; break;
-
-		}
-
-	};
-
-	this.onDocumentMouseUp = function ( event ) {
-
-		event.preventDefault();
-		event.stopPropagation();
-
-		switch ( event.button ) {
-
-			case 0: this.moveForward = false; break;
-			case 2: this.moveBackward = false; break;
-
-		}
-
-	};
-
-	this.onDocumentMouseMove = function (event) {
-
-		this.mouseX = event.clientX - this.windowHalfX;
-		this.mouseY = event.clientY - this.windowHalfY;
-
-	};
-	
-	this.onDocumentKeyDown = function ( event ) {
-
-		switch( event.keyCode ) {
-
-			case 38: /*up*/
-			case 87: /*W*/ this.moveForward = true; break;
-
-			case 37: /*left*/
-			case 65: /*A*/ this.moveLeft = true; break;
-
-			case 40: /*down*/
-			case 83: /*S*/ this.moveBackward = true; break;
-
-			case 39: /*right*/
-			case 68: /*D*/ this.moveRight = true; break;
-
-		}
-
-	};
-
-	this.onDocumentKeyUp = function ( event ) {
-
-		switch( event.keyCode ) {
-
-			case 38: /*up*/
-			case 87: /*W*/ this.moveForward = false; break;
-
-			case 37: /*left*/
-			case 65: /*A*/ this.moveLeft = false; break;
-
-			case 40: /*down*/
-			case 83: /*S*/ this.moveBackward = false; break;
-
-			case 39: /*right*/
-			case 68: /*D*/ this.moveRight = false; break;
-
-		}
-
-	};
-	
-	this.update = function() {
-	
-		if ( this.moveForward )  this.camera.translateZ( - this.movement_speed, this.nofly );
-		if ( this.moveBackward ) this.camera.translateZ(   this.movement_speed, this.nofly  );
-		if ( this.moveLeft )     this.camera.translateX( - this.movement_speed, this.nofly  );
-		if ( this.moveRight )    this.camera.translateX(   this.movement_speed, this.nofly  );
-
-		this.lon += this.mouseX * this.look_speed;
-		if( this.look_vertical ) this.lat -= this.mouseY * this.look_speed;
-
-		this.lat = Math.max( - 85, Math.min( 85, this.lat ) );
-		this.phi = ( 90 - this.lat ) * Math.PI / 180;
-		this.theta = this.lon * Math.PI / 180;
-
-		this.camera.target.position.x = 100 * Math.sin( this.phi ) * Math.cos( this.theta ) + this.camera.position.x;
-		this.camera.target.position.y = 100 * Math.cos( this.phi ) + this.camera.position.y;
-		this.camera.target.position.z = 100 * Math.sin( this.phi ) * Math.sin( this.theta ) + this.camera.position.z;
-		
-	};
-	
-	
-	document.addEventListener( 'contextmenu', function ( event ) { event.preventDefault(); }, false );
-	
-	document.addEventListener( 'mousemove', bind( this, this.onDocumentMouseMove ), false );
-	document.addEventListener( 'mousedown', bind( this, this.onDocumentMouseDown ), false );
-	document.addEventListener( 'mouseup', bind( this, this.onDocumentMouseUp ), false );
-	document.addEventListener( 'keydown', bind( this, this.onDocumentKeyDown ), false );
-	document.addEventListener( 'keyup', bind( this, this.onDocumentKeyUp ), false );
-	
-};

+ 2 - 2
examples/js/ShaderExtras.js

@@ -16,7 +16,7 @@ var ShaderExtras = {
 				maxblur:  { type: "f", value: 1.0 },
 			  },
 
-	vertex_shader: [
+	vertexShader: [
 
 	"varying vec2 vUv;",
 
@@ -29,7 +29,7 @@ var ShaderExtras = {
 
 	].join("\n"),
 
-	fragment_shader: [
+	fragmentShader: [
 
 	"varying vec2 vUv;",
 	

+ 5 - 5
examples/misc_materials_multimaterials.html

@@ -1,7 +1,7 @@
 <!DOCTYPE HTML>
 <html lang="en">
 	<head>
-		<title>three.js - materials - multi-materials - webgl</title>
+		<title>three.js misc - materials - multi-materials</title>
 		<meta charset="utf-8">
 		<style type="text/css">
 			body {
@@ -99,9 +99,9 @@
 				sphere = new Sphere( 100, 16, 8 );
 				for (var i=0; i<10; i++) {
 					//mesh = new THREE.Mesh( sphere, new THREE.MeshLambertMaterial( ) );
-					mesh = new THREE.Mesh( sphere, [ new THREE.MeshLambertMaterial( { color: 0xffffff } ), new THREE.MeshBasicMaterial( { color: 0x000000, wireframe: true,  wireframe_linewidth: 1.5 } ) ] );
-					//mesh = new THREE.Mesh( sphere, new THREE.MeshLambertMaterial( { color: 0x00aa00, wireframe: true,  wireframe_linewidth: 1.5 } ) );
-					//mesh = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { wireframe: true,  wireframe_linewidth: 2.5 } ) );
+					mesh = new THREE.Mesh( sphere, [ new THREE.MeshLambertMaterial( { color: 0xffffff } ), new THREE.MeshBasicMaterial( { color: 0x000000, wireframe: true,  wireframeLinewidth: 1.5 } ) ] );
+					//mesh = new THREE.Mesh( sphere, new THREE.MeshLambertMaterial( { color: 0x00aa00, wireframe: true,  wireframeLinewidth: 1.5 } ) );
+					//mesh = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { wireframe: true,  wireframeLinewidth: 2.5 } ) );
 					mesh.position.x = 500 * ( Math.random() - 0.5 );
 					mesh.position.y = 500 * ( Math.random() - 0.5 );
 					mesh.position.z = 500 * ( Math.random() - 0.5 );
@@ -211,7 +211,7 @@
 				var materials = [ new THREE.MeshFaceMaterial() ];
 
 				// full-mesh wireframe overlay
-				//materials.push( new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true, wireframe_linewidth: 1.5 } ) );
+				//materials.push( new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true, wireframeLinewidth: 1.5 } ) );
 
 				// full-mesh color overlay
 				//materials.push( new THREE.MeshBasicMaterial { color: 0xff0000, opacity: 0.5 } ) );

+ 7 - 7
examples/misc_sound.html

@@ -71,7 +71,7 @@
 				scene.fog = new THREE.FogExp2( 0x000000, 0.0035 );
 
 				camera = new THREE.QuakeCamera( { fov: 50, aspect: window.innerWidth / window.innerHeight, near: 1, far: 10000,
-												  movement_speed: 1, look_speed: 0.002, nofly: true, look_vertical: false } );
+												  movementSpeed: 1, lookSpeed: 0.002, noFly: true, lookVertical: false } );
 
 				camera.position.set( 0, 25, 0 );
 
@@ -126,7 +126,7 @@
 
 				// ground
 
-				var material_wireframe = new THREE.MeshLambertMaterial( { color: 0xffaa00, wireframe: true, wireframe_linewidth: 1 } );
+				var material_wireframe = new THREE.MeshLambertMaterial( { color: 0xffaa00, wireframe: true, wireframeLinewidth: 1 } );
 				material_wireframe.color.setHSV( 0.1, 0.2, 0.25 );
 
 
@@ -160,7 +160,7 @@
 				postprocessing.camera.projectionMatrix = THREE.Matrix4.makeOrtho( window.innerWidth / - 2, window.innerWidth / 2,  window.innerHeight / 2, window.innerHeight / - 2, -10000, 10000 );
 				postprocessing.camera.position.z = 100;
 
-				var pars = { min_filter: THREE.LinearFilter, mag_filter: THREE.LinearFilter };
+				var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter };
 				postprocessing.rtTexture1 = new THREE.RenderTarget( window.innerWidth, window.innerHeight, pars );
 				postprocessing.rtTexture2 = new THREE.RenderTarget( 512, 512, pars );
 				postprocessing.rtTexture3 = new THREE.RenderTarget( 512, 512, pars );
@@ -174,8 +174,8 @@
 				postprocessing.materialScreen = new THREE.MeshShaderMaterial( {
 
 					uniforms: screen_uniforms,
-					vertex_shader: screen_shader.vertex_shader,
-					fragment_shader: screen_shader.fragment_shader,
+					vertexShader: screen_shader.vertexShader,
+					fragmentShader: screen_shader.fragmentShader,
 					blending: THREE.AdditiveBlending
 
 				} );
@@ -193,8 +193,8 @@
 				postprocessing.materialConvolution = new THREE.MeshShaderMaterial( {
 
 					uniforms: convolution_uniforms,
-					vertex_shader:   "#define KERNEL_SIZE 25.0\n" + convolution_shader.vertex_shader,
-					fragment_shader: "#define KERNEL_SIZE 25\n"   + convolution_shader.fragment_shader
+					vertexShader:   "#define KERNEL_SIZE 25.0\n" + convolution_shader.vertexShader,
+					fragmentShader: "#define KERNEL_SIZE 25\n"   + convolution_shader.fragmentShader
 
 				} );
 

+ 2 - 2
examples/misc_uqbiquity_test.html

@@ -1,7 +1,7 @@
 <!DOCTYPE HTML>
 <html lang="en">
 	<head>
-		<title>three.js - geometry - canvas polyfield</title>
+		<title>three.js misc - geometry - polyfield</title>
 		<meta charset="utf-8">
 		<style type="text/css">
 			body {
@@ -195,7 +195,7 @@
 				geometry.computeCentroids();
 				geometry.sortFacesByMaterial();
 
-				mesh = new THREE.Mesh( geometry, [ new THREE.MeshFaceMaterial(), new THREE.MeshBasicMaterial( { color: 0xff0000, opacity: 0.5, wireframe: true, wireframe_linewidth: 10 } ) ] );
+				mesh = new THREE.Mesh( geometry, [ new THREE.MeshFaceMaterial(), new THREE.MeshBasicMaterial( { color: 0xff0000, opacity: 0.5, wireframe: true, wireframeLinewidth: 10 } ) ] );
 				mesh.doubleSided = true;
 				mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
 				scene.addObject( mesh );

+ 15 - 15
examples/scenes/test_scene.js

@@ -129,8 +129,8 @@ var scene = {
 		"width" : 10, 
 		"height": 10,
 		"depth" : 10, 
-		"segments_width"  : 1, 
-		"segments_height" : 1,
+		"segmentsWidth"  : 1, 
+		"segmentsHeight" : 1,
 		"flipped" : false, 
 		"sides"   : { "px": true, "nx": true, "py": true, "ny": true, "pz": true, "nz": true }
 	},
@@ -139,23 +139,23 @@ var scene = {
 		"type"   : "plane",
 		"width"  : 10, 
 		"height" : 10,
-		"segments_width"  : 50, 
-		"segments_height" : 50
+		"segmentsWidth"  : 50, 
+		"segmentsHeight" : 50
 	},	
 
 	"quad": {
 		"type"   : "plane",
 		"width"  : 10, 
 		"height" : 10,
-		"segments_width"  : 1, 
-		"segments_height" : 1
+		"segmentsWidth"  : 1, 
+		"segmentsHeight" : 1
 	},	
 
 	"sphere": {
 		"type"    : "sphere",
 		"radius"  : 5, 
-		"segments_width"  : 32, 
-		"segments_height" : 16
+		"segmentsWidth"  : 32, 
+		"segmentsHeight" : 16
 	},
 
 	"icosahedron": {
@@ -270,27 +270,27 @@ var scene = {
 	
 	"basic_refraction": {
 		"type": "MeshBasicMaterial",
-		"parameters": { color: 0xffffff, env_map: "cube_refraction", refraction_ratio: 0.95 } 
+		"parameters": { color: 0xffffff, envMap: "cube_refraction", refractionRatio: 0.95 } 
 	},
 	
 	"lambert_cube": {
 		"type": "MeshLambertMaterial",
-		"parameters": { color: 0xff6600, env_map: "cube_reflection", combine: "MixOperation", reflectivity: 0.3 }
+		"parameters": { color: 0xff6600, envMap: "cube_reflection", combine: "MixOperation", reflectivity: 0.3 }
 	},
 	
 	"chrome": {
 		"type": "MeshLambertMaterial",
-		"parameters": { color: 0xffffff, env_map: "cube_reflection" }
+		"parameters": { color: 0xffffff, envMap: "cube_reflection" }
 	},
 
 	"darkerchrome": {
 		"type": "MeshLambertMaterial",
-		"parameters": { color: 0x222222, env_map: "cube_reflection" }
+		"parameters": { color: 0x222222, envMap: "cube_reflection" }
 	},
 	
 	"glass": {
 		"type": "MeshLambertMaterial",
-		"parameters": { color: 0x101046, env_map: "cube_reflection", opacity: 0.25 }
+		"parameters": { color: 0x101046, envMap: "cube_reflection", opacity: 0.25 }
 	},
 
 	"interior": {
@@ -355,8 +355,8 @@ var scene = {
 
 	"texture_minecraft": {
 		"url": "textures/minecraft/grass.png",
-		"mag_filter": "NearestFilter",
-		"min_filter": "LinearMipMapLinearFilter"
+		"magFilter": "NearestFilter",
+		"minFilter": "LinearMipMapLinearFilter"
 	}
 	
 },

+ 1 - 1
examples/webgl_geometry_blenderexport_colors.html

@@ -95,7 +95,7 @@
 
 				geometry.materials[0][0].shading = THREE.FlatShading;
 
-				var material = [ new THREE.MeshFaceMaterial(), new THREE.MeshLambertMaterial( { color: 0xffffff, opacity:0.9, shading:THREE.FlatShading, wireframe: true, wireframe_linewidth: 2 } ) ];
+				var material = [ new THREE.MeshFaceMaterial(), new THREE.MeshLambertMaterial( { color: 0xffffff, opacity:0.9, shading:THREE.FlatShading, wireframe: true, wireframeLinewidth: 2 } ) ];
 
 				mesh = SceneUtils.addMesh( scene, geometry, 250, 0, 0, 0, 0, 0, 0, material );
 

+ 1 - 1
examples/webgl_geometry_colors.html

@@ -127,7 +127,7 @@
 
 				var materials = [
 
-					new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, vertex_colors: true } ),
+					new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, vertexColors: true } ),
 					new THREE.MeshBasicMaterial( { color: 0x000000, shading: THREE.FlatShading, wireframe: true } )
 
 				];

+ 2 - 2
examples/webgl_geometry_dynamic.html

@@ -71,7 +71,7 @@
 				container = document.getElementById( 'container' );
 
 				camera = new THREE.QuakeCamera( { fov: 60, aspect: window.innerWidth / window.innerHeight, near: 1, far: 20000,
-												  movement_speed: 10, look_speed: 0.004, nofly: false, look_vertical: true } );
+												  movementSpeed: 10, lookSpeed: 0.004, noFly: false, lookVertical: true } );
 
 				camera.target.position.z = - 100;
 
@@ -114,7 +114,7 @@
 				geometry.computeVertexNormals();
 
 				var texture = ImageUtils.loadTexture( "textures/water.jpg" );
-				texture.wrap_s = texture.wrap_t = THREE.RepeatWrapping;
+				texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
 				material = new THREE.MeshBasicMaterial( { color:0x0044ff, opacity:1, map: texture } );
 
 				mesh = new THREE.Mesh( geometry, material );

+ 1 - 1
examples/webgl_geometry_minecraft.html

@@ -76,7 +76,7 @@
 				container = document.getElementById( 'container' );
 
 				camera = new THREE.QuakeCamera( { fov: 60, aspect: window.innerWidth / window.innerHeight, near: 1, far: 20000,
-												   movement_speed: 15, look_speed: 0.005, nofly: false, look_vertical: true } );
+												   movementSpeed: 15, lookSpeed: 0.005, noFly: false, lookVertical: true } );
 
 				camera.target.position.z = - 100;
 

+ 1 - 1
examples/webgl_geometry_minecraft_ao.html

@@ -86,7 +86,7 @@
 				container = document.getElementById( 'container' );
 
 				camera = new THREE.QuakeCamera( { fov: 60, aspect: window.innerWidth / window.innerHeight, near: 1, far: 20000,
-												  movement_speed: 15, look_speed: 0.005, nofly: false, look_vertical: true } );
+												  movementSpeed: 15, lookSpeed: 0.005, noFly: false, lookVertical: true } );
 
 				camera.target.position.z = - 100;
 

+ 1 - 1
examples/webgl_geometry_terrain.html

@@ -68,7 +68,7 @@
 				container = document.getElementById( 'container' );
 
 				camera = new THREE.QuakeCamera( { fov: 60, aspect: window.innerWidth / window.innerHeight, near: 1, far: 20000,
-												  movement_speed: 15, look_speed: 0.004, nofly: false, look_vertical: true } );
+												  movementSpeed: 15, lookSpeed: 0.004, noFly: false, lookVertical: true } );
 
 				camera.target.position.z = - 100;
 

+ 1 - 1
examples/webgl_geometry_terrain2.html

@@ -68,7 +68,7 @@
 				container = document.getElementById( 'container' );
 
 				camera = new THREE.QuakeCamera( { fov: 60, aspect: window.innerWidth / window.innerHeight, near: 1, far: 20000,
-												  movement_speed: 10, look_speed: 0.004, nofly: false, look_vertical: true } );
+												  movementSpeed: 10, lookSpeed: 0.004, noFly: false, lookVertical: true } );
 
 				camera.target.position.z = - 100;
 

+ 1 - 1
examples/webgl_geometry_terrain_fog.html

@@ -67,7 +67,7 @@
 				container = document.getElementById( 'container' );
 
 				camera = new THREE.QuakeCamera( { fov: 60, aspect: window.innerWidth / window.innerHeight, near: 1, far: 10000,
-												  movement_speed: 5, look_speed: 0.004, nofly: false, look_vertical: true } );
+												  movementSpeed: 5, lookSpeed: 0.004, noFly: false, lookVertical: true } );
 
 				camera.target.position.z = - 100;
 

+ 4 - 4
examples/webgl_hdr.html

@@ -128,8 +128,8 @@
 				scene.addLight( directionalLight );
 
 				var texture = ImageUtils.loadTexture( "textures/memorial.png" );
-				texture.min_filter = THREE.LinearFilter;
-				texture.mag_filter = THREE.NearestFilter;
+				texture.minFilter = THREE.LinearFilter;
+				texture.magFilter = THREE.NearestFilter;
 
 				materialHDR = new THREE.MeshShaderMaterial( {
 
@@ -138,8 +138,8 @@
 						exposure:  { type: "f", value: 0.125 },
 						brightMax: { type: "f", value: 0.5 }
 						},
-					vertex_shader: getText( 'vs-hdr' ),
-					fragment_shader: getText( 'fs-hdr' )
+					vertexShader: getText( 'vs-hdr' ),
+					fragmentShader: getText( 'fs-hdr' )
 
 				} );
 

+ 6 - 6
examples/webgl_lines_colors.html

@@ -118,7 +118,7 @@
 									[ material, scale*1.5, [0,0,0],  geometry2 ],
 									[ material, scale*1.5, [d,0,0],  geometry3 ] ];
 
-				material.vertex_colors = true;
+				material.vertexColors = true;
 
 				for ( i = 0; i < parameters.length; ++i ) {
 
@@ -140,7 +140,7 @@
 
 				sceneScreen = new THREE.Scene();
 
-				var pars = { min_filter: THREE.LinearFilter, mag_filter: THREE.LinearFilter };
+				var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter };
 				rtTexture1 = new THREE.RenderTarget( window.innerWidth, window.innerHeight, pars );
 				rtTexture2 = new THREE.RenderTarget( 512, 512, pars );
 				rtTexture3 = new THREE.RenderTarget( 512, 512, pars );
@@ -154,8 +154,8 @@
 				materialScreen = new THREE.MeshShaderMaterial( {
 
 					uniforms: screen_uniforms,
-					vertex_shader: screen_shader.vertex_shader,
-					fragment_shader: screen_shader.fragment_shader,
+					vertexShader: screen_shader.vertexShader,
+					fragmentShader: screen_shader.fragmentShader,
 					blending: THREE.AdditiveBlending
 
 				} );
@@ -173,8 +173,8 @@
 				materialConvolution = new THREE.MeshShaderMaterial( {
 
 					uniforms: convolution_uniforms,
-					vertex_shader:   "#define KERNEL_SIZE 25.0\n" + convolution_shader.vertex_shader,
-					fragment_shader: "#define KERNEL_SIZE 25\n"   + convolution_shader.fragment_shader
+					vertexShader:   "#define KERNEL_SIZE 25.0\n" + convolution_shader.vertexShader,
+					fragmentShader: "#define KERNEL_SIZE 25\n"   + convolution_shader.fragmentShader
 
 				} );
 

+ 25 - 25
examples/webgl_materials_cars.html

@@ -227,31 +227,31 @@
 
 				var mlib = {
 
-				"Orange": 	new THREE.MeshLambertMaterial( { color: 0xff6600, env_map: textureCube, combine: THREE.MixOperation, reflectivity: 0.3 } ),
-				"Blue": 	new THREE.MeshLambertMaterial( { color: 0x001133, env_map: textureCube, combine: THREE.MixOperation, reflectivity: 0.3 } ),
-				"Red": 		new THREE.MeshLambertMaterial( { color: 0x660000, env_map: textureCube, combine: THREE.MixOperation, reflectivity: 0.25 } ),
-				"Black": 	new THREE.MeshLambertMaterial( { color: 0x000000, env_map: textureCube, combine: THREE.MixOperation, reflectivity: 0.15 } ),
-				"White":	new THREE.MeshLambertMaterial( { color: 0xffffff, env_map: textureCube, combine: THREE.MixOperation, reflectivity: 0.25 } ),
-
-				"Carmine": 	new THREE.MeshPhongMaterial( { color: 0x770000, specular:0xffaaaa, env_map: textureCube, combine: THREE.MultiplyOperation } ),
-				"Gold": 	new THREE.MeshPhongMaterial( { color: 0xaa9944, specular:0xbbaa99, shininess:50, env_map: textureCube, combine: THREE.MultiplyOperation } ),
-				"Bronze":	new THREE.MeshPhongMaterial( { color: 0x150505, specular:0xee6600, shininess:10, env_map: textureCube, combine: THREE.MixOperation, reflectivity: 0.25 } ),
-				"Chrome": 	new THREE.MeshPhongMaterial( { color: 0xffffff, specular:0xffffff, env_map: textureCube, combine: THREE.Multiply } ),
-
-				"Orange metal": new THREE.MeshLambertMaterial( { color: 0xff6600, env_map: textureCube, combine: THREE.MultiplyOperation } ),
-				"Blue metal": 	new THREE.MeshLambertMaterial( { color: 0x001133, env_map: textureCube, combine: THREE.MultiplyOperation  } ),
-				"Red metal": 	new THREE.MeshLambertMaterial( { color: 0x770000, env_map: textureCube, combine: THREE.MultiplyOperation } ),
-				"Green metal": 	new THREE.MeshLambertMaterial( { color: 0x007711, env_map: textureCube, combine: THREE.MultiplyOperation } ),
-				"Black metal":	new THREE.MeshLambertMaterial( { color: 0x222222, env_map: textureCube, combine: THREE.MultiplyOperation } ),
-
-				"Pure chrome": 	new THREE.MeshLambertMaterial( { color: 0xffffff, env_map: textureCube } ),
-				"Dark chrome":	new THREE.MeshLambertMaterial( { color: 0x444444, env_map: textureCube } ),
-				"Darker chrome":new THREE.MeshLambertMaterial( { color: 0x222222, env_map: textureCube } ),
-
-				"Black glass": 	new THREE.MeshLambertMaterial( { color: 0x101016, env_map: textureCube, opacity: 0.975 } ),
-				"Dark glass":	new THREE.MeshLambertMaterial( { color: 0x101046, env_map: textureCube, opacity: 0.25 } ),
-				"Blue glass":	new THREE.MeshLambertMaterial( { color: 0x668899, env_map: textureCube, opacity: 0.75 } ),
-				"Light glass":	new THREE.MeshBasicMaterial( { color: 0x223344, env_map: textureCube, opacity: 0.25, combine: THREE.MixOperation, reflectivity: 0.25 } ),
+				"Orange": 	new THREE.MeshLambertMaterial( { color: 0xff6600, envMap: textureCube, combine: THREE.MixOperation, reflectivity: 0.3 } ),
+				"Blue": 	new THREE.MeshLambertMaterial( { color: 0x001133, envMap: textureCube, combine: THREE.MixOperation, reflectivity: 0.3 } ),
+				"Red": 		new THREE.MeshLambertMaterial( { color: 0x660000, envMap: textureCube, combine: THREE.MixOperation, reflectivity: 0.25 } ),
+				"Black": 	new THREE.MeshLambertMaterial( { color: 0x000000, envMap: textureCube, combine: THREE.MixOperation, reflectivity: 0.15 } ),
+				"White":	new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: textureCube, combine: THREE.MixOperation, reflectivity: 0.25 } ),
+
+				"Carmine": 	new THREE.MeshPhongMaterial( { color: 0x770000, specular:0xffaaaa, envMap: textureCube, combine: THREE.MultiplyOperation } ),
+				"Gold": 	new THREE.MeshPhongMaterial( { color: 0xaa9944, specular:0xbbaa99, shininess:50, envMap: textureCube, combine: THREE.MultiplyOperation } ),
+				"Bronze":	new THREE.MeshPhongMaterial( { color: 0x150505, specular:0xee6600, shininess:10, envMap: textureCube, combine: THREE.MixOperation, reflectivity: 0.25 } ),
+				"Chrome": 	new THREE.MeshPhongMaterial( { color: 0xffffff, specular:0xffffff, envMap: textureCube, combine: THREE.Multiply } ),
+
+				"Orange metal": new THREE.MeshLambertMaterial( { color: 0xff6600, envMap: textureCube, combine: THREE.MultiplyOperation } ),
+				"Blue metal": 	new THREE.MeshLambertMaterial( { color: 0x001133, envMap: textureCube, combine: THREE.MultiplyOperation  } ),
+				"Red metal": 	new THREE.MeshLambertMaterial( { color: 0x770000, envMap: textureCube, combine: THREE.MultiplyOperation } ),
+				"Green metal": 	new THREE.MeshLambertMaterial( { color: 0x007711, envMap: textureCube, combine: THREE.MultiplyOperation } ),
+				"Black metal":	new THREE.MeshLambertMaterial( { color: 0x222222, envMap: textureCube, combine: THREE.MultiplyOperation } ),
+
+				"Pure chrome": 	new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: textureCube } ),
+				"Dark chrome":	new THREE.MeshLambertMaterial( { color: 0x444444, envMap: textureCube } ),
+				"Darker chrome":new THREE.MeshLambertMaterial( { color: 0x222222, envMap: textureCube } ),
+
+				"Black glass": 	new THREE.MeshLambertMaterial( { color: 0x101016, envMap: textureCube, opacity: 0.975 } ),
+				"Dark glass":	new THREE.MeshLambertMaterial( { color: 0x101046, envMap: textureCube, opacity: 0.25 } ),
+				"Blue glass":	new THREE.MeshLambertMaterial( { color: 0x668899, envMap: textureCube, opacity: 0.75 } ),
+				"Light glass":	new THREE.MeshBasicMaterial( { color: 0x223344, envMap: textureCube, opacity: 0.25, combine: THREE.MixOperation, reflectivity: 0.25 } ),
 
 				"Red glass":	new THREE.MeshLambertMaterial( { color: 0xff0000, opacity: 0.75 } ),
 				"Yellow glass":	new THREE.MeshLambertMaterial( { color: 0xffffaa, opacity: 0.75 } ),

+ 12 - 12
examples/webgl_materials_cars_camaro.html

@@ -124,25 +124,25 @@
 				var camaroMaterials = {
 
 					body: 		[],
-					chrome: 	new THREE.MeshLambertMaterial( { color: 0xffffff, env_map: textureCube } ),
-					darkchrome: new THREE.MeshLambertMaterial( { color: 0x444444, env_map: textureCube } ),
-					glass:		new THREE.MeshBasicMaterial( { color: 0x223344, env_map: textureCube, opacity: 0.25, combine: THREE.MixOperation, reflectivity: 0.25 } ),
+					chrome: 	new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: textureCube } ),
+					darkchrome: new THREE.MeshLambertMaterial( { color: 0x444444, envMap: textureCube } ),
+					glass:		new THREE.MeshBasicMaterial( { color: 0x223344, envMap: textureCube, opacity: 0.25, combine: THREE.MixOperation, reflectivity: 0.25 } ),
 					tire:       new THREE.MeshLambertMaterial( { color: 0x050505 } ),
 					interior:   new THREE.MeshPhongMaterial( { color: 0x050505, shininess: 20 } ),
 					black:      new THREE.MeshLambertMaterial( { color: 0x000000 } )
 
 				}
 
-				camaroMaterials.body.push( [ "Orange", new THREE.MeshLambertMaterial( { color: 0xff6600, env_map: textureCube, combine: THREE.MixOperation, reflectivity: 0.3 } ) ] );
-				camaroMaterials.body.push( [ "Blue", new THREE.MeshLambertMaterial( { color: 0x226699, env_map: textureCube, combine: THREE.MixOperation, reflectivity: 0.3 } ) ] );
-				camaroMaterials.body.push( [ "Red", new THREE.MeshLambertMaterial( { color: 0x660000, env_map: textureCube, combine: THREE.MixOperation, reflectivity: 0.5 } ) ] );
-				camaroMaterials.body.push( [ "Black", new THREE.MeshLambertMaterial( { color: 0x000000, env_map: textureCube, combine: THREE.MixOperation, reflectivity: 0.5 } ) ] );
-				camaroMaterials.body.push( [ "White", new THREE.MeshLambertMaterial( { color: 0xffffff, env_map: textureCube, combine: THREE.MixOperation, reflectivity: 0.5 } ) ] );
+				camaroMaterials.body.push( [ "Orange", new THREE.MeshLambertMaterial( { color: 0xff6600, envMap: textureCube, combine: THREE.MixOperation, reflectivity: 0.3 } ) ] );
+				camaroMaterials.body.push( [ "Blue", new THREE.MeshLambertMaterial( { color: 0x226699, envMap: textureCube, combine: THREE.MixOperation, reflectivity: 0.3 } ) ] );
+				camaroMaterials.body.push( [ "Red", new THREE.MeshLambertMaterial( { color: 0x660000, envMap: textureCube, combine: THREE.MixOperation, reflectivity: 0.5 } ) ] );
+				camaroMaterials.body.push( [ "Black", new THREE.MeshLambertMaterial( { color: 0x000000, envMap: textureCube, combine: THREE.MixOperation, reflectivity: 0.5 } ) ] );
+				camaroMaterials.body.push( [ "White", new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: textureCube, combine: THREE.MixOperation, reflectivity: 0.5 } ) ] );
 
-				camaroMaterials.body.push( [ "Carmine", new THREE.MeshPhongMaterial( { color: 0x770000, specular:0xffaaaa, env_map: textureCube, combine: THREE.MultiplyOperation } ) ] );
-				camaroMaterials.body.push( [ "Gold", new THREE.MeshPhongMaterial( { color: 0xaa9944, specular:0xbbaa99, shininess:50, env_map: textureCube, combine: THREE.MultiplyOperation } ) ] );
-				camaroMaterials.body.push( [ "Bronze", new THREE.MeshPhongMaterial( { color: 0x150505, specular:0xee6600, shininess:10, env_map: textureCube, combine: THREE.MixOperation, reflectivity: 0.5 } ) ] );
-				camaroMaterials.body.push( [ "Chrome", new THREE.MeshPhongMaterial( { color: 0xffffff, specular:0xffffff, env_map: textureCube, combine: THREE.MultiplyOperation } ) ] );
+				camaroMaterials.body.push( [ "Carmine", new THREE.MeshPhongMaterial( { color: 0x770000, specular:0xffaaaa, envMap: textureCube, combine: THREE.MultiplyOperation } ) ] );
+				camaroMaterials.body.push( [ "Gold", new THREE.MeshPhongMaterial( { color: 0xaa9944, specular:0xbbaa99, shininess:50, envMap: textureCube, combine: THREE.MultiplyOperation } ) ] );
+				camaroMaterials.body.push( [ "Bronze", new THREE.MeshPhongMaterial( { color: 0x150505, specular:0xee6600, shininess:10, envMap: textureCube, combine: THREE.MixOperation, reflectivity: 0.5 } ) ] );
+				camaroMaterials.body.push( [ "Chrome", new THREE.MeshPhongMaterial( { color: 0xffffff, specular:0xffffff, envMap: textureCube, combine: THREE.MultiplyOperation } ) ] );
 
 				var loader = new THREE.Loader();
 				loader.loadBinary( { model: "obj/camaro/CamaroNoUv_bin.js", callback: function( geometry ) { createScene( geometry, camaroMaterials ) } } );

+ 4 - 4
examples/webgl_materials_cubemap.html

@@ -107,10 +107,10 @@
 				var reflectionCube = ImageUtils.loadTextureCube( urls );
 				var refractionCube = new THREE.Texture( reflectionCube.image, new THREE.CubeRefractionMapping() );
 				
-				//var cubeMaterial3 = new THREE.MeshPhongMaterial( { color: 0x000000, specular:0xaa0000, env_map: reflectionCube, combine: THREE.MixOperation, reflectivity: 0.25 } );
-				var cubeMaterial3 = new THREE.MeshLambertMaterial( { color: 0xff6600, env_map: reflectionCube, combine: THREE.MixOperation, reflectivity: 0.3 } );
-				var cubeMaterial2 = new THREE.MeshLambertMaterial( { color: 0xffee00, env_map: refractionCube, refraction_ratio: 0.95 } );
-				var cubeMaterial1 = new THREE.MeshLambertMaterial( { color: 0xffffff, env_map: reflectionCube } )
+				//var cubeMaterial3 = new THREE.MeshPhongMaterial( { color: 0x000000, specular:0xaa0000, envMap: reflectionCube, combine: THREE.MixOperation, reflectivity: 0.25 } );
+				var cubeMaterial3 = new THREE.MeshLambertMaterial( { color: 0xff6600, envMap: reflectionCube, combine: THREE.MixOperation, reflectivity: 0.3 } );
+				var cubeMaterial2 = new THREE.MeshLambertMaterial( { color: 0xffee00, envMap: refractionCube, refractionRatio: 0.95 } );
+				var cubeMaterial1 = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: reflectionCube } )
 
 				SceneUtils.addPanoramaCubeWebGL( sceneCube, 100000, reflectionCube );
 

+ 1 - 1
examples/webgl_materials_cubemap_balls_reflection.html

@@ -91,7 +91,7 @@
 					];
 
 				var textureCube = ImageUtils.loadTextureCube( urls );
-				var material = new THREE.MeshBasicMaterial( { color: 0xffffff, env_map: textureCube } );
+				var material = new THREE.MeshBasicMaterial( { color: 0xffffff, envMap: textureCube } );
 
 				for ( var i = 0; i < 200; i ++ ) {
 

+ 1 - 1
examples/webgl_materials_cubemap_balls_refraction.html

@@ -91,7 +91,7 @@
 					];
 
 				var textureCube = ImageUtils.loadTextureCube( urls, new THREE.CubeRefractionMapping() );
-				var material = new THREE.MeshBasicMaterial( { color: 0xffffff, env_map: textureCube, refraction_ratio: 0.95 } );
+				var material = new THREE.MeshBasicMaterial( { color: 0xffffff, envMap: textureCube, refractionRatio: 0.95 } );
 
 				for ( var i = 0; i < 200; i ++ ) {
 

+ 1 - 1
examples/webgl_materials_cubemap_escher.html

@@ -80,7 +80,7 @@
 							 r + "pz.jpg", r + "nz.jpg" ];
 
 				var textureCube = ImageUtils.loadTextureCube( urls );
-				var material = new THREE.MeshBasicMaterial( { color: 0xffffff, env_map: textureCube } )
+				var material = new THREE.MeshBasicMaterial( { color: 0xffffff, envMap: textureCube } )
 				var geometry = new Sphere( 100, 96, 64 );
 
 				var mesh = new THREE.Mesh( geometry, material );

+ 3 - 3
examples/webgl_materials_cubemap_refraction.html

@@ -104,9 +104,9 @@
 
 				var textureCube = ImageUtils.loadTextureCube( urls, new THREE.CubeRefractionMapping() );
 
-				var cubeMaterial3 = new THREE.MeshBasicMaterial( { color: 0xccddff, env_map: textureCube, refraction_ratio: 0.98, reflectivity:0.9 } );
-				var cubeMaterial2 = new THREE.MeshBasicMaterial( { color: 0xccfffd, env_map: textureCube, refraction_ratio: 0.985 } );
-				var cubeMaterial1 = new THREE.MeshBasicMaterial( { color: 0xffffff, env_map: textureCube, refraction_ratio: 0.98 } )
+				var cubeMaterial3 = new THREE.MeshBasicMaterial( { color: 0xccddff, envMap: textureCube, refractionRatio: 0.98, reflectivity:0.9 } );
+				var cubeMaterial2 = new THREE.MeshBasicMaterial( { color: 0xccfffd, envMap: textureCube, refractionRatio: 0.985 } );
+				var cubeMaterial1 = new THREE.MeshBasicMaterial( { color: 0xffffff, envMap: textureCube, refractionRatio: 0.98 } )
 
 				//SceneUtils.addPanoramaCubePlanes( sceneCube, 100000, images );
 				//SceneUtils.addPanoramaCube( sceneCube, 100000, images );

+ 1 - 1
examples/webgl_materials_normalmap.html

@@ -155,7 +155,7 @@
 
 				uniforms[ "uShininess" ].value = shininess;
 
-				var parameters = { fragment_shader: shader.fragment_shader, vertex_shader: shader.vertex_shader, uniforms: uniforms };
+				var parameters = { fragmentShader: shader.fragmentShader, vertexShader: shader.vertexShader, uniforms: uniforms };
 				var material1 = new THREE.MeshShaderMaterial( parameters );
 
 				var material2 = new THREE.MeshPhongMaterial( { color: diffuse, specular: specular, ambient: ambient, shininess: shininess } );

+ 1 - 1
examples/webgl_materials_normalmap2.html

@@ -138,7 +138,7 @@
 
 				uniforms[ "uShininess" ].value = shininess;
 
-				var parameters = { fragment_shader: shader.fragment_shader, vertex_shader: shader.vertex_shader, uniforms: uniforms };
+				var parameters = { fragmentShader: shader.fragmentShader, vertexShader: shader.vertexShader, uniforms: uniforms };
 				var material = new THREE.MeshShaderMaterial( parameters );
 
 				loader = new THREE.Loader( true );

+ 1 - 1
examples/webgl_materials_shaders_fresnel.html

@@ -99,7 +99,7 @@
 
 				uniforms["tCube"].texture = textureCube;
 
-				var parameters = { fragment_shader: shader.fragment_shader, vertex_shader: shader.vertex_shader, uniforms: uniforms };
+				var parameters = { fragmentShader: shader.fragmentShader, vertexShader: shader.vertexShader, uniforms: uniforms };
 				var material = new THREE.MeshShaderMaterial( parameters );
 
 				for ( var i = 0; i < 200; i ++ ) {

+ 7 - 7
examples/webgl_materials_video.html

@@ -102,8 +102,8 @@
 				//video.muted = true;
 
 				texture = new THREE.Texture( video );
-				texture.min_filter = THREE.LinearFilter;
-				texture.mag_filter = THREE.LinearFilter;
+				texture.minFilter = THREE.LinearFilter;
+				texture.magFilter = THREE.LinearFilter;
 
 				//
 
@@ -204,7 +204,7 @@
 				postprocessing.camera.projectionMatrix = THREE.Matrix4.makeOrtho( window.innerWidth / - 2, window.innerWidth / 2,  window.innerHeight / 2, window.innerHeight / - 2, -10000, 10000 );
 				postprocessing.camera.position.z = 100;
 
-				var pars = { min_filter: THREE.LinearFilter, mag_filter: THREE.LinearFilter };
+				var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter };
 				postprocessing.rtTexture1 = new THREE.RenderTarget( window.innerWidth, window.innerHeight, pars );
 				postprocessing.rtTexture2 = new THREE.RenderTarget( 512, 512, pars );
 				postprocessing.rtTexture3 = new THREE.RenderTarget( 512, 512, pars );
@@ -218,8 +218,8 @@
 				postprocessing.materialScreen = new THREE.MeshShaderMaterial( {
 
 					uniforms: screen_uniforms,
-					vertex_shader: screen_shader.vertex_shader,
-					fragment_shader: screen_shader.fragment_shader,
+					vertexShader: screen_shader.vertexShader,
+					fragmentShader: screen_shader.fragmentShader,
 					blending: THREE.AdditiveBlending
 
 				} );
@@ -237,8 +237,8 @@
 				postprocessing.materialConvolution = new THREE.MeshShaderMaterial( {
 
 					uniforms: convolution_uniforms,
-					vertex_shader:   "#define KERNEL_SIZE 25.0\n" + convolution_shader.vertex_shader,
-					fragment_shader: "#define KERNEL_SIZE 25\n"   + convolution_shader.fragment_shader
+					vertexShader:   "#define KERNEL_SIZE 25.0\n" + convolution_shader.vertexShader,
+					fragmentShader: "#define KERNEL_SIZE 25\n"   + convolution_shader.fragmentShader
 
 				} );
 

+ 1 - 1
examples/webgl_particles_billboards_colors.html

@@ -85,7 +85,7 @@
 
 				geometry.colors = colors;
 
-				material = new THREE.ParticleBasicMaterial( { size: 35, map: sprite, blending: THREE.BillboardBlending, vertex_colors: true } );
+				material = new THREE.ParticleBasicMaterial( { size: 35, map: sprite, blending: THREE.BillboardBlending, vertexColors: true } );
 				material.color.setHSV( 1.0, 0.2, 0.8 );
 
 				particles = new THREE.ParticleSystem( geometry, material );

+ 1 - 1
examples/webgl_particles_sprites.html

@@ -91,7 +91,7 @@
 					sprite = parameters[i][1];
 					size   = parameters[i][2];
 
-					materials[i] = new THREE.ParticleBasicMaterial( { size: size, map: sprite, blending: THREE.AdditiveBlending, depth_test: false } );
+					materials[i] = new THREE.ParticleBasicMaterial( { size: size, map: sprite, blending: THREE.AdditiveBlending, depthTest: false } );
 					materials[i].color.setHSV( color[0], color[1], color[2] );
 
 					particles = new THREE.ParticleSystem( geometry, materials[i] );

+ 13 - 13
examples/webgl_postprocessing.html

@@ -107,16 +107,16 @@
 				directionalLight.position.normalize();
 				sceneModel.addLight( directionalLight );
 
-				rtTexture1 = new THREE.RenderTarget( window.innerWidth, window.innerHeight, { min_filter: THREE.LinearFilter, mag_filter: THREE.NearestFilter } );
-				rtTexture2 = new THREE.RenderTarget( 256, 512, { min_filter: THREE.LinearFilter, mag_filter: THREE.LinearFilter } );
-				rtTexture3 = new THREE.RenderTarget( 512, 256, { min_filter: THREE.LinearFilter, mag_filter: THREE.LinearFilter } );
+				rtTexture1 = new THREE.RenderTarget( window.innerWidth, window.innerHeight, { minFilter: THREE.LinearFilter, magFilter: THREE.NearestFilter } );
+				rtTexture2 = new THREE.RenderTarget( 256, 512, { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter } );
+				rtTexture3 = new THREE.RenderTarget( 512, 256, { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter } );
 
 				materialColor = new THREE.MeshShaderMaterial( {
 
 					uniforms: { time: { type: "f", value: 0.0 } },
-					vertex_shader: getText( 'vs-generic' ),
-					fragment_shader: getText( 'fs-colors' ),
-					depth_test: false
+					vertexShader: getText( 'vs-generic' ),
+					fragmentShader: getText( 'fs-colors' ),
+					depthTest: false
 
 				} );
 
@@ -129,8 +129,8 @@
 				materialScreen = new THREE.MeshShaderMaterial( {
 
 					uniforms: screen_uniforms,
-					vertex_shader: screen_shader.vertex_shader,
-					fragment_shader: screen_shader.fragment_shader,
+					vertexShader: screen_shader.vertexShader,
+					fragmentShader: screen_shader.fragmentShader,
 					blending: THREE.AdditiveBlending
 
 				} );
@@ -145,8 +145,8 @@
 				materialFilm = new THREE.MeshShaderMaterial( {
 
 					uniforms: film_uniforms,
-					vertex_shader: film_shader.vertex_shader,
-					fragment_shader: film_shader.fragment_shader
+					vertexShader: film_shader.vertexShader,
+					fragmentShader: film_shader.fragmentShader
 
 				} );
 
@@ -165,8 +165,8 @@
 				materialConvolution = new THREE.MeshShaderMaterial( {
 
 					uniforms: convolution_uniforms,
-					vertex_shader:   "#define KERNEL_SIZE 25.0\n" + convolution_shader.vertex_shader,
-					fragment_shader: "#define KERNEL_SIZE 25\n"   + convolution_shader.fragment_shader
+					vertexShader:   "#define KERNEL_SIZE 25.0\n" + convolution_shader.vertexShader,
+					fragmentShader: "#define KERNEL_SIZE 25\n"   + convolution_shader.fragmentShader
 
 				} );
 
@@ -233,7 +233,7 @@
 
 				uniforms[ "uShininess" ].value = shininess;
 
-				var parameters = { fragment_shader: shader.fragment_shader, vertex_shader: shader.vertex_shader, uniforms: uniforms };
+				var parameters = { fragmentShader: shader.fragmentShader, vertexShader: shader.vertexShader, uniforms: uniforms };
 				var mat2 = new THREE.MeshShaderMaterial( parameters );
 
 				mesh = new THREE.Mesh( geometry, mat2 );

+ 5 - 5
examples/webgl_postprocessing_dof.html

@@ -1,7 +1,7 @@
 <!DOCTYPE HTML>
 <html lang="en">
 	<head>
-		<title>three.js - postprocessing - depth-of-field - webgl</title>
+		<title>three.js webgl - postprocessing - depth-of-field</title>
 		<meta charset="utf-8">
 		<style type="text/css">
 			body {
@@ -102,7 +102,7 @@
 
 				var textureCube = ImageUtils.loadTextureCube( urls );
 
-				parameters = { color: 0xff1100, env_map: textureCube, shading: THREE.FlatShading };
+				parameters = { color: 0xff1100, envMap: textureCube, shading: THREE.FlatShading };
 				//parameters = { color: 0xff1100, shading: THREE.FlatShading };
 				cubeMaterial = new THREE.MeshBasicMaterial( parameters );
 
@@ -241,7 +241,7 @@
 				postprocessing.camera.projectionMatrix = THREE.Matrix4.makeOrtho( window.innerWidth / - 2, window.innerWidth / 2,  window.innerHeight / 2, window.innerHeight / - 2, -10000, 10000 );
 				postprocessing.camera.position.z = 100;
 
-				var pars = { min_filter: THREE.LinearFilter, mag_filter: THREE.LinearFilter };
+				var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter };
 				postprocessing.rtTextureDepth = new THREE.RenderTarget( window.innerWidth, height, pars );
 				postprocessing.rtTextureColor = new THREE.RenderTarget( window.innerWidth, height, pars );
 
@@ -257,8 +257,8 @@
 				postprocessing.materialBokeh = new THREE.MeshShaderMaterial( {
 
 					uniforms: postprocessing.bokeh_uniforms,
-					vertex_shader: bokeh_shader.vertex_shader,
-					fragment_shader: bokeh_shader.fragment_shader
+					vertexShader: bokeh_shader.vertexShader,
+					fragmentShader: bokeh_shader.fragmentShader
 
 				} );
 

+ 7 - 7
examples/webgl_ribbons.html

@@ -116,7 +116,7 @@
 				var tmpRot = new THREE.Matrix4();
 				tmpRot.setRotAxis( new THREE.Vector3( 1, 0, 0 ), 1.57 );
 				
-				var material_base = new THREE.MeshBasicMaterial( { color:0xffffff, vertex_colors:true } );
+				var material_base = new THREE.MeshBasicMaterial( { color:0xffffff, vertexColors:true } );
 
 				renderer.initMaterial( material_base, scene.lights, scene.fog );
 
@@ -128,7 +128,7 @@
 				for ( i = 0; i < xgrid; i++ )
 				for ( j = 0; j < ygrid; j++ ) {
 
-					materials[c] = new THREE.MeshBasicMaterial( { color:0xffffff, vertex_colors:true } );
+					materials[c] = new THREE.MeshBasicMaterial( { color:0xffffff, vertexColors:true } );
 					materials[c].program = material_base.program;
 					materials[c].uniforms = Uniforms.clone( THREE.ShaderLib[ 'basic' ].uniforms );
 
@@ -232,7 +232,7 @@
 				postprocessing.camera.projectionMatrix = THREE.Matrix4.makeOrtho( window.innerWidth / - 2, window.innerWidth / 2,  window.innerHeight / 2, window.innerHeight / - 2, -10000, 10000 );
 				postprocessing.camera.position.z = 100;
 
-				var pars = { min_filter: THREE.LinearFilter, mag_filter: THREE.LinearFilter };
+				var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter };
 				postprocessing.rtTexture1 = new THREE.RenderTarget( window.innerWidth, window.innerHeight, pars );
 				postprocessing.rtTexture2 = new THREE.RenderTarget( 512, 512, pars );
 				postprocessing.rtTexture3 = new THREE.RenderTarget( 512, 512, pars );
@@ -246,8 +246,8 @@
 				postprocessing.materialScreen = new THREE.MeshShaderMaterial( {
 
 					uniforms: screen_uniforms,
-					vertex_shader: screen_shader.vertex_shader,
-					fragment_shader: screen_shader.fragment_shader,
+					vertexShader: screen_shader.vertexShader,
+					fragmentShader: screen_shader.fragmentShader,
 					blending: THREE.AdditiveBlending
 
 				} );
@@ -265,8 +265,8 @@
 				postprocessing.materialConvolution = new THREE.MeshShaderMaterial( {
 
 					uniforms: convolution_uniforms,
-					vertex_shader:   "#define KERNEL_SIZE 25.0\n" + convolution_shader.vertex_shader,
-					fragment_shader: "#define KERNEL_SIZE 25\n"   + convolution_shader.fragment_shader
+					vertexShader:   "#define KERNEL_SIZE 25.0\n" + convolution_shader.vertexShader,
+					fragmentShader: "#define KERNEL_SIZE 25\n"   + convolution_shader.fragmentShader
 
 				} );
 

+ 6 - 6
examples/webgl_rtt.html

@@ -67,7 +67,7 @@
 			}
 		</script>
 
-		<script id="vertex_shader" type="x-shader/x-vertex">
+		<script id="vertexShader" type="x-shader/x-vertex">
 			varying vec2 vUv;
 
 			void main() {
@@ -130,21 +130,21 @@
 				light.position.normalize();
 				sceneRTT.addLight( light );
 
-				rtTexture = new THREE.RenderTarget( window.innerWidth, window.innerHeight, { min_filter: THREE.LinearFilter, mag_filter: THREE.NearestFilter } );
+				rtTexture = new THREE.RenderTarget( window.innerWidth, window.innerHeight, { minFilter: THREE.LinearFilter, magFilter: THREE.NearestFilter } );
 
 				material = new THREE.MeshShaderMaterial( {
 
 					uniforms: { time: { type: "f", value: 0.0 } },
-					vertex_shader: document.getElementById( 'vertex_shader' ).textContent,
-					fragment_shader: document.getElementById( 'fragment_shader_pass_1' ).textContent
+					vertexShader: document.getElementById( 'vertexShader' ).textContent,
+					fragmentShader: document.getElementById( 'fragment_shader_pass_1' ).textContent
 
 				} );
 
 				var materialScreen = new THREE.MeshShaderMaterial( {
 
 					uniforms: { tDiffuse: { type: "t", value: 0, texture: rtTexture } },
-					vertex_shader: document.getElementById( 'vertex_shader' ).textContent,
-					fragment_shader: document.getElementById( 'fragment_shader_screen' ).textContent
+					vertexShader: document.getElementById( 'vertexShader' ).textContent,
+					fragmentShader: document.getElementById( 'fragment_shader_screen' ).textContent
 
 				} );
 

+ 8 - 8
examples/webgl_sandbox.html

@@ -145,8 +145,8 @@
 				var geometry = new Sphere( 50, 32, 16 );
 
 				var uniforms = ShaderUtils.lib[ 'basic' ].uniforms;
-				var vertex_shader = ShaderUtils.lib[ 'basic' ].vertex_shader;
-				var fragment_shader = ShaderUtils.lib[ 'basic' ].fragment_shader;
+				var vertexShader = ShaderUtils.lib[ 'basic' ].vertexShader;
+				var fragmentShader = ShaderUtils.lib[ 'basic' ].fragmentShader;
 
 				var texture = new THREE.Texture( generateTexture( 0, 0.5, 1 ), new THREE.UVMapping() );
 				var texture2 = new THREE.Texture( generateTexture( 0, 1, 0 ), new THREE.SphericalReflectionMapping() );
@@ -158,8 +158,8 @@
 					new THREE.MeshBasicMaterial( { color: 0x0066ff, blending: THREE.AdditiveBlending } ),
 					new THREE.MeshBasicMaterial( { map: texture, fog: false } ),
 					new THREE.MeshBasicMaterial( { map: ImageUtils.loadTexture( 'textures/land_ocean_ice_cloud_2048.jpg' ) } ),
-					new THREE.MeshBasicMaterial( { map: texture2, env_map: ImageUtils.loadTexture( 'textures/envmap.png', new THREE.SphericalReflectionMapping() ) } ),
-					new THREE.MeshShaderMaterial( { uniforms: uniforms, vertex_shader: vertex_shader, fragment_shader: fragment_shader } )
+					new THREE.MeshBasicMaterial( { map: texture2, envMap: ImageUtils.loadTexture( 'textures/envmap.png', new THREE.SphericalReflectionMapping() ) } ),
+					new THREE.MeshShaderMaterial( { uniforms: uniforms, vertexShader: vertexShader, fragmentShader: fragmentShader } )
 
 					/*
 					new THREE.MeshLambertMaterial( { color: 0xdddddd, shading: THREE.FlatShading } ),
@@ -169,10 +169,10 @@
 					new THREE.MeshNormalMaterial( { shading: THREE.SmoothShading } ),
 					new THREE.MeshBasicMaterial( { color: 0xffaa00, wireframe: true } ),
 					new THREE.MeshBasicMaterial( { map: texture, fog: false } ),
-					new THREE.MeshBasicMaterial( { env_map: texture2, fog: false } ),
+					new THREE.MeshBasicMaterial( { envMap: texture2, fog: false } ),
 					new THREE.MeshLambertMaterial( { map: ImageUtils.loadTexture( 'textures/land_ocean_ice_cloud_2048.jpg' ) } ),
-					new THREE.MeshLambertMaterial( { map: texture2, env_map: ImageUtils.loadTexture( 'textures/envmap.png', new THREE.SphericalReflectionMapping() ) } ),
-					new THREE.MeshShaderMaterial( { uniforms: uniforms, vertex_shader: vertex_shader, fragment_shader: fragment_shader } )
+					new THREE.MeshLambertMaterial( { map: texture2, envMap: ImageUtils.loadTexture( 'textures/envmap.png', new THREE.SphericalReflectionMapping() ) } ),
+					new THREE.MeshShaderMaterial( { uniforms: uniforms, vertexShader: vertexShader, fragmentShader: fragmentShader } )
 					*/
 
 				];
@@ -186,7 +186,7 @@
 
 				materials.push( new THREE.MeshFaceMaterial() );
 
-				// materials = [ new THREE.MeshBasicMaterial( { map: texture, env_map: texture2 } ) ];
+				// materials = [ new THREE.MeshBasicMaterial( { map: texture, envMap: texture2 } ) ];
 
 				for ( var i = 0; i < 5000; i ++ ) {
 

+ 4 - 4
examples/webgl_shader.html

@@ -41,14 +41,14 @@
 		<script type="text/javascript" src="js/RequestAnimationFrame.js"></script>
 		<script type="text/javascript" src="js/Stats.js"></script>
 
-		<script id="vertex_shader" type="x-shader/x-vertex">
+		<script id="vertexShader" type="x-shader/x-vertex">
 			void main()
 			{
 				gl_Position = vec4( position, 1.0 );
 			}
 		</script>
 
-		<script id="fragment_shader" type="x-shader/x-fragment">
+		<script id="fragmentShader" type="x-shader/x-fragment">
 			#ifdef GL_ES
 			precision highp float;
 			#endif
@@ -120,8 +120,8 @@
 				material = new THREE.MeshShaderMaterial( {
 
 					uniforms: uniforms,
-					vertex_shader: document.getElementById( 'vertex_shader' ).textContent,
-					fragment_shader: document.getElementById( 'fragment_shader' ).textContent
+					vertexShader: document.getElementById( 'vertexShader' ).textContent,
+					fragmentShader: document.getElementById( 'fragmentShader' ).textContent
 
 					} );
 

+ 4 - 4
examples/webgl_shader2.html

@@ -155,7 +155,7 @@
 
 		</script>
 
-		<script id="vertex_shader" type="x-shader/x-vertex">
+		<script id="vertexShader" type="x-shader/x-vertex">
 
 			varying vec2 vUv;
 
@@ -211,7 +211,7 @@
 					texture: { type: "t", value: 0, texture: ImageUtils.loadTexture( "textures/disturb.jpg" ) }
 				};
 
-				uniforms2.texture.texture.wrap_s = uniforms2.texture.texture.wrap_t = THREE.Repeat;
+				uniforms2.texture.texture.wrapS = uniforms2.texture.texture.wrapT = THREE.Repeat;
 
 				var size = 0.75, mlib = [],
 					params = [ [ 'fragment_shader1', uniforms1 ],  [ 'fragment_shader2', uniforms2 ], [ 'fragment_shader3', uniforms1 ], [ 'fragment_shader4', uniforms1 ] ];
@@ -221,8 +221,8 @@
 					material = new THREE.MeshShaderMaterial( {
 
 						uniforms: params[ i ][ 1 ],
-						vertex_shader: document.getElementById( 'vertex_shader' ).textContent,
-						fragment_shader: document.getElementById( params[ i ][ 0 ] ).textContent
+						vertexShader: document.getElementById( 'vertexShader' ).textContent,
+						fragmentShader: document.getElementById( params[ i ][ 0 ] ).textContent
 
 						} );
 

+ 4 - 4
src/cameras/Camera.js

@@ -27,12 +27,12 @@ THREE.Camera = function( fov, aspect, near, far, target ) {
 
 	this.tmpVec = new THREE.Vector3();
 
-	this.translateX = function ( amount, nofly ) {
+	this.translateX = function ( amount, noFly ) {
 
 		this.tmpVec.sub( this.target.position, this.position ).normalize().multiplyScalar( amount );
 		this.tmpVec.crossSelf( this.up );
 
-		if ( nofly ) this.tmpVec.y = 0;
+		if ( noFly ) this.tmpVec.y = 0;
 
 		this.position.addSelf( this.tmpVec );
 		this.target.position.addSelf( this.tmpVec );
@@ -45,11 +45,11 @@ THREE.Camera = function( fov, aspect, near, far, target ) {
 	};
 	*/
 
-	this.translateZ = function ( amount, nofly ) {
+	this.translateZ = function ( amount, noFly ) {
 
 		this.tmpVec.sub( this.target.position, this.position ).normalize().multiplyScalar( amount );
 
-		if ( nofly ) this.tmpVec.y = 0;
+		if ( noFly ) this.tmpVec.y = 0;
 
 		this.position.subSelf( this.tmpVec );
 		this.target.position.subSelf( this.tmpVec );

+ 35 - 18
src/cameras/QuakeCamera.js

@@ -2,6 +2,22 @@
  * @author mrdoob / http://mrdoob.com/
  * @author alteredq / http://alteredqualia.com/
  * @author paulirish / http://paulirish.com/
+ *
+ * parameters = {
+ *  fov: <float>,
+ *  aspect: <float>,
+ *  near: <float>,
+ *  far: <float>,
+ *  target: <THREE.Object3D>,
+ 
+ *  movementSpeed: <float>,
+ *  lookSpeed: <float>,
+ 
+ *  noFly: <bool>, 
+ *  lookVertical: <bool>, 
+ 
+ *  domElement: <HTMLElement>, 
+ * }
  */
 
 function bind( scope, fn ) {
@@ -14,24 +30,25 @@ function bind( scope, fn ) {
 
 }
 
+
 THREE.QuakeCamera = function ( parameters ) {
 
 	THREE.Camera.call( this, parameters.fov, parameters.aspect, parameters.near, parameters.far, parameters.target );
 
-	this.movement_speed = 1.0;
-	this.look_speed = 0.005;
+	this.movementSpeed = 1.0;
+	this.lookSpeed = 0.005;
 
-	this.nofly = false;
-	this.look_vertical = true;
+	this.noFly = false;
+	this.lookVertical = true;
 
 	this.domElement = document;
 
 	if ( parameters ) {
 
-		if ( parameters.movement_speed !== undefined ) this.movement_speed = parameters.movement_speed;
-		if ( parameters.look_speed !== undefined ) this.look_speed  = parameters.look_speed;
-		if ( parameters.nofly !== undefined ) this.nofly = parameters.nofly;
-		if ( parameters.look_vertical !== undefined ) this.look_vertical = parameters.look_vertical;
+		if ( parameters.movementSpeed !== undefined ) this.movementSpeed = parameters.movementSpeed;
+		if ( parameters.lookSpeed !== undefined ) this.lookSpeed  = parameters.lookSpeed;
+		if ( parameters.noFly !== undefined ) this.noFly = parameters.noFly;
+		if ( parameters.lookVertical !== undefined ) this.lookVertical = parameters.lookVertical;
 
 		if ( parameters.domElement !== undefined ) this.domElement = parameters.domElement;
 
@@ -130,24 +147,24 @@ THREE.QuakeCamera = function ( parameters ) {
 
 	this.update = function() {
 
-		if ( this.moveForward ) this.translateZ( - this.movement_speed, this.nofly );
-		if ( this.moveBackward ) this.translateZ( this.movement_speed, this.nofly );
-		if ( this.moveLeft ) this.translateX( - this.movement_speed, this.nofly );
-		if ( this.moveRight ) this.translateX( this.movement_speed, this.nofly );
+		if ( this.moveForward ) this.translateZ( - this.movementSpeed, this.noFly );
+		if ( this.moveBackward ) this.translateZ( this.movementSpeed, this.noFly );
+		if ( this.moveLeft ) this.translateX( - this.movementSpeed, this.noFly );
+		if ( this.moveRight ) this.translateX( this.movementSpeed, this.noFly );
 
-		this.lon += this.mouseX * this.look_speed;
-		if( this.look_vertical ) this.lat -= this.mouseY * this.look_speed;
+		this.lon += this.mouseX * this.lookSpeed;
+		if( this.lookVertical ) this.lat -= this.mouseY * this.lookSpeed;
 
 		this.lat = Math.max( - 85, Math.min( 85, this.lat ) );
 		this.phi = ( 90 - this.lat ) * Math.PI / 180;
 		this.theta = this.lon * Math.PI / 180;
 
-		var target_position = this.target.position,
+		var targetPosition = this.target.position,
 			position = this.position;
 
-		target_position.x = position.x + 100 * Math.sin( this.phi ) * Math.cos( this.theta );
-		target_position.y = position.y + 100 * Math.cos( this.phi );
-		target_position.z = position.z + 100 * Math.sin( this.phi ) * Math.sin( this.theta );
+		targetPosition.x = position.x + 100 * Math.sin( this.phi ) * Math.cos( this.theta );
+		targetPosition.y = position.y + 100 * Math.cos( this.phi );
+		targetPosition.z = position.z + 100 * Math.sin( this.phi ) * Math.sin( this.theta );
 
 		this.supr.update.call( this );
 

+ 14 - 10
src/extras/SceneUtils.js

@@ -1,3 +1,7 @@
+/**
+ * @author alteredq / http://alteredqualia.com/
+ */
+
 var SceneUtils = {
 
 	loadScene : function( url, callback_sync, callback_async, callback_progress ) {
@@ -256,17 +260,17 @@ var SceneUtils = {
 
 				if ( g.type == "cube" ) {
 
-					geometry = new Cube( g.width, g.height, g.depth, g.segments_width, g.segments_height, null, g.flipped, g.sides );
+					geometry = new Cube( g.width, g.height, g.depth, g.segmentsWidth, g.segmentsHeight, null, g.flipped, g.sides );
 					result.geometries[ dg ] = geometry;
 
 				} else if ( g.type == "plane" ) {
 
-					geometry = new Plane( g.width, g.height, g.segments_width, g.segments_height );
+					geometry = new Plane( g.width, g.height, g.segmentsWidth, g.segmentsHeight );
 					result.geometries[ dg ] = geometry;
 
 				} else if ( g.type == "sphere" ) {
 
-					geometry = new Sphere( g.radius, g.segments_width, g.segments_height );
+					geometry = new Sphere( g.radius, g.segmentsWidth, g.segmentsHeight );
 					result.geometries[ dg ] = geometry;
 
 				} else if ( g.type == "cylinder" ) {
@@ -340,11 +344,11 @@ var SceneUtils = {
 
 					texture = ImageUtils.loadTexture( tt.url, tt.mapping, callback_texture );
 
-					if ( THREE[ tt.min_filter ] != undefined )
-						texture.min_filter = THREE[ tt.min_filter ];
+					if ( THREE[ tt.minFilter ] != undefined )
+						texture.minFilter = THREE[ tt.minFilter ];
 
-					if ( THREE[ tt.mag_filter ] != undefined )
-						texture.mag_filter = THREE[ tt.mag_filter ];
+					if ( THREE[ tt.magFilter ] != undefined )
+						texture.magFilter = THREE[ tt.magFilter ];
 
 				}
 
@@ -360,7 +364,7 @@ var SceneUtils = {
 
 				for( pp in m.parameters ) {
 
-					if ( pp == "env_map" || pp == "map" || pp == "light_map" ) {
+					if ( pp == "envMap" || pp == "map" || pp == "lightMap" ) {
 
 						m.parameters[ pp ] = result.textures[ m.parameters[ pp ] ];
 
@@ -418,8 +422,8 @@ var SceneUtils = {
 		var shader = ShaderUtils.lib["cube"];
 		shader.uniforms["tCube"].texture = textureCube;
 
-		var material = new THREE.MeshShaderMaterial( { fragment_shader: shader.fragment_shader,
-								   vertex_shader: shader.vertex_shader,
+		var material = new THREE.MeshShaderMaterial( { fragmentShader: shader.fragmentShader,
+								   vertexShader: shader.vertexShader,
 								   uniforms: shader.uniforms
 								} ),
 

+ 20 - 15
src/extras/ShaderUtils.js

@@ -1,3 +1,8 @@
+/**
+ * @author alteredq / http://alteredqualia.com/
+ * @author mr.doob / http://mrdoob.com/
+ */
+ 
 var ShaderUtils = {
 
 	lib: { 
@@ -19,7 +24,7 @@ var ShaderUtils = {
 
 		},
 
-		fragment_shader: [
+		fragmentShader: [
 
 		"uniform samplerCube tCube;",
 
@@ -43,7 +48,7 @@ var ShaderUtils = {
 
 		].join("\n"),
 
-		vertex_shader: [
+		vertexShader: [
 
 		"uniform float mRefractionRatio;",
 		"uniform float mFresnelBias;",
@@ -116,7 +121,7 @@ var ShaderUtils = {
 
 		},
 
-		fragment_shader: [
+		fragmentShader: [
 
 		"uniform vec3 uDirLightPos;",
 
@@ -216,7 +221,7 @@ var ShaderUtils = {
 		"}"
 		].join("\n"),
 
-		vertex_shader: [
+		vertexShader: [
 
 		"attribute vec4 tangent;",
 
@@ -289,7 +294,7 @@ var ShaderUtils = {
 
 		uniforms: { "tCube": { type: "t", value: 1, texture: null } },
 
-		vertex_shader: [
+		vertexShader: [
 
 		"varying vec3 vViewPosition;",
 
@@ -304,7 +309,7 @@ var ShaderUtils = {
 
 		].join("\n"),
 
-		fragment_shader: [
+		fragmentShader: [
 
 		"uniform samplerCube tCube;",
 
@@ -336,7 +341,7 @@ var ShaderUtils = {
 		"cKernel" : { type: "fv1", value: [] }
 		},
 
-		vertex_shader: [
+		vertexShader: [
 
 		"varying vec2 vUv;",
 		
@@ -352,7 +357,7 @@ var ShaderUtils = {
 
 		].join("\n"),
 
-		fragment_shader: [
+		fragmentShader: [
 
 		"varying vec2 vUv;",
 		
@@ -410,7 +415,7 @@ var ShaderUtils = {
 					grayscale:  { type: "i", value: 1 }
 				  },
 
-		vertex_shader: [
+		vertexShader: [
             
 		"varying vec2 vUv;",
 
@@ -423,7 +428,7 @@ var ShaderUtils = {
 
 		].join("\n"),
 
-		fragment_shader: [
+		fragmentShader: [
 		
 		"varying vec2 vUv;",
 		"uniform sampler2D tDiffuse;",
@@ -487,7 +492,7 @@ var ShaderUtils = {
 					opacity: { type: "f", value: 1.0 } 
 				  },
 
-		vertex_shader: [
+		vertexShader: [
 
 		"varying vec2 vUv;",
 
@@ -500,7 +505,7 @@ var ShaderUtils = {
 
 		].join("\n"),
 
-		fragment_shader: [
+		fragmentShader: [
 		
 		"varying vec2 vUv;",
 		"uniform sampler2D tDiffuse;",
@@ -526,7 +531,7 @@ var ShaderUtils = {
 
 		uniforms: {},
 
-		vertex_shader: [
+		vertexShader: [
 
 		"void main() {",
 
@@ -536,7 +541,7 @@ var ShaderUtils = {
 
 		].join("\n"),
 
-		fragment_shader: [
+		fragmentShader: [
 
 		"void main() {",
 
@@ -579,7 +584,7 @@ var ShaderUtils = {
 		for( i = 0; i < kernelSize; ++i ) values[ i ] /= sum;
 		
 		return values;
-				
+
 	}
 
 };

+ 3 - 3
src/extras/io/Loader.js

@@ -1238,7 +1238,7 @@ THREE.Loader.prototype = {
 		// defaults
 		
 		mtype = "MeshLambertMaterial";
-		mpars = { color: 0xeeeeee, opacity: 1.0, map: null, light_map: null, vertex_colors: m.vertex_colors };
+		mpars = { color: 0xeeeeee, opacity: 1.0, map: null, lightMap: null, vertexColors: m.vertex_colors };
 		
 		// parameters from model file
 		
@@ -1269,9 +1269,9 @@ THREE.Loader.prototype = {
 		if ( m.map_lightmap && texture_path ) {
 
 			texture = document.createElement( 'canvas' );
-			mpars.light_map = new THREE.Texture( texture );
+			mpars.lightMap = new THREE.Texture( texture );
 			
-			load_image( mpars.light_map, texture_path + "/" + m.map_lightmap );			
+			load_image( mpars.lightMap, texture_path + "/" + m.map_lightmap );			
 
 		}
 		

+ 3 - 3
src/extras/primitives/Cube.js

@@ -3,7 +3,7 @@
  * based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Cube.as
  */
 
-var Cube = function ( width, height, depth, segments_width, segments_height, materials, flipped, sides ) {
+var Cube = function ( width, height, depth, segmentsWidth, segmentsHeight, materials, flipped, sides ) {
 
 	THREE.Geometry.call( this );
 
@@ -65,8 +65,8 @@ var Cube = function ( width, height, depth, segments_width, segments_height, mat
 	function buildPlane( u, v, udir, vdir, width, height, depth, material ) {
 
 		var w, ix, iy,
-		gridX = segments_width || 1,
-		gridY = segments_height || 1,
+		gridX = segmentsWidth || 1,
+		gridY = segmentsHeight || 1,
 		gridX1 = gridX + 1,
 		gridY1 = gridY + 1,
 		width_half = width / 2,

+ 1 - 0
src/extras/primitives/Icosahedron.js

@@ -1,5 +1,6 @@
 /**
  * @author oosmoxiecode
+ 
  * uvs are messed up in this one, and commented away for now. There is an ugly "seam" by the shared vertices
  * when it "wraps" around, that needs to be fixed. It´s because they share the first and the last vertices
  * so it draws the entire texture on the seam-faces, I think...

+ 59 - 36
src/extras/primitives/LathedObject.js

@@ -3,42 +3,65 @@
  */
 
 function LathedObject( verts, nsteps, latheAngle ) {
-   THREE.Geometry.call( this );
-   nsteps = nsteps || 12;
-   latheAngle = latheAngle || 2 * Math.PI;
-   var stepSize = latheAngle / nsteps;
-   var newV = [], oldInds = [], newInds = [], startInds = [];
-   for ( var j = 0; j < verts.length; j ++ ) {
-      this.vertices.push( new THREE.Vertex( verts[ j ] ) );
-      oldInds[ j ] = this.vertices.length - 1;
-      newV[ j ] = new THREE.Vector3( verts[ j ].x, verts[ j ].y, verts[ j ].z );
-   }
-   var m = THREE.Matrix4.rotationZMatrix( stepSize );
-   for ( var r = 0; r <= latheAngle + 0.001; r += stepSize ) { // need the +0.001 for it go up to latheAngle
-      for ( var j = 0; j < newV.length; j ++ ) {
-	 if ( r < latheAngle ) {
-	    newV[ j ] = m.multiplyVector3( newV[ j ].clone() );
-	    this.vertices.push( new THREE.Vertex( newV[ j ] ) );
-	    newInds[ j ] = this.vertices.length - 1;
-	 } else {
-	    newInds = startInds; // wrap it up!
-	 }
-      }
-      if ( r == 0 ) startInds = oldInds;
-      for ( var j = 0; j < oldInds.length - 1; j ++ ) {
-	 this.faces.push( new THREE.Face4( newInds[ j ], newInds[ j + 1 ], oldInds[ j + 1 ], oldInds[ j ] ) );
-	 this.uvs.push( [ new THREE.UV( r / latheAngle, j / verts.length ),
-			  new THREE.UV( r / latheAngle, ( j + 1 ) / verts.length ),
-			  new THREE.UV( ( r - stepSize ) / latheAngle, ( j + 1 ) / verts.length ),
-			  new THREE.UV( ( r - stepSize ) / latheAngle, j / verts.length ) ] );
-      }
-      oldInds = newInds;
-      newInds = [];
-   }
-   this.computeCentroids();
-   this.computeFaceNormals();
-   this.computeVertexNormals();
-   this.sortFacesByMaterial();
+
+	THREE.Geometry.call( this );
+
+	this.nsteps = nsteps || 12;
+	this.latheAngle = latheAngle || 2 * Math.PI;
+	
+	var stepSize = this.latheAngle / this.nsteps;
+	
+	var newV = [], oldInds = [], newInds = [], startInds = [];
+	
+	for ( var j = 0; j < verts.length; j ++ ) {
+      
+		this.vertices.push( new THREE.Vertex( verts[ j ] ) );
+		oldInds[ j ] = this.vertices.length - 1;
+		newV[ j ] = new THREE.Vector3( verts[ j ].x, verts[ j ].y, verts[ j ].z );
+
+	}
+	
+	var m = THREE.Matrix4.rotationZMatrix( this.stepSize );
+	
+	for ( var r = 0; r <= this.latheAngle + 0.001; r += this.stepSize ) { // need the +0.001 for it go up to latheAngle
+	
+		for ( var j = 0; j < newV.length; j ++ ) {
+			
+			if ( r < latheAngle ) {
+				
+				newV[ j ] = m.multiplyVector3( newV[ j ].clone() );
+				this.vertices.push( new THREE.Vertex( newV[ j ] ) );
+				newInds[ j ] = this.vertices.length - 1;
+
+			} else {
+			
+				newInds = startInds; // wrap it up!
+
+			}
+
+		}
+		
+		if ( r == 0 ) startInds = oldInds;
+      
+		for ( var j = 0; j < oldInds.length - 1; j ++ ) {
+			
+			this.faces.push( new THREE.Face4( newInds[ j ], newInds[ j + 1 ], oldInds[ j + 1 ], oldInds[ j ] ) );
+			this.uvs.push( [ new THREE.UV( r / latheAngle, j / verts.length ),
+							 new THREE.UV( r / latheAngle, ( j + 1 ) / verts.length ),
+							 new THREE.UV( ( r - stepSize ) / latheAngle, ( j + 1 ) / verts.length ),
+							 new THREE.UV( ( r - stepSize ) / latheAngle, j / verts.length ) ] );
+			
+		}
+		
+		oldInds = newInds;
+		newInds = [];
+	}
+	
+	this.computeCentroids();
+	this.computeFaceNormals();
+	this.computeVertexNormals();
+	this.sortFacesByMaterial();
+
 };
 
 LathedObject.prototype = new THREE.Geometry();

+ 3 - 3
src/extras/primitives/Plane.js

@@ -3,15 +3,15 @@
  * based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Plane.as
  */
 
-var Plane = function ( width, height, segments_width, segments_height ) {
+var Plane = function ( width, height, segmentsWidth, segmentsHeight ) {
 
 	THREE.Geometry.call( this );
 
 	var ix, iy,
 	width_half = width / 2,
 	height_half = height / 2,
-	gridX = segments_width || 1,
-	gridY = segments_height || 1,
+	gridX = segmentsWidth || 1,
+	gridY = segmentsHeight || 1,
 	gridX1 = gridX + 1,
 	gridY1 = gridY + 1,
 	segment_width = width / gridX,

+ 3 - 3
src/extras/primitives/Sphere.js

@@ -3,12 +3,12 @@
  * based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Sphere.as
  */
 
-var Sphere = function ( radius, segments_width, segments_height ) {
+var Sphere = function ( radius, segmentsWidth, segmentsHeight ) {
 
 	THREE.Geometry.call( this );
 
-	var gridX = segments_width || 8,
-	gridY = segments_height || 6;
+	var gridX = segmentsWidth || 8,
+	gridY = segmentsHeight || 6;
 
 	var i, j, pi = Math.PI;
 	var iHor = Math.max( 3, gridX );

+ 6 - 6
src/materials/LineBasicMaterial.js

@@ -7,13 +7,13 @@
  *  opacity: <float>,
  
  *  blending: THREE.NormalBlending,
- *  depth_test: <bool>,
+ *  depthTest: <bool>,
  
  *  linewidth: <float>,
  *  linecap: "round",  
  *  linejoin: "round",
  
- *  vertex_colors: <bool>
+ *  vertexColors: <bool>
  * }
  */
 
@@ -25,13 +25,13 @@ THREE.LineBasicMaterial = function ( parameters ) {
 	this.opacity = 1.0;
 
 	this.blending = THREE.NormalBlending;
-	this.depth_test = true;
+	this.depthTest = true;
 
 	this.linewidth = 1.0;
 	this.linecap = 'round'; // implemented just in CanvasRenderer
 	this.linejoin = 'round'; // implemented just in CanvasRenderer
 
-	this.vertex_colors = false;
+	this.vertexColors = false;
 
 	if ( parameters ) {
 
@@ -39,13 +39,13 @@ THREE.LineBasicMaterial = function ( parameters ) {
 		if ( parameters.opacity !== undefined ) this.opacity  = parameters.opacity;
 
 		if ( parameters.blending !== undefined ) this.blending = parameters.blending;
-		if ( parameters.depth_test !== undefined ) this.depth_test = parameters.depth_test;
+		if ( parameters.depthTest !== undefined ) this.depthTest = parameters.depthTest;
 
 		if ( parameters.linewidth !== undefined ) this.linewidth = parameters.linewidth;
 		if ( parameters.linecap !== undefined ) this.linecap = parameters.linecap;
 		if ( parameters.linejoin !== undefined ) this.linejoin = parameters.linejoin;
 
-		if ( parameters.vertex_colors !== undefined ) this.vertex_colors = parameters.vertex_colors;
+		if ( parameters.vertexColors !== undefined ) this.vertexColors = parameters.vertexColors;
 
 	}
 

+ 23 - 23
src/materials/MeshBasicMaterial.js

@@ -7,21 +7,21 @@
  *  opacity: <float>,
  *  map: new THREE.Texture( <Image> ),
 
- *  light_map: new THREE.Texture( <Image> ),
+ *  lightMap: new THREE.Texture( <Image> ),
 
- *  env_map: new THREE.TextureCube( [posx, negx, posy, negy, posz, negz] ),
+ *  envMap: new THREE.TextureCube( [posx, negx, posy, negy, posz, negz] ),
  *  combine: THREE.Multiply,
  *  reflectivity: <float>,
- *  refraction_ratio: <float>,
+ *  refractionRatio: <float>,
  
  *  shading: THREE.SmoothShading,
  *  blending: THREE.NormalBlending,
- *  depth_test: <bool>,
+ *  depthTest: <bool>,
  
  *  wireframe: <boolean>,
- *  wireframe_linewidth: <float>,
+ *  wireframeLinewidth: <float>,
  
- *  vertex_colors: <bool>,
+ *  vertexColors: <bool>,
  *  skinning: <bool>
  * }
  */
@@ -34,52 +34,52 @@ THREE.MeshBasicMaterial = function ( parameters ) {
 	this.opacity = 1.0;
 	this.map = null;
 
-	this.light_map = null;
+	this.lightMap = null;
 
-	this.env_map = null;
+	this.envMap = null;
 	this.combine = THREE.MultiplyOperation;
 	this.reflectivity = 1.0;
-	this.refraction_ratio = 0.98;
+	this.refractionRatio = 0.98;
 
 	this.fog = true; // implemented just in WebGLRenderer2
 
 	this.shading = THREE.SmoothShading;
 	this.blending = THREE.NormalBlending;
-	this.depth_test = true;
+	this.depthTest = true;
 
 	this.wireframe = false;
-	this.wireframe_linewidth = 1.0;
-	this.wireframe_linecap = 'round'; // implemented just in CanvasRenderer
-	this.wireframe_linejoin = 'round'; // implemented just in CanvasRenderer
+	this.wireframeLinewidth = 1.0;
+	this.wireframeLinecap = 'round'; // implemented just in CanvasRenderer
+	this.wireframeLinejoin = 'round'; // implemented just in CanvasRenderer
 
-	this.vertex_colors = false;
+	this.vertexColors = false;
 	this.skinning = false;
 
 	if ( parameters ) {
 
 		if ( parameters.color !== undefined ) this.color.setHex( parameters.color );
-		if ( parameters.opacity !== undefined ) this.opacity  = parameters.opacity;
+		if ( parameters.opacity !== undefined ) this.opacity = parameters.opacity;
 		if ( parameters.map !== undefined ) this.map = parameters.map;
 
-		if ( parameters.light_map !== undefined ) this.light_map = parameters.light_map;
+		if ( parameters.lightMap !== undefined ) this.lightMap = parameters.lightMap;
 
-		if ( parameters.env_map !== undefined ) this.env_map = parameters.env_map;
+		if ( parameters.envMap !== undefined ) this.envMap = parameters.envMap;
 		if ( parameters.combine !== undefined ) this.combine = parameters.combine;
 		if ( parameters.reflectivity !== undefined ) this.reflectivity  = parameters.reflectivity;
-		if ( parameters.refraction_ratio !== undefined ) this.refraction_ratio  = parameters.refraction_ratio;
+		if ( parameters.refractionRatio !== undefined ) this.refractionRatio  = parameters.refractionRatio;
 
 		if ( parameters.fog !== undefined ) this.fog  = parameters.fog;
 
 		if ( parameters.shading !== undefined ) this.shading = parameters.shading;
 		if ( parameters.blending !== undefined ) this.blending = parameters.blending;
-		if ( parameters.depth_test !== undefined ) this.depth_test = parameters.depth_test;
+		if ( parameters.depthTest !== undefined ) this.depthTest = parameters.depthTest;
 
 		if ( parameters.wireframe !== undefined ) this.wireframe = parameters.wireframe;
-		if ( parameters.wireframe_linewidth !== undefined ) this.wireframe_linewidth = parameters.wireframe_linewidth;
-		if ( parameters.wireframe_linecap !== undefined ) this.wireframe_linecap = parameters.wireframe_linecap;
-		if ( parameters.wireframe_linejoin !== undefined ) this.wireframe_linejoin = parameters.wireframe_linejoin;
+		if ( parameters.wireframeLinewidth !== undefined ) this.wireframeLinewidth = parameters.wireframeLinewidth;
+		if ( parameters.wireframeLinecap !== undefined ) this.wireframeLinecap = parameters.wireframeLinecap;
+		if ( parameters.wireframeLinejoin !== undefined ) this.wireframeLinejoin = parameters.wireframeLinejoin;
 
-		if ( parameters.vertex_colors !== undefined ) this.vertex_colors = parameters.vertex_colors;
+		if ( parameters.vertexColors !== undefined ) this.vertexColors = parameters.vertexColors;
 		if ( parameters.skinning !== undefined ) this.skinning = parameters.skinning;
 
 	}

+ 6 - 6
src/materials/MeshDepthMaterial.js

@@ -6,10 +6,10 @@
  *  opacity: <float>,
  
  *  blending: THREE.NormalBlending,
- *  depth_test: <bool>,
+ *  depthTest: <bool>,
  
  *  wireframe: <boolean>,
- *  wireframe_linewidth: <float>
+ *  wireframeLinewidth: <float>
  * } 
  */
 
@@ -21,10 +21,10 @@ THREE.MeshDepthMaterial = function ( parameters ) {
 
 	this.shading = THREE.SmoothShading; // doesn't really apply here, normals are not used
 	this.blending = THREE.NormalBlending;
-	this.depth_test = true;
+	this.depthTest = true;
 
 	this.wireframe = false;
-	this.wireframe_linewidth = 1.0;
+	this.wireframeLinewidth = 1.0;
 
 	if ( parameters ) {
 
@@ -32,10 +32,10 @@ THREE.MeshDepthMaterial = function ( parameters ) {
 
 		if ( parameters.shading !== undefined ) this.shading  = parameters.shading;
 		if ( parameters.blending !== undefined ) this.blending = parameters.blending;
-		if ( parameters.depth_test !== undefined ) this.depth_test = parameters.depth_test;
+		if ( parameters.depthTest !== undefined ) this.depthTest = parameters.depthTest;
 
 		if ( parameters.wireframe !== undefined ) this.wireframe = parameters.wireframe;
-		if ( parameters.wireframe_linewidth !== undefined ) this.wireframe_linewidth = parameters.wireframe_linewidth;
+		if ( parameters.wireframeLinewidth !== undefined ) this.wireframeLinewidth = parameters.wireframeLinewidth;
 
 	}
 

+ 22 - 22
src/materials/MeshLambertMaterial.js

@@ -7,21 +7,21 @@
  *  opacity: <float>,
  *  map: new THREE.Texture( <Image> ),
  
- *  light_map: new THREE.Texture( <Image> ),
+ *  lightMap: new THREE.Texture( <Image> ),
  
- *  env_map: new THREE.TextureCube( [posx, negx, posy, negy, posz, negz] ),
+ *  envMap: new THREE.TextureCube( [posx, negx, posy, negy, posz, negz] ),
  *  combine: THREE.Multiply,
  *  reflectivity: <float>,
- *  refraction_ratio: <float>,
+ *  refractionRatio: <float>,
  
  *  shading: THREE.SmoothShading,
  *  blending: THREE.NormalBlending,
- *  depth_test: <bool>,
+ *  depthTest: <bool>,
  
  *  wireframe: <boolean>,
- *  wireframe_linewidth: <float>,
+ *  wireframeLinewidth: <float>,
  
- *  vertex_colors: <bool>,
+ *  vertexColors: <bool>,
  *  skinning: <bool>
  * }
  */
@@ -34,25 +34,25 @@ THREE.MeshLambertMaterial = function ( parameters ) {
 	this.opacity = 1.0;
 	this.map = null;
 
-	this.light_map = null;
+	this.lightMap = null;
 
-	this.env_map = null;
+	this.envMap = null;
 	this.combine = THREE.MultiplyOperation;
 	this.reflectivity = 1.0;
-	this.refraction_ratio = 0.98;
+	this.refractionRatio = 0.98;
 
 	this.fog = true; // implemented just in WebGLRenderer2
 
 	this.shading = THREE.SmoothShading;
 	this.blending = THREE.NormalBlending;
-	this.depth_test = true;
+	this.depthTest = true;
 
 	this.wireframe = false;
-	this.wireframe_linewidth = 1.0;
-	this.wireframe_linecap = 'round'; // implemented just in CanvasRenderer
-	this.wireframe_linejoin = 'round'; // implemented just in CanvasRenderer
+	this.wireframeLinewidth = 1.0;
+	this.wireframeLinecap = 'round'; // implemented just in CanvasRenderer
+	this.wireframeLinejoin = 'round'; // implemented just in CanvasRenderer
 
-	this.vertex_colors = false;
+	this.vertexColors = false;
 	this.skinning = false;
 
 	if ( parameters ) {
@@ -61,25 +61,25 @@ THREE.MeshLambertMaterial = function ( parameters ) {
 		if ( parameters.opacity !== undefined ) this.opacity  = parameters.opacity;
 		if ( parameters.map !== undefined ) this.map = parameters.map;
 
-		if ( parameters.light_map !== undefined ) this.light_map = parameters.light_map;
+		if ( parameters.lightMap !== undefined ) this.lightMap = parameters.lightMap;
 
-		if ( parameters.env_map !== undefined ) this.env_map = parameters.env_map;
+		if ( parameters.envMap !== undefined ) this.envMap = parameters.envMap;
 		if ( parameters.combine !== undefined ) this.combine = parameters.combine;
 		if ( parameters.reflectivity !== undefined ) this.reflectivity  = parameters.reflectivity;
-		if ( parameters.refraction_ratio !== undefined ) this.refraction_ratio  = parameters.refraction_ratio;
+		if ( parameters.refractionRatio !== undefined ) this.refractionRatio  = parameters.refractionRatio;
 
 		if ( parameters.fog !== undefined ) this.fog  = parameters.fog;
 
 		if ( parameters.shading !== undefined ) this.shading = parameters.shading;
 		if ( parameters.blending !== undefined ) this.blending = parameters.blending;
-		if ( parameters.depth_test !== undefined ) this.depth_test = parameters.depth_test;
+		if ( parameters.depthTest !== undefined ) this.depthTest = parameters.depthTest;
 
 		if ( parameters.wireframe !== undefined ) this.wireframe = parameters.wireframe;
-		if ( parameters.wireframe_linewidth !== undefined ) this.wireframe_linewidth = parameters.wireframe_linewidth;
-		if ( parameters.wireframe_linecap !== undefined ) this.wireframe_linecap = parameters.wireframe_linecap;
-		if ( parameters.wireframe_linejoin !== undefined ) this.wireframe_linejoin = parameters.wireframe_linejoin;
+		if ( parameters.wireframeLinewidth !== undefined ) this.wireframeLinewidth = parameters.wireframeLinewidth;
+		if ( parameters.wireframeLinecap !== undefined ) this.wireframeLinecap = parameters.wireframeLinecap;
+		if ( parameters.wireframeLinejoin !== undefined ) this.wireframeLinejoin = parameters.wireframeLinejoin;
 
-		if ( parameters.vertex_colors !== undefined ) this.vertex_colors = parameters.vertex_colors;
+		if ( parameters.vertexColors !== undefined ) this.vertexColors = parameters.vertexColors;
 		if ( parameters.skinning !== undefined ) this.skinning = parameters.skinning;
 
 	}

+ 6 - 6
src/materials/MeshNormalMaterial.js

@@ -6,10 +6,10 @@
  
  *  shading: THREE.FlatShading,
  *  blending: THREE.NormalBlending,
- *  depth_test: <bool>,
+ *  depthTest: <bool>,
  
  *  wireframe: <boolean>,
- *  wireframe_linewidth: <float>
+ *  wireframeLinewidth: <float>
  * }
  */
 
@@ -21,10 +21,10 @@ THREE.MeshNormalMaterial = function ( parameters ) {
 
 	this.shading = THREE.FlatShading;
 	this.blending = THREE.NormalBlending;
-	this.depth_test = true;
+	this.depthTest = true;
 
 	this.wireframe = false;
-	this.wireframe_linewidth = 1.0;
+	this.wireframeLinewidth = 1.0;
 
 	if ( parameters ) {
 
@@ -32,10 +32,10 @@ THREE.MeshNormalMaterial = function ( parameters ) {
 
 		if ( parameters.shading !== undefined ) this.shading  = parameters.shading;
 		if ( parameters.blending !== undefined ) this.blending = parameters.blending;
-		if ( parameters.depth_test !== undefined ) this.depth_test = parameters.depth_test;
+		if ( parameters.depthTest !== undefined ) this.depthTest = parameters.depthTest;
 
 		if ( parameters.wireframe !== undefined ) this.wireframe = parameters.wireframe;
-		if ( parameters.wireframe_linewidth !== undefined ) this.wireframe_linewidth = parameters.wireframe_linewidth;
+		if ( parameters.wireframeLinewidth !== undefined ) this.wireframeLinewidth = parameters.wireframeLinewidth;
 
 	}
 

+ 22 - 22
src/materials/MeshPhongMaterial.js

@@ -11,21 +11,21 @@
 
  *  map: new THREE.Texture( <Image> ),
 
- *  light_map: new THREE.Texture( <Image> ),
+ *  lightMap: new THREE.Texture( <Image> ),
 
- *  env_map: new THREE.TextureCube( [posx, negx, posy, negy, posz, negz] ),
+ *  envMap: new THREE.TextureCube( [posx, negx, posy, negy, posz, negz] ),
  *  combine: THREE.Multiply,
  *  reflectivity: <float>,
- *  refraction_ratio: <float>,
+ *  refractionRatio: <float>,
 
  *  shading: THREE.SmoothShading,
  *  blending: THREE.NormalBlending,
- *  depth_test: <bool>,
+ *  depthTest: <bool>,
  
  *  wireframe: <boolean>,
- *  wireframe_linewidth: <float>,
+ *  wireframeLinewidth: <float>,
  
- *  vertex_colors: <bool>,
+ *  vertexColors: <bool>,
  *  skinning: <bool>
  * }
  */
@@ -42,25 +42,25 @@ THREE.MeshPhongMaterial = function ( parameters ) {
 
 	this.map = null;
 
-	this.light_map = null;
+	this.lightMap = null;
 
-	this.env_map = null;
+	this.envMap = null;
 	this.combine = THREE.MultiplyOperation;
 	this.reflectivity = 1.0;
-	this.refraction_ratio = 0.98;
+	this.refractionRatio = 0.98;
 
 	this.fog = true; // implemented just in WebGLRenderer2
 
 	this.shading = THREE.SmoothShading;
 	this.blending = THREE.NormalBlending;
-	this.depth_test = true;
+	this.depthTest = true;
 
 	this.wireframe = false;
-	this.wireframe_linewidth = 1.0;
-	this.wireframe_linecap = 'round'; // implemented just in CanvasRenderer
-	this.wireframe_linejoin = 'round'; // implemented just in CanvasRenderer
+	this.wireframeLinewidth = 1.0;
+	this.wireframeLinecap = 'round'; // implemented just in CanvasRenderer
+	this.wireframeLinejoin = 'round'; // implemented just in CanvasRenderer
 
-	this.vertex_colors = false;
+	this.vertexColors = false;
 	this.skinning = false;
 
 	if ( parameters ) {
@@ -71,27 +71,27 @@ THREE.MeshPhongMaterial = function ( parameters ) {
 		if ( parameters.shininess !== undefined ) this.shininess = parameters.shininess;
 		if ( parameters.opacity !== undefined ) this.opacity = parameters.opacity;
 
-		if ( parameters.light_map !== undefined ) this.light_map = parameters.light_map;
+		if ( parameters.lightMap !== undefined ) this.lightMap = parameters.lightMap;
 
 		if ( parameters.map !== undefined ) this.map = parameters.map;
 
-		if ( parameters.env_map !== undefined ) this.env_map = parameters.env_map;
+		if ( parameters.envMap !== undefined ) this.envMap = parameters.envMap;
 		if ( parameters.combine !== undefined ) this.combine = parameters.combine;
 		if ( parameters.reflectivity !== undefined ) this.reflectivity  = parameters.reflectivity;
-		if ( parameters.refraction_ratio !== undefined ) this.refraction_ratio  = parameters.refraction_ratio;
+		if ( parameters.refractionRatio !== undefined ) this.refractionRatio  = parameters.refractionRatio;
 
 		if ( parameters.fog !== undefined ) this.fog  = parameters.fog;
 
 		if ( parameters.shading !== undefined ) this.shading = parameters.shading;
 		if ( parameters.blending !== undefined ) this.blending = parameters.blending;
-		if ( parameters.depth_test !== undefined ) this.depth_test = parameters.depth_test;
+		if ( parameters.depthTest !== undefined ) this.depthTest = parameters.depthTest;
 
 		if ( parameters.wireframe !== undefined ) this.wireframe = parameters.wireframe;
-		if ( parameters.wireframe_linewidth !== undefined ) this.wireframe_linewidth = parameters.wireframe_linewidth;
-		if ( parameters.wireframe_linecap !== undefined ) this.wireframe_linecap = parameters.wireframe_linecap;
-		if ( parameters.wireframe_linejoin !== undefined ) this.wireframe_linejoin = parameters.wireframe_linejoin;
+		if ( parameters.wireframeLinewidth !== undefined ) this.wireframeLinewidth = parameters.wireframeLinewidth;
+		if ( parameters.wireframeLinecap !== undefined ) this.wireframeLinecap = parameters.wireframeLinecap;
+		if ( parameters.wireframeLinejoin !== undefined ) this.wireframeLinejoin = parameters.wireframeLinejoin;
 
-		if ( parameters.vertex_colors !== undefined ) this.vertex_colors = parameters.vertex_colors;
+		if ( parameters.vertexColors !== undefined ) this.vertexColors = parameters.vertexColors;
 		if ( parameters.skinning !== undefined ) this.skinning = parameters.skinning;
 
 	}

+ 19 - 19
src/materials/MeshShaderMaterial.js

@@ -2,19 +2,19 @@
  * @author alteredq / http://alteredqualia.com/
  *
  * parameters = {
- *  fragment_shader: <string>,
- *  vertex_shader: <string>,
+ *  fragmentShader: <string>,
+ *  vertexShader: <string>,
  
  *  uniforms: { "parameter1": { type: "f", value: 1.0 }, "parameter2": { type: "i" value2: 2 } },
  
  *  shading: THREE.SmoothShading,
  *  blending: THREE.NormalBlending,
- *  depth_test: <bool>,
+ *  depthTest: <bool>,
  
  *  wireframe: <boolean>,
- *  wireframe_linewidth: <float>,
+ *  wireframeLinewidth: <float>,
  
- *  vertex_colors: <bool>,
+ *  vertexColors: <bool>,
  *  skinning: <bool>
  * }
  */
@@ -23,28 +23,28 @@ THREE.MeshShaderMaterial = function ( parameters ) {
 
 	this.id = THREE.MaterialCounter.value ++;
 
-	this.fragment_shader = "void main() {}";
-	this.vertex_shader = "void main() {}";
+	this.fragmentShader = "void main() {}";
+	this.vertexShader = "void main() {}";
 	this.uniforms = {};
 
 	this.opacity = 1.0; // set to < 1.0 to renderer in transparent batch
 
 	this.shading = THREE.SmoothShading;
 	this.blending = THREE.NormalBlending;
-	this.depth_test = true;
+	this.depthTest = true;
 
 	this.wireframe = false;
-	this.wireframe_linewidth = 1.0;
-	this.wireframe_linecap = 'round';	// doesn't make sense here
-	this.wireframe_linejoin = 'round';  // not implemented in WebGLRenderer (and this material doesn't make sense in CanvasRenderer)
+	this.wireframeLinewidth = 1.0;
+	this.wireframeLinecap = 'round';	// doesn't make sense here
+	this.wireframeLinejoin = 'round';  // not implemented in WebGLRenderer (and this material doesn't make sense in CanvasRenderer)
 
-	this.vertex_colors = false; // must set this if shader wants to use "color" attribute stream
+	this.vertexColors = false; // must set this if shader wants to use "color" attribute stream
 	this.skinning = false;	// must set this is shader wants to use skinning attribute streams
 
 	if ( parameters ) {
 
-		if ( parameters.fragment_shader !== undefined ) this.fragment_shader = parameters.fragment_shader;
-		if ( parameters.vertex_shader !== undefined ) this.vertex_shader = parameters.vertex_shader;
+		if ( parameters.fragmentShader !== undefined ) this.fragmentShader = parameters.fragmentShader;
+		if ( parameters.vertexShader !== undefined ) this.vertexShader = parameters.vertexShader;
 
 		if ( parameters.uniforms !== undefined ) this.uniforms = parameters.uniforms;
 
@@ -52,14 +52,14 @@ THREE.MeshShaderMaterial = function ( parameters ) {
 
 		if ( parameters.shading !== undefined ) this.shading = parameters.shading;
 		if ( parameters.blending !== undefined ) this.blending = parameters.blending;
-		if ( parameters.depth_test !== undefined ) this.depth_test = parameters.depth_test;
+		if ( parameters.depthTest !== undefined ) this.depthTest = parameters.depthTest;
 
 		if ( parameters.wireframe !== undefined ) this.wireframe = parameters.wireframe;
-		if ( parameters.wireframe_linewidth !== undefined ) this.wireframe_linewidth = parameters.wireframe_linewidth;
-		if ( parameters.wireframe_linecap !== undefined ) this.wireframe_linecap = parameters.wireframe_linecap;
-		if ( parameters.wireframe_linejoin !== undefined ) this.wireframe_linejoin = parameters.wireframe_linejoin;
+		if ( parameters.wireframeLinewidth !== undefined ) this.wireframeLinewidth = parameters.wireframeLinewidth;
+		if ( parameters.wireframeLinecap !== undefined ) this.wireframeLinecap = parameters.wireframeLinecap;
+		if ( parameters.wireframeLinejoin !== undefined ) this.wireframeLinejoin = parameters.wireframeLinejoin;
 
-		if ( parameters.vertex_colors !== undefined ) this.vertex_colors = parameters.vertex_colors;
+		if ( parameters.vertexColors !== undefined ) this.vertexColors = parameters.vertexColors;
 		if ( parameters.skinning !== undefined ) this.skinning = parameters.skinning;
 
 	}

+ 6 - 6
src/materials/ParticleBasicMaterial.js

@@ -10,9 +10,9 @@
  *  size: <float>,
  
  *  blending: THREE.NormalBlending,
- *  depth_test: <bool>,
+ *  depthTest: <bool>,
  
- *  vertex_colors: <bool>
+ *  vertexColors: <bool>
  * }
  */
 
@@ -27,11 +27,11 @@ THREE.ParticleBasicMaterial = function ( parameters ) {
 	this.size = 1.0;
 
 	this.blending = THREE.NormalBlending;
-	this.depth_test = true;
+	this.depthTest = true;
 
 	this.offset = new THREE.Vector2(); // TODO: expose to parameters (implemented just in CanvasRenderer)
 
-	this.vertex_colors = false;
+	this.vertexColors = false;
 
 	if ( parameters ) {
 
@@ -42,9 +42,9 @@ THREE.ParticleBasicMaterial = function ( parameters ) {
 		if ( parameters.size !== undefined ) this.size = parameters.size;
 
 		if ( parameters.blending !== undefined ) this.blending = parameters.blending;
-		if ( parameters.depth_test !== undefined ) this.depth_test = parameters.depth_test;
+		if ( parameters.depthTest !== undefined ) this.depthTest = parameters.depthTest;
 
-		if ( parameters.vertex_colors !== undefined ) this.vertex_colors = parameters.vertex_colors;
+		if ( parameters.vertexColors !== undefined ) this.vertexColors = parameters.vertexColors;
 
 	}
 

+ 4 - 4
src/materials/RenderTarget.js

@@ -9,11 +9,11 @@ THREE.RenderTarget = function ( width, height, options ) {
 
 	options = options || {};
 
-	this.wrap_s = options.wrap_s !== undefined ? options.wrap_s : THREE.ClampToEdgeWrapping;
-	this.wrap_t = options.wrap_t !== undefined ? options.wrap_t : THREE.ClampToEdgeWrapping;
+	this.wrapS = options.wrapS !== undefined ? options.wrapS : THREE.ClampToEdgeWrapping;
+	this.wrapT = options.wrapT !== undefined ? options.wrapT : THREE.ClampToEdgeWrapping;
 
-	this.mag_filter = options.mag_filter !== undefined ? options.mag_filter : THREE.LinearFilter;
-	this.min_filter = options.min_filter !== undefined ? options.min_filter : THREE.LinearMipMapLinearFilter;
+	this.magFilter = options.magFilter !== undefined ? options.magFilter : THREE.LinearFilter;
+	this.minFilter = options.minFilter !== undefined ? options.minFilter : THREE.LinearMipMapLinearFilter;
 
 	this.format = options.format !== undefined ? options.format : THREE.RGBFormat;
 	this.type = options.type !== undefined ? options.type : THREE.UnsignedByteType;

+ 6 - 6
src/materials/Texture.js

@@ -4,17 +4,17 @@
  * @author szimek / https://github.com/szimek/
  */
 
-THREE.Texture = function ( image, mapping, wrap_s, wrap_t, mag_filter, min_filter ) {
+THREE.Texture = function ( image, mapping, wrapS, wrapT, magFilter, minFilter ) {
 
 	this.image = image;
 
 	this.mapping = mapping !== undefined ? mapping : new THREE.UVMapping();
 
-	this.wrap_s = wrap_s !== undefined ? wrap_s : THREE.ClampToEdgeWrapping;
-	this.wrap_t = wrap_t !== undefined ? wrap_t : THREE.ClampToEdgeWrapping;
+	this.wrapS = wrapS !== undefined ? wrapS : THREE.ClampToEdgeWrapping;
+	this.wrapT = wrapT !== undefined ? wrapT : THREE.ClampToEdgeWrapping;
 
-	this.mag_filter = mag_filter !== undefined ? mag_filter : THREE.LinearFilter;
-	this.min_filter = min_filter !== undefined ? min_filter : THREE.LinearMipMapLinearFilter;
+	this.magFilter = magFilter !== undefined ? magFilter : THREE.LinearFilter;
+	this.minFilter = minFilter !== undefined ? minFilter : THREE.LinearMipMapLinearFilter;
 
 	this.needsUpdate = false;
 
@@ -24,7 +24,7 @@ THREE.Texture.prototype = {
 
 	clone: function () {
 
-		return new THREE.Texture( this.image, this.mapping, this.wrap_s, this.wrap_t, this.mag_filter, this.min_filter );
+		return new THREE.Texture( this.image, this.mapping, this.wrapS, this.wrapT, this.magFilter, this.minFilter );
 
 	}
 

+ 4 - 0
src/materials/Uniforms.js

@@ -1,3 +1,7 @@
+/**
+ * @author alteredq / http://alteredqualia.com/
+ */
+ 
 var Uniforms = {
 
 	clone: function( uniforms_src ) {

+ 8 - 8
src/renderers/CanvasRenderer.js

@@ -519,10 +519,10 @@ THREE.CanvasRenderer = function () {
 					}
 
 
-				} else if ( material.env_map ) {
+				} else if ( material.envMap ) {
 
 
-					if ( material.env_map.mapping instanceof THREE.SphericalReflectionMapping ) {
+					if ( material.envMap.mapping instanceof THREE.SphericalReflectionMapping ) {
 
 						var cameraMatrix = camera.matrixWorld;
 
@@ -538,9 +538,9 @@ THREE.CanvasRenderer = function () {
 						_uv3x = ( _vector3.x * cameraMatrix.n11 + _vector3.y * cameraMatrix.n12 + _vector3.z * cameraMatrix.n13 ) * 0.5 + 0.5;
 						_uv3y = - ( _vector3.x * cameraMatrix.n21 + _vector3.y * cameraMatrix.n22 + _vector3.z * cameraMatrix.n23 ) * 0.5 + 0.5;
 
-						texturePath( _v1x, _v1y, _v2x, _v2y, _v3x, _v3y, material.env_map.image, _uv1x, _uv1y, _uv2x, _uv2y, _uv3x, _uv3y );
+						texturePath( _v1x, _v1y, _v2x, _v2y, _v3x, _v3y, material.envMap.image, _uv1x, _uv1y, _uv2x, _uv2y, _uv3x, _uv3y );
 
-					}/* else if ( material.env_map.mapping == THREE.RefractionMapping ) {
+					}/* else if ( material.envMap.mapping == THREE.RefractionMapping ) {
 
 						
 
@@ -549,7 +549,7 @@ THREE.CanvasRenderer = function () {
 
 				} else {
 
-					material.wireframe ? strokePath( material.color.__styleString, material.wireframe_linewidth ) : fillPath( material.color.__styleString );
+					material.wireframe ? strokePath( material.color.__styleString, material.wireframeLinewidth ) : fillPath( material.color.__styleString );
 
 				}
 
@@ -600,13 +600,13 @@ THREE.CanvasRenderer = function () {
 						_color.b = material.color.b * _light.b;
 
 						_color.updateStyleString();
-						material.wireframe ? strokePath( _color.__styleString, material.wireframe_linewidth ) : fillPath( _color.__styleString );
+						material.wireframe ? strokePath( _color.__styleString, material.wireframeLinewidth ) : fillPath( _color.__styleString );
 
 					} 
 
 				} else {
 
-					material.wireframe ? strokePath( material.color.__styleString, material.wireframe_linewidth ) : fillPath( material.color.__styleString );
+					material.wireframe ? strokePath( material.color.__styleString, material.wireframeLinewidth ) : fillPath( material.color.__styleString );
 
 				}
 
@@ -639,7 +639,7 @@ THREE.CanvasRenderer = function () {
 				_color.b = normalToComponent( element.normalWorld.z );
 				_color.updateStyleString();
 
-				material.wireframe ? strokePath( _color.__styleString, material.wireframe_linewidth ) : fillPath( _color.__styleString );
+				material.wireframe ? strokePath( _color.__styleString, material.wireframeLinewidth ) : fillPath( _color.__styleString );
 
 			}
 

+ 2 - 2
src/renderers/SVGRenderer.js

@@ -406,7 +406,7 @@ THREE.SVGRenderer = function () {
 
 		if ( material.wireframe ) {
 
-			_svgNode.setAttribute( 'style', 'fill: none; stroke: ' + _color.__styleString + '; stroke-width: ' + material.wireframe_linewidth + '; stroke-opacity: ' + material.opacity + '; stroke-linecap: ' + material.wireframe_linecap + '; stroke-linejoin: ' + material.wireframe_linejoin );
+			_svgNode.setAttribute( 'style', 'fill: none; stroke: ' + _color.__styleString + '; stroke-width: ' + material.wireframeLinewidth + '; stroke-opacity: ' + material.opacity + '; stroke-linecap: ' + material.wireframeLinecap + '; stroke-linejoin: ' + material.wireframeLinejoin );
 
 		} else {
 
@@ -462,7 +462,7 @@ THREE.SVGRenderer = function () {
 
 		if ( material.wireframe ) {
 
-			_svgNode.setAttribute( 'style', 'fill: none; stroke: ' + _color.__styleString + '; stroke-width: ' + material.wireframe_linewidth + '; stroke-opacity: ' + material.opacity + '; stroke-linecap: ' + material.wireframe_linecap + '; stroke-linejoin: ' + material.wireframe_linejoin );
+			_svgNode.setAttribute( 'style', 'fill: none; stroke: ' + _color.__styleString + '; stroke-width: ' + material.wireframeLinewidth + '; stroke-opacity: ' + material.opacity + '; stroke-linecap: ' + material.wireframeLinecap + '; stroke-linejoin: ' + material.wireframeLinejoin );
 
 		} else {
 

+ 62 - 62
src/renderers/WebGLRenderer.js

@@ -1225,8 +1225,8 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 	function setMaterialShaders( material, shaders ) {
 
-		material.fragment_shader = shaders.fragment_shader;
-		material.vertex_shader = shaders.vertex_shader;
+		material.fragmentShader = shaders.fragmentShader;
+		material.vertexShader = shaders.vertexShader;
 		material.uniforms = Uniforms.clone( shaders.uniforms );
 
 	};
@@ -1242,13 +1242,13 @@ THREE.WebGLRenderer = function ( parameters ) {
 		uniforms.opacity.value = material.opacity;
 		uniforms.map.texture = material.map;
 
-		uniforms.light_map.texture = material.light_map;
+		uniforms.lightMap.texture = material.lightMap;
 
-		uniforms.env_map.texture = material.env_map;
+		uniforms.envMap.texture = material.envMap;
 		uniforms.reflectivity.value = material.reflectivity;
-		uniforms.refraction_ratio.value = material.refraction_ratio;
+		uniforms.refractionRatio.value = material.refractionRatio;
 		uniforms.combine.value = material.combine;
-		uniforms.useRefract.value = material.env_map && material.env_map.mapping instanceof THREE.CubeRefractionMapping;
+		uniforms.useRefract.value = material.envMap && material.envMap.mapping instanceof THREE.CubeRefractionMapping;
 
 	};
 
@@ -1346,11 +1346,11 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		maxLightCount = allocateLights( lights, 4 );
 
-		parameters = { fog: fog, map: material.map, env_map: material.env_map, light_map: material.light_map, vertex_colors: material.vertex_colors,
+		parameters = { fog: fog, map: material.map, envMap: material.envMap, lightMap: material.lightMap, vertexColors: material.vertexColors,
 					   skinning: material.skinning,
 					   maxDirLights: maxLightCount.directional, maxPointLights: maxLightCount.point };
 
-		material.program = buildProgram( material.fragment_shader, material.vertex_shader, parameters );
+		material.program = buildProgram( material.fragmentShader, material.vertexShader, parameters );
 
 		identifiers = [ 'viewMatrix', 'modelViewMatrix', 'projectionMatrix', 'normalMatrix', 'objectMatrix', 'cameraPosition',
 						'cameraInverseMatrix', 'boneGlobalMatrices'
@@ -1470,14 +1470,14 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		if ( material instanceof THREE.MeshShaderMaterial ||
 			 material instanceof THREE.MeshPhongMaterial ||
-			 material.env_map ) {
+			 material.envMap ) {
 
 			_gl.uniform3f( p_uniforms.cameraPosition, camera.position.x, camera.position.y, camera.position.z );
 
 		}
 
 		if ( material instanceof THREE.MeshShaderMaterial ||
-			 material.env_map ||
+			 material.envMap ||
 			 material.skinning ) {
 
 			_gl.uniformMatrix4fv( p_uniforms.objectMatrix, false, object._objectMatrixArray );
@@ -1605,7 +1605,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 			if ( material.wireframe ) {
 
-				_gl.lineWidth( material.wireframe_linewidth );
+				_gl.lineWidth( material.wireframeLinewidth );
 				_gl.bindBuffer( _gl.ELEMENT_ARRAY_BUFFER, geometryChunk.__webGLLineBuffer );
 				_gl.drawElements( _gl.LINES, geometryChunk.__webGLLineCount, _gl.UNSIGNED_SHORT, 0 );
 
@@ -1972,7 +1972,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 					material = opaque.list[ i ];
 
-					setDepthTest( material.depth_test );
+					setDepthTest( material.depthTest );
 					renderBuffer( camera, lights, fog, material, buffer, object );
 
 				}
@@ -1998,7 +1998,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 					material = opaque.list[ i ];
 
-					setDepthTest( material.depth_test );
+					setDepthTest( material.depthTest );
 
 					program = setProgram( camera, lights, fog, material, object );
 					object.render( function( object ) { renderBufferImmediate( object, program ); } );
@@ -2028,7 +2028,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 					material = transparent.list[ i ];
 
 					setBlending( material.blending );
-					setDepthTest( material.depth_test );
+					setDepthTest( material.depthTest );
 
 					renderBuffer( camera, lights, fog, material, buffer, object );
 
@@ -2056,7 +2056,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 					material = transparent.list[ i ];
 
 					setBlending( material.blending );
-					setDepthTest( material.depth_test );
+					setDepthTest( material.depthTest );
 
 					program = setProgram( camera, lights, fog, material, object );
 					object.render( function( object ) { renderBufferImmediate( object, program ); } );
@@ -2069,7 +2069,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		// Generate mipmap if we're using any kind of mipmap filtering
 
-		if ( renderTarget && renderTarget.min_filter !== THREE.NearestFilter && renderTarget.min_filter !== THREE.LinearFilter ) {
+		if ( renderTarget && renderTarget.minFilter !== THREE.NearestFilter && renderTarget.minFilter !== THREE.LinearFilter ) {
 
 			updateRenderTargetMipmap( renderTarget );
 
@@ -2385,7 +2385,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 	};
 
-	function buildProgram( fragment_shader, vertex_shader, parameters ) {
+	function buildProgram( fragmentShader, vertexShader, parameters ) {
 
 		var program = _gl.createProgram(),
 
@@ -2401,9 +2401,9 @@ THREE.WebGLRenderer = function ( parameters ) {
 			parameters.fog instanceof THREE.FogExp2 ? "#define FOG_EXP2" : "",
 
 			parameters.map ? "#define USE_MAP" : "",
-			parameters.env_map ? "#define USE_ENVMAP" : "",
-			parameters.light_map ? "#define USE_LIGHTMAP" : "",
-			parameters.vertex_colors ? "#define USE_COLOR" : "",
+			parameters.envMap ? "#define USE_ENVMAP" : "",
+			parameters.lightMap ? "#define USE_LIGHTMAP" : "",
+			parameters.vertexColors ? "#define USE_COLOR" : "",
 
 			"uniform mat4 viewMatrix;",
 			"uniform vec3 cameraPosition;",
@@ -2417,9 +2417,9 @@ THREE.WebGLRenderer = function ( parameters ) {
 			"#define MAX_POINT_LIGHTS " + parameters.maxPointLights,
 
 			parameters.map ? "#define USE_MAP" : "",
-			parameters.env_map ? "#define USE_ENVMAP" : "",
-			parameters.light_map ? "#define USE_LIGHTMAP" : "",
-			parameters.vertex_colors ? "#define USE_COLOR" : "",
+			parameters.envMap ? "#define USE_ENVMAP" : "",
+			parameters.lightMap ? "#define USE_LIGHTMAP" : "",
+			parameters.vertexColors ? "#define USE_COLOR" : "",
 			parameters.skinning ? "#define USE_SKINNING" : "",
 
 			"uniform mat4 objectMatrix;",
@@ -2444,8 +2444,8 @@ THREE.WebGLRenderer = function ( parameters ) {
 			""
 		].join("\n");
 
-		_gl.attachShader( program, getShader( "fragment", prefix_fragment + fragment_shader ) );
-		_gl.attachShader( program, getShader( "vertex", prefix_vertex + vertex_shader ) );
+		_gl.attachShader( program, getShader( "fragment", prefix_fragment + fragmentShader ) );
+		_gl.attachShader( program, getShader( "vertex", prefix_vertex + vertexShader ) );
 
 		_gl.linkProgram( program );
 
@@ -2454,13 +2454,13 @@ THREE.WebGLRenderer = function ( parameters ) {
 			alert( "Could not initialise shaders\n"+
 					"VALIDATE_STATUS: " + _gl.getProgramParameter( program, _gl.VALIDATE_STATUS ) + ", gl error [" + _gl.getError() + "]" );
 
-			//console.log( prefix_fragment + fragment_shader );
-			//console.log( prefix_vertex + vertex_shader );
+			//console.log( prefix_fragment + fragmentShader );
+			//console.log( prefix_vertex + vertexShader );
 
 		}
 
-		//console.log( prefix_fragment + fragment_shader );
-		//console.log( prefix_vertex + vertex_shader );
+		//console.log( prefix_fragment + fragmentShader );
+		//console.log( prefix_vertex + vertexShader );
 
 		program.uniforms = {};
 		program.attributes = {};
@@ -2649,11 +2649,11 @@ THREE.WebGLRenderer = function ( parameters ) {
 				_gl.bindTexture( _gl.TEXTURE_2D, texture.__webGLTexture );
 				_gl.texImage2D( _gl.TEXTURE_2D, 0, _gl.RGBA, _gl.RGBA, _gl.UNSIGNED_BYTE, texture.image );
 
-				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_S, paramThreeToGL( texture.wrap_s ) );
-				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_T, paramThreeToGL( texture.wrap_t ) );
+				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_S, paramThreeToGL( texture.wrapS ) );
+				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_T, paramThreeToGL( texture.wrapT ) );
 
-				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MAG_FILTER, paramThreeToGL( texture.mag_filter ) );
-				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MIN_FILTER, paramThreeToGL( texture.min_filter ) );
+				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MAG_FILTER, paramThreeToGL( texture.magFilter ) );
+				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MIN_FILTER, paramThreeToGL( texture.minFilter ) );
 				_gl.generateMipmap( _gl.TEXTURE_2D );
 				_gl.bindTexture( _gl.TEXTURE_2D, null );
 
@@ -2664,11 +2664,11 @@ THREE.WebGLRenderer = function ( parameters ) {
 				_gl.bindTexture( _gl.TEXTURE_2D, texture.__webGLTexture );
 				_gl.texSubImage2D( _gl.TEXTURE_2D, 0, 0, 0, _gl.RGBA, _gl.UNSIGNED_BYTE, texture.image );
 
-				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_S, paramThreeToGL( texture.wrap_s ) );
-				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_T, paramThreeToGL( texture.wrap_t ) );
+				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_S, paramThreeToGL( texture.wrapS ) );
+				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_T, paramThreeToGL( texture.wrapT ) );
 
-				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MAG_FILTER, paramThreeToGL( texture.mag_filter ) );
-				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MIN_FILTER, paramThreeToGL( texture.min_filter ) );
+				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MAG_FILTER, paramThreeToGL( texture.magFilter ) );
+				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MIN_FILTER, paramThreeToGL( texture.minFilter ) );
 				_gl.generateMipmap( _gl.TEXTURE_2D );
 				_gl.bindTexture( _gl.TEXTURE_2D, null );
 
@@ -2699,10 +2699,10 @@ THREE.WebGLRenderer = function ( parameters ) {
 			// Setup texture
 
 			_gl.bindTexture( _gl.TEXTURE_2D, renderTexture.__webGLTexture );
-			_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_S, paramThreeToGL( renderTexture.wrap_s ) );
-			_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_T, paramThreeToGL( renderTexture.wrap_t ) );
-			_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MAG_FILTER, paramThreeToGL( renderTexture.mag_filter ) );
-			_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MIN_FILTER, paramThreeToGL( renderTexture.min_filter ) );
+			_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_S, paramThreeToGL( renderTexture.wrapS ) );
+			_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_T, paramThreeToGL( renderTexture.wrapT ) );
+			_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MAG_FILTER, paramThreeToGL( renderTexture.magFilter ) );
+			_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MIN_FILTER, paramThreeToGL( renderTexture.minFilter ) );
 			_gl.texImage2D( _gl.TEXTURE_2D, 0, paramThreeToGL( renderTexture.format ), renderTexture.width, renderTexture.height, 0, paramThreeToGL( renderTexture.format ), paramThreeToGL( renderTexture.type ), null );
 
 			// Setup framebuffer
@@ -3009,7 +3009,7 @@ THREE.Snippets = {
 
 		"varying vec3 vReflect;",
 		"uniform float reflectivity;",
-		"uniform samplerCube env_map;",
+		"uniform samplerCube envMap;",
 		"uniform int combine;",
 
 	"#endif"
@@ -3020,7 +3020,7 @@ THREE.Snippets = {
 
 	"#ifdef USE_ENVMAP",
 
-		"vec4 cubeColor = textureCube( env_map, vec3( -vReflect.x, vReflect.yz ) );",
+		"vec4 cubeColor = textureCube( envMap, vec3( -vReflect.x, vReflect.yz ) );",
 
 		"if ( combine == 1 ) {",
 
@@ -3042,7 +3042,7 @@ THREE.Snippets = {
 	"#ifdef USE_ENVMAP",
 
 		"varying vec3 vReflect;",
-		"uniform float refraction_ratio;",
+		"uniform float refractionRatio;",
 		"uniform bool useRefract;",
 
 	"#endif"
@@ -3058,7 +3058,7 @@ THREE.Snippets = {
 
 		"if ( useRefract ) {",
 
-			"vReflect = refract( normalize( mPosition.xyz - cameraPosition ), normalize( nWorld.xyz ), refraction_ratio );",
+			"vReflect = refract( normalize( mPosition.xyz - cameraPosition ), normalize( nWorld.xyz ), refractionRatio );",
 
 		"} else {",
 
@@ -3143,7 +3143,7 @@ THREE.Snippets = {
 	"#ifdef USE_LIGHTMAP",
 
 		"varying vec2 vUv2;",
-		"uniform sampler2D light_map;",
+		"uniform sampler2D lightMap;",
 
 	"#endif"
 
@@ -3163,7 +3163,7 @@ THREE.Snippets = {
 
 	"#ifdef USE_LIGHTMAP",
 
-		"gl_FragColor = gl_FragColor * texture2D( light_map, vUv2 );",
+		"gl_FragColor = gl_FragColor * texture2D( lightMap, vUv2 );",
 
 	"#endif"
 
@@ -3423,12 +3423,12 @@ THREE.UniformsLib = {
 	"opacity" : { type: "f", value: 1.0 },
 	"map"     : { type: "t", value: 0, texture: null },
 
-	"light_map"       : { type: "t", value: 2, texture: null },
+	"lightMap"       : { type: "t", value: 2, texture: null },
 
-	"env_map" 		  : { type: "t", value: 1, texture: null },
+	"envMap" 		  : { type: "t", value: 1, texture: null },
 	"useRefract"	  : { type: "i", value: 0 },
 	"reflectivity"    : { type: "f", value: 1.0 },
-	"refraction_ratio": { type: "f", value: 0.98 },
+	"refractionRatio": { type: "f", value: 0.98 },
 	"combine"		  : { type: "i", value: 0 },
 
 	"fogDensity": { type: "f", value: 0.00025 },
@@ -3474,7 +3474,7 @@ THREE.ShaderLib = {
 					"opacity" : { type: "f", value: 1.0 }
 				  },
 
-		fragment_shader: [
+		fragmentShader: [
 
 			"uniform float mNear;",
 			"uniform float mFar;",
@@ -3490,7 +3490,7 @@ THREE.ShaderLib = {
 
 		].join("\n"),
 
-		vertex_shader: [
+		vertexShader: [
 
 			"void main() {",
 
@@ -3506,7 +3506,7 @@ THREE.ShaderLib = {
 
 		uniforms: { "opacity" : { type: "f", value: 1.0 } },
 
-		fragment_shader: [
+		fragmentShader: [
 
 			"uniform float opacity;",
 			"varying vec3 vNormal;",
@@ -3519,7 +3519,7 @@ THREE.ShaderLib = {
 
 		].join("\n"),
 
-		vertex_shader: [
+		vertexShader: [
 
 			"varying vec3 vNormal;",
 
@@ -3540,7 +3540,7 @@ THREE.ShaderLib = {
 
 		uniforms: THREE.UniformsLib[ "common" ],
 
-		fragment_shader: [
+		fragmentShader: [
 
 			"uniform vec3 diffuse;",
 			"uniform float opacity;",
@@ -3565,7 +3565,7 @@ THREE.ShaderLib = {
 
 		].join("\n"),
 
-		vertex_shader: [
+		vertexShader: [
 
 			THREE.Snippets[ "map_pars_vertex" ],
 			THREE.Snippets[ "lightmap_pars_vertex" ],
@@ -3594,7 +3594,7 @@ THREE.ShaderLib = {
 		uniforms: Uniforms.merge( [ THREE.UniformsLib[ "common" ],
 									THREE.UniformsLib[ "lights" ] ] ),
 
-		fragment_shader: [
+		fragmentShader: [
 
 			"uniform vec3 diffuse;",
 			"uniform float opacity;",
@@ -3622,7 +3622,7 @@ THREE.ShaderLib = {
 
 		].join("\n"),
 
-		vertex_shader: [
+		vertexShader: [
 
 			"varying vec3 vLightWeighting;",
 
@@ -3665,7 +3665,7 @@ THREE.ShaderLib = {
 
 								] ),
 
-		fragment_shader: [
+		fragmentShader: [
 
 			"uniform vec3 diffuse;",
 			"uniform float opacity;",
@@ -3698,7 +3698,7 @@ THREE.ShaderLib = {
 
 		].join("\n"),
 
-		vertex_shader: [
+		vertexShader: [
 
 			"#define PHONG",
 
@@ -3744,7 +3744,7 @@ THREE.ShaderLib = {
 
 		uniforms: THREE.UniformsLib[ "particle" ],
 
-		fragment_shader: [
+		fragmentShader: [
 
 			"uniform vec3 psColor;",
 			"uniform float opacity;",
@@ -3765,7 +3765,7 @@ THREE.ShaderLib = {
 
 		].join("\n"),
 
-		vertex_shader: [
+		vertexShader: [
 
 			"uniform float size;",
 

+ 25 - 25
src/renderers/WebGLRenderer2.js

@@ -202,9 +202,9 @@ THREE.WebGLRenderer2 = function ( antialias ) {
 
 							}
 
-							if ( material.env_map ) {
+							if ( material.envMap ) {
 
-								setTexture( material.env_map, 1 );
+								setTexture( material.envMap, 1 );
 								_gl.uniform1i( uniforms.tSpherical, 1 );
 
 							}
@@ -282,7 +282,7 @@ THREE.WebGLRenderer2 = function ( antialias ) {
 
 						} else {
 
-							_gl.lineWidth( material.wireframe_linewidth );
+							_gl.lineWidth( material.wireframeLinewidth );
 							_gl.bindBuffer( _gl.ELEMENT_ARRAY_BUFFER, buffer.lines );
 							_gl.drawElements( _gl.LINES, buffer.lineCount, _gl.UNSIGNED_SHORT, 0 );
 
@@ -516,19 +516,19 @@ THREE.WebGLRenderer2 = function ( antialias ) {
 
 				vs = [
 					material.map ? 'varying vec2 vUv;' : null,
-					material.env_map ? 'varying vec2 vSpherical;' : null,
+					material.envMap ? 'varying vec2 vSpherical;' : null,
 
 					'void main() {',
 						'gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );',
 
 						material.map ? 'vUv = uv;' : null,
 
-						material.env_map ? 'vec3 u = normalize( modelViewMatrix * vec4( position, 1.0 ) ).xyz;' : null,
-						material.env_map ? 'vec3 n = normalize( normalMatrix * normal );' : null,
-						material.env_map ? 'vec3 r = reflect( u, n );' : null,
-						material.env_map ? 'float m = 2.0 * sqrt( r.x * r.x + r.y * r.y + ( r.z + 1.0 ) * ( r.z + 1.0 ) );' : null,
-						material.env_map ? 'vSpherical.x = r.x / m + 0.5;' : null,
-						material.env_map ? 'vSpherical.y = - r.y / m + 0.5;' : null,
+						material.envMap ? 'vec3 u = normalize( modelViewMatrix * vec4( position, 1.0 ) ).xyz;' : null,
+						material.envMap ? 'vec3 n = normalize( normalMatrix * normal );' : null,
+						material.envMap ? 'vec3 r = reflect( u, n );' : null,
+						material.envMap ? 'float m = 2.0 * sqrt( r.x * r.x + r.y * r.y + ( r.z + 1.0 ) * ( r.z + 1.0 ) );' : null,
+						material.envMap ? 'vSpherical.x = r.x / m + 0.5;' : null,
+						material.envMap ? 'vSpherical.y = - r.y / m + 0.5;' : null,
 
 					'}'
 				].filter( removeNull ).join( '\n' );
@@ -540,8 +540,8 @@ THREE.WebGLRenderer2 = function ( antialias ) {
 					material.map ? 'uniform sampler2D tMap;' : null,
 					material.map ? 'varying vec2 vUv;' : null,
 
-					material.env_map ? 'uniform sampler2D tSpherical;' : null,
-					material.env_map ? 'varying vec2 vSpherical;' : null,
+					material.envMap ? 'uniform sampler2D tSpherical;' : null,
+					material.envMap ? 'varying vec2 vSpherical;' : null,
 
 					material.fog ? 'uniform float fog;' : null,
 					material.fog ? 'uniform float fogNear;' : null,
@@ -558,7 +558,7 @@ THREE.WebGLRenderer2 = function ( antialias ) {
 
 						material.map ? 'gl_FragColor *= texture2D( tMap, vUv );' : null,
 
-						material.env_map ? 'gl_FragColor += texture2D( tSpherical, vSpherical );' : null,
+						material.envMap ? 'gl_FragColor += texture2D( tSpherical, vSpherical );' : null,
 
 						material.fog ? 'float depth = gl_FragCoord.z / gl_FragCoord.w;' : null,
 						material.fog ? 'float fogFactor = fog * smoothstep( fogNear, fogFar, depth );' : null,
@@ -569,7 +569,7 @@ THREE.WebGLRenderer2 = function ( antialias ) {
 				identifiers.push( 'mColor', 'mOpacity' );
 
 				if ( material.map ) identifiers.push( 'tMap' );
-				if ( material.env_map ) identifiers.push( 'tSpherical' );
+				if ( material.envMap ) identifiers.push( 'tSpherical' );
 				if ( material.fog ) identifiers.push( 'fog', 'fogColor', 'fogNear', 'fogFar' );
 
 
@@ -620,8 +620,8 @@ THREE.WebGLRenderer2 = function ( antialias ) {
 
 			} else if ( material instanceof THREE.MeshShaderMaterial ) {
 
-				vs = material.vertex_shader;
-				fs = material.fragment_shader;
+				vs = material.vertexShader;
+				fs = material.fragmentShader;
 
 				for( uniform in material.uniforms ) {
 
@@ -644,7 +644,7 @@ THREE.WebGLRenderer2 = function ( antialias ) {
 
 		}
 
-		function compileProgram( vertex_shader, fragment_shader ) {
+		function compileProgram( vertexShader, fragmentShader ) {
 
 			var program = _gl.createProgram(), shader, prefix_vertex, prefix_fragment;
 
@@ -674,7 +674,7 @@ THREE.WebGLRenderer2 = function ( antialias ) {
 			// Vertex shader
 
 			shader = _gl.createShader( _gl.VERTEX_SHADER );
-			_gl.shaderSource( shader, prefix_vertex + vertex_shader );
+			_gl.shaderSource( shader, prefix_vertex + vertexShader );
 			_gl.compileShader( shader );
 			_gl.attachShader( program, shader );
 
@@ -688,7 +688,7 @@ THREE.WebGLRenderer2 = function ( antialias ) {
 			// Fragment Shader
 
 			shader = _gl.createShader( _gl.FRAGMENT_SHADER );
-			_gl.shaderSource( shader, prefix_fragment + fragment_shader );
+			_gl.shaderSource( shader, prefix_fragment + fragmentShader );
 			_gl.compileShader( shader );
 			_gl.attachShader( program, shader );
 
@@ -706,8 +706,8 @@ THREE.WebGLRenderer2 = function ( antialias ) {
 				alert( "Could not initialise shaders.\n" +
 				"VALIDATE_STATUS: " + _gl.getProgramParameter( program, _gl.VALIDATE_STATUS ) + "\n" +
 				"ERROR: " + _gl.getError() + "\n\n" +
-				"- Vertex Shader -\n" + prefix_vertex + vertex_shader + "\n\n" +
-				"- Fragment Shader -\n" + prefix_fragment + fragment_shader );
+				"- Vertex Shader -\n" + prefix_vertex + vertexShader + "\n\n" +
+				"- Fragment Shader -\n" + prefix_fragment + fragmentShader );
 
 			}
 
@@ -765,11 +765,11 @@ THREE.WebGLRenderer2 = function ( antialias ) {
 				_gl.bindTexture( _gl.TEXTURE_2D, texture.__webglTexture );
 				_gl.texImage2D( _gl.TEXTURE_2D, 0, _gl.RGBA, _gl.RGBA, _gl.UNSIGNED_BYTE, texture.image );
 
-				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_S, paramThreeToGL( texture.wrap_s ) );
-				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_T, paramThreeToGL( texture.wrap_t ) );
+				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_S, paramThreeToGL( texture.wrapS ) );
+				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_WRAP_T, paramThreeToGL( texture.wrapT ) );
 
-				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MAG_FILTER, paramThreeToGL( texture.mag_filter ) );
-				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MIN_FILTER, paramThreeToGL( texture.min_filter ) );
+				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MAG_FILTER, paramThreeToGL( texture.magFilter ) );
+				_gl.texParameteri( _gl.TEXTURE_2D, _gl.TEXTURE_MIN_FILTER, paramThreeToGL( texture.minFilter ) );
 				_gl.generateMipmap( _gl.TEXTURE_2D );
 				_gl.bindTexture( _gl.TEXTURE_2D, null );
 				

+ 1 - 1
utils/exporters/blender/2.56/scripts/op/io_mesh_threejs/export_threejs.py

@@ -52,7 +52,7 @@ COLORS = [0xeeeeee, 0xee0000, 0x00ee00, 0x0000ee, 0xeeee00, 0x00eeee, 0xee00ee]
 # #####################################################
 TEMPLATE_FILE_ASCII = """\
 /*
- * File generated with Blender 2.55 Exporter
+ * File generated with Blender 2.56 Exporter
  * https://github.com/mrdoob/three.js/tree/master/utils/exporters/blender/
  *
  * vertices: %(nvertex)d

部分文件因为文件数量过多而无法显示