From 2bfc640985de7e79184d9db0001991485b05504d Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Wed, 11 Sep 2013 13:36:30 -0700 Subject: [PATCH] Updated builds. --- build/three.js | 33 ++++++++++----------------------- build/three.min.js | 6 +++--- 2 files changed, 13 insertions(+), 26 deletions(-) diff --git a/build/three.js b/build/three.js index 7a988d72a6..002567ee91 100644 --- a/build/three.js +++ b/build/three.js @@ -15069,7 +15069,6 @@ THREE.Scene = function () { this.autoUpdate = true; // checked by the renderer this.matrixAutoUpdate = false; - this.__objects = []; this.__lights = []; this.__objectsAdded = []; @@ -15097,20 +15096,15 @@ THREE.Scene.prototype.__addObject = function ( object ) { } else if ( !( object instanceof THREE.Camera || object instanceof THREE.Bone ) ) { - if ( this.__objects.indexOf( object ) === - 1 ) { + this.__objectsAdded.push( object ); - this.__objects.push( object ); - this.__objectsAdded.push( object ); + // check if previously removed - // check if previously removed + var i = this.__objectsRemoved.indexOf( object ); - var i = this.__objectsRemoved.indexOf( object ); - - if ( i !== -1 ) { + if ( i !== -1 ) { - this.__objectsRemoved.splice( i, 1 ); - - } + this.__objectsRemoved.splice( i, 1 ); } @@ -15148,22 +15142,15 @@ THREE.Scene.prototype.__removeObject = function ( object ) { } else if ( !( object instanceof THREE.Camera ) ) { - var i = this.__objects.indexOf( object ); - - if ( i !== -1 ) { - - this.__objects.splice( i, 1 ); - this.__objectsRemoved.push( object ); - - // check if previously added + this.__objectsRemoved.push( object ); - var ai = this.__objectsAdded.indexOf( object ); + // check if previously added - if ( ai !== -1 ) { + var i = this.__objectsAdded.indexOf( object ); - this.__objectsAdded.splice( ai, 1 ); + if ( i !== -1 ) { - } + this.__objectsAdded.splice( i, 1 ); } diff --git a/build/three.min.js b/build/three.min.js index 7277cdd15a..1b6242e7ea 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -293,9 +293,9 @@ THREE.MorphAnimMesh.prototype.updateAnimation=function(a){var b=this.duration/th (this.morphTargetInfluences[this.lastKeyframe]=0,this.morphTargetInfluences[this.currentKeyframe]=1,this.morphTargetInfluences[a]=0,this.lastKeyframe=this.currentKeyframe,this.currentKeyframe=a);b=this.time%b/b;this.directionBackwards&&(b=1-b);this.morphTargetInfluences[this.currentKeyframe]=b;this.morphTargetInfluences[this.lastKeyframe]=1-b}; THREE.MorphAnimMesh.prototype.clone=function(a){void 0===a&&(a=new THREE.MorphAnimMesh(this.geometry,this.material));a.duration=this.duration;a.mirroredLoop=this.mirroredLoop;a.time=this.time;a.lastKeyframe=this.lastKeyframe;a.currentKeyframe=this.currentKeyframe;a.direction=this.direction;a.directionBackwards=this.directionBackwards;THREE.Mesh.prototype.clone.call(this,a);return a};THREE.Ribbon=function(a,b){THREE.Object3D.call(this);this.geometry=a;this.material=b};THREE.Ribbon.prototype=Object.create(THREE.Object3D.prototype);THREE.Ribbon.prototype.clone=function(a){void 0===a&&(a=new THREE.Ribbon(this.geometry,this.material));THREE.Object3D.prototype.clone.call(this,a);return a};THREE.LOD=function(){THREE.Object3D.call(this);this.objects=[]};THREE.LOD.prototype=Object.create(THREE.Object3D.prototype);THREE.LOD.prototype.addLevel=function(a,b){void 0===b&&(b=0);for(var b=Math.abs(b),c=0;c=this.objects[d].distance)this.objects[d-1].object.visible=!1,this.objects[d].object.visible=!0;else break;for(;d=g||(g*=f.intensity,c.add(Pa.multiplyScalar(g)))}else f instanceof THREE.PointLight&&(h=wa.getPositionFromMatrix(f.matrixWorld),g=b.dot(wa.subVectors(h,a).normalize()),0>=g||(g*=0==f.distance?1:1-Math.min(a.distanceTo(h)/f.distance,1),0!=g&&(g*=f.intensity,c.add(Pa.multiplyScalar(g)))))}} function c(a,b,c,d){m(b);l(c);n(d);s(a.getStyle());B.stroke();ta.expandByScalar(2*b)}function d(a){t(a.getStyle());B.fill()}function e(a,b,c,e,f,h,g,j,i,k,m,l,n){if(!(n instanceof THREE.DataTexture||void 0===n.image||0==n.image.width)){if(!0===n.needsUpdate){var p=n.wrapS==THREE.RepeatWrapping,r=n.wrapT==THREE.RepeatWrapping;Ja[n.id]=B.createPattern(n.image,!0===p&&!0===r?"repeat":!0===p&&!1===r?"repeat-x":!1===p&&!0===r?"repeat-y":"no-repeat");n.needsUpdate=!1}void 0===Ja[n.id]?t("rgba(0,0,0,1)"): t(Ja[n.id]);var p=n.offset.x/n.repeat.x,r=n.offset.y/n.repeat.y,s=n.image.width*n.repeat.x,q=n.image.height*n.repeat.y,g=(g+p)*s,j=(1-j+r)*q,c=c-a,e=e-b,f=f-a,h=h-b,i=(i+p)*s-g,k=(1-k+r)*q-j,m=(m+p)*s-g,l=(1-l+r)*q-j,p=i*l-m*k;0===p?(void 0===ga[n.id]&&(b=document.createElement("canvas"),b.width=n.image.width,b.height=n.image.height,b=b.getContext("2d"),b.drawImage(n.image,0,0),ga[n.id]=b.getImageData(0,0,n.image.width,n.image.height).data),b=ga[n.id],g=4*(Math.floor(g)+Math.floor(j)*n.image.width), -- GitLab