From 6a857400bc680bc49c55af22ae5ff22a601fcd58 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Sat, 9 Apr 2011 12:53:17 +0100 Subject: [PATCH] REVISION ++ --- README.md | 9 +++++++++ REVISION | 2 +- build/Three.js | 2 +- build/custom/ThreeCanvas.js | 2 +- build/custom/ThreeDOM.js | 2 +- build/custom/ThreeExtras.js | 2 +- build/custom/ThreeSVG.js | 2 +- build/custom/ThreeWebGL.js | 2 +- src/objects/Sprite.js | 16 +++++++--------- 9 files changed, 23 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index ab9ffb28..bca40314 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,15 @@ This code creates a camera, then creates a scene, adds a cube on it, creates a & ### Change Log ### +2011 04 09 - **r39** (249.048 KB, gzip: 61.020 KB) + +* Improved WebGLRenderer program cache. ([alteredq](http://github.com/alteredq)) +* Added support for pre-computed edges in loaders and exporters. ([alteredq](http://github.com/alteredq)) +* Added `Sprite` object. ([empaempa](http://github.com/empaempa)) +* Added `Collisions` classes. ([drojdjou](http://github.com/drojdjou)) +* Added `THREE` namespace to all the classes that missed it. ([mrdoob](http://github.com/mrdoob)) + + 2011 03 31 - **r38** (225.442 KB, gzip: 55.908 KB) * Added `LensFlare` light. ([empaempa](http://github.com/empaempa)) diff --git a/REVISION b/REVISION index e522732c..a2720097 100644 --- a/REVISION +++ b/REVISION @@ -1 +1 @@ -38 +39 diff --git a/build/Three.js b/build/Three.js index a8ee9124..206626a9 100755 --- a/build/Three.js +++ b/build/Three.js @@ -1,4 +1,4 @@ -// Three.js r38 - http://github.com/mrdoob/three.js +// Three.js r39 - http://github.com/mrdoob/three.js var THREE=THREE||{};if(!window.Int32Array){window.Int32Array=Array;window.Float32Array=Array}THREE.Color=function(b){this.setHex(b)}; THREE.Color.prototype={autoUpdate:!0,copy:function(b){this.r=b.r;this.g=b.g;this.b=b.b;this.hex=b.hex;this.__styleString=b.__styleString},setRGB:function(b,d,c){this.r=b;this.g=d;this.b=c;if(this.autoUpdate){this.updateHex();this.updateStyleString()}},setHSV:function(b,d,c){var f,g,h,j,k,m;if(c==0)f=g=h=0;else{j=Math.floor(b*6);k=b*6-j;b=c*(1-d);m=c*(1-d*k);d=c*(1-d*(1-k));switch(j){case 1:f=m;g=c;h=b;break;case 2:f=b;g=c;h=d;break;case 3:f=b;g=m;h=c;break;case 4:f=d;g=b;h=c;break;case 5:f=c;g=b; h=m;break;case 6:case 0:f=c;g=d;h=b}}this.r=f;this.g=g;this.b=h;if(this.autoUpdate){this.updateHex();this.updateStyleString()}},setHex:function(b){this.hex=~~b&16777215;if(this.autoUpdate){this.updateRGB();this.updateStyleString()}},updateHex:function(){this.hex=~~(this.r*255)<<16^~~(this.g*255)<<8^~~(this.b*255)},updateRGB:function(){this.r=(this.hex>>16&255)/255;this.g=(this.hex>>8&255)/255;this.b=(this.hex&255)/255},updateStyleString:function(){this.__styleString="rgb("+~~(this.r*255)+","+~~(this.g* diff --git a/build/custom/ThreeCanvas.js b/build/custom/ThreeCanvas.js index 83c5dda8..e7c8edb2 100644 --- a/build/custom/ThreeCanvas.js +++ b/build/custom/ThreeCanvas.js @@ -1,4 +1,4 @@ -// ThreeCanvas.js r38 - http://github.com/mrdoob/three.js +// ThreeCanvas.js r39 - http://github.com/mrdoob/three.js var THREE=THREE||{};if(!window.Int32Array){window.Int32Array=Array;window.Float32Array=Array}THREE.Color=function(a){this.setHex(a)}; THREE.Color.prototype={autoUpdate:!0,copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;this.hex=a.hex;this.__styleString=a.__styleString},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;if(this.autoUpdate){this.updateHex();this.updateStyleString()}},setHSV:function(a,b,c){var e,d,g,f,i,h;if(c==0)e=d=g=0;else{f=Math.floor(a*6);i=a*6-f;a=c*(1-b);h=c*(1-b*i);b=c*(1-b*(1-i));switch(f){case 1:e=h;d=c;g=a;break;case 2:e=a;d=c;g=b;break;case 3:e=a;d=h;g=c;break;case 4:e=b;d=a;g=c;break;case 5:e=c;d=a; g=h;break;case 6:case 0:e=c;d=b;g=a}}this.r=e;this.g=d;this.b=g;if(this.autoUpdate){this.updateHex();this.updateStyleString()}},setHex:function(a){this.hex=~~a&16777215;if(this.autoUpdate){this.updateRGB();this.updateStyleString()}},updateHex:function(){this.hex=~~(this.r*255)<<16^~~(this.g*255)<<8^~~(this.b*255)},updateRGB:function(){this.r=(this.hex>>16&255)/255;this.g=(this.hex>>8&255)/255;this.b=(this.hex&255)/255},updateStyleString:function(){this.__styleString="rgb("+~~(this.r*255)+","+~~(this.g* diff --git a/build/custom/ThreeDOM.js b/build/custom/ThreeDOM.js index 8f91123d..cdcfe0ca 100644 --- a/build/custom/ThreeDOM.js +++ b/build/custom/ThreeDOM.js @@ -1,4 +1,4 @@ -// ThreeDOM.js r38 - http://github.com/mrdoob/three.js +// ThreeDOM.js r39 - http://github.com/mrdoob/three.js var THREE=THREE||{};if(!window.Int32Array){window.Int32Array=Array;window.Float32Array=Array}THREE.Color=function(a){this.setHex(a)}; THREE.Color.prototype={autoUpdate:!0,copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;this.hex=a.hex;this.__styleString=a.__styleString},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;if(this.autoUpdate){this.updateHex();this.updateStyleString()}},setHSV:function(a,b,c){var e,d,g,f,i,h;if(c==0)e=d=g=0;else{f=Math.floor(a*6);i=a*6-f;a=c*(1-b);h=c*(1-b*i);b=c*(1-b*(1-i));switch(f){case 1:e=h;d=c;g=a;break;case 2:e=a;d=c;g=b;break;case 3:e=a;d=h;g=c;break;case 4:e=b;d=a;g=c;break;case 5:e=c;d=a; g=h;break;case 6:case 0:e=c;d=b;g=a}}this.r=e;this.g=d;this.b=g;if(this.autoUpdate){this.updateHex();this.updateStyleString()}},setHex:function(a){this.hex=~~a&16777215;if(this.autoUpdate){this.updateRGB();this.updateStyleString()}},updateHex:function(){this.hex=~~(this.r*255)<<16^~~(this.g*255)<<8^~~(this.b*255)},updateRGB:function(){this.r=(this.hex>>16&255)/255;this.g=(this.hex>>8&255)/255;this.b=(this.hex&255)/255},updateStyleString:function(){this.__styleString="rgb("+~~(this.r*255)+","+~~(this.g* diff --git a/build/custom/ThreeExtras.js b/build/custom/ThreeExtras.js index 2317b17d..2459d945 100644 --- a/build/custom/ThreeExtras.js +++ b/build/custom/ThreeExtras.js @@ -1,4 +1,4 @@ -// ThreeExtras.js r38 - http://github.com/mrdoob/three.js +// ThreeExtras.js r39 - http://github.com/mrdoob/three.js var GeometryUtils={merge:function(a,b){var c=b instanceof THREE.Mesh,d=a.vertices.length,e=c?b.geometry:b,f=a.vertices,h=e.vertices,g=a.faces,j=e.faces,l=a.faceVertexUvs[0];e=e.faceVertexUvs[0];c&&b.matrixAutoUpdate&&b.updateMatrix();for(var k=0,n=h.length;k>16&255)/255;this.g=(this.hex>>8&255)/255;this.b=(this.hex&255)/255},updateStyleString:function(){this.__styleString="rgb("+~~(this.r*255)+","+~~(this.g* diff --git a/build/custom/ThreeWebGL.js b/build/custom/ThreeWebGL.js index 3ea31350..e5a0c659 100644 --- a/build/custom/ThreeWebGL.js +++ b/build/custom/ThreeWebGL.js @@ -1,4 +1,4 @@ -// ThreeWebGL.js r38 - http://github.com/mrdoob/three.js +// ThreeWebGL.js r39 - http://github.com/mrdoob/three.js var THREE=THREE||{};if(!window.Int32Array){window.Int32Array=Array;window.Float32Array=Array}THREE.Color=function(b){this.setHex(b)}; THREE.Color.prototype={autoUpdate:!0,copy:function(b){this.r=b.r;this.g=b.g;this.b=b.b;this.hex=b.hex;this.__styleString=b.__styleString},setRGB:function(b,e,d){this.r=b;this.g=e;this.b=d;if(this.autoUpdate){this.updateHex();this.updateStyleString()}},setHSV:function(b,e,d){var h,g,k,i,p,q;if(d==0)h=g=k=0;else{i=Math.floor(b*6);p=b*6-i;b=d*(1-e);q=d*(1-e*p);e=d*(1-e*(1-p));switch(i){case 1:h=q;g=d;k=b;break;case 2:h=b;g=d;k=e;break;case 3:h=b;g=q;k=d;break;case 4:h=e;g=b;k=d;break;case 5:h=d;g=b; k=q;break;case 6:case 0:h=d;g=e;k=b}}this.r=h;this.g=g;this.b=k;if(this.autoUpdate){this.updateHex();this.updateStyleString()}},setHex:function(b){this.hex=~~b&16777215;if(this.autoUpdate){this.updateRGB();this.updateStyleString()}},updateHex:function(){this.hex=~~(this.r*255)<<16^~~(this.g*255)<<8^~~(this.b*255)},updateRGB:function(){this.r=(this.hex>>16&255)/255;this.g=(this.hex>>8&255)/255;this.b=(this.hex&255)/255},updateStyleString:function(){this.__styleString="rgb("+~~(this.r*255)+","+~~(this.g* diff --git a/src/objects/Sprite.js b/src/objects/Sprite.js index dc93c792..1c50fcf0 100644 --- a/src/objects/Sprite.js +++ b/src/objects/Sprite.js @@ -3,7 +3,7 @@ */ THREE.Sprite = function( parameters ) { - + THREE.Object3D.call( this ); if( parameters.material !== undefined ) { @@ -11,27 +11,27 @@ THREE.Sprite = function( parameters ) { this.material = parameters.material; this.map = undefined; this.blending = material.blending; - + } else if( parameters.map !== undefined ) { - + this.map = parameters.map instanceof THREE.Texture ? parameters.map : ImageUtils.loadTexture( parameters.map ); this.material = undefined; this.blending = parameters.blending !== undefined ? parameters.blending : THREE.NormalBlending; } - + this.useScreenCoordinates = parameters.useScreenCoordinates !== undefined ? parameters.useScreenCoordinates : true; this.mergeWith3D = parameters.mergeWith3D !== undefined ? parameters.mergeWith3D : !this.useScreenCoordinates; this.affectedByDistance = parameters.affectedByDistance !== undefined ? parameters.affectedByDistance : !this.useScreenCoordinates; this.alignment = parameters.alignment instanceof THREE.Vector2 ? parameters.alignment : THREE.SpriteAlignment.center; - + this.rotation3d = this.rotation; this.rotation = 0; this.opacity = 1; - + this.uvOffset = new THREE.Vector2( 0, 0 ); this.uvScale = new THREE.Vector2( 1, 1 ); - + }; THREE.Sprite.prototype = new THREE.Object3D(); @@ -75,5 +75,3 @@ THREE.SpriteAlignment.centerRight = new THREE.Vector2( -1, 0 ); THREE.SpriteAlignment.bottomLeft = new THREE.Vector2( 1, 1 ); THREE.SpriteAlignment.bottomCenter = new THREE.Vector2( 0, 1 ); THREE.SpriteAlignment.bottomRight = new THREE.Vector2( -1, 1 ); - -