Przeglądaj źródła

Added FlyCamera (thanks to James Baicoianu). Added specular map to normal map shader. Added WebGL Earth FlyCamera demo.

Changed normal map shader to multiply specular component with diffuse weighting as specular highlights were appearing in the dark parts.

Changed camera look speed in minecraft and terrain demos, they were too fast - I guess as everything got faster with antialiasing off.

Reenabled antialiasing in few demos where it was too ugly without (basically anything with lines and without postprocessing).

Fixed again spurious invisible characters in empaempa's code (which are breaking everything and are hard to hunt as they look like spaces).
alteredq 14 lat temu
rodzic
commit
22bd108ab1

Plik diff jest za duży
+ 4 - 5
build/Three.js


+ 5 - 5
build/custom/ThreeCanvas.js

@@ -82,11 +82,11 @@ THREE.Animation.prototype.interpolate=function(a,b,c,e,d,g,f){a=(c-a)*0.5;e=(e-b
 THREE.Animation.prototype.getPrevKeyWith=function(a,b,c){var e=this.data.hierarchy[b].keys;for(c=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?c>0?c:0:c>=0?c:c+e.length;c>=0;c--)if(e[c][a]!==undefined)return e[c];return this.data.hierarchy[b].keys[e.length-1]};
 THREE.Camera=function(a,b,c,e,d){THREE.Object3D.call(this);this.fov=a||50;this.aspect=b||1;this.near=c||0.1;this.far=e||2E3;this.target=d||new THREE.Object3D;this.useTarget=!0;this.matrixWorldInverse=new THREE.Matrix4;this.projectionMatrix=null;this.updateProjectionMatrix()};THREE.Camera.prototype=new THREE.Object3D;THREE.Camera.prototype.constructor=THREE.Camera;THREE.Camera.prototype.supr=THREE.Object3D.prototype;
 THREE.Camera.prototype.translate=function(a,b){this.matrix.rotateAxis(b);this.position.addSelf(b.multiplyScalar(a));this.target.position.addSelf(b.multiplyScalar(a))};THREE.Camera.prototype.updateProjectionMatrix=function(){this.projectionMatrix=THREE.Matrix4.makePerspective(this.fov,this.aspect,this.near,this.far)};THREE.Camera.prototype.updateMatrix=function(){this.update(undefined,!0)};
-THREE.Camera.prototype.update=function(a,b,c){if(this.useTarget){this.matrix.lookAt(this.position,this.target.position,this.up);this.matrix.setPosition(this.position);a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix);THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse);b=!0}else{this.matrixAutoUpdate&&(b|=this.updateMatrix());if(b||this.matrixWorldNeedsUpdate){a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix);this.matrixWorldNeedsUpdate=
-!1;b=!0;THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse)}}for(a=0;a<this.children.length;a++)this.children[a].update(this.matrixWorld,b,c)};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,c){THREE.Light.call(this,a);this.position=new THREE.Vector3(0,1,0);this.intensity=b||1;this.distance=c||0};THREE.DirectionalLight.prototype=new THREE.Light;THREE.DirectionalLight.prototype.constructor=THREE.DirectionalLight;THREE.PointLight=function(a,b,c){THREE.Light.call(this,a);this.position=new THREE.Vector3;this.intensity=b||1;this.distance=c||0};THREE.PointLight.prototype=new THREE.Light;
-THREE.PointLight.prototype.constructor=THREE.PointLight;THREE.Material=function(a){this.id=THREE.MaterialCounter.value++;a=a||{};this.opacity=a.opacity!==undefined?a.opacity:1;this.transparent=a.transparent!==undefined?a.transparent:!1;this.blending=a.blending!==undefined?a.blending:THREE.NormalBlending;this.depthTest=a.depthTest!==undefined?a.depthTest:!0};THREE.NoShading=0;THREE.FlatShading=1;THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NormalBlending=0;
-THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;THREE.MultiplyBlending=3;THREE.AdditiveAlphaBlending=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.Camera.prototype.update=function(a,b,c){if(this.useTarget){this.matrix.lookAt(this.position,this.target.position,this.up);this.matrix.setPosition(this.position);a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix);THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse);b=!0}else if(b||this.matrixWorldNeedsUpdate){a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix);this.matrixWorldNeedsUpdate=!1;b=!0;THREE.Matrix4.makeInvert(this.matrixWorld,
+this.matrixWorldInverse)}for(a=0;a<this.children.length;a++)this.children[a].update(this.matrixWorld,b,c)};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,c){THREE.Light.call(this,a);this.position=new THREE.Vector3(0,1,0);this.intensity=b||1;this.distance=c||0};THREE.DirectionalLight.prototype=new THREE.Light;THREE.DirectionalLight.prototype.constructor=THREE.DirectionalLight;THREE.PointLight=function(a,b,c){THREE.Light.call(this,a);this.position=new THREE.Vector3;this.intensity=b||1;this.distance=c||0};THREE.PointLight.prototype=new THREE.Light;THREE.PointLight.prototype.constructor=THREE.PointLight;
+THREE.Material=function(a){this.id=THREE.MaterialCounter.value++;a=a||{};this.opacity=a.opacity!==undefined?a.opacity:1;this.transparent=a.transparent!==undefined?a.transparent:!1;this.blending=a.blending!==undefined?a.blending:THREE.NormalBlending;this.depthTest=a.depthTest!==undefined?a.depthTest:!0};THREE.NoShading=0;THREE.FlatShading=1;THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NormalBlending=0;THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;
+THREE.MultiplyBlending=3;THREE.AdditiveAlphaBlending=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){THREE.Material.call(this,a);a=a||{};this.color=a.color!==undefined?new THREE.Color(a.color):new THREE.Color(16777215);this.linewidth=a.linewidth!==undefined?a.linewidth:1;this.linecap=a.linecap!==undefined?a.linecap:"round";this.linejoin=a.linejoin!==undefined?a.linejoin:"round";this.vertexColors=a.vertexColors?a.vertexColors:!1};THREE.LineBasicMaterial.prototype=new THREE.Material;THREE.LineBasicMaterial.prototype.constructor=THREE.LineBasicMaterial;
 THREE.MeshBasicMaterial=function(a){THREE.Material.call(this,a);a=a||{};this.color=a.color!==undefined?new THREE.Color(a.color):new THREE.Color(16777215);this.map=a.map!==undefined?a.map:null;this.lightMap=a.lightMap!==undefined?a.lightMap:null;this.envMap=a.envMap!==undefined?a.envMap:null;this.combine=a.combine!==undefined?a.combine:THREE.MultiplyOperation;this.reflectivity=a.reflectivity!==undefined?a.reflectivity:1;this.refractionRatio=a.refractionRatio!==undefined?a.refractionRatio:0.98;this.shading=
 a.shading!==undefined?a.shading:THREE.SmoothShading;this.wireframe=a.wireframe!==undefined?a.wireframe:!1;this.wireframeLinewidth=a.wireframeLinewidth!==undefined?a.wireframeLinewidth:1;this.wireframeLinecap=a.wireframeLinecap!==undefined?a.wireframeLinecap:"round";this.wireframeLinejoin=a.wireframeLinejoin!==undefined?a.wireframeLinejoin:"round";this.vertexColors=a.vertexColors!==undefined?a.vertexColors:!1;this.skinning=a.skinning!==undefined?a.skinning:!1;this.morphTargets=a.morphTargets!==undefined?

+ 2 - 2
build/custom/ThreeDOM.js

@@ -71,8 +71,8 @@ THREE.Animation.prototype.interpolate=function(a,b,c,e,d,g,f){a=(c-a)*0.5;e=(e-b
 THREE.Animation.prototype.getPrevKeyWith=function(a,b,c){var e=this.data.hierarchy[b].keys;for(c=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?c>0?c:0:c>=0?c:c+e.length;c>=0;c--)if(e[c][a]!==undefined)return e[c];return this.data.hierarchy[b].keys[e.length-1]};
 THREE.Camera=function(a,b,c,e,d){THREE.Object3D.call(this);this.fov=a||50;this.aspect=b||1;this.near=c||0.1;this.far=e||2E3;this.target=d||new THREE.Object3D;this.useTarget=!0;this.matrixWorldInverse=new THREE.Matrix4;this.projectionMatrix=null;this.updateProjectionMatrix()};THREE.Camera.prototype=new THREE.Object3D;THREE.Camera.prototype.constructor=THREE.Camera;THREE.Camera.prototype.supr=THREE.Object3D.prototype;
 THREE.Camera.prototype.translate=function(a,b){this.matrix.rotateAxis(b);this.position.addSelf(b.multiplyScalar(a));this.target.position.addSelf(b.multiplyScalar(a))};THREE.Camera.prototype.updateProjectionMatrix=function(){this.projectionMatrix=THREE.Matrix4.makePerspective(this.fov,this.aspect,this.near,this.far)};THREE.Camera.prototype.updateMatrix=function(){this.update(undefined,!0)};
-THREE.Camera.prototype.update=function(a,b,c){if(this.useTarget){this.matrix.lookAt(this.position,this.target.position,this.up);this.matrix.setPosition(this.position);a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix);THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse);b=!0}else{this.matrixAutoUpdate&&(b|=this.updateMatrix());if(b||this.matrixWorldNeedsUpdate){a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix);this.matrixWorldNeedsUpdate=
-!1;b=!0;THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse)}}for(a=0;a<this.children.length;a++)this.children[a].update(this.matrixWorld,b,c)};THREE.ParticleDOMMaterial=function(a){THREE.Material.call(this);this.domElement=a};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.Camera.prototype.update=function(a,b,c){if(this.useTarget){this.matrix.lookAt(this.position,this.target.position,this.up);this.matrix.setPosition(this.position);a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix);THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse);b=!0}else if(b||this.matrixWorldNeedsUpdate){a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix);this.matrixWorldNeedsUpdate=!1;b=!0;THREE.Matrix4.makeInvert(this.matrixWorld,
+this.matrixWorldInverse)}for(a=0;a<this.children.length;a++)this.children[a].update(this.matrixWorld,b,c)};THREE.ParticleDOMMaterial=function(a){THREE.Material.call(this);this.domElement=a};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.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;
 THREE.Bone.prototype.update=function(a,b,c){this.matrixAutoUpdate&&(b|=this.updateMatrix());if(b||this.matrixWorldNeedsUpdate){a?this.skinMatrix.multiply(a,this.matrix):this.skinMatrix.copy(this.matrix);this.matrixWorldNeedsUpdate=!1;b=!0}var e,d=this.children.length;if(this.hasNoneBoneChildren){this.matrixWorld.multiply(this.skin.matrixWorld,this.skinMatrix);for(e=0;e<d;e++){a=this.children[e];a instanceof THREE.Bone?a.update(this.skinMatrix,b,c):a.update(this.matrixWorld,!0,c)}}else for(e=0;e<d;e++)this.children[e].update(this.skinMatrix,
 b,c)};THREE.Bone.prototype.addChild=function(a){if(this.children.indexOf(a)===-1){a.parent!==undefined&&a.parent.removeChild(a);a.parent=this;this.children.push(a);if(!(a instanceof THREE.Bone))this.hasNoneBoneChildren=!0}};

