f;f++){a.__webglFramebuffer[f]=m.createFramebuffer();a.__webglRenderbuffer[f]=m.createRenderbuffer();m.texImage2D(m.TEXTURE_CUBE_MAP_POSITIVE_X+f,0,d,a.width,a.height,0,d,e,null);var g=a,h=m.TEXTURE_CUBE_MAP_POSITIVE_X+f;m.bindFramebuffer(m.FRAMEBUFFER,
+a.__webglFramebuffer[f]);m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,h,g.__webglTexture,0);G(a.__webglRenderbuffer[f],a)}c&&m.generateMipmap(m.TEXTURE_CUBE_MAP)}else a.__webglFramebuffer=m.createFramebuffer(),a.__webglRenderbuffer=a.shareDepthFrom?a.shareDepthFrom.__webglRenderbuffer:m.createRenderbuffer(),m.bindTexture(m.TEXTURE_2D,a.__webglTexture),A(m.TEXTURE_2D,a,c),m.texImage2D(m.TEXTURE_2D,0,d,a.width,a.height,0,d,e,null),d=m.TEXTURE_2D,m.bindFramebuffer(m.FRAMEBUFFER,a.__webglFramebuffer),
+m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,d,a.__webglTexture,0),a.shareDepthFrom?a.depthBuffer&&!a.stencilBuffer?m.framebufferRenderbuffer(m.FRAMEBUFFER,m.DEPTH_ATTACHMENT,m.RENDERBUFFER,a.__webglRenderbuffer):a.depthBuffer&&a.stencilBuffer&&m.framebufferRenderbuffer(m.FRAMEBUFFER,m.DEPTH_STENCIL_ATTACHMENT,m.RENDERBUFFER,a.__webglRenderbuffer):G(a.__webglRenderbuffer,a),c&&m.generateMipmap(m.TEXTURE_2D);b?m.bindTexture(m.TEXTURE_CUBE_MAP,null):m.bindTexture(m.TEXTURE_2D,null);m.bindRenderbuffer(m.RENDERBUFFER,
+null);m.bindFramebuffer(m.FRAMEBUFFER,null)}a?(b=b?a.__webglFramebuffer[a.activeCubeFace]:a.__webglFramebuffer,c=a.width,a=a.height,e=d=0):(b=null,c=pb,a=qb,d=ib,e=bb);b!==ab&&(m.bindFramebuffer(m.FRAMEBUFFER,b),m.viewport(d,e,c,a),ab=b);Xb=c;fc=a};this.readRenderTargetPixels=function(a,b,c,d,e,f){if(!(a instanceof THREE.WebGLRenderTarget))console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");else if(a.__webglFramebuffer)if(a.format!==THREE.RGBAFormat)console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA format. readPixels can read only RGBA format.");
+else{var g=!1;a.__webglFramebuffer!==ab&&(m.bindFramebuffer(m.FRAMEBUFFER,a.__webglFramebuffer),g=!0);m.checkFramebufferStatus(m.FRAMEBUFFER)===m.FRAMEBUFFER_COMPLETE?m.readPixels(b,c,d,e,m.RGBA,m.UNSIGNED_BYTE,f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.");g&&m.bindFramebuffer(m.FRAMEBUFFER,ab)}};this.initMaterial=function(){THREE.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};this.addPrePlugin=function(){THREE.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")};
+this.addPostPlugin=function(){THREE.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")};this.updateShadowMap=function(){THREE.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")}};
THREE.WebGLRenderTarget=function(a,b,c){this.width=a;this.height=b;c=c||{};this.wrapS=void 0!==c.wrapS?c.wrapS:THREE.ClampToEdgeWrapping;this.wrapT=void 0!==c.wrapT?c.wrapT:THREE.ClampToEdgeWrapping;this.magFilter=void 0!==c.magFilter?c.magFilter:THREE.LinearFilter;this.minFilter=void 0!==c.minFilter?c.minFilter:THREE.LinearMipMapLinearFilter;this.anisotropy=void 0!==c.anisotropy?c.anisotropy:1;this.offset=new THREE.Vector2(0,0);this.repeat=new THREE.Vector2(1,1);this.format=void 0!==c.format?c.format:
THREE.RGBAFormat;this.type=void 0!==c.type?c.type:THREE.UnsignedByteType;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.generateMipmaps=!0;this.shareDepthFrom=void 0!==c.shareDepthFrom?c.shareDepthFrom:null};
THREE.WebGLRenderTarget.prototype={constructor:THREE.WebGLRenderTarget,setSize:function(a,b){this.width=a;this.height=b},clone:function(){var a=new THREE.WebGLRenderTarget(this.width,this.height);a.wrapS=this.wrapS;a.wrapT=this.wrapT;a.magFilter=this.magFilter;a.minFilter=this.minFilter;a.anisotropy=this.anisotropy;a.offset.copy(this.offset);a.repeat.copy(this.repeat);a.format=this.format;a.type=this.type;a.depthBuffer=this.depthBuffer;a.stencilBuffer=this.stencilBuffer;a.generateMipmaps=this.generateMipmaps;
a.shareDepthFrom=this.shareDepthFrom;return a},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.WebGLRenderTarget.prototype);THREE.WebGLRenderTargetCube=function(a,b,c){THREE.WebGLRenderTarget.call(this,a,b,c);this.activeCubeFace=0};THREE.WebGLRenderTargetCube.prototype=Object.create(THREE.WebGLRenderTarget.prototype);THREE.WebGLRenderTargetCube.prototype.constructor=THREE.WebGLRenderTargetCube;
THREE.WebGLExtensions=function(a){var b={};this.get=function(c){if(void 0!==b[c])return b[c];var d;switch(c){case "EXT_texture_filter_anisotropic":d=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||a.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case "WEBGL_compressed_texture_s3tc":d=a.getExtension("WEBGL_compressed_texture_s3tc")||a.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");
-break;case "WEBGL_compressed_texture_pvrtc":d=a.getExtension("WEBGL_compressed_texture_pvrtc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:d=a.getExtension(c)}null===d&&console.log("THREE.WebGLRenderer: "+c+" extension not supported.");return b[c]=d}};
-THREE.WebGLProgram=function(){var a=0;return function(b,c,d,e){var f=b.context,g=d.defines,h=d.__webglShader.uniforms,k=d.attributes,n=d.__webglShader.vertexShader,p=d.__webglShader.fragmentShader,q=d.index0AttributeName;void 0===q&&!0===e.morphTargets&&(q="position");var m="SHADOWMAP_TYPE_BASIC";e.shadowMapType===THREE.PCFShadowMap?m="SHADOWMAP_TYPE_PCF":e.shadowMapType===THREE.PCFSoftShadowMap&&(m="SHADOWMAP_TYPE_PCF_SOFT");var t="ENVMAP_TYPE_CUBE",s="ENVMAP_MODE_REFLECTION",r="ENVMAP_BLENDING_MULTIPLY";
-if(e.envMap){switch(d.envMap.mapping){case THREE.CubeReflectionMapping:case THREE.CubeRefractionMapping:t="ENVMAP_TYPE_CUBE";break;case THREE.EquirectangularReflectionMapping:case THREE.EquirectangularRefractionMapping:t="ENVMAP_TYPE_EQUIREC";break;case THREE.SphericalReflectionMapping:t="ENVMAP_TYPE_SPHERE"}switch(d.envMap.mapping){case THREE.CubeRefractionMapping:case THREE.EquirectangularRefractionMapping:s="ENVMAP_MODE_REFRACTION"}switch(d.combine){case THREE.MultiplyOperation:r="ENVMAP_BLENDING_MULTIPLY";
-break;case THREE.MixOperation:r="ENVMAP_BLENDING_MIX";break;case THREE.AddOperation:r="ENVMAP_BLENDING_ADD"}}var u,v;u=[];for(var y in g)v=g[y],!1!==v&&(v="#define "+y+" "+v,u.push(v));u=u.join("\n");g=f.createProgram();d instanceof THREE.RawShaderMaterial?b=d="":(d=["precision "+e.precision+" float;","precision "+e.precision+" int;",u,e.supportsVertexTextures?"#define VERTEX_TEXTURES":"",b.gammaInput?"#define GAMMA_INPUT":"",b.gammaOutput?"#define GAMMA_OUTPUT":"","#define MAX_DIR_LIGHTS "+e.maxDirLights,
-"#define MAX_POINT_LIGHTS "+e.maxPointLights,"#define MAX_SPOT_LIGHTS "+e.maxSpotLights,"#define MAX_HEMI_LIGHTS "+e.maxHemiLights,"#define MAX_SHADOWS "+e.maxShadows,"#define MAX_BONES "+e.maxBones,e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+s:"",e.lightMap?"#define USE_LIGHTMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.vertexColors?"#define USE_COLOR":
-"",e.skinning?"#define USE_SKINNING":"",e.useVertexTexture?"#define BONE_TEXTURE":"",e.morphTargets?"#define USE_MORPHTARGETS":"",e.morphNormals?"#define USE_MORPHNORMALS":"",e.wrapAround?"#define WRAP_AROUND":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+m:"",e.shadowMapDebug?"#define SHADOWMAP_DEBUG":"",e.shadowMapCascade?"#define SHADOWMAP_CASCADE":"",e.sizeAttenuation?"#define USE_SIZEATTENUATION":
-"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 cameraPosition;\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\nattribute vec2 uv2;\n#ifdef USE_COLOR\n\tattribute vec3 color;\n#endif\n#ifdef USE_MORPHTARGETS\n\tattribute vec3 morphTarget0;\n\tattribute vec3 morphTarget1;\n\tattribute vec3 morphTarget2;\n\tattribute vec3 morphTarget3;\n\t#ifdef USE_MORPHNORMALS\n\t\tattribute vec3 morphNormal0;\n\t\tattribute vec3 morphNormal1;\n\t\tattribute vec3 morphNormal2;\n\t\tattribute vec3 morphNormal3;\n\t#else\n\t\tattribute vec3 morphTarget4;\n\t\tattribute vec3 morphTarget5;\n\t\tattribute vec3 morphTarget6;\n\t\tattribute vec3 morphTarget7;\n\t#endif\n#endif\n#ifdef USE_SKINNING\n\tattribute vec4 skinIndex;\n\tattribute vec4 skinWeight;\n#endif\n"].join("\n"),
-b=["precision "+e.precision+" float;","precision "+e.precision+" int;",e.bumpMap||e.normalMap?"#extension GL_OES_standard_derivatives : enable":"",u,"#define MAX_DIR_LIGHTS "+e.maxDirLights,"#define MAX_POINT_LIGHTS "+e.maxPointLights,"#define MAX_SPOT_LIGHTS "+e.maxSpotLights,"#define MAX_HEMI_LIGHTS "+e.maxHemiLights,"#define MAX_SHADOWS "+e.maxShadows,e.alphaTest?"#define ALPHATEST "+e.alphaTest:"",b.gammaInput?"#define GAMMA_INPUT":"",b.gammaOutput?"#define GAMMA_OUTPUT":"",e.useFog&&e.fog?"#define USE_FOG":
-"",e.useFog&&e.fogExp?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+t:"",e.envMap?"#define "+s:"",e.envMap?"#define "+r:"",e.lightMap?"#define USE_LIGHTMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.vertexColors?"#define USE_COLOR":"",e.metal?"#define METAL":"",e.wrapAround?"#define WRAP_AROUND":"",e.doubleSided?"#define DOUBLE_SIDED":
-"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+m:"",e.shadowMapDebug?"#define SHADOWMAP_DEBUG":"",e.shadowMapCascade?"#define SHADOWMAP_CASCADE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;\nuniform vec3 cameraPosition;\n"].join("\n"));n=new THREE.WebGLShader(f,f.VERTEX_SHADER,d+n);p=new THREE.WebGLShader(f,f.FRAGMENT_SHADER,b+p);f.attachShader(g,n);f.attachShader(g,p);void 0!==q&&f.bindAttribLocation(g,
-0,q);f.linkProgram(g);!1===f.getProgramParameter(g,f.LINK_STATUS)&&(console.error("THREE.WebGLProgram: Could not initialise shader."),console.error("gl.VALIDATE_STATUS",f.getProgramParameter(g,f.VALIDATE_STATUS)),console.error("gl.getError()",f.getError()));""!==f.getProgramInfoLog(g)&&console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",f.getProgramInfoLog(g));f.deleteShader(n);f.deleteShader(p);q="viewMatrix modelViewMatrix projectionMatrix normalMatrix modelMatrix cameraPosition morphTargetInfluences bindMatrix bindMatrixInverse".split(" ");
-e.useVertexTexture?(q.push("boneTexture"),q.push("boneTextureWidth"),q.push("boneTextureHeight")):q.push("boneGlobalMatrices");e.logarithmicDepthBuffer&&q.push("logDepthBufFC");for(var C in h)q.push(C);h=q;C={};q=0;for(b=h.length;qL;L++)A[L]=new THREE.Vector3,w[L]=new THREE.Vector3;A=D.shadowCascadeNearZ[K];D=D.shadowCascadeFarZ[K];w[0].set(-1,-1,A);w[1].set(1,-1,A);w[2].set(-1,1,A);w[3].set(1,1,A);w[4].set(-1,-1,D);w[5].set(1,-1,D);w[6].set(-1,1,D);w[7].set(1,1,D);M.originalCamera=v;w=new THREE.Gyroscope;w.position.copy(z.shadowCascadeOffset);w.add(M);w.add(M.target);v.add(w);z.shadowCascadeArray[E]=M;console.log("Created virtualLight",M)}K=
-z;A=E;D=K.shadowCascadeArray[A];D.position.copy(K.position);D.target.position.copy(K.target.position);D.lookAt(D.target);D.shadowCameraVisible=K.shadowCameraVisible;D.shadowDarkness=K.shadowDarkness;D.shadowBias=K.shadowCascadeBias[A];w=K.shadowCascadeNearZ[A];K=K.shadowCascadeFarZ[A];D=D.pointsFrustum;D[0].z=w;D[1].z=w;D[2].z=w;D[3].z=w;D[4].z=K;D[5].z=K;D[6].z=K;D[7].z=K;U[G]=M;G++}else U[G]=z,G++;u=0;for(F=U.length;u t&&(.2>d&&(b[0].x+=1),.2>a&&(b[1].x+=1),.2>q&&(b[2].x+=1));n=0;for(p=this.vertices.length;n c&&1===a.x&&(a=new THREE.Vector2(a.x-1,a.y));0===b.x&&0===b.z&&(a=new THREE.Vector2(c/2/Math.PI+.5,a.y));return a.clone()}
+THREE.Geometry.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;for(var k=this,l=0,p=a.length;l t&&(.2>d&&(b[0].x+=1),.2>a&&(b[1].x+=1),.2>q&&(b[2].x+=1));l=0;for(p=this.vertices.length;l s;s++){d[0]=t[g[s]];d[1]=t[g[(s+1)%3]];d.sort(f);var r=d.toString();void 0===e[r]?(e[r]={vert1:d[0],vert2:d[1],face1:q,face2:void 0},p++):e[r].face2=q}d=new Float32Array(6*p);f=0;for(r in e)if(g=e[r],void 0===g.face2||
-.9999>k[g.face1].normal.dot(k[g.face2].normal))p=n[g.vert1],d[f++]=p.x,d[f++]=p.y,d[f++]=p.z,p=n[g.vert2],d[f++]=p.x,d[f++]=p.y,d[f++]=p.z;h.addAttribute("position",new THREE.BufferAttribute(d,3));THREE.Line.call(this,h,new THREE.LineBasicMaterial({color:c}),THREE.LinePieces);this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1};THREE.EdgesHelper.prototype=Object.create(THREE.Line.prototype);THREE.EdgesHelper.prototype.constructor=THREE.EdgesHelper;
+THREE.EdgesHelper=function(a,b,c){b=void 0!==b?b:16777215;c=Math.cos(THREE.Math.degToRad(void 0!==c?c:1));var d=[0,0],e={},f=function(a,b){return a-b},g=["a","b","c"],h=new THREE.BufferGeometry,k;a.geometry instanceof THREE.BufferGeometry?(k=new THREE.Geometry,k.fromBufferGeometry(a.geometry)):k=a.geometry.clone();k.mergeVertices();k.computeFaceNormals();var l=k.vertices;k=k.faces;for(var p=0,q=0,n=k.length;qL;L++)I[L]=new THREE.Vector3,F[L]=new THREE.Vector3;I=z.shadowCascadeNearZ[H];z=z.shadowCascadeFarZ[H];F[0].set(-1,-1,I);F[1].set(1,-1,I);F[2].set(-1,1,I);F[3].set(1,1,I);F[4].set(-1,-1,z);F[5].set(1,-1,z);F[6].set(-1,1,z);F[7].set(1,1,z);M.originalCamera=v;F=new THREE.Gyroscope;F.position.copy(A.shadowCascadeOffset);F.add(M);F.add(M.target);v.add(F);A.shadowCascadeArray[G]=M}H=A;I=G;z=H.shadowCascadeArray[I];z.position.copy(H.position);
+z.target.position.copy(H.target.position);z.lookAt(z.target);z.shadowCameraVisible=H.shadowCameraVisible;z.shadowDarkness=H.shadowDarkness;z.shadowBias=H.shadowCascadeBias[I];F=H.shadowCascadeNearZ[I];H=H.shadowCascadeFarZ[I];z=z.pointsFrustum;z[0].z=F;z[1].z=F;z[2].z=F;z[3].z=F;z[4].z=H;z[5].z=H;z[6].z=H;z[7].z=H;U[E]=M;E++}else U[E]=A,E++;u=0;for(y=U.length;uq-1?0:q-1,t=q+1>e-1?e-1:q+1,r=0>p-1?0:p-1,s=p+1>d-1?d-1:p+1,u=[],v=[0,0,h[4*(q*d+p)]/255*b];u.push([-1,0,h[4*(q*d+r)]/255*b]);u.push([-1,-1,h[4*(n*d+r)]/255*b]);u.push([0,-1,h[4*(n*d+p)]/255*b]);u.push([1,-1,h[4*(n*d+s)]/255*b]);u.push([1,0,h[4*(q*d+s)]/255*b]);u.push([1,1,h[4*(t*d+s)]/255*b]);u.push([0,1,h[4*(t*d+p)]/255*
+b]);u.push([-1,1,h[4*(t*d+r)]/255*b]);n=[];r=u.length;for(t=0;t=this.currentTime?f.interpolate(g,this.currentTime):f.inter
THREE.KeyFrameAnimation.prototype.getPrevKeyWith=function(a,b,c){b=this.data.hierarchy[b].keys;for(c=0<=c?c:c+b.length;0<=c;c--)if(b[c].hasTarget(a))return b[c];return b[b.length-1]};THREE.MorphAnimation=function(a){this.mesh=a;this.frames=a.morphTargetInfluences.length;this.currentTime=0;this.duration=1E3;this.loop=!0;this.currentFrame=this.lastFrame=0;this.isPlaying=!1};
THREE.MorphAnimation.prototype={constructor:THREE.MorphAnimation,play:function(){this.isPlaying=!0},pause:function(){this.isPlaying=!1},update:function(a){if(!1!==this.isPlaying){this.currentTime+=a;!0===this.loop&&this.currentTime>this.duration&&(this.currentTime%=this.duration);this.currentTime=Math.min(this.currentTime,this.duration);a=this.duration/this.frames;var b=Math.floor(this.currentTime/a);b!=this.currentFrame&&(this.mesh.morphTargetInfluences[this.lastFrame]=0,this.mesh.morphTargetInfluences[this.currentFrame]=
1,this.mesh.morphTargetInfluences[b]=0,this.lastFrame=this.currentFrame,this.currentFrame=b);this.mesh.morphTargetInfluences[b]=this.currentTime%a/a;this.mesh.morphTargetInfluences[this.lastFrame]=1-this.mesh.morphTargetInfluences[b]}}};
-THREE.BoxGeometry=function(a,b,c,d,e,f){function g(a,b,c,d,e,f,g,r){var u,v=h.widthSegments,y=h.heightSegments,C=e/2,x=f/2,F=h.vertices.length;if("x"===a&&"y"===b||"y"===a&&"x"===b)u="z";else if("x"===a&&"z"===b||"z"===a&&"x"===b)u="y",y=h.depthSegments;else if("z"===a&&"y"===b||"y"===a&&"z"===b)u="x",v=h.depthSegments;var z=v+1,G=y+1,E=e/v,w=f/y,D=new THREE.Vector3;D[u]=0Examples
scene.add( cubeCamera );
//Create car
- var chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, ambient: 0xffffff, envMap: cubeCamera.renderTarget } );
+ var chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: cubeCamera.renderTarget } );
var car = new Mesh( carGeometry, chromeMaterial );
scene.add( car );
diff --git a/docs/api/constants/CustomBlendingEquations.html b/docs/api/constants/CustomBlendingEquations.html
index b27f99eb9a5708..bee4aae4586394 100644
--- a/docs/api/constants/CustomBlendingEquations.html
+++ b/docs/api/constants/CustomBlendingEquations.html
@@ -13,7 +13,9 @@ Equations
THREE.SubtractEquation
- THREE.ReverseSubtractEquation
+ THREE.ReverseSubtractEquation
+ THREE.MinEquation
+ THREE.MaxEquation
Destination Factors
diff --git a/docs/api/constants/GLState.html b/docs/api/constants/GLState.html
index f75843f14fbd58..06e08e5c8dabb3 100644
--- a/docs/api/constants/GLState.html
+++ b/docs/api/constants/GLState.html
@@ -7,7 +7,7 @@
- GL State Conflicts
+ GL State Constants
Cull Face
Mapping Modes
THREE.UVMapping
THREE.CubeReflectionMapping
THREE.CubeRefractionMapping
+ THREE.EquirectangularReflectionMapping
+ THREE.EquirectangularRefractionMapping
THREE.SphericalReflectionMapping
Data Types
THREE.UnsignedShortType
THREE.IntType
THREE.UnsignedIntType
- THREE.FloatType
+ THREE.FloatType
+ THREE.HalfFloatType
Pixel Types
@@ -65,10 +68,11 @@ Pixel Formats
THREE.RGBFormat
THREE.RGBAFormat
THREE.LuminanceFormat
- THREE.LuminanceAlphaFormat
+ THREE.LuminanceAlphaFormat
+ THREE.RGBEFormat
- Compressed Texture Formats
+ DDS / ST3C Compressed Texture Formats
THREE.RGBA_S3TC_DXT1_Format
@@ -76,6 +80,13 @@ Compressed Texture Formats
THREE.RGBA_S3TC_DXT5_Format
PVRTC Compressed Texture Formats
+
+ THREE.RGB_PVRTC_2BPPV1_Format
+ THREE.RGBA_PVRTC_4BPPV1_Format
+ THREE.RGBA_PVRTC_2BPPV1_Format
+ Source
diff --git a/docs/api/core/Raycaster.html b/docs/api/core/Raycaster.html
index b06160765f0b13..ce6b442c41308b 100644
--- a/docs/api/core/Raycaster.html
+++ b/docs/api/core/Raycaster.html
@@ -23,8 +23,8 @@ Example
// calculate mouse position in normalized device coordinates
// (-1 to +1) for both components
- mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1
- mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1
+ mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
+ mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
}
@@ -36,9 +36,9 @@ Example
// calculate objects intersecting the picking ray
var intersects = raycaster.intersectObjects( scene.children );
- for ( var intersect in intersects ) {
+ for ( var i = 0; i < intersects.length; i++ ) {
- intersect.object.material.color = new THREE.Color( 0xff0000 );
+ intersects[ i ].object.material.color.set( 0xff0000 );
}
diff --git a/docs/api/extras/geometries/CylinderGeometry.html b/docs/api/extras/geometries/CylinderGeometry.html
index 51e6803ca3c282..e17b611ac9c7c8 100644
--- a/docs/api/extras/geometries/CylinderGeometry.html
+++ b/docs/api/extras/geometries/CylinderGeometry.html
@@ -8,7 +8,7 @@
[page:Geometry] →
-
+
[name]
Example
Constructor
- [name]([page:Float radiusTop], [page:Float radiusBottom], [page:Float height], [page:Integer radiusSegments], [page:Integer heightSegments], [page:Boolean openEnded])
+ [name]([page:Float radiusTop], [page:Float radiusBottom], [page:Float height], [page:Integer radiusSegments], [page:Integer heightSegments], [page:Boolean openEnded], [page:Float thetaStart], [page:Float thetaLength])
radiusBottom — Radius of the cylinder at the bottom. Default is 20.
height — Height of the cylinder. Default is 100.
radiusSegments — Number of segmented faces around the circumference of the cylinder. Default is 8
heightSegments — Number of rows of faces along the height of the cylinder. Default is 1.
- openEnded — A Boolean indicating whether the ends of the cylinder are open or capped. Default is false, meaning capped.
+ openEnded — A Boolean indicating whether the ends of the cylinder are open or capped. Default is false, meaning capped.
+ thetaStart — Start angle for first segment, default = 0 (three o'clock position).
+ thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cylinder.
Properties
[property:Camera camera]
Methods
- [method:todo update]()
+ [method:null update]()
[name]
Constructor
- [name]([DirectionalLight:todo light], [page:Number size])
+ [name]([page:DirectionalLight light], [page:Number size])
size -- dimensions of the plane
@@ -32,18 +32,18 @@ Properties
[property:Line lightPlane]
[property:DirectionalLight light]
[property:Line targetLine]
Methods
diff --git a/docs/api/extras/helpers/EdgesHelper.html b/docs/api/extras/helpers/EdgesHelper.html
index 69f99bfc0c3223..d3b11734d3ee23 100644
--- a/docs/api/extras/helpers/EdgesHelper.html
+++ b/docs/api/extras/helpers/EdgesHelper.html
@@ -27,10 +27,12 @@ Example
Constructor
- [name]( [page:Object3D object], [page:Color color] )
+ [name]( [page:Object3D object], [page:Color color], [page:Float thresholdAngle] )
- color -- Color of the edges.
+ color -- Color of the edges.
+ thresholdAngle -- the minimim angle (in degrees), between the face normals of adjacent faces, that is required to render an edge. Default is 0.1.
+
[name]
- Constructor
- [name]([page:todo light], [page:todo sphereSize], [page:todo arrowLength], [page:todo domeSize])
+ [name]([page:HemisphereLight light], [page:Number sphereSize])
- sphereSize -- todo
- arrowLength -- todo
- domeSize -- todo
+ light -- The HemisphereLight.
+ sphereSize -- The size of the sphere that shows the location.
Properties
[property:Mesh lightSphere]
[property:HemisphereLight light]
Methods
- [method:todo update]()
+ [method:null update]()
[method:Object3D parse]( [page:String text], [page:Function mtllibCallback]
- Found objects are converted to [page:Mesh] with a [page:BufferGeometry] and materials are converted to [page:MeshLambertMaterial].
+ Found objects are converted to a [page:Mesh] and materials are converted to [page:MeshLambertMaterial].
Example
diff --git a/docs/api/loaders/SceneLoader.html b/docs/api/loaders/SceneLoader.html
deleted file mode 100644
index b7a169a9cdeeca..00000000000000
--- a/docs/api/loaders/SceneLoader.html
+++ /dev/null
@@ -1,114 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- [name]
-
- Constructor
-
- [name]( [page:LoadingManager manager] )
- Properties
-
-
- Methods
-
- [method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )
-
- [page:Function onLoad] — Will be called when load completes. The argument will be an [page:Object] containing the loaded components.
- [page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.
- [page:Function onError] — Will be called when load errors.
- [method:Object parse]( [page:Object json], [page:Function callbackFinished], [page:String url] )
-
- [page:Function callbackFinished] — Will be called when parse completes.
- [page:String url] — Will be used as base for assets' relative URLs.
- [method:null setCrossOrigin]( [page:String value] )
- [method:null addGeometryHandler]( [page:String typeID], [page:Function loaderClass] )
-
- [page:Function loaderClass] — The handler class.
- [method:null addHierarchyHandler]( [page:String typeID], [page:Function loaderClass] )
-
- [page:Function loaderClass] — The handler class.
- Example
-
-
- // instantiate a loader
- var loader = new THREE.SceneLoader();
-
- // Handle STL geometries
- loader.addGeometryHandler( "stl", THREE.STLLoader );
-
- // Handle OBJ objects
- loader.addHierarchyHandler( "obj", THREE.OBJLoader );
-
- // load a JSON resource
- loader.load(
- // resource URL
- 'scenes/test_scene.js',
- // Function when resource is loaded
- function ( result ) {
- scene.add( result.scene );
- },
- // Function called when download progresses
- function ( xhr ) {
- console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
- },
- // Function called when download errors
- function ( xhr ) {
- console.log( 'An error happened' );
- }
- );
-
-
- [example:webgl_loader_scene]
-
-
- Source
-
- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/SceneLoader.js examples/js/loaders/SceneLoader.js]
-
-
diff --git a/docs/api/materials/MeshLambertMaterial.html b/docs/api/materials/MeshLambertMaterial.html
index 4028b0ea7d04b7..483dced39f253b 100644
--- a/docs/api/materials/MeshLambertMaterial.html
+++ b/docs/api/materials/MeshLambertMaterial.html
@@ -29,7 +29,7 @@ [name]([page:Object parameters])
specularMap — Set specular map. Default is null.
alphaMap — Set alpha map. Default is null.
envMap — Set env map. Default is null.
- fog — Define whether the material color is affected by global fog settings. Default is false.
+ fog — Define whether the material color is affected by global fog settings. Default is false.
shading — How the triangles of a curved surface are rendered. Default is [page:Materials THREE.SmoothShading].
wireframe — Render geometry as wireframe. Default is false (i.e. render as smooth shaded).
wireframeLinewidth — Controls wireframe thickness. Default is 1.
@@ -49,11 +49,6 @@ [property:Color color]
Diffuse color of the material. Default is white.
- [property:Color ambient]
-
- [property:Color emissive]
diff --git a/docs/api/materials/MeshNormalMaterial.html b/docs/api/materials/MeshNormalMaterial.html
index 37ca144e1b2e17..80b32009d5fad7 100644
--- a/docs/api/materials/MeshNormalMaterial.html
+++ b/docs/api/materials/MeshNormalMaterial.html
@@ -12,7 +12,7 @@
[name]
Constructor
[name]([page:Object parameters])
wireframe -- Render geometry as wireframe. Default is false (i.e. render as smooth shaded).
wireframeLinewidth -- Controls wireframe thickness. Default is 1.
morphTargets -- Define whether the material uses morphTargets. Default is false.
@@ -34,25 +33,19 @@ [name]([page:Object parameters])
Properties
- [property:number shading]
+ [property:boolean wireframe]
- Options are [page:Materials THREE.SmoothShading], [page:Materials THREE.FlatShading](default)
+ Render geometry as wireframe. Default is false (i.e. render as smooth shaded).
[property:boolean wireframe]
- [property:number wireframeLinewidth]
Due to limitations in the ANGLE layer, on Windows platforms linewidth will always be 1 regardless of the set value.
- [property:boolean morphTargets]
- Methods
diff --git a/docs/api/materials/MeshPhongMaterial.html b/docs/api/materials/MeshPhongMaterial.html
index 70179ecec63a13..2d84126decc497 100644
--- a/docs/api/materials/MeshPhongMaterial.html
+++ b/docs/api/materials/MeshPhongMaterial.html
@@ -41,7 +41,7 @@ [name]([page:Object parameters])
- materials.push( new THREE.MeshPhongMaterial( { ambient: 0x030303, color: 0xdddddd, specular: 0x009900, shininess: 30, shading: THREE.FlatShading } ) );
+ materials.push( new THREE.MeshPhongMaterial( { color: 0xdddddd, specular: 0x009900, shininess: 30, shading: THREE.FlatShading } ) );
[property:Color color]
Diffuse color of the material. Default is white.
- [property:Color ambient]
-
- [property:Color emissive]
@@ -70,7 +65,7 @@ [property:Color specular]
[property:Float shininess]
- [property:boolean metal]
[name]( [page:Object parameters] )
map - the texture map
- rotation - the rotation of the sprite
+ rotation - the rotation of the sprite
fog - whether or not to use the scene fog
[method:Color lerp]( [page:Color color], alpha ) [page:Color this]
Linear interpolation of this colors rgb values and the rgb values of the first argument. The alpha argument can be thought of as the percent between the two colors, where 0 is this color and 1 is the first argument.
[method:Array toArray]( [page:Array array] )
+ [method:Color equals]( [page:Color c] ) [page:Color this]
[name]
-
-
-
- Euler angles describe a rotation transformation by rotating an object on its various axes in specified amounts per axis, and a specified axis order.
- (More information on Wikipedia)Example
-
- var a = new THREE.Euler( 0, 1, 1.57, 'XYZ' );
- var b = new THREE.Vector3( 1, 0, 1 );
- b.applyEuler(a);
-
-
-
- Constructor
-
-
- [name]( [page:Float x], [page:Float y], [page:Float z], [page:String order] )
-
- y -- [page:Float] the angle of the y axis in radians
- z -- [page:Float] the angle of the z axis in radians
- order -- [page:String] A string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case).
- Properties
-
- [property:Float x]
-
- [property:Float y]
-
- [property:Float z]
-
- [property:String order]
-
-
-
- Methods
-
- [method:Euler set]( [page:Float x], [page:Float y], [page:Float z], [page:String order] ) [page:Euler this]
-
- y -- [page:Float] Angle in y axis in radians
- z -- [page:Float] Angle in z axis in radians
- order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
- [method:Euler copy]( [page:Euler euler] ) [page:Euler this]
- [method:Euler setFromRotationMatrix]( [page:Matrix4 m], [page:String order] ) [page:Euler this]
-
- order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
- [method:Euler setFromQuaternion]( [page:Quaternion q], [page:String order] ) [page:Euler this]
-
- order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
- [method:Euler reorder]( [page:String newOrder] ) [page:Euler this]
-
- WARNING: this discards revolution information.
- [method:Euler setFromVector3]([page:Vector3 vector], [page:String order]) [page:Euler this]
- [method:Vector3 toVector3]()
- [method:Euler fromArray]([page:Array array]) [page:Euler this]
-
- Assigns this euler's y angle to array[1].
- Assigns this euler's z angle to array[2].
- Optionally assigns this euler's order to array[3].
- [method:Array toArray]()
- [method:Boolean equals]( [page:Euler euler] )
- [method:Euler clone]()
- Source
-
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-
+
+
+
+
+
+
+
+ [name]
+
+
+
+ Euler angles describe a rotation transformation by rotating an object on its various axes in specified amounts per axis, and a specified axis order.
+ (More information on Wikipedia)Example
+
+ var a = new THREE.Euler( 0, 1, 1.57, 'XYZ' );
+ var b = new THREE.Vector3( 1, 0, 1 );
+ b.applyEuler(a);
+
+
+
+ Constructor
+
+
+ [name]( [page:Float x], [page:Float y], [page:Float z], [page:String order] )
+
+ y -- [page:Float] the angle of the y axis in radians
+ z -- [page:Float] the angle of the z axis in radians
+ order -- [page:String] A string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case).
+ Properties
+
+ [property:Float x]
+
+ [property:Float y]
+
+ [property:Float z]
+
+ [property:String order]
+
+
+
+ Methods
+
+ [method:Euler set]( [page:Float x], [page:Float y], [page:Float z], [page:String order] ) [page:Euler this]
+
+ y -- [page:Float] Angle in y axis in radians
+ z -- [page:Float] Angle in z axis in radians
+ order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
+ [method:Euler copy]( [page:Euler euler] ) [page:Euler this]
+ [method:Euler setFromRotationMatrix]( [page:Matrix4 m], [page:String order] ) [page:Euler this]
+
+ order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
+ [method:Euler setFromQuaternion]( [page:Quaternion q], [page:String order] ) [page:Euler this]
+
+ order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
+ [method:Euler reorder]( [page:String newOrder] ) [page:Euler this]
+
+ WARNING: this discards revolution information.
+ [method:Euler setFromVector3]([page:Vector3 vector], [page:String order]) [page:Euler this]
+ [method:Vector3 toVector3]()
+ [method:Euler fromArray]([page:Array array]) [page:Euler this]
+
+ Assigns this euler's y angle to array[1].
+ Assigns this euler's z angle to array[2].
+ Optionally assigns this euler's order to array[3].
+ [method:Array toArray]( [page:Array array] )
+ [method:Boolean equals]( [page:Euler euler] )
+ [method:Euler clone]()
+ Source
+
+ [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+
diff --git a/docs/api/math/Matrix4.html b/docs/api/math/Matrix4.html
index 9b494e103ecf82..72ee6b3d08a307 100644
--- a/docs/api/math/Matrix4.html
+++ b/docs/api/math/Matrix4.html
@@ -165,8 +165,7 @@ [method:Matrix4 compose]( [page:Vector3 translation], [page:Quaternion quate
[method:Array decompose]( [page:Vector3 translation], [page:Quaternion quaternion], [page:Vector3 scale] )
- If parameters are not passed, new instances will be created.
+ Decomposes this matrix into the *translation*, *quaternion* and *scale* components.
[method:Matrix4 makeTranslation]( [page:Float x], [page:Float y], [page:Float z] ) [page:Matrix4 this]
diff --git a/docs/api/math/Quaternion.html b/docs/api/math/Quaternion.html
index 139194281fa13e..25735bfbe00454 100644
--- a/docs/api/math/Quaternion.html
+++ b/docs/api/math/Quaternion.html
@@ -131,15 +131,18 @@ [method:Quaternion slerp]( [page:Quaternion qa], [page:Quaternion qb], [page
[method:Quaternion slerp]([page:Quaternion qb], [page:float t])
- t -- Normalized [0..1] interpolation factor.
+ t -- Normalized [0..1] interpolation factor.
.toArray() [page: Array]
+ [method:Array toArray]( [page:Array array] )
+ [method:Boolean equals]([page:Quaternion v])
[method:Float lengthSq]()
[method:Quaternion fromArray]([page:Array array])
diff --git a/docs/api/math/Vector2.html b/docs/api/math/Vector2.html
index c09dec2c3049bf..f1bdc572cbf509 100644
--- a/docs/api/math/Vector2.html
+++ b/docs/api/math/Vector2.html
@@ -226,7 +226,10 @@ [method:Vector2 fromArray]([page:Array array]) [page:Vector2 this]
Sets this vector's x value to be array[0] and y value to be array[1].
[method:Array toArray]()
+ [method:Array toArray]( [page:Array array] )
+ [method:Vector3 applyProjection]([page:Matrix4 m]) [page:Vector3 this]
Multiplies this vector and m, and divides by perspective.
- [method:Array toArray]()
+ [method:Array toArray]( [page:Array array] )
+
Assigns this vector's y value to array[1].
diff --git a/docs/api/math/Vector4.html b/docs/api/math/Vector4.html
index 5d0733cf82bbaf..a874c8964a2c70 100644
--- a/docs/api/math/Vector4.html
+++ b/docs/api/math/Vector4.html
@@ -186,7 +186,7 @@ [method:Vector4 max]([page:Vector4 v]) [page:Vector4 this]
v -- [page:Vector4]
[method:Vector4 addScalar]([page:Float s]) [page:Vector4 this]
@@ -204,7 +204,7 @@ [method:Boolean equals]([page:Vector4 v])
[method:Vector4 setAxisAngleFromRotationMatrix]([page:Matrix4 m]) [page:Vector4 this]
[method:Float getComponent]([page:Integer index])
Index 1: y
Index 2: z
Index 3: w
-
+
[method:null setComponent]([page:Integer index], [page:Float value])
@@ -246,13 +246,13 @@ [method:null setComponent]([page:Integer index], [page:Float value])
-
+
Index 0: x
Index 1: y
Index 2: z
Index 3: w
[method:Vector4 fromArray]([page:Array array]) [page:Vector4 this]
[method:Vector4 fromArray]([page:Array array]) [page:Vector4 this]
Sets the vector's components based on an array formatted like [x, y, z, w]
[method:Array toArray]()
+ [method:Array toArray]( [page:Array array] )
+ [property:number format]
[property:number type]
[property:boolean depthBuffer]
diff --git a/docs/index.html b/docs/index.html
index 7ce1d59f9c0415..5b2f85dee1bb19 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -269,11 +269,11 @@ three.js / docs
var li = document.createElement( 'li' );
var a = document.createElement( 'a' );
a.setAttribute( 'href', '#' );
- ( function( s, c, p ) {
+ ( function( s, c, p ) {
a.addEventListener( 'click', function( e ) {
goTo( s, c, p );
e.preventDefault();
- } )
+ } )
} )( section, category, page[ 0 ] )
a.textContent = page[ 0 ];
li.appendChild( a );
@@ -370,7 +370,7 @@ three.js / docs
// Resolve links of the form 'Class.member'
if(section.indexOf(MEMBER_DELIMITER) !== -1) {
parts = section.split(MEMBER_DELIMITER)
- section = parts[0];
+ section = parts[0];
member = parts[1];
}
@@ -379,7 +379,7 @@ three.js / docs
section = location.section;
category = location.category;
name = location.name;
- }
+ }
var title = 'three.js - documentation - ' + section + ' - ' + name;
var url = encodeUrl(section) + DELIMITER + encodeUrl( category ) + DELIMITER + encodeUrl(name) + (!!member ? MEMBER_DELIMITER + encodeUrl(member) : '');
@@ -405,6 +405,18 @@ three.js / docs
if ( window.location.hash.length > 0 ) goToHash();
+ console.log([
+ ' __ __',
+ ' __/ __\\ / __\\__ ____ _____ _____',
+ '/ __/ /\\/ / /___\\/ ____\\/ _____\\/ _____\\',
+ '\\/_ __/ / _ / / __/ / __ / / __ /_ __ _____',
+ '/ / / / / / / / / / / / ___/ / ___/\\ _\\/ __\\/ _____\\',
+ '\\/__/ \\/__/\\/__/\\/__/ \\/_____/\\/_____/\\/__/ / / / ___/',
+ ' / __/ / \\__ \\',
+ ' \\/____/\\/_____/'
+ ].join('\n'));
+
+