Explorar o código

Updated builds.

Mr.doob %!s(int64=8) %!d(string=hai) anos
pai
achega
b5c53e463a
Modificáronse 3 ficheiros con 9 adicións e 7 borrados
  1. 4 3
      build/three.js
  2. 1 1
      build/three.min.js
  3. 4 3
      build/three.module.js

+ 4 - 3
build/three.js

@@ -16333,8 +16333,10 @@
 
 
 				if ( boxMesh === undefined ) {
 				if ( boxMesh === undefined ) {
 
 
+					// TODO Adjust skybox to camera somehow
+
 					boxMesh = new Mesh(
 					boxMesh = new Mesh(
-						new BoxBufferGeometry( 1, 1, 1 ),
+						new BoxBufferGeometry( 5, 5, 5 ),
 						new ShaderMaterial( {
 						new ShaderMaterial( {
 							uniforms: ShaderLib.cube.uniforms,
 							uniforms: ShaderLib.cube.uniforms,
 							vertexShader: ShaderLib.cube.vertexShader,
 							vertexShader: ShaderLib.cube.vertexShader,
@@ -16355,10 +16357,9 @@
 
 
 				renderList.push( boxMesh, boxMesh.geometry, boxMesh.material, 0, null );
 				renderList.push( boxMesh, boxMesh.geometry, boxMesh.material, 0, null );
 
 
-				// TOFIX Hack to make sure background gets rendered first
 				// TOFIX Ideally background should be rendered last
 				// TOFIX Ideally background should be rendered last
 
 
-				renderList.opaque.unshift( renderList.opaque.pop() );
+				renderList.opaque.unshift( renderList.opaque.pop() ); // Hack to make sure background gets rendered first
 
 
 			} else if ( background && background.isTexture ) {
 			} else if ( background && background.isTexture ) {
 
 

+ 1 - 1
build/three.min.js

@@ -57,7 +57,7 @@ new z(r,3));this.addAttribute("uv",new z(n,2))}function xc(a,b,c,d){O.call(this)
 for(b=0;b<g;b++)n.push(b*k-e,-m,0),q.push(0,0,1),t.push(b/c),t.push(1-a/d)}for(a=0;a<d;a++)for(b=0;b<c;b++)e=b+g*(a+1),f=b+1+g*(a+1),h=b+1+g*a,r.push(b+g*a,e,h),r.push(e,f,h);this.setIndex(r);this.addAttribute("position",new z(n,3));this.addAttribute("normal",new z(q,3));this.addAttribute("uv",new z(t,2))}function va(a){N.call(this);this.type="MeshBasicMaterial";this.color=new D(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.envMap=this.alphaMap=
 for(b=0;b<g;b++)n.push(b*k-e,-m,0),q.push(0,0,1),t.push(b/c),t.push(1-a/d)}for(a=0;a<d;a++)for(b=0;b<c;b++)e=b+g*(a+1),f=b+1+g*(a+1),h=b+1+g*a,r.push(b+g*a,e,h),r.push(e,f,h);this.setIndex(r);this.addAttribute("position",new z(n,3));this.addAttribute("normal",new z(q,3));this.addAttribute("uv",new z(t,2))}function va(a){N.call(this);this.type="MeshBasicMaterial";this.color=new D(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.envMap=this.alphaMap=
 this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.lights=this.morphTargets=this.skinning=!1;this.setValues(a)}function ib(a,b){this.origin=void 0!==a?a:new p;this.direction=void 0!==b?b:new p}function Hb(a,b){this.start=void 0!==a?a:new p;this.end=void 0!==b?b:new p}function Sa(a,b,c){this.a=void 0!==a?a:new p;this.b=void 0!==b?b:new p;this.c=void 0!==c?c:new p}function fa(a,
 this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.lights=this.morphTargets=this.skinning=!1;this.setValues(a)}function ib(a,b){this.origin=void 0!==a?a:new p;this.direction=void 0!==b?b:new p}function Hb(a,b){this.start=void 0!==a?a:new p;this.end=void 0!==b?b:new p}function Sa(a,b,c){this.a=void 0!==a?a:new p;this.b=void 0!==b?b:new p;this.c=void 0!==c?c:new p}function fa(a,
 b){w.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new F;this.material=void 0!==b?b:new va({color:16777215*Math.random()});this.drawMode=0;this.updateMorphTargets()}function Rf(a,b,c,d){function e(a,c){b.buffers.color.setClear(a.r,a.g,a.b,c,d)}var f=new D(0),g=0,h,k,l;return{getClearColor:function(){return f},setClearColor:function(a,b){f.set(a);g=void 0!==b?b:1;e(f,g)},getClearAlpha:function(){return g},setClearAlpha:function(a){g=a;e(f,g)},render:function(b,d,q,t){d=d.background;null===
 b){w.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new F;this.material=void 0!==b?b:new va({color:16777215*Math.random()});this.drawMode=0;this.updateMorphTargets()}function Rf(a,b,c,d){function e(a,c){b.buffers.color.setClear(a.r,a.g,a.b,c,d)}var f=new D(0),g=0,h,k,l;return{getClearColor:function(){return f},setClearColor:function(a,b){f.set(a);g=void 0!==b?b:1;e(f,g)},getClearAlpha:function(){return g},setClearAlpha:function(a){g=a;e(f,g)},render:function(b,d,q,t){d=d.background;null===
-d?e(f,g):d&&d.isColor&&(e(d,1),t=!0);(a.autoClear||t)&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil);d&&d.isCubeTexture?(void 0===l&&(l=new fa(new gb(1,1,1),new qa({uniforms:jb.cube.uniforms,vertexShader:jb.cube.vertexShader,fragmentShader:jb.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),c.update(l.geometry)),l.material.uniforms.tCube.value=d,l.matrixWorld.copyPosition(q.matrixWorld),b.push(l,l.geometry,l.material,0,null),b.opaque.unshift(b.opaque.pop())):d&&d.isTexture&&
+d?e(f,g):d&&d.isColor&&(e(d,1),t=!0);(a.autoClear||t)&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil);d&&d.isCubeTexture?(void 0===l&&(l=new fa(new gb(5,5,5),new qa({uniforms:jb.cube.uniforms,vertexShader:jb.cube.vertexShader,fragmentShader:jb.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),c.update(l.geometry)),l.material.uniforms.tCube.value=d,l.matrixWorld.copyPosition(q.matrixWorld),b.push(l,l.geometry,l.material,0,null),b.opaque.unshift(b.opaque.pop())):d&&d.isTexture&&
 (void 0===h&&(h=new Fb(-1,1,1,-1,0,1),k=new fa(new hb(2,2),new va({depthTest:!1,depthWrite:!1,fog:!1})),c.update(k.geometry)),k.material.map=d,a.renderBufferDirect(h,null,k.geometry,k.material,k,null))}}}function Sf(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.program&&b.program&&a.program!==b.program?a.program.id-b.program.id:a.material.id!==b.material.id?a.material.id-b.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function Tf(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-
 (void 0===h&&(h=new Fb(-1,1,1,-1,0,1),k=new fa(new hb(2,2),new va({depthTest:!1,depthWrite:!1,fog:!1})),c.update(k.geometry)),k.material.map=d,a.renderBufferDirect(h,null,k.geometry,k.material,k,null))}}}function Sf(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.program&&b.program&&a.program!==b.program?a.program.id-b.program.id:a.material.id!==b.material.id?a.material.id-b.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function Tf(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-
 b.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function Uf(){var a=[],b=0,c=[],d=[];return{opaque:c,transparent:d,init:function(){b=0;c.length=0;d.length=0},push:function(e,f,g,h,k){var l=a[b];void 0===l?(l={id:e.id,object:e,geometry:f,material:g,program:g.program,renderOrder:e.renderOrder,z:h,group:k},a[b]=l):(l.id=e.id,l.object=e,l.geometry=f,l.material=g,l.program=g.program,l.renderOrder=e.renderOrder,l.z=h,l.group=k);(!0===g.transparent?d:c).push(l);b++},sort:function(){1<c.length&&c.sort(Sf);1<d.length&&
 b.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function Uf(){var a=[],b=0,c=[],d=[];return{opaque:c,transparent:d,init:function(){b=0;c.length=0;d.length=0},push:function(e,f,g,h,k){var l=a[b];void 0===l?(l={id:e.id,object:e,geometry:f,material:g,program:g.program,renderOrder:e.renderOrder,z:h,group:k},a[b]=l):(l.id=e.id,l.object=e,l.geometry=f,l.material=g,l.program=g.program,l.renderOrder=e.renderOrder,l.z=h,l.group=k);(!0===g.transparent?d:c).push(l);b++},sort:function(){1<c.length&&c.sort(Sf);1<d.length&&
 d.sort(Tf)}}}function Vf(){var a={};return{get:function(b,c){b=b.id+","+c.id;c=a[b];void 0===c&&(c=new Uf,a[b]=c);return c},dispose:function(){a={}}}}function Wf(a,b){return Math.abs(b[1])-Math.abs(a[1])}function Xf(a){var b={},c=new Float32Array(8);return{update:function(d,e,f,g){var h=d.morphTargetInfluences,k=h.length;d=b[e.id];if(void 0===d){d=[];for(var l=0;l<k;l++)d[l]=[l,0];b[e.id]=d}var r=f.morphTargets&&e.morphAttributes.position;f=f.morphNormals&&e.morphAttributes.normal;for(l=0;l<k;l++){var n=
 d.sort(Tf)}}}function Vf(){var a={};return{get:function(b,c){b=b.id+","+c.id;c=a[b];void 0===c&&(c=new Uf,a[b]=c);return c},dispose:function(){a={}}}}function Wf(a,b){return Math.abs(b[1])-Math.abs(a[1])}function Xf(a){var b={},c=new Float32Array(8);return{update:function(d,e,f,g){var h=d.morphTargetInfluences,k=h.length;d=b[e.id];if(void 0===d){d=[];for(var l=0;l<k;l++)d[l]=[l,0];b[e.id]=d}var r=f.morphTargets&&e.morphAttributes.position;f=f.morphNormals&&e.morphAttributes.normal;for(l=0;l<k;l++){var n=

+ 4 - 3
build/three.module.js

@@ -16327,8 +16327,10 @@ function WebGLBackground( renderer, state, geometries, premultipliedAlpha ) {
 
 
 			if ( boxMesh === undefined ) {
 			if ( boxMesh === undefined ) {
 
 
+				// TODO Adjust skybox to camera somehow
+
 				boxMesh = new Mesh(
 				boxMesh = new Mesh(
-					new BoxBufferGeometry( 1, 1, 1 ),
+					new BoxBufferGeometry( 5, 5, 5 ),
 					new ShaderMaterial( {
 					new ShaderMaterial( {
 						uniforms: ShaderLib.cube.uniforms,
 						uniforms: ShaderLib.cube.uniforms,
 						vertexShader: ShaderLib.cube.vertexShader,
 						vertexShader: ShaderLib.cube.vertexShader,
@@ -16349,10 +16351,9 @@ function WebGLBackground( renderer, state, geometries, premultipliedAlpha ) {
 
 
 			renderList.push( boxMesh, boxMesh.geometry, boxMesh.material, 0, null );
 			renderList.push( boxMesh, boxMesh.geometry, boxMesh.material, 0, null );
 
 
-			// TOFIX Hack to make sure background gets rendered first
 			// TOFIX Ideally background should be rendered last
 			// TOFIX Ideally background should be rendered last
 
 
-			renderList.opaque.unshift( renderList.opaque.pop() );
+			renderList.opaque.unshift( renderList.opaque.pop() ); // Hack to make sure background gets rendered first
 
 
 		} else if ( background && background.isTexture ) {
 		} else if ( background && background.isTexture ) {