Plik diff jest za duży
+ 7 - 8
build/custom/ThreeExtras.js


+ 6 - 6
build/custom/ThreeSVG.js

@@ -82,12 +82,12 @@ THREE.Animation.prototype.interpolate=function(a,b,c,e,d,g,f){a=(c-a)*0.5;e=(e-b
 THREE.Animation.prototype.getPrevKeyWith=function(a,b,c){var e=this.data.hierarchy[b].keys;for(c=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?c>0?c:0:c>=0?c:c+e.length;c>=0;c--)if(e[c][a]!==undefined)return e[c];return this.data.hierarchy[b].keys[e.length-1]};
 THREE.Camera=function(a,b,c,e,d){THREE.Object3D.call(this);this.fov=a||50;this.aspect=b||1;this.near=c||0.1;this.far=e||2E3;this.target=d||new THREE.Object3D;this.useTarget=!0;this.matrixWorldInverse=new THREE.Matrix4;this.projectionMatrix=null;this.updateProjectionMatrix()};THREE.Camera.prototype=new THREE.Object3D;THREE.Camera.prototype.constructor=THREE.Camera;THREE.Camera.prototype.supr=THREE.Object3D.prototype;
 THREE.Camera.prototype.translate=function(a,b){this.matrix.rotateAxis(b);this.position.addSelf(b.multiplyScalar(a));this.target.position.addSelf(b.multiplyScalar(a))};THREE.Camera.prototype.updateProjectionMatrix=function(){this.projectionMatrix=THREE.Matrix4.makePerspective(this.fov,this.aspect,this.near,this.far)};THREE.Camera.prototype.updateMatrix=function(){this.update(undefined,!0)};
-THREE.Camera.prototype.update=function(a,b,c){if(this.useTarget){this.matrix.lookAt(this.position,this.target.position,this.up);this.matrix.setPosition(this.position);a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix);THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse);b=!0}else{this.matrixAutoUpdate&&(b|=this.updateMatrix());if(b||this.matrixWorldNeedsUpdate){a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix);this.matrixWorldNeedsUpdate=
-!1;b=!0;THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse)}}for(a=0;a<this.children.length;a++)this.children[a].update(this.matrixWorld,b,c)};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,c){THREE.Light.call(this,a);this.position=new THREE.Vector3(0,1,0);this.intensity=b||1;this.distance=c||0};THREE.DirectionalLight.prototype=new THREE.Light;THREE.DirectionalLight.prototype.constructor=THREE.DirectionalLight;THREE.PointLight=function(a,b,c){THREE.Light.call(this,a);this.position=new THREE.Vector3;this.intensity=b||1;this.distance=c||0};THREE.PointLight.prototype=new THREE.Light;
-THREE.PointLight.prototype.constructor=THREE.PointLight;THREE.Material=function(a){this.id=THREE.MaterialCounter.value++;a=a||{};this.opacity=a.opacity!==undefined?a.opacity:1;this.transparent=a.transparent!==undefined?a.transparent:!1;this.blending=a.blending!==undefined?a.blending:THREE.NormalBlending;this.depthTest=a.depthTest!==undefined?a.depthTest:!0};THREE.NoShading=0;THREE.FlatShading=1;THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NormalBlending=0;
-THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;THREE.MultiplyBlending=3;THREE.AdditiveAlphaBlending=4;THREE.MaterialCounter={value:0};
-THREE.LineBasicMaterial=function(a){THREE.Material.call(this,a);a=a||{};this.color=a.color!==undefined?new THREE.Color(a.color):new THREE.Color(16777215);this.linewidth=a.linewidth!==undefined?a.linewidth:1;this.linecap=a.linecap!==undefined?a.linecap:"round";this.linejoin=a.linejoin!==undefined?a.linejoin:"round";this.vertexColors=a.vertexColors?a.vertexColors:!1};THREE.LineBasicMaterial.prototype=new THREE.Material;THREE.LineBasicMaterial.prototype.constructor=THREE.LineBasicMaterial;
+THREE.Camera.prototype.update=function(a,b,c){if(this.useTarget){this.matrix.lookAt(this.position,this.target.position,this.up);this.matrix.setPosition(this.position);a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix);THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse);b=!0}else if(b||this.matrixWorldNeedsUpdate){a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix);this.matrixWorldNeedsUpdate=!1;b=!0;THREE.Matrix4.makeInvert(this.matrixWorld,
+this.matrixWorldInverse)}for(a=0;a<this.children.length;a++)this.children[a].update(this.matrixWorld,b,c)};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,c){THREE.Light.call(this,a);this.position=new THREE.Vector3(0,1,0);this.intensity=b||1;this.distance=c||0};THREE.DirectionalLight.prototype=new THREE.Light;THREE.DirectionalLight.prototype.constructor=THREE.DirectionalLight;THREE.PointLight=function(a,b,c){THREE.Light.call(this,a);this.position=new THREE.Vector3;this.intensity=b||1;this.distance=c||0};THREE.PointLight.prototype=new THREE.Light;THREE.PointLight.prototype.constructor=THREE.PointLight;
+THREE.Material=function(a){this.id=THREE.MaterialCounter.value++;a=a||{};this.opacity=a.opacity!==undefined?a.opacity:1;this.transparent=a.transparent!==undefined?a.transparent:!1;this.blending=a.blending!==undefined?a.blending:THREE.NormalBlending;this.depthTest=a.depthTest!==undefined?a.depthTest:!0};THREE.NoShading=0;THREE.FlatShading=1;THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NormalBlending=0;THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;
+THREE.MultiplyBlending=3;THREE.AdditiveAlphaBlending=4;THREE.MaterialCounter={value:0};THREE.LineBasicMaterial=function(a){THREE.Material.call(this,a);a=a||{};this.color=a.color!==undefined?new THREE.Color(a.color):new THREE.Color(16777215);this.linewidth=a.linewidth!==undefined?a.linewidth:1;this.linecap=a.linecap!==undefined?a.linecap:"round";this.linejoin=a.linejoin!==undefined?a.linejoin:"round";this.vertexColors=a.vertexColors?a.vertexColors:!1};THREE.LineBasicMaterial.prototype=new THREE.Material;
+THREE.LineBasicMaterial.prototype.constructor=THREE.LineBasicMaterial;
 THREE.MeshBasicMaterial=function(a){THREE.Material.call(this,a);a=a||{};this.color=a.color!==undefined?new THREE.Color(a.color):new THREE.Color(16777215);this.map=a.map!==undefined?a.map:null;this.lightMap=a.lightMap!==undefined?a.lightMap:null;this.envMap=a.envMap!==undefined?a.envMap:null;this.combine=a.combine!==undefined?a.combine:THREE.MultiplyOperation;this.reflectivity=a.reflectivity!==undefined?a.reflectivity:1;this.refractionRatio=a.refractionRatio!==undefined?a.refractionRatio:0.98;this.shading=
 a.shading!==undefined?a.shading:THREE.SmoothShading;this.wireframe=a.wireframe!==undefined?a.wireframe:!1;this.wireframeLinewidth=a.wireframeLinewidth!==undefined?a.wireframeLinewidth:1;this.wireframeLinecap=a.wireframeLinecap!==undefined?a.wireframeLinecap:"round";this.wireframeLinejoin=a.wireframeLinejoin!==undefined?a.wireframeLinejoin:"round";this.vertexColors=a.vertexColors!==undefined?a.vertexColors:!1;this.skinning=a.skinning!==undefined?a.skinning:!1;this.morphTargets=a.morphTargets!==undefined?
 a.morphTargets:!1};THREE.MeshBasicMaterial.prototype=new THREE.Material;THREE.MeshBasicMaterial.prototype.constructor=THREE.MeshBasicMaterial;

