Bladeren bron

If I'm not mistaken that would have affected other Loaders.

Mr.doob 14 jaren geleden
bovenliggende
commit
0f3093373d
3 gewijzigde bestanden met toevoegingen van 16 en 16 verwijderingen
  1. 6 6
      build/Three.js
  2. 6 6
      build/custom/ThreeExtras.js
  3. 4 4
      src/extras/io/Loader.js

+ 6 - 6
build/Three.js

@@ -376,12 +376,12 @@ var Torus=function(a,c,b,d){this.radius=a||100;this.tube=c||40;this.segmentsR=b|
 var TorusKnot=function(a,c,b,d,f,g,h){function k(x,y,p,z,G,M){y=p/z*x;p=Math.cos(y);return new THREE.Vector3(G*(2+p)*0.5*Math.cos(x),G*(2+p)*Math.sin(x)*0.5,M*G*Math.sin(y)*0.5)}THREE.Geometry.call(this);this.radius=a||200;this.tube=c||40;this.segmentsR=b||64;this.segmentsT=d||8;this.p=f||2;this.q=g||3;this.heightScale=h||1;this.grid=Array(this.segmentsR);b=new THREE.Vector3;d=new THREE.Vector3;g=new THREE.Vector3;for(a=0;a<this.segmentsR;++a){this.grid[a]=Array(this.segmentsT);for(c=0;c<this.segmentsT;++c){var m=
 a/this.segmentsR*2*this.p*Math.PI;h=c/this.segmentsT*2*Math.PI;f=k(m,h,this.q,this.p,this.radius,this.heightScale);m=k(m+0.01,h,this.q,this.p,this.radius,this.heightScale);b.x=m.x-f.x;b.y=m.y-f.y;b.z=m.z-f.z;d.x=m.x+f.x;d.y=m.y+f.y;d.z=m.z+f.z;g.cross(b,d);d.cross(g,b);g.normalize();d.normalize();m=this.tube*Math.cos(h);h=this.tube*Math.sin(h);f.x+=m*d.x+h*g.x;f.y+=m*d.y+h*g.y;f.z+=m*d.z+h*g.z;this.grid[a][c]=this.vertices.push(new THREE.Vertex(new THREE.Vector3(f.x,f.y,f.z)))-1}}for(a=0;a<this.segmentsR;++a)for(c=
 0;c<this.segmentsT;++c){g=(a+1)%this.segmentsR;h=(c+1)%this.segmentsT;f=this.grid[a][c];b=this.grid[g][c];d=this.grid[a][h];g=this.grid[g][h];h=new THREE.UV(a/this.segmentsR,c/this.segmentsT);m=new THREE.UV((a+1)/this.segmentsR,c/this.segmentsT);var n=new THREE.UV(a/this.segmentsR,(c+1)/this.segmentsT),q=new THREE.UV((a+1)/this.segmentsR,(c+1)/this.segmentsT);this.faces.push(new THREE.Face3(f,b,d));this.faceVertexUvs[0].push([h,m,n]);this.faces.push(new THREE.Face3(g,d,b));this.faceVertexUvs[0].push([q,
-n,m])}this.computeCentroids();this.computeFaceNormals();this.computeVertexNormals()};TorusKnot.prototype=new THREE.Geometry;TorusKnot.prototype.constructor=TorusKnot;THREE.Loader=function(a){this.statusDomElement=(this.showStatus=a)?THREE.Loader.prototype.addStatusElement():null};
-THREE.Loader.prototype={onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},addStatusElement:function(){var a=document.createElement("div");a.style.position="absolute";a.style.right="0px";a.style.top="0px";a.style.fontSize="0.8em";a.style.textAlign="left";a.style.background="rgba(0,0,0,0.25)";a.style.color="#fff";a.style.width="120px";a.style.padding="0.5em 0.5em 0.5em 0.5em";a.style.zIndex=1E3;a.innerHTML="Loading ...";return a},updateProgress:function(a){var c="Loaded ";
-c+=a.total?(100*a.loaded/a.total).toFixed(0)+"%":(a.loaded/1E3).toFixed(2)+" KB";this.statusDomElement.innerHTML=c},extractUrlbase:function(a){a=a.split("/");a.pop();return a.join("/")},init_materials:function(a,c,b){a.materials=[];for(var d=0;d<c.length;++d)a.materials[d]=[THREE.Loader.prototype.createMaterial(c[d],b)]},createMaterial:function(a,c){function b(k){k=Math.log(k)/Math.LN2;return Math.floor(k)==k}function d(k,m){var n=new Image;n.onload=function(){if(!b(this.width)||!b(this.height)){var q=
-Math.pow(2,Math.round(Math.log(this.width)/Math.LN2)),x=Math.pow(2,Math.round(Math.log(this.height)/Math.LN2));k.image.width=q;k.image.height=x;k.image.getContext("2d").drawImage(this,0,0,q,x)}else k.image=this;k.needsUpdate=!0};n.src=m}var f,g,h;f="MeshLambertMaterial";g={color:15658734,opacity:1,map:null,lightMap:null,vertexColors:a.vertexColors?THREE.VertexColors:!1};if(a.shading)if(a.shading=="Phong")f="MeshPhongMaterial";else a.shading=="Basic"&&(f="MeshBasicMaterial");if(a.mapDiffuse&&c){h=
-document.createElement("canvas");g.map=new THREE.Texture(h);g.map.sourceFile=a.mapDiffuse;d(g.map,c+"/"+a.mapDiffuse)}else if(a.colorDiffuse){h=(a.colorDiffuse[0]*255<<16)+(a.colorDiffuse[1]*255<<8)+a.colorDiffuse[2]*255;g.color=h;g.opacity=a.transparency}else if(a.DbgColor)g.color=a.DbgColor;if(a.mapLightmap&&c){h=document.createElement("canvas");g.lightMap=new THREE.Texture(h);g.lightMap.sourceFile=a.mapLightmap;d(g.lightMap,c+"/"+a.mapLightmap)}return new THREE[f](g)}};
-THREE.JSONLoader=function(a){THREE.Loader.call(this,a)};THREE.JSONLoader.prototype=new THREE.Loader;THREE.JSONLoader.prototype.constructor=THREE.JSONLoader;THREE.JSONLoader.prototype.supr=THREE.Loader.prototype;THREE.JSONLoader.prototype.load=function(a){var c=this,b=a.model,d=a.callback,f=a.texture_path?a.texture_path:this.extractUrlbase(b);a=new Worker(b);a.onmessage=function(g){c.createModel(g.data,d,f);c.onLoadComplete()};this.onLoadStart();a.postMessage((new Date).getTime())};
+n,m])}this.computeCentroids();this.computeFaceNormals();this.computeVertexNormals()};TorusKnot.prototype=new THREE.Geometry;TorusKnot.prototype.constructor=TorusKnot;THREE.Loader=function(a){this.statusDomElement=(this.showStatus=a)?THREE.Loader.prototype.addStatusElement():null;this.onLoadStart=function(){};this.onLoadProgress=function(){};this.onLoadComplete=function(){}};
+THREE.Loader.prototype={addStatusElement:function(){var a=document.createElement("div");a.style.position="absolute";a.style.right="0px";a.style.top="0px";a.style.fontSize="0.8em";a.style.textAlign="left";a.style.background="rgba(0,0,0,0.25)";a.style.color="#fff";a.style.width="120px";a.style.padding="0.5em 0.5em 0.5em 0.5em";a.style.zIndex=1E3;a.innerHTML="Loading ...";return a},updateProgress:function(a){var c="Loaded ";c+=a.total?(100*a.loaded/a.total).toFixed(0)+"%":(a.loaded/1E3).toFixed(2)+" KB";
+this.statusDomElement.innerHTML=c},extractUrlbase:function(a){a=a.split("/");a.pop();return a.join("/")},init_materials:function(a,c,b){a.materials=[];for(var d=0;d<c.length;++d)a.materials[d]=[THREE.Loader.prototype.createMaterial(c[d],b)]},createMaterial:function(a,c){function b(k){k=Math.log(k)/Math.LN2;return Math.floor(k)==k}function d(k,m){var n=new Image;n.onload=function(){if(!b(this.width)||!b(this.height)){var q=Math.pow(2,Math.round(Math.log(this.width)/Math.LN2)),x=Math.pow(2,Math.round(Math.log(this.height)/
+Math.LN2));k.image.width=q;k.image.height=x;k.image.getContext("2d").drawImage(this,0,0,q,x)}else k.image=this;k.needsUpdate=!0};n.src=m}var f,g,h;f="MeshLambertMaterial";g={color:15658734,opacity:1,map:null,lightMap:null,vertexColors:a.vertexColors?THREE.VertexColors:!1};if(a.shading)if(a.shading=="Phong")f="MeshPhongMaterial";else a.shading=="Basic"&&(f="MeshBasicMaterial");if(a.mapDiffuse&&c){h=document.createElement("canvas");g.map=new THREE.Texture(h);g.map.sourceFile=a.mapDiffuse;d(g.map,c+
+"/"+a.mapDiffuse)}else if(a.colorDiffuse){h=(a.colorDiffuse[0]*255<<16)+(a.colorDiffuse[1]*255<<8)+a.colorDiffuse[2]*255;g.color=h;g.opacity=a.transparency}else if(a.DbgColor)g.color=a.DbgColor;if(a.mapLightmap&&c){h=document.createElement("canvas");g.lightMap=new THREE.Texture(h);g.lightMap.sourceFile=a.mapLightmap;d(g.lightMap,c+"/"+a.mapLightmap)}return new THREE[f](g)}};THREE.JSONLoader=function(a){THREE.Loader.call(this,a)};THREE.JSONLoader.prototype=new THREE.Loader;
+THREE.JSONLoader.prototype.constructor=THREE.JSONLoader;THREE.JSONLoader.prototype.supr=THREE.Loader.prototype;THREE.JSONLoader.prototype.load=function(a){var c=this,b=a.model,d=a.callback,f=a.texture_path?a.texture_path:this.extractUrlbase(b);a=new Worker(b);a.onmessage=function(g){c.createModel(g.data,d,f);c.onLoadComplete()};this.onLoadStart();a.postMessage((new Date).getTime())};
 THREE.JSONLoader.prototype.createModel=function(a,c,b){var d=new THREE.Geometry;this.init_materials(d,a.materials,b);(function(){if(a.version===undefined||a.version!=2)console.error("Deprecated file format.");else{var f,g,h,k,m,n,q,x,y,p,z=a.faces;x=a.vertices;var G=a.normals,M=a.colors,D=0;for(f=0;f<a.uvs.length;f++)a.uvs[f].length&&D++;for(f=0;f<D;f++){d.faceUvs[f]=[];d.faceVertexUvs[f]=[]}h=0;for(k=x.length;h<k;){y=new THREE.Vertex;y.position.x=x[h++];y.position.y=x[h++];y.position.z=x[h++];d.vertices.push(y)}h=
 0;for(k=z.length;h<k;){m=z[h++];n=m&1;f=m&2;q=m&4;g=m&8;x=m&16;y=m&32;p=m&64;m&=128;if(n){n=new THREE.Face4;n.a=z[h++];n.b=z[h++];n.c=z[h++];n.d=z[h++];nVertices=4}else{n=new THREE.Face3;n.a=z[h++];n.b=z[h++];n.c=z[h++];nVertices=3}if(f){materialIndex=z[h++];n.materials=d.materials[materialIndex]}if(q)for(f=0;f<D;f++){uvLayer=a.uvs[f];uvIndex=z[h++];u=uvLayer[uvIndex*2];v=uvLayer[uvIndex*2+1];d.faceUvs[f].push(new THREE.UV(u,v))}if(g)for(f=0;f<D;f++){uvLayer=a.uvs[f];uvs=[];for(g=0;g<nVertices;g++){uvIndex=
 z[h++];u=uvLayer[uvIndex*2];v=uvLayer[uvIndex*2+1];uvs[g]=new THREE.UV(u,v)}g=d.faces.length;d.faceVertexUvs[f][g]=uvs}if(x){normalIndex=z[h++]*3;normal=new THREE.Vector3;normal.x=G[normalIndex++];normal.y=G[normalIndex++];normal.z=G[normalIndex];n.normal=normal}if(y)for(f=0;f<nVertices;f++){normalIndex=z[h++]*3;normal=new THREE.Vector3;normal.x=G[normalIndex++];normal.y=G[normalIndex++];normal.z=G[normalIndex];n.vertexNormals.push(normal)}if(p){color=new THREE.Color(z[h++]);n.color=color}if(m)for(f=

+ 6 - 6
build/custom/ThreeExtras.js

@@ -61,12 +61,12 @@ var Torus=function(a,g,b,c){this.radius=a||100;this.tube=g||40;this.segmentsR=b|
 var TorusKnot=function(a,g,b,c,d,e,f){function h(p,q,m,t,y,C){q=m/t*p;m=Math.cos(q);return new THREE.Vector3(y*(2+m)*0.5*Math.cos(p),y*(2+m)*Math.sin(p)*0.5,C*y*Math.sin(q)*0.5)}THREE.Geometry.call(this);this.radius=a||200;this.tube=g||40;this.segmentsR=b||64;this.segmentsT=c||8;this.p=d||2;this.q=e||3;this.heightScale=f||1;this.grid=Array(this.segmentsR);b=new THREE.Vector3;c=new THREE.Vector3;e=new THREE.Vector3;for(a=0;a<this.segmentsR;++a){this.grid[a]=Array(this.segmentsT);for(g=0;g<this.segmentsT;++g){var j=
 a/this.segmentsR*2*this.p*Math.PI;f=g/this.segmentsT*2*Math.PI;d=h(j,f,this.q,this.p,this.radius,this.heightScale);j=h(j+0.01,f,this.q,this.p,this.radius,this.heightScale);b.x=j.x-d.x;b.y=j.y-d.y;b.z=j.z-d.z;c.x=j.x+d.x;c.y=j.y+d.y;c.z=j.z+d.z;e.cross(b,c);c.cross(e,b);e.normalize();c.normalize();j=this.tube*Math.cos(f);f=this.tube*Math.sin(f);d.x+=j*c.x+f*e.x;d.y+=j*c.y+f*e.y;d.z+=j*c.z+f*e.z;this.grid[a][g]=this.vertices.push(new THREE.Vertex(new THREE.Vector3(d.x,d.y,d.z)))-1}}for(a=0;a<this.segmentsR;++a)for(g=
 0;g<this.segmentsT;++g){e=(a+1)%this.segmentsR;f=(g+1)%this.segmentsT;d=this.grid[a][g];b=this.grid[e][g];c=this.grid[a][f];e=this.grid[e][f];f=new THREE.UV(a/this.segmentsR,g/this.segmentsT);j=new THREE.UV((a+1)/this.segmentsR,g/this.segmentsT);var k=new THREE.UV(a/this.segmentsR,(g+1)/this.segmentsT),l=new THREE.UV((a+1)/this.segmentsR,(g+1)/this.segmentsT);this.faces.push(new THREE.Face3(d,b,c));this.faceVertexUvs[0].push([f,j,k]);this.faces.push(new THREE.Face3(e,c,b));this.faceVertexUvs[0].push([l,
-k,j])}this.computeCentroids();this.computeFaceNormals();this.computeVertexNormals()};TorusKnot.prototype=new THREE.Geometry;TorusKnot.prototype.constructor=TorusKnot;THREE.Loader=function(a){this.statusDomElement=(this.showStatus=a)?THREE.Loader.prototype.addStatusElement():null};
-THREE.Loader.prototype={onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},addStatusElement:function(){var a=document.createElement("div");a.style.position="absolute";a.style.right="0px";a.style.top="0px";a.style.fontSize="0.8em";a.style.textAlign="left";a.style.background="rgba(0,0,0,0.25)";a.style.color="#fff";a.style.width="120px";a.style.padding="0.5em 0.5em 0.5em 0.5em";a.style.zIndex=1E3;a.innerHTML="Loading ...";return a},updateProgress:function(a){var g="Loaded ";
-g+=a.total?(100*a.loaded/a.total).toFixed(0)+"%":(a.loaded/1E3).toFixed(2)+" KB";this.statusDomElement.innerHTML=g},extractUrlbase:function(a){a=a.split("/");a.pop();return a.join("/")},init_materials:function(a,g,b){a.materials=[];for(var c=0;c<g.length;++c)a.materials[c]=[THREE.Loader.prototype.createMaterial(g[c],b)]},createMaterial:function(a,g){function b(h){h=Math.log(h)/Math.LN2;return Math.floor(h)==h}function c(h,j){var k=new Image;k.onload=function(){if(!b(this.width)||!b(this.height)){var l=
-Math.pow(2,Math.round(Math.log(this.width)/Math.LN2)),p=Math.pow(2,Math.round(Math.log(this.height)/Math.LN2));h.image.width=l;h.image.height=p;h.image.getContext("2d").drawImage(this,0,0,l,p)}else h.image=this;h.needsUpdate=!0};k.src=j}var d,e,f;d="MeshLambertMaterial";e={color:15658734,opacity:1,map:null,lightMap:null,vertexColors:a.vertexColors?THREE.VertexColors:!1};if(a.shading)if(a.shading=="Phong")d="MeshPhongMaterial";else a.shading=="Basic"&&(d="MeshBasicMaterial");if(a.mapDiffuse&&g){f=
-document.createElement("canvas");e.map=new THREE.Texture(f);e.map.sourceFile=a.mapDiffuse;c(e.map,g+"/"+a.mapDiffuse)}else if(a.colorDiffuse){f=(a.colorDiffuse[0]*255<<16)+(a.colorDiffuse[1]*255<<8)+a.colorDiffuse[2]*255;e.color=f;e.opacity=a.transparency}else if(a.DbgColor)e.color=a.DbgColor;if(a.mapLightmap&&g){f=document.createElement("canvas");e.lightMap=new THREE.Texture(f);e.lightMap.sourceFile=a.mapLightmap;c(e.lightMap,g+"/"+a.mapLightmap)}return new THREE[d](e)}};
-THREE.JSONLoader=function(a){THREE.Loader.call(this,a)};THREE.JSONLoader.prototype=new THREE.Loader;THREE.JSONLoader.prototype.constructor=THREE.JSONLoader;THREE.JSONLoader.prototype.supr=THREE.Loader.prototype;THREE.JSONLoader.prototype.load=function(a){var g=this,b=a.model,c=a.callback,d=a.texture_path?a.texture_path:this.extractUrlbase(b);a=new Worker(b);a.onmessage=function(e){g.createModel(e.data,c,d);g.onLoadComplete()};this.onLoadStart();a.postMessage((new Date).getTime())};
+k,j])}this.computeCentroids();this.computeFaceNormals();this.computeVertexNormals()};TorusKnot.prototype=new THREE.Geometry;TorusKnot.prototype.constructor=TorusKnot;THREE.Loader=function(a){this.statusDomElement=(this.showStatus=a)?THREE.Loader.prototype.addStatusElement():null;this.onLoadStart=function(){};this.onLoadProgress=function(){};this.onLoadComplete=function(){}};
+THREE.Loader.prototype={addStatusElement:function(){var a=document.createElement("div");a.style.position="absolute";a.style.right="0px";a.style.top="0px";a.style.fontSize="0.8em";a.style.textAlign="left";a.style.background="rgba(0,0,0,0.25)";a.style.color="#fff";a.style.width="120px";a.style.padding="0.5em 0.5em 0.5em 0.5em";a.style.zIndex=1E3;a.innerHTML="Loading ...";return a},updateProgress:function(a){var g="Loaded ";g+=a.total?(100*a.loaded/a.total).toFixed(0)+"%":(a.loaded/1E3).toFixed(2)+" KB";
+this.statusDomElement.innerHTML=g},extractUrlbase:function(a){a=a.split("/");a.pop();return a.join("/")},init_materials:function(a,g,b){a.materials=[];for(var c=0;c<g.length;++c)a.materials[c]=[THREE.Loader.prototype.createMaterial(g[c],b)]},createMaterial:function(a,g){function b(h){h=Math.log(h)/Math.LN2;return Math.floor(h)==h}function c(h,j){var k=new Image;k.onload=function(){if(!b(this.width)||!b(this.height)){var l=Math.pow(2,Math.round(Math.log(this.width)/Math.LN2)),p=Math.pow(2,Math.round(Math.log(this.height)/
+Math.LN2));h.image.width=l;h.image.height=p;h.image.getContext("2d").drawImage(this,0,0,l,p)}else h.image=this;h.needsUpdate=!0};k.src=j}var d,e,f;d="MeshLambertMaterial";e={color:15658734,opacity:1,map:null,lightMap:null,vertexColors:a.vertexColors?THREE.VertexColors:!1};if(a.shading)if(a.shading=="Phong")d="MeshPhongMaterial";else a.shading=="Basic"&&(d="MeshBasicMaterial");if(a.mapDiffuse&&g){f=document.createElement("canvas");e.map=new THREE.Texture(f);e.map.sourceFile=a.mapDiffuse;c(e.map,g+
+"/"+a.mapDiffuse)}else if(a.colorDiffuse){f=(a.colorDiffuse[0]*255<<16)+(a.colorDiffuse[1]*255<<8)+a.colorDiffuse[2]*255;e.color=f;e.opacity=a.transparency}else if(a.DbgColor)e.color=a.DbgColor;if(a.mapLightmap&&g){f=document.createElement("canvas");e.lightMap=new THREE.Texture(f);e.lightMap.sourceFile=a.mapLightmap;c(e.lightMap,g+"/"+a.mapLightmap)}return new THREE[d](e)}};THREE.JSONLoader=function(a){THREE.Loader.call(this,a)};THREE.JSONLoader.prototype=new THREE.Loader;
+THREE.JSONLoader.prototype.constructor=THREE.JSONLoader;THREE.JSONLoader.prototype.supr=THREE.Loader.prototype;THREE.JSONLoader.prototype.load=function(a){var g=this,b=a.model,c=a.callback,d=a.texture_path?a.texture_path:this.extractUrlbase(b);a=new Worker(b);a.onmessage=function(e){g.createModel(e.data,c,d);g.onLoadComplete()};this.onLoadStart();a.postMessage((new Date).getTime())};
 THREE.JSONLoader.prototype.createModel=function(a,g,b){var c=new THREE.Geometry;this.init_materials(c,a.materials,b);(function(){if(a.version===undefined||a.version!=2)console.error("Deprecated file format.");else{var d,e,f,h,j,k,l,p,q,m,t=a.faces;p=a.vertices;var y=a.normals,C=a.colors,x=0;for(d=0;d<a.uvs.length;d++)a.uvs[d].length&&x++;for(d=0;d<x;d++){c.faceUvs[d]=[];c.faceVertexUvs[d]=[]}f=0;for(h=p.length;f<h;){q=new THREE.Vertex;q.position.x=p[f++];q.position.y=p[f++];q.position.z=p[f++];c.vertices.push(q)}f=
 0;for(h=t.length;f<h;){j=t[f++];k=j&1;d=j&2;l=j&4;e=j&8;p=j&16;q=j&32;m=j&64;j&=128;if(k){k=new THREE.Face4;k.a=t[f++];k.b=t[f++];k.c=t[f++];k.d=t[f++];nVertices=4}else{k=new THREE.Face3;k.a=t[f++];k.b=t[f++];k.c=t[f++];nVertices=3}if(d){materialIndex=t[f++];k.materials=c.materials[materialIndex]}if(l)for(d=0;d<x;d++){uvLayer=a.uvs[d];uvIndex=t[f++];u=uvLayer[uvIndex*2];v=uvLayer[uvIndex*2+1];c.faceUvs[d].push(new THREE.UV(u,v))}if(e)for(d=0;d<x;d++){uvLayer=a.uvs[d];uvs=[];for(e=0;e<nVertices;e++){uvIndex=
 t[f++];u=uvLayer[uvIndex*2];v=uvLayer[uvIndex*2+1];uvs[e]=new THREE.UV(u,v)}e=c.faces.length;c.faceVertexUvs[d][e]=uvs}if(p){normalIndex=t[f++]*3;normal=new THREE.Vector3;normal.x=y[normalIndex++];normal.y=y[normalIndex++];normal.z=y[normalIndex];k.normal=normal}if(q)for(d=0;d<nVertices;d++){normalIndex=t[f++]*3;normal=new THREE.Vector3;normal.x=y[normalIndex++];normal.y=y[normalIndex++];normal.z=y[normalIndex];k.vertexNormals.push(normal)}if(m){color=new THREE.Color(t[f++]);k.color=color}if(j)for(d=

+ 4 - 4
src/extras/io/Loader.js

@@ -7,14 +7,14 @@ THREE.Loader = function ( showStatus ) {
 	this.showStatus = showStatus;
 	this.statusDomElement = showStatus ? THREE.Loader.prototype.addStatusElement() : null;
 
+	this.onLoadStart = function () {};
+	this.onLoadProgress = function() {};
+	this.onLoadComplete = function () {};
+
 };
 
 THREE.Loader.prototype = {
 
-	onLoadStart: function () {},
-	onLoadProgress: function() {},
-	onLoadComplete: function () {},
-
 	addStatusElement: function () {
 
 		var e = document.createElement( "div" );