From 776d618160dfc8589bfbf42aa5ec9fc63324824c Mon Sep 17 00:00:00 2001 From: alteredq Date: Sat, 25 Feb 2012 03:41:11 +0100 Subject: [PATCH] Added THREE.Math.sign --- build/Three.js | 2 +- build/custom/ThreeCanvas.js | 2 +- build/custom/ThreeDOM.js | 2 +- build/custom/ThreeSVG.js | 2 +- build/custom/ThreeWebGL.js | 2 +- src/core/Math.js | 6 ++++++ 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/build/Three.js b/build/Three.js index bb993726dc..90ec495572 100644 --- a/build/Three.js +++ b/build/Three.js @@ -29,7 +29,7 @@ THREE.Face4&&(g=E.multiplyVector3(g.copy(u[b.a].position)),e=E.multiplyVector3(e THREE.Rectangle=function(){function a(){g=d-b;e=f-c}var b,c,d,f,g,e,h=!0;this.getX=function(){return b};this.getY=function(){return c};this.getWidth=function(){return g};this.getHeight=function(){return e};this.getLeft=function(){return b};this.getTop=function(){return c};this.getRight=function(){return d};this.getBottom=function(){return f};this.set=function(g,e,k,q){h=!1;b=g;c=e;d=k;f=q;a()};this.addPoint=function(g,e){h?(h=!1,b=g,c=e,d=g,f=e):(b=bg?d:g,f=f>e?f:e);a()};this.add3Points= function(g,e,k,q,m,o){h?(h=!1,b=gk?g>m?g:m:k>m?k:m,f=e>q?e>o?e:o:q>o?q:o):(b=gk?g>m?g>d?g:d:m>d?m:d:k>m?k>d?k:d:m>d?m:d,f=e>q?e>o?e>f?e:f:o>f?o:f:q>o?q>f?q:f:o>f?o:f);a()};this.addRectangle=function(g){h?(h=!1,b=g.getLeft(),c=g.getTop(),d=g.getRight(),f=g.getBottom()):(b=bg.getRight()?d:g.getRight(),f=f> g.getBottom()?f:g.getBottom());a()};this.inflate=function(g){b-=g;c-=g;d+=g;f+=g;a()};this.minSelf=function(g){b=b>g.getLeft()?b:g.getLeft();c=c>g.getTop()?c:g.getTop();d=da.getRight()||fa.getBottom()?!1:!0};this.empty=function(){h=!0;f=d=c=b=0;a()};this.isEmpty=function(){return h}}; -THREE.Math={clamp:function(a,b,c){return ac?c:a},clampBottom:function(a,b){return ac?c:a},clampBottom:function(a,b){return aa?-1:0f?d:f,e=e>g?e:g);a()};this.add3Points= function(f,g,i,o,m,n){h?(h=!1,b=fi?f>m?f:m:i>m?i:m,e=g>o?g>n?g:n:o>n?o:n):(b=fi?f>m?f>d?f:d:m>d?m:d:i>m?i>d?i:d:m>d?m:d,e=g>o?g>n?g>e?g:e:n>e?n:e:o>n?o>e?o:e:n>e?n:e);a()};this.addRectangle=function(f){h?(h=!1,b=f.getLeft(),c=f.getTop(),d=f.getRight(),e=f.getBottom()):(b=bf.getRight()?d:f.getRight(),e=e> f.getBottom()?e:f.getBottom());a()};this.inflate=function(f){b-=f;c-=f;d+=f;e+=f;a()};this.minSelf=function(f){b=b>f.getLeft()?b:f.getLeft();c=c>f.getTop()?c:f.getTop();d=da.getRight()||ea.getBottom()?!1:!0};this.empty=function(){h=!0;e=d=c=b=0;a()};this.isEmpty=function(){return h}}; -THREE.Math={clamp:function(a,b,c){return ac?c:a},clampBottom:function(a,b){return ac?c:a},clampBottom:function(a,b){return aa?-1:0f?d:f,e=e>g?e:g);a()};this.add3Points= function(f,g,j,k,n,m){h?(h=!1,b=fj?f>n?f:n:j>n?j:n,e=g>k?g>m?g:m:k>m?k:m):(b=fj?f>n?f>d?f:d:n>d?n:d:j>n?j>d?j:d:n>d?n:d,e=g>k?g>m?g>e?g:e:m>e?m:e:k>m?k>e?k:e:m>e?m:e);a()};this.addRectangle=function(f){h?(h=!1,b=f.getLeft(),c=f.getTop(),d=f.getRight(),e=f.getBottom()):(b=bf.getRight()?d:f.getRight(),e=e> f.getBottom()?e:f.getBottom());a()};this.inflate=function(f){b-=f;c-=f;d+=f;e+=f;a()};this.minSelf=function(f){b=b>f.getLeft()?b:f.getLeft();c=c>f.getTop()?c:f.getTop();d=da.getRight()||ea.getBottom()?!1:!0};this.empty=function(){h=!0;e=d=c=b=0;a()};this.isEmpty=function(){return h}}; -THREE.Math={clamp:function(a,b,c){return ac?c:a},clampBottom:function(a,b){return ac?c:a},clampBottom:function(a,b){return aa?-1:0f?d:f,e=e>g?e:g);a()};this.add3Points= function(f,g,j,m,n,l){h?(h=!1,b=fj?f>n?f:n:j>n?j:n,e=g>m?g>l?g:l:m>l?m:l):(b=fj?f>n?f>d?f:d:n>d?n:d:j>n?j>d?j:d:n>d?n:d,e=g>m?g>l?g>e?g:e:l>e?l:e:m>l?m>e?m:e:l>e?l:e);a()};this.addRectangle=function(f){h?(h=!1,b=f.getLeft(),c=f.getTop(),d=f.getRight(),e=f.getBottom()):(b=bf.getRight()?d:f.getRight(),e=e> f.getBottom()?e:f.getBottom());a()};this.inflate=function(f){b-=f;c-=f;d+=f;e+=f;a()};this.minSelf=function(f){b=b>f.getLeft()?b:f.getLeft();c=c>f.getTop()?c:f.getTop();d=da.getRight()||ea.getBottom()?!1:!0};this.empty=function(){h=!0;e=d=c=b=0;a()};this.isEmpty=function(){return h}}; -THREE.Math={clamp:function(a,b,c){return ac?c:a},clampBottom:function(a,b){return ac?c:a},clampBottom:function(a,b){return aa?-1:0g?d:g,e=e>h?e:h);a()};this.add3Points= function(g,h,j,n,l,r){i?(i=!1,b=gj?g>l?g:l:j>l?j:l,e=h>n?h>r?h:r:n>r?n:r):(b=gj?g>l?g>d?g:d:l>d?l:d:j>l?j>d?j:d:l>d?l:d,e=h>n?h>r?h>e?h:e:r>e?r:e:n>r?n>e?n:e:r>e?r:e);a()};this.addRectangle=function(g){i?(i=!1,b=g.getLeft(),c=g.getTop(),d=g.getRight(),e=g.getBottom()):(b=bg.getRight()?d:g.getRight(),e=e> g.getBottom()?e:g.getBottom());a()};this.inflate=function(g){b-=g;c-=g;d+=g;e+=g;a()};this.minSelf=function(g){b=b>g.getLeft()?b:g.getLeft();c=c>g.getTop()?c:g.getTop();d=da.getRight()||ea.getBottom()?!1:!0};this.empty=function(){i=!0;e=d=c=b=0;a()};this.isEmpty=function(){return i}}; -THREE.Math={clamp:function(a,b,c){return ac?c:a},clampBottom:function(a,b){return ac?c:a},clampBottom:function(a,b){return aa?-1:0 0 ) ? 1 : 0 ); + } }; -- GitLab