+ 5 - 5
build/custom/ThreeWebGL.js

@@ -82,11 +82,11 @@ THREE.Animation.prototype.interpolate=function(b,e,d,h,g,k,i){b=(d-b)*0.5;h=(h-e
 THREE.Animation.prototype.getPrevKeyWith=function(b,e,d){var h=this.data.hierarchy[e].keys;for(d=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?d>0?d:0:d>=0?d:d+h.length;d>=0;d--)if(h[d][b]!==undefined)return h[d];return this.data.hierarchy[e].keys[h.length-1]};
 THREE.Camera=function(b,e,d,h,g){THREE.Object3D.call(this);this.fov=b||50;this.aspect=e||1;this.near=d||0.1;this.far=h||2E3;this.target=g||new THREE.Object3D;this.useTarget=!0;this.matrixWorldInverse=new THREE.Matrix4;this.projectionMatrix=null;this.updateProjectionMatrix()};THREE.Camera.prototype=new THREE.Object3D;THREE.Camera.prototype.constructor=THREE.Camera;THREE.Camera.prototype.supr=THREE.Object3D.prototype;
 THREE.Camera.prototype.translate=function(b,e){this.matrix.rotateAxis(e);this.position.addSelf(e.multiplyScalar(b));this.target.position.addSelf(e.multiplyScalar(b))};THREE.Camera.prototype.updateProjectionMatrix=function(){this.projectionMatrix=THREE.Matrix4.makePerspective(this.fov,this.aspect,this.near,this.far)};THREE.Camera.prototype.updateMatrix=function(){this.update(undefined,!0)};
-THREE.Camera.prototype.update=function(b,e,d){if(this.useTarget){this.matrix.lookAt(this.position,this.target.position,this.up);this.matrix.setPosition(this.position);b?this.matrixWorld.multiply(b,this.matrix):this.matrixWorld.copy(this.matrix);THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse);e=!0}else{this.matrixAutoUpdate&&(e|=this.updateMatrix());if(e||this.matrixWorldNeedsUpdate){b?this.matrixWorld.multiply(b,this.matrix):this.matrixWorld.copy(this.matrix);this.matrixWorldNeedsUpdate=
-!1;e=!0;THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse)}}for(b=0;b<this.children.length;b++)this.children[b].update(this.matrixWorld,e,d)};THREE.Light=function(b){THREE.Object3D.call(this);this.color=new THREE.Color(b)};THREE.Light.prototype=new THREE.Object3D;THREE.Light.prototype.constructor=THREE.Light;THREE.Light.prototype.supr=THREE.Object3D.prototype;THREE.AmbientLight=function(b){THREE.Light.call(this,b)};THREE.AmbientLight.prototype=new THREE.Light;
-THREE.AmbientLight.prototype.constructor=THREE.AmbientLight;THREE.DirectionalLight=function(b,e,d){THREE.Light.call(this,b);this.position=new THREE.Vector3(0,1,0);this.intensity=e||1;this.distance=d||0};THREE.DirectionalLight.prototype=new THREE.Light;THREE.DirectionalLight.prototype.constructor=THREE.DirectionalLight;THREE.PointLight=function(b,e,d){THREE.Light.call(this,b);this.position=new THREE.Vector3;this.intensity=e||1;this.distance=d||0};THREE.PointLight.prototype=new THREE.Light;
-THREE.PointLight.prototype.constructor=THREE.PointLight;THREE.Material=function(b){this.id=THREE.MaterialCounter.value++;b=b||{};this.opacity=b.opacity!==undefined?b.opacity:1;this.transparent=b.transparent!==undefined?b.transparent:!1;this.blending=b.blending!==undefined?b.blending:THREE.NormalBlending;this.depthTest=b.depthTest!==undefined?b.depthTest:!0};THREE.NoShading=0;THREE.FlatShading=1;THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NormalBlending=0;
-THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;THREE.MultiplyBlending=3;THREE.AdditiveAlphaBlending=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.Camera.prototype.update=function(b,e,d){if(this.useTarget){this.matrix.lookAt(this.position,this.target.position,this.up);this.matrix.setPosition(this.position);b?this.matrixWorld.multiply(b,this.matrix):this.matrixWorld.copy(this.matrix);THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse);e=!0}else if(e||this.matrixWorldNeedsUpdate){b?this.matrixWorld.multiply(b,this.matrix):this.matrixWorld.copy(this.matrix);this.matrixWorldNeedsUpdate=!1;e=!0;THREE.Matrix4.makeInvert(this.matrixWorld,
+this.matrixWorldInverse)}for(b=0;b<this.children.length;b++)this.children[b].update(this.matrixWorld,e,d)};THREE.Light=function(b){THREE.Object3D.call(this);this.color=new THREE.Color(b)};THREE.Light.prototype=new THREE.Object3D;THREE.Light.prototype.constructor=THREE.Light;THREE.Light.prototype.supr=THREE.Object3D.prototype;THREE.AmbientLight=function(b){THREE.Light.call(this,b)};THREE.AmbientLight.prototype=new THREE.Light;THREE.AmbientLight.prototype.constructor=THREE.AmbientLight;
+THREE.DirectionalLight=function(b,e,d){THREE.Light.call(this,b);this.position=new THREE.Vector3(0,1,0);this.intensity=e||1;this.distance=d||0};THREE.DirectionalLight.prototype=new THREE.Light;THREE.DirectionalLight.prototype.constructor=THREE.DirectionalLight;THREE.PointLight=function(b,e,d){THREE.Light.call(this,b);this.position=new THREE.Vector3;this.intensity=e||1;this.distance=d||0};THREE.PointLight.prototype=new THREE.Light;THREE.PointLight.prototype.constructor=THREE.PointLight;
+THREE.Material=function(b){this.id=THREE.MaterialCounter.value++;b=b||{};this.opacity=b.opacity!==undefined?b.opacity:1;this.transparent=b.transparent!==undefined?b.transparent:!1;this.blending=b.blending!==undefined?b.blending:THREE.NormalBlending;this.depthTest=b.depthTest!==undefined?b.depthTest:!0};THREE.NoShading=0;THREE.FlatShading=1;THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NormalBlending=0;THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;
+THREE.MultiplyBlending=3;THREE.AdditiveAlphaBlending=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(b){THREE.Material.call(this,b);b=b||{};this.color=b.color!==undefined?new THREE.Color(b.color):new THREE.Color(16777215);this.linewidth=b.linewidth!==undefined?b.linewidth:1;this.linecap=b.linecap!==undefined?b.linecap:"round";this.linejoin=b.linejoin!==undefined?b.linejoin:"round";this.vertexColors=b.vertexColors?b.vertexColors:!1};THREE.LineBasicMaterial.prototype=new THREE.Material;THREE.LineBasicMaterial.prototype.constructor=THREE.LineBasicMaterial;
 THREE.MeshBasicMaterial=function(b){THREE.Material.call(this,b);b=b||{};this.color=b.color!==undefined?new THREE.Color(b.color):new THREE.Color(16777215);this.map=b.map!==undefined?b.map:null;this.lightMap=b.lightMap!==undefined?b.lightMap:null;this.envMap=b.envMap!==undefined?b.envMap:null;this.combine=b.combine!==undefined?b.combine:THREE.MultiplyOperation;this.reflectivity=b.reflectivity!==undefined?b.reflectivity:1;this.refractionRatio=b.refractionRatio!==undefined?b.refractionRatio:0.98;this.shading=
 b.shading!==undefined?b.shading:THREE.SmoothShading;this.wireframe=b.wireframe!==undefined?b.wireframe:!1;this.wireframeLinewidth=b.wireframeLinewidth!==undefined?b.wireframeLinewidth:1;this.wireframeLinecap=b.wireframeLinecap!==undefined?b.wireframeLinecap:"round";this.wireframeLinejoin=b.wireframeLinejoin!==undefined?b.wireframeLinejoin:"round";this.vertexColors=b.vertexColors!==undefined?b.vertexColors:!1;this.skinning=b.skinning!==undefined?b.skinning:!1;this.morphTargets=b.morphTargets!==undefined?

BIN
examples/textures/planets/earth_atmos_2048.jpg


BIN
examples/textures/planets/earth_clouds_1024.png


BIN
examples/textures/planets/earth_normal_2048.jpg


BIN
examples/textures/planets/earth_specular_2048.jpg


BIN
examples/textures/planets/moon_1024.jpg


+ 502 - 0
examples/webgl_flycamera_earth.html

@@ -0,0 +1,502 @@
+<!DOCTYPE html>
+<html>
+	<title>three.js webgl - fly camera - earth</title>
+	<style type="text/css"> 
+	body {
+		background:#000;
+		color: #eee;
+		padding:0;
+		margin:0;
+		font-weight:bold;
+		overflow:hidden;
+
+		font-family:Monospace;
+		font-size:13px;
+		text-align:center;
+	}
+
+	#info {
+		position: absolute;
+		top: 0px; width: 100%;
+		padding: 5px;
+		z-index:100;
+	}
+
+	a {
+
+		color: #0080ff;
+	}
+	
+	b { color:orange }
+	
+	</style> 
+
+	<script type="text/javascript" src="../build/Three.js"></script> 
+		
+	<script type="text/javascript" src="js/Detector.js"></script>
+	<script type="text/javascript" src="js/RequestAnimationFrame.js"></script> 
+	<script type="text/javascript" src="js/Stats.js"></script>
+
+</head>
+
+<body>
+
+<div id="info"><a href="http://github.com/mrdoob/three.js" target="_blank">three.js</a> - earth [fly camera]<br/><br/>
+<b>WASD</b> move, <b>R|F</b> up | down, <b>Q|E</b> roll, <b>up|down</b> pitch, <b>left|right</b> yaw<br/>
+</div>
+
+<script type="text/javascript">
+
+	if ( ! Detector.webgl ) Detector.addGetWebGLMessage();
+
+	var radius = 6371;
+	var tilt = 0.41;
+	var rotationSpeed = 0.02;
+
+	var cloudsScale = 1.005;
+	var moonScale = 0.23;
+
+	var MARGIN = 0;
+	var SCREEN_HEIGHT = window.innerHeight - MARGIN * 2;
+	var SCREEN_WIDTH  = window.innerWidth;
+	
+	var ENABLE_LENSFLARES = false;
+
+	var lensFlare, lensFlareRotate;
+	
+	var container, stats;
+	var camera, scene, sceneCube, renderer;
+	var geometry, meshPlanet, meshClouds, meshMoon;
+	var dirLight, pointLight, ambientLight;
+	var lastUpdate = new Date().getTime();
+
+	var t, d, dPlanet, dMoon, dMoonVec = new THREE.Vector3();
+
+	var postprocessing = { enabled : true, bloom: false };
+	
+	init();
+	animate();
+
+	function init() {
+		
+		container = document.createElement( 'div' );
+        document.body.appendChild( container ); 
+
+        camera = new THREE.FlyCamera({
+		
+			fov: 25, 
+			aspect: SCREEN_WIDTH / SCREEN_HEIGHT,
+			movementSpeed: 1000,
+			domElement: container,
+			rollSpeed: Math.PI / 24,
+			dragToLook: false,
+			near: 50,
+			far: 1e7
+
+        });
+
+        camera.position.z = radius * 5;
+
+        scene = new THREE.Scene();
+		scene.fog = new THREE.FogExp2( 0x000000, 0.00000025 );
+		
+        dirLight = new THREE.DirectionalLight( 0xffffff );
+        dirLight.position.set( -1, 0, 1 );
+        dirLight.position.normalize();
+        scene.addLight( dirLight );
+
+        pointLight = new THREE.PointLight( 0x000000 );
+        pointLight.position.set( -5000, 0, 5000 );
+        //scene.addLight( pointLight );
+		
+		ambientLight = new THREE.AmbientLight( 0x000000 );
+		scene.addLight( ambientLight );
+
+		var planetTexture   = THREE.ImageUtils.loadTexture( "textures/planets/earth_atmos_2048.jpg" );
+		var cloudsTexture   = THREE.ImageUtils.loadTexture( "textures/planets/earth_clouds_1024.png" );
+		var normalTexture   = THREE.ImageUtils.loadTexture( "textures/planets/earth_normal_2048.jpg" );
+		var specularTexture = THREE.ImageUtils.loadTexture( "textures/planets/earth_specular_2048.jpg" );
+
+		var moonTexture = THREE.ImageUtils.loadTexture( "textures/planets/moon_1024.jpg" );
+
+		var shader = THREE.ShaderUtils.lib[ "normal" ];
+		var uniforms = THREE.UniformsUtils.clone( shader.uniforms );
+
+		uniforms[ "tNormal" ].texture = normalTexture;
+		uniforms[ "uNormalScale" ].value = 0.85;
+
+		uniforms[ "tDiffuse" ].texture = planetTexture;
+		uniforms[ "tSpecular" ].texture = specularTexture;
+
+		uniforms[ "enableAO" ].value = false;
+		uniforms[ "enableDiffuse" ].value = true;
+		uniforms[ "enableSpecular" ].value = true;
+
+		uniforms[ "uDirLightPos" ].value = dirLight.position;
+		uniforms[ "uDirLightColor" ].value = dirLight.color;
+
+		uniforms[ "uPointLightPos" ].value = pointLight.position;
+		uniforms[ "uPointLightColor" ].value = pointLight.color;
+
+		uniforms[ "uAmbientLightColor" ].value = ambientLight.color;
+
+		uniforms[ "uDiffuseColor" ].value.setHex( 0xffffff );
+		uniforms[ "uSpecularColor" ].value.setHex( 0xaaaaaa );
+		uniforms[ "uAmbientColor" ].value.setHex( 0x000000 );
+
+		uniforms[ "uShininess" ].value = 30;
+
+		var parameters = { fragmentShader: shader.fragmentShader, vertexShader: shader.vertexShader, uniforms: uniforms };
+		var materialNormalMap = new THREE.MeshShaderMaterial( parameters );
+
+		// planet		
+		
+        geometry = new THREE.Sphere( radius, 100, 50 );
+		geometry.computeTangents();		
+
+        meshPlanet = new THREE.Mesh( geometry, materialNormalMap );
+		meshPlanet.rotation.y = 1.3;
+		meshPlanet.rotation.z = tilt;
+        scene.addObject( meshPlanet );
+
+		// clouds		
+
+        var materialClouds = new THREE.MeshLambertMaterial( { color: 0xffffff, map: cloudsTexture, transparent:true } );
+
+		meshClouds = new THREE.Mesh( geometry, materialClouds );
+		meshClouds.scale.set( cloudsScale, cloudsScale, cloudsScale );
+		meshClouds.rotation.z = tilt;
+        scene.addObject( meshClouds );
+
+		// moon
+
+        var materialMoon = new THREE.MeshPhongMaterial( { color: 0xffffff, map: moonTexture } );
+		
+        meshMoon = new THREE.Mesh( geometry, materialMoon );
+		meshMoon.position.set( radius * 5, 0, 0 );
+		meshMoon.scale.set( moonScale, moonScale, moonScale );
+        scene.addObject( meshMoon );
+
+		// stars
+		
+		var i, r = radius,
+			starsGeometry = [ new THREE.Geometry(), new THREE.Geometry() ];
+ 
+		for ( i = 0; i < 250; ++i ) {
+
+			vector1 = new THREE.Vector3( Math.random() * 2 - 1, Math.random() * 2 - 1, Math.random() * 2 - 1 );
+			vector1.multiplyScalar( r );
+
+			starsGeometry[ 0 ].vertices.push( new THREE.Vertex( vector1 ) );
+
+		}
+
+		for ( i = 0; i < 1500; ++i ) {
+
+			vector1 = new THREE.Vector3( Math.random() * 2 - 1, Math.random() * 2 - 1, Math.random() * 2 - 1 );
+			vector1.multiplyScalar( r );
+
+			starsGeometry[ 1 ].vertices.push( new THREE.Vertex( vector1 ) );
+
+		}
+
+		var stars;
+		var starsMaterials = [ new THREE.ParticleBasicMaterial( { color: 0x555555, size: 2, sizeAttenuation: false } ),
+							   new THREE.ParticleBasicMaterial( { color: 0x555555, size: 1, sizeAttenuation: false } ),
+							   new THREE.ParticleBasicMaterial( { color: 0x333333, size: 2, sizeAttenuation: false } ),
+							   new THREE.ParticleBasicMaterial( { color: 0x3a3a3a, size: 1, sizeAttenuation: false } ),
+							   new THREE.ParticleBasicMaterial( { color: 0x1a1a1a, size: 2, sizeAttenuation: false } ),
+							   new THREE.ParticleBasicMaterial( { color: 0x1a1a1a, size: 1, sizeAttenuation: false } )
+							];
+		
+		for ( i = 10; i < 30; i ++) {
+		
+			stars = new THREE.ParticleSystem( starsGeometry[ i % 2 ], starsMaterials[ i % 6 ] );
+			stars.rotation.x = Math.random() * 6;
+			stars.rotation.y = Math.random() * 6;
+			stars.rotation.z = Math.random() * 6;
+			
+			s = i * 10;
+			stars.scale.set( s, s, s );
+			
+			stars.matrixAutoUpdate = false;
+			stars.updateMatrix();
+			
+			scene.addObject( stars );
+			
+		}
+
+		if ( ENABLE_LENSFLARES ) {
+		
+			lensFlare = new THREE.LensFlare( THREE.ImageUtils.loadTexture( "textures/lensflare/lensflare0.png" ), 700, 0.0, THREE.AdditiveBlending );
+			
+			lensFlare.add( THREE.ImageUtils.loadTexture( "textures/lensflare/lensflare2.png" ), 512, 0.0, THREE.AdditiveBlending );
+			lensFlare.add( lensFlare.lensFlares[ 1 ].texture, 512, 0.0, THREE.AdditiveBlending );
+			lensFlare.add( lensFlare.lensFlares[ 1 ].texture, 512, 0.0, THREE.AdditiveBlending );
+			
+			lensFlare.add( THREE.ImageUtils.loadTexture( "textures/lensflare/lensflare3.png" ), 60, 0.6, THREE.AdditiveBlending );
+			lensFlare.add( lensFlare.lensFlares[ 4 ].texture, 70, 0.7, THREE.AdditiveBlending );
+			lensFlare.add( lensFlare.lensFlares[ 4 ].texture, 120, 0.9, THREE.AdditiveBlending );
+			lensFlare.add( lensFlare.lensFlares[ 4 ].texture, 70, 1.0, THREE.AdditiveBlending );
+			
+			lensFlare.customUpdateCallback = lensFlareUpdateCallback;
+			lensFlare.position.set( 0, 0, -99000 );
+			
+			
+			lensFlareRotate = new THREE.Object3D();
+			lensFlareRotate.addChild( lensFlare );
+			
+			scene.addChild( lensFlareRotate );
+			
+			lensFlareRotate.rotation.x = Math.PI;
+			lensFlareRotate.rotation.y = Math.PI / 2;
+			
+		}
+
+        renderer = new THREE.WebGLRenderer( { clearAlpha: 1, clearColor: 0x000000 } );
+        renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
+        renderer.sortObjects = false;
+
+		initPostprocessing();
+		renderer.autoClear = false;
+
+        container.appendChild( renderer.domElement );
+
+        stats = new Stats();
+        stats.domElement.style.position = 'absolute';
+        stats.domElement.style.top = '0px';
+        stats.domElement.style.zIndex = 100;
+        container.appendChild( stats.domElement );
+
+		window.addEventListener( 'resize', onWindowResize, false );
+
+	};
+
+	function onWindowResize( event ) {
+
+		SCREEN_HEIGHT = window.innerHeight;
+		SCREEN_WIDTH  = window.innerWidth;
+
+		renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
+
+		camera.aspect = SCREEN_WIDTH / SCREEN_HEIGHT;
+		camera.updateProjectionMatrix();
+
+		initPostprocessing();
+
+	}
+
+	function initPostprocessing() {
+
+		postprocessing.scene = new THREE.Scene();
+
+		postprocessing.camera = new THREE.Camera();
+		postprocessing.camera.projectionMatrix = THREE.Matrix4.makeOrtho( SCREEN_WIDTH / - 2, SCREEN_WIDTH / 2,  SCREEN_HEIGHT / 2, SCREEN_HEIGHT / - 2, -10000, 10000 );
+		postprocessing.camera.position.z = 100;
+
+		var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBAFormat };
+		postprocessing.rtTexture1 = new THREE.WebGLRenderTarget( SCREEN_WIDTH, SCREEN_HEIGHT, pars );
+		postprocessing.rtTexture2 = new THREE.WebGLRenderTarget( 512, 512, pars );
+		postprocessing.rtTexture3 = new THREE.WebGLRenderTarget( 512, 512, pars );
+
+		var screen_shader = THREE.ShaderUtils.lib["screen"];
+		var screen_uniforms = THREE.UniformsUtils.clone( screen_shader.uniforms );
+
+		screen_uniforms["tDiffuse"].texture = postprocessing.rtTexture1;
+		screen_uniforms["opacity"].value = 1.0;
+
+		postprocessing.materialScreen = new THREE.MeshShaderMaterial( {
+
+			uniforms: screen_uniforms,
+			vertexShader: screen_shader.vertexShader,
+			fragmentShader: screen_shader.fragmentShader,
+			blending: THREE.AdditiveBlending,
+			transparent: true
+
+		} );
+
+		var convolution_shader = THREE.ShaderUtils.lib["convolution"];
+		var convolution_uniforms = THREE.UniformsUtils.clone( convolution_shader.uniforms );
+
+		postprocessing.blurx = new THREE.Vector2( 0.001953125, 0.0 ),
+		postprocessing.blury = new THREE.Vector2( 0.0, 0.001953125 );
+
+		convolution_uniforms["tDiffuse"].texture = postprocessing.rtTexture1;
+		convolution_uniforms["uImageIncrement"].value = postprocessing.blurx;
+		convolution_uniforms["cKernel"].value = THREE.ShaderUtils.buildKernel( 4.0 );
+
+		postprocessing.materialConvolution = new THREE.MeshShaderMaterial( {
+
+			uniforms: convolution_uniforms,
+			vertexShader:   "#define KERNEL_SIZE 25.0\n" + convolution_shader.vertexShader,
+			fragmentShader: "#define KERNEL_SIZE 25\n"   + convolution_shader.fragmentShader
+
+		} );
+
+		var film_shader = THREE.ShaderUtils.lib["film"];
+		var film_uniforms = THREE.UniformsUtils.clone( film_shader.uniforms );
+
+		film_uniforms["tDiffuse"].texture = postprocessing.rtTexture1;
+
+		postprocessing.materialFilm = new THREE.MeshShaderMaterial( { uniforms: film_uniforms, vertexShader: film_shader.vertexShader, fragmentShader: film_shader.fragmentShader } );
+		postprocessing.materialFilm.uniforms.grayscale.value = 0;
+		postprocessing.materialFilm.uniforms.nIntensity.value = 0.35;
+		postprocessing.materialFilm.uniforms.sIntensity.value = 0.75;
+		postprocessing.materialFilm.uniforms.sCount.value = 2048;
+
+		postprocessing.quad = new THREE.Mesh( new THREE.Plane( SCREEN_WIDTH, SCREEN_HEIGHT ), postprocessing.materialConvolution );
+		postprocessing.quad.position.z = - 500;
+		postprocessing.scene.addObject( postprocessing.quad );
+
+	};
+
+	function cap_bottom( val, bottom ) {
+	
+		return val < bottom ? bottom : val;
+
+	};
+	
+	function lensFlareUpdateCallback( object ) {
+
+		var f, fl = object.lensFlares.length;
+		var flare;
+		var vecX = -object.positionScreen.x * 2;
+		var vecY = -object.positionScreen.y * 2; 
+
+
+		for( f = 0; f < fl; f++ ) {
+			   
+			   flare = object.lensFlares[ f ];
+			   
+			   flare.x = object.positionScreen.x + vecX * flare.distance;
+			   flare.y = object.positionScreen.y + vecY * flare.distance;
+
+			   flare.rotation = 0;
+			   
+			   flare.opacity = cap_bottom( 1 - 0.01 * d / radius, 0 );
+
+		}
+
+		// hard coded stuff
+
+		object.lensFlares[ 2 ].y += 0.025;
+		object.lensFlares[ 3 ].rotation = object.positionScreen.x * 0.5 + 45 * Math.PI / 180;
+
+	};
+
+	function animate() {
+
+		requestAnimationFrame( animate );
+ 
+        render();
+        stats.update();
+
+	};
+
+	
+	function cap( val, bottom ) {
+	
+		return val > bottom ? val : bottom;
+
+	};
+
+	function render() {
+
+		// rotate the planet and clouds
+
+		t = this.getFrametime();
+
+        meshPlanet.rotation.y += rotationSpeed * t; 
+		meshClouds.rotation.y += 1.25 * rotationSpeed * t;
+		
+		// slow down as we approach the surface
+
+		dPlanet = camera.position.length();
+
+		dMoonVec.sub( camera.position, meshMoon.position );
+		dMoon = dMoonVec.length();
+		
+		if ( dMoon < dPlanet ) {
+
+			d = ( dMoon - radius * moonScale * 1.01 );
+
+		} else {
+		
+			d = ( dPlanet - radius * 1.01 );
+
+		}
+		
+        camera.movementSpeed = 0.33 * d;
+
+		if ( ENABLE_LENSFLARES ) {
+		
+			lensFlareRotate.position.set( camera.position.x, camera.position.y, camera.position.z );
+			
+		}
+		
+		if ( postprocessing.enabled ) {
+
+			renderer.clear();
+
+			// Render scene into texture
+
+			renderer.render( scene, camera, postprocessing.rtTexture1, true );
+
+			if ( postprocessing.bloom ) {
+			
+				// Render quad with blured scene into texture (convolution pass 1)
+
+				postprocessing.quad.materials = [ postprocessing.materialConvolution ];
+
+				postprocessing.materialConvolution.uniforms.tDiffuse.texture = postprocessing.rtTexture1;
+				postprocessing.materialConvolution.uniforms.uImageIncrement.value = postprocessing.blurx;
+
+				renderer.render( postprocessing.scene, postprocessing.camera, postprocessing.rtTexture2, true );
+
+				// Render quad with blured scene into texture (convolution pass 2)
+
+				postprocessing.materialConvolution.uniforms.tDiffuse.texture = postprocessing.rtTexture2;
+				postprocessing.materialConvolution.uniforms.uImageIncrement.value = postprocessing.blury;
+
+				renderer.render( postprocessing.scene, postprocessing.camera, postprocessing.rtTexture3, true );
+
+				// Render original scene with superimposed blur to texture
+
+				postprocessing.quad.materials = [ postprocessing.materialScreen ];
+
+				postprocessing.materialScreen.uniforms.tDiffuse.texture = postprocessing.rtTexture3;
+				postprocessing.materialScreen.uniforms.opacity.value = 0.75;
+
+				renderer.render( postprocessing.scene, postprocessing.camera, postprocessing.rtTexture1, false );
+
+			}
+			
+			// Render to screen
+
+			postprocessing.materialFilm.uniforms.time.value += 0.01;
+			postprocessing.quad.materials = [ postprocessing.materialFilm ];
+
+			postprocessing.materialScreen.uniforms.tDiffuse.texture = postprocessing.rtTexture1;
+			renderer.render( postprocessing.scene, postprocessing.camera );
+
+		} else {
+
+			renderer.clear();
+			renderer.render( scene, camera );
+
+		}
+
+	};
+	
+	function getFrametime() {
+
+        var now = new Date().getTime();
+        var tdiff = ( now - lastUpdate ) / 1000;
+        lastUpdate = now;
+        return tdiff;
+
+	};
+
+</script>
+</body>
+</html>

