提交 f1592016 编写于 作者: M Mr.doob

Updated builds.

上级 0f6b0e6f
......@@ -10943,7 +10943,6 @@ THREE.MaterialLoader.prototype = {
material = new THREE.MeshBasicMaterial( {
color: json.color,
vertexColors: json.vertexColors,
opacity: json.opacity,
transparent: json.transparent,
wireframe: json.wireframe
......@@ -10959,7 +10958,6 @@ THREE.MaterialLoader.prototype = {
color: json.color,
ambient: json.ambient,
emissive: json.emissive,
vertexColors: json.vertexColors,
opacity: json.opacity,
transparent: json.transparent,
wireframe: json.wireframe
......@@ -10977,7 +10975,6 @@ THREE.MaterialLoader.prototype = {
emissive: json.emissive,
specular: json.specular,
shininess: json.shininess,
vertexColors: json.vertexColors,
opacity: json.opacity,
transparent: json.transparent,
wireframe: json.wireframe
......@@ -11012,6 +11009,8 @@ THREE.MaterialLoader.prototype = {
}
if ( json.vertexColors !== undefined ) material.vertexColors = json.vertexColors;
return material;
}
......
......@@ -218,9 +218,9 @@ new THREE.Face4,n.a=z[g++],n.b=z[g++],n.c=z[g++],n.d=z[g++],j=4):(n=new THREE.Fa
3*z[g++],f=new THREE.Vector3,f.x=G[l++],f.y=G[l++],f.z=G[l],n.vertexNormals.push(f);t&&(m=z[g++],m=new THREE.Color(C[m]),n.color=m);if(q)for(e=0;e<j;e++)m=z[g++],m=new THREE.Color(C[m]),n.vertexColors.push(m);c.faces.push(n)}if(a.skinWeights){g=0;for(i=a.skinWeights.length;g<i;g+=2)z=a.skinWeights[g],G=a.skinWeights[g+1],c.skinWeights.push(new THREE.Vector4(z,G,0,0))}if(a.skinIndices){g=0;for(i=a.skinIndices.length;g<i;g+=2)z=a.skinIndices[g],G=a.skinIndices[g+1],c.skinIndices.push(new THREE.Vector4(z,
G,0,0))}c.bones=a.bones;c.animation=a.animation;if(void 0!==a.morphTargets){g=0;for(i=a.morphTargets.length;g<i;g++){c.morphTargets[g]={};c.morphTargets[g].name=a.morphTargets[g].name;c.morphTargets[g].vertices=[];C=c.morphTargets[g].vertices;H=a.morphTargets[g].vertices;z=0;for(G=H.length;z<G;z+=3)q=new THREE.Vector3,q.x=H[z]*d,q.y=H[z+1]*d,q.z=H[z+2]*d,C.push(q)}}if(void 0!==a.morphColors){g=0;for(i=a.morphColors.length;g<i;g++){c.morphColors[g]={};c.morphColors[g].name=a.morphColors[g].name;c.morphColors[g].colors=
[];G=c.morphColors[g].colors;C=a.morphColors[g].colors;d=0;for(z=C.length;d<z;d+=3)H=new THREE.Color(16755200),H.setRGB(C[d],C[d+1],C[d+2]),G.push(H)}}c.computeCentroids();c.computeFaceNormals();if(void 0===a.materials)return{geometry:c};d=this.initMaterials(a.materials,b);this.needsTangents(d)&&c.computeTangents();return{geometry:c,materials:d}};THREE.LoadingManager=function(a,b,c){var d=this,e=0,f=0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(){f++};this.itemEnd=function(a){e++;if(void 0!==d.onProgress)d.onProgress(a,e,f);if(e===f&&void 0!==d.onLoad)d.onLoad()}};THREE.DefaultLoadingManager=new THREE.LoadingManager;THREE.GeometryLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};THREE.GeometryLoader.prototype={constructor:THREE.GeometryLoader,load:function(a,b){var c=this,d=new THREE.XHRLoader;d.setCrossOrigin(this.crossOrigin);d.load(a,function(a){b(c.parse(JSON.parse(a)))})},setCrossOrigin:function(a){this.crossOrigin=a},parse:function(){}};THREE.MaterialLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
THREE.MaterialLoader.prototype={constructor:THREE.MaterialLoader,load:function(a,b){var c=this,d=new THREE.XHRLoader;d.setCrossOrigin(this.crossOrigin);d.load(a,function(a){b(c.parse(JSON.parse(a)))})},setCrossOrigin:function(a){this.crossOrigin=a},parse:function(a){var b;switch(a.type){case "MeshBasicMaterial":b=new THREE.MeshBasicMaterial({color:a.color,vertexColors:a.vertexColors,opacity:a.opacity,transparent:a.transparent,wireframe:a.wireframe});break;case "MeshLambertMaterial":b=new THREE.MeshLambertMaterial({color:a.color,
ambient:a.ambient,emissive:a.emissive,vertexColors:a.vertexColors,opacity:a.opacity,transparent:a.transparent,wireframe:a.wireframe});break;case "MeshPhongMaterial":b=new THREE.MeshPhongMaterial({color:a.color,ambient:a.ambient,emissive:a.emissive,specular:a.specular,shininess:a.shininess,vertexColors:a.vertexColors,opacity:a.opacity,transparent:a.transparent,wireframe:a.wireframe});break;case "MeshNormalMaterial":b=new THREE.MeshNormalMaterial({opacity:a.opacity,transparent:a.transparent,wireframe:a.wireframe});
break;case "MeshDepthMaterial":b=new THREE.MeshDepthMaterial({opacity:a.opacity,transparent:a.transparent,wireframe:a.wireframe})}return b}};THREE.ObjectLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
THREE.MaterialLoader.prototype={constructor:THREE.MaterialLoader,load:function(a,b){var c=this,d=new THREE.XHRLoader;d.setCrossOrigin(this.crossOrigin);d.load(a,function(a){b(c.parse(JSON.parse(a)))})},setCrossOrigin:function(a){this.crossOrigin=a},parse:function(a){var b;switch(a.type){case "MeshBasicMaterial":b=new THREE.MeshBasicMaterial({color:a.color,opacity:a.opacity,transparent:a.transparent,wireframe:a.wireframe});break;case "MeshLambertMaterial":b=new THREE.MeshLambertMaterial({color:a.color,
ambient:a.ambient,emissive:a.emissive,opacity:a.opacity,transparent:a.transparent,wireframe:a.wireframe});break;case "MeshPhongMaterial":b=new THREE.MeshPhongMaterial({color:a.color,ambient:a.ambient,emissive:a.emissive,specular:a.specular,shininess:a.shininess,opacity:a.opacity,transparent:a.transparent,wireframe:a.wireframe});break;case "MeshNormalMaterial":b=new THREE.MeshNormalMaterial({opacity:a.opacity,transparent:a.transparent,wireframe:a.wireframe});break;case "MeshDepthMaterial":b=new THREE.MeshDepthMaterial({opacity:a.opacity,
transparent:a.transparent,wireframe:a.wireframe})}void 0!==a.vertexColors&&(b.vertexColors=a.vertexColors);return b}};THREE.ObjectLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
THREE.ObjectLoader.prototype={constructor:THREE.ObjectLoader,load:function(a,b){var c=this,d=new THREE.XHRLoader(c.manager);d.setCrossOrigin(this.crossOrigin);d.load(a,function(a){b(c.parse(JSON.parse(a)))})},setCrossOrigin:function(a){this.crossOrigin=a},parse:function(a){var b=this.parseGeometries(a.geometries),c=this.parseMaterials(a.materials);return this.parseObject(a.object,b,c)},parseGeometries:function(a){var b={};if(void 0!==a)for(var c=new THREE.JSONLoader,d=0,e=a.length;d<e;d++){var f,
h=a[d];switch(h.type){case "PlaneGeometry":f=new THREE.PlaneGeometry(h.width,h.height,h.widthSegments,h.heightSegments);break;case "CubeGeometry":f=new THREE.CubeGeometry(h.width,h.height,h.depth,h.widthSegments,h.heightSegments,h.depthSegments);break;case "CylinderGeometry":f=new THREE.CylinderGeometry(h.radiusTop,h.radiusBottom,h.height,h.radiusSegments,h.heightSegments,h.openEnded);break;case "SphereGeometry":f=new THREE.SphereGeometry(h.radius,h.widthSegments,h.heightSegments,h.phiStart,h.phiLength,
h.thetaStart,h.thetaLength);break;case "IcosahedronGeometry":f=new THREE.IcosahedronGeometry(h.radius,h.detail);break;case "TorusGeometry":f=new THREE.TorusGeometry(h.radius,h.tube,h.radialSegments,h.tubularSegments,h.arc);break;case "TorusKnotGeometry":f=new THREE.TorusKnotGeometry(h.radius,h.tube,h.radialSegments,h.tubularSegments,h.p,h.q,h.heightScale);break;case "Geometry":f=c.parse(h.data).geometry}void 0!==h.id&&(f.id=h.id);void 0!==h.name&&(f.name=h.name);b[h.id]=f}return b},parseMaterials:function(a){var b=
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册