+ 1 - 1
examples/webgl_geometry_blenderexport_colors.html

@@ -77,7 +77,7 @@
 				loader.load( { model: "obj/cubecolors/cubecolors.js", callback: createScene1 } );
 				loader.load( { model: "obj/cubecolors/cube_fvc.js", callback: createScene2 } );
 
-				renderer = new THREE.WebGLRenderer();
+				renderer = new THREE.WebGLRenderer( { antialias: true } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 
 				container.appendChild( renderer.domElement );

+ 1 - 1
examples/webgl_geometry_colors.html

@@ -158,7 +158,7 @@
 				mesh3.scale = mesh.scale;
 				scene.addObject( mesh3 );
 
-				renderer = new THREE.WebGLRenderer();
+				renderer = new THREE.WebGLRenderer( { antialias: true } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 
 				container.appendChild( renderer.domElement );

+ 1 - 1
examples/webgl_geometry_minecraft.html

@@ -78,7 +78,7 @@
 				camera = new THREE.QuakeCamera( {
 
 					fov: 60, aspect: window.innerWidth / window.innerHeight, near: 1, far: 20000,
-					movementSpeed: 15, lookSpeed: 0.005, noFly: false, lookVertical: true
+					movementSpeed: 15, lookSpeed: 0.00125, noFly: false, lookVertical: true
 
 				} );
 

+ 1 - 1
examples/webgl_geometry_minecraft_ao.html

@@ -87,7 +87,7 @@
 
 					fov: 60, aspect: window.innerWidth / window.innerHeight, near: 1, far: 20000,
 					constrainVertical: true, verticalMin: 1.1, verticalMax: 2.2,
-					movementSpeed: 15, lookSpeed: 0.005, noFly: false, lookVertical: true
+					movementSpeed: 15, lookSpeed: 0.00125, noFly: false, lookVertical: true
 
 				} );
 

+ 1 - 1
examples/webgl_geometry_terrain.html

@@ -70,7 +70,7 @@
 				camera = new THREE.QuakeCamera( {
 
 					fov: 60, aspect: window.innerWidth / window.innerHeight, near: 1, far: 20000,
-					movementSpeed: 15, lookSpeed: 0.004, noFly: false, lookVertical: true
+					movementSpeed: 15, lookSpeed: 0.001, noFly: false, lookVertical: true
 
 				} );
 

+ 1 - 1
examples/webgl_geometry_terrain_fog.html

@@ -69,7 +69,7 @@
 				camera = new THREE.QuakeCamera( {
 
 					fov: 60, aspect: window.innerWidth / window.innerHeight, near: 1, far: 10000,
-					movementSpeed: 5, lookSpeed: 0.004, noFly: false, lookVertical: true
+					movementSpeed: 5, lookSpeed: 0.001, noFly: false, lookVertical: true
 
 				} );
 

+ 1 - 1
examples/webgl_interactive_voxelpainter.html

@@ -104,7 +104,7 @@
 				directionalLight.position.normalize();
 				scene.addLight( directionalLight );
 
-				renderer = new THREE.WebGLRenderer();
+				renderer = new THREE.WebGLRenderer( { antialias: true } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 
 				container.appendChild( renderer.domElement );

+ 1 - 1
examples/webgl_lines_sphere.html

@@ -115,7 +115,7 @@
 
 				}
 
-				renderer = new THREE.WebGLRenderer();
+				renderer = new THREE.WebGLRenderer( { antialias: true } );
 				renderer.setSize(SCREEN_WIDTH, SCREEN_HEIGHT);
 				container.appendChild(renderer.domElement);
 

+ 1 - 1
examples/webgl_lines_splines.html

@@ -79,7 +79,7 @@
 
 				scene = new THREE.Scene();
 
-				renderer = new THREE.WebGLRenderer();
+				renderer = new THREE.WebGLRenderer( { antialias: true } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.autoClear = false;
 				container.appendChild( renderer.domElement );

+ 1 - 0
examples/webgl_materials_normalmap.html

@@ -133,6 +133,7 @@
 
 				uniforms[ "enableAO" ].value = true;
 				uniforms[ "enableDiffuse" ].value = false;
+				uniforms[ "enableSpecular" ].value = false;
 
 				uniforms[ "tNormal" ].texture = THREE.ImageUtils.loadTexture( "textures/normal/ninja/normal.jpg" );
 				uniforms[ "tAO" ].texture = THREE.ImageUtils.loadTexture( "textures/normal/ninja/ao.jpg" );

+ 1 - 0
examples/webgl_materials_normalmap2.html

@@ -123,6 +123,7 @@
 
 				uniforms[ "enableAO" ].value = false;
 				uniforms[ "enableDiffuse" ].value = true;
+				uniforms[ "enableSpecular" ].value = false;
 
 				uniforms[ "uPointLightPos" ].value = pointLight.position;
 				uniforms[ "uPointLightColor" ].value = pointLight.color;

+ 1 - 1
examples/webgl_scene_test.html

@@ -227,7 +227,7 @@
 				scene  = loadScene.scene;
 				camera = loadScene.camera;
 
-				renderer = new THREE.WebGLRenderer();
+				renderer = new THREE.WebGLRenderer( { antialias: true } );
 				renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
 				renderer.domElement.style.position = "relative";
 				container.appendChild( renderer.domElement );

+ 9 - 5
src/cameras/Camera.js

@@ -20,7 +20,7 @@ THREE.Camera = function ( fov, aspect, near, far, target ) {
 
 	this.updateProjectionMatrix();
 
-}
+};
 
 THREE.Camera.prototype = new THREE.Object3D();
 THREE.Camera.prototype.constructor = THREE.Camera;
@@ -33,21 +33,21 @@ THREE.Camera.prototype.translate = function ( distance, axis ) {
 	this.position.addSelf( axis.multiplyScalar( distance ) );
 	this.target.position.addSelf( axis.multiplyScalar( distance ) );
 
-}
+};
 
 
 THREE.Camera.prototype.updateProjectionMatrix = function () {
 
 	this.projectionMatrix = THREE.Matrix4.makePerspective( this.fov, this.aspect, this.near, this.far );
 
-}
+};
 
 THREE.Camera.prototype.updateMatrix = function () {
 
 	// this.parent === undefined && this.update( undefined, true );
 	this.update( undefined, true );
 
-}
+};
 
 THREE.Camera.prototype.update = function ( parentMatrixWorld, forceUpdate, camera ) {
 
@@ -77,11 +77,15 @@ THREE.Camera.prototype.update = function ( parentMatrixWorld, forceUpdate, camer
 
 	} else {
 
+		/*
 		if ( this.matrixAutoUpdate ) {
 
-			forceUpdate |= this.updateMatrix();
+			// this doesn't make sense, it is endless loop
+			// also updateMatrix() doesn't return anything
+			//forceUpdate |= this.updateMatrix();
 
 		}
+		*/
 
 		if ( forceUpdate || this.matrixWorldNeedsUpdate ) {
 

+ 1 - 1
src/core/Object3D.js

@@ -185,4 +185,4 @@ THREE.Object3D.prototype = {
 
 	}
 
-}
+};

+ 19 - 11
src/extras/ShaderUtils.js

@@ -85,7 +85,7 @@ THREE.ShaderUtils = {
 		/* -------------------------------------------------------------------------
 		//	Normal map shader
 		//		- Blinn-Phong
-		//		- normal + diffuse + AO + displacement maps
+		//		- normal + diffuse + specular + AO + displacement maps
 		//		- 1 point and 1 directional lights
 		 ------------------------------------------------------------------------- */
 
@@ -93,16 +93,18 @@ THREE.ShaderUtils = {
 
 			uniforms: {
 
-				"enableAO": { type: "i", value: 0 },
-				"enableDiffuse": { type: "i", value: 0 },
+				"enableAO"		: { type: "i", value: 0 },
+				"enableDiffuse"	: { type: "i", value: 0 },
+				"enableSpecular": { type: "i", value: 0 },
 
-				"tDiffuse": { type: "t", value: 0, texture: null },
-				"tNormal": { type: "t", value: 2, texture: null },
-				"tAO": { type: "t", value: 3, texture: null },
+				"tDiffuse"	: { type: "t", value: 0, texture: null },
+				"tNormal"	: { type: "t", value: 2, texture: null },
+				"tSpecular"	: { type: "t", value: 3, texture: null },
+				"tAO"		: { type: "t", value: 4, texture: null },
 
 				"uNormalScale": { type: "f", value: 1.0 },
 
-				"tDisplacement": { type: "t", value: 4, texture: null },
+				"tDisplacement": { type: "t", value: 5, texture: null },
 				"uDisplacementBias": { type: "f", value: -0.5 },
 				"uDisplacementScale": { type: "f", value: 2.5 },
 
@@ -135,10 +137,12 @@ THREE.ShaderUtils = {
 				"uniform float uShininess;",
 
 				"uniform bool enableDiffuse;",
+				"uniform bool enableSpecular;",
 				"uniform bool enableAO;",
 
 				"uniform sampler2D tDiffuse;",
 				"uniform sampler2D tNormal;",
+				"uniform sampler2D tSpecular;",
 				"uniform sampler2D tAO;",
 
 				"uniform float uNormalScale;",
@@ -155,6 +159,7 @@ THREE.ShaderUtils = {
 
 					"vec3 diffuseTex = vec3( 1.0, 1.0, 1.0 );",
 					"vec3 aoTex = vec3( 1.0, 1.0, 1.0 );",
+					"vec3 specularTex = vec3( 1.0, 1.0, 1.0 );",
 
 					"vec3 normalTex = texture2D( tNormal, vUv ).xyz * 2.0 - 1.0;",
 					"normalTex.xy *= uNormalScale;",
@@ -166,6 +171,9 @@ THREE.ShaderUtils = {
 					"if( enableAO )",
 						"aoTex = texture2D( tAO, vUv ).xyz;",
 
+					"if( enableSpecular )",
+						"specularTex = texture2D( tSpecular, vUv ).xyz;",
+
 					"mat3 tsb = mat3( vTangent, vBinormal, vNormal );",
 					"vec3 finalNormal = tsb * normalTex;",
 
@@ -185,10 +193,10 @@ THREE.ShaderUtils = {
 
 					"float pointSpecularWeight = 0.0;",
 					"if ( pointDotNormalHalf >= 0.0 )",
-						"pointSpecularWeight = pow( pointDotNormalHalf, uShininess );",
+						"pointSpecularWeight = specularTex.r * pow( pointDotNormalHalf, uShininess );",
 
 					"pointDiffuse  += vec4( uDiffuseColor, 1.0 ) * pointDiffuseWeight;",
-					"pointSpecular += vec4( uSpecularColor, 1.0 ) * pointSpecularWeight;",
+					"pointSpecular += vec4( uSpecularColor, 1.0 ) * pointSpecularWeight * pointDiffuseWeight;",
 
 					// directional light
 
@@ -205,10 +213,10 @@ THREE.ShaderUtils = {
 
 					"float dirSpecularWeight = 0.0;",
 					"if ( dirDotNormalHalf >= 0.0 )",
-						"dirSpecularWeight = pow( dirDotNormalHalf, uShininess );",
+						"dirSpecularWeight = specularTex.r * pow( dirDotNormalHalf, uShininess );",
 
 					"dirDiffuse  += vec4( uDiffuseColor, 1.0 ) * dirDiffuseWeight;",
-					"dirSpecular += vec4( uSpecularColor, 1.0 ) * dirSpecularWeight;",
+					"dirSpecular += vec4( uSpecularColor, 1.0 ) * dirSpecularWeight * dirDiffuseWeight;",
 
 					// all lights contribution summation
 

+ 3 - 2
src/lights/LensFlare.js

@@ -15,6 +15,7 @@ THREE.LensFlare = function ( texture, size, distance, blending ) {
 		this.add( texture, size, distance, blending );
 		
 	}
+
 };
 
 THREE.LensFlare.prototype = new THREE.Object3D();
@@ -43,7 +44,7 @@ THREE.LensFlare.prototype.add = function( texture, size, distance, blending ) {
 		                    opacity: 1,					// opacity
 		                    blending: blending } );		// blending
 
-}
+};
 
 
 /*
@@ -71,7 +72,7 @@ THREE.LensFlare.prototype.updateLensFlares = function() {
 
 	}
 
-}
+};
 
 
 

+ 12 - 14
src/objects/ShadowVolume.js

@@ -6,12 +6,12 @@ THREE.ShadowVolume = function( meshOrGeometry, isStatic ) {
 
 	if( meshOrGeometry instanceof THREE.Mesh ) {
 
-	 	THREE.Mesh.call( this, meshOrGeometry.geometry, isStatic ? [ new THREE.ShadowVolumeDynamicMaterial() ] : [ new THREE.ShadowVolumeDynamicMaterial() ] );
+		THREE.Mesh.call( this, meshOrGeometry.geometry, isStatic ? [ new THREE.ShadowVolumeDynamicMaterial() ] : [ new THREE.ShadowVolumeDynamicMaterial() ] );
 		meshOrGeometry.addChild( this );
 
 	} else {
 
-	 	THREE.Mesh.call( this, meshOrGeometry, isStatic ? [ new THREE.ShadowVolumeDynamicMaterial() ] : [ new THREE.ShadowVolumeDynamicMaterial() ] );
+		THREE.Mesh.call( this, meshOrGeometry, isStatic ? [ new THREE.ShadowVolumeDynamicMaterial() ] : [ new THREE.ShadowVolumeDynamicMaterial() ] );
 
 	}
 
@@ -84,24 +84,24 @@ THREE.ShadowVolume.prototype.calculateShadowVolumeGeometry = function() {
 			// find combination and processed vertex index (vertices are split up by renderer)
 
 			     if( faceA.a === vertexA ) { faceACombination = "a"; faceAvertexAIndex = vertexOffsetPerFace[ faceAIndex ] + 0; }
-			else if( faceA.b === vertexA ) { faceACombination = "b"; faceAvertexAIndex = vertexOffsetPerFace[ faceAIndex ] + 1; }
-			else if( faceA.c === vertexA ) { faceACombination = "c"; faceAvertexAIndex = vertexOffsetPerFace[ faceAIndex ] + 2; }
+			else if( faceA.b === vertexA ) { faceACombination = "b"; faceAvertexAIndex = vertexOffsetPerFace[ faceAIndex ] + 1; }
+			else if( faceA.c === vertexA ) { faceACombination = "c"; faceAvertexAIndex = vertexOffsetPerFace[ faceAIndex ] + 2; }
 			else if( faceA.d === vertexA ) { faceACombination = "d"; faceAvertexAIndex = vertexOffsetPerFace[ faceAIndex ] + 3; }
 
 			     if( faceA.a === vertexB ) { faceACombination += "a"; faceAvertexBIndex = vertexOffsetPerFace[ faceAIndex ] + 0; }
-			else if( faceA.b === vertexB ) { faceACombination += "b"; faceAvertexBIndex = vertexOffsetPerFace[ faceAIndex ] + 1; }
-			else if( faceA.c === vertexB ) { faceACombination += "c"; faceAvertexBIndex = vertexOffsetPerFace[ faceAIndex ] + 2; }
-			else if( faceA.d === vertexB ) { faceACombination += "d"; faceAvertexBIndex = vertexOffsetPerFace[ faceAIndex ] + 3; }
+			else if( faceA.b === vertexB ) { faceACombination += "b"; faceAvertexBIndex = vertexOffsetPerFace[ faceAIndex ] + 1; }
+			else if( faceA.c === vertexB ) { faceACombination += "c"; faceAvertexBIndex = vertexOffsetPerFace[ faceAIndex ] + 2; }
+			else if( faceA.d === vertexB ) { faceACombination += "d"; faceAvertexBIndex = vertexOffsetPerFace[ faceAIndex ] + 3; }
 
 			     if( faceB.a === vertexA ) { faceBCombination = "a"; faceBvertexAIndex = vertexOffsetPerFace[ faceBIndex ] + 0; }
-			else if( faceB.b === vertexA ) { faceBCombination = "b"; faceBvertexAIndex = vertexOffsetPerFace[ faceBIndex ] + 1; }
-			else if( faceB.c === vertexA ) { faceBCombination = "c"; faceBvertexAIndex = vertexOffsetPerFace[ faceBIndex ] + 2; }
- 			else if( faceB.d === vertexA ) { faceBCombination = "d"; faceBvertexAIndex = vertexOffsetPerFace[ faceBIndex ] + 3; }
+			else if( faceB.b === vertexA ) { faceBCombination = "b"; faceBvertexAIndex = vertexOffsetPerFace[ faceBIndex ] + 1; }
+			else if( faceB.c === vertexA ) { faceBCombination = "c"; faceBvertexAIndex = vertexOffsetPerFace[ faceBIndex ] + 2; }
+ 			else if( faceB.d === vertexA ) { faceBCombination = "d"; faceBvertexAIndex = vertexOffsetPerFace[ faceBIndex ] + 3; }
 
 			     if( faceB.a === vertexB ) { faceBCombination += "a"; faceBvertexBIndex = vertexOffsetPerFace[ faceBIndex ] + 0; }
-			else if( faceB.b === vertexB ) { faceBCombination += "b"; faceBvertexBIndex = vertexOffsetPerFace[ faceBIndex ] + 1; }
+			else if( faceB.b === vertexB ) { faceBCombination += "b"; faceBvertexBIndex = vertexOffsetPerFace[ faceBIndex ] + 1; }
 			else if( faceB.c === vertexB ) { faceBCombination += "c"; faceBvertexBIndex = vertexOffsetPerFace[ faceBIndex ] + 2; }
-			else if( faceB.d === vertexB ) { faceBCombination += "d"; faceBvertexBIndex = vertexOffsetPerFace[ faceBIndex ] + 3; }
+			else if( faceB.d === vertexB ) { faceBCombination += "d"; faceBvertexBIndex = vertexOffsetPerFace[ faceBIndex ] + 3; }
 
 			if( faceACombination === "ac" ||
 				faceACombination === "ad" ||
@@ -153,8 +153,6 @@ THREE.ShadowVolume.prototype.calculateShadowVolumeGeometry = function() {
 
 			}
 
-
-
 			face = new THREE.Face4( faceAvertexAIndex, faceAvertexBIndex, faceBvertexAIndex, faceBvertexBIndex );
 			face.normal.set( 1, 0, 0 );
 			edgeFaces.push( face );

+ 5 - 5
src/renderers/WebGLRenderer.js

@@ -2122,8 +2122,10 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		uniforms.enableLighting.value = lights.directional.length + lights.point.length;
 		uniforms.ambientLightColor.value = lights.ambient;
+
 		uniforms.directionalLightColor.value = lights.directional.colors;
 		uniforms.directionalLightDirection.value = lights.directional.positions;
+
 		uniforms.pointLightColor.value = lights.point.colors;
 		uniforms.pointLightPosition.value = lights.point.positions;
 		uniforms.pointLightDistance.value = lights.point.distances;
@@ -3405,7 +3407,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 				
 					size = object.map.image.width / ( object.affectedByDistance ? 1 : _viewportHeight );
 					scale[ 0 ] = size * invAspect * object.scale.x;
-					scale[ 1 ] = size * object.scale.y;
+					scale[ 1 ] = size * object.scale.y;
 				
 					_gl.uniform2f( uniforms.uvScale, object.uvScale.x, object.uvScale.y );
 					_gl.uniform2f( uniforms.uvOffset, object.uvOffset.x, object.uvOffset.y );
@@ -3649,9 +3651,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 		_gl.enable( _gl.DEPTH_TEST );
 		_gl.depthMask( _currentDepthMask );
 
-	}
-
-
+	};
 
 
 	function setupMatrices( object, camera ) {
@@ -3659,7 +3659,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 		object._modelViewMatrix.multiplyToArray( camera.matrixWorldInverse, object.matrixWorld, object._modelViewMatrixArray );
 		THREE.Matrix4.makeInvert3x3( object._modelViewMatrix ).transposeIntoArray( object._normalMatrixArray );
 
-	}
+	};
 
 	this.initWebGLObjects = function ( scene ) {
 

+ 1 - 0
utils/build.py

@@ -90,6 +90,7 @@ EXTRAS_FILES = [
 'extras/ShaderUtils.js',
 'extras/cameras/QuakeCamera.js',
 'extras/cameras/PathCamera.js',
+'extras/cameras/FlyCamera.js',
 'extras/geometries/Cube.js',
 'extras/geometries/Cylinder.js',
 'extras/geometries/Icosahedron.js',

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików