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

Updated builds.

上级 046f7809
......@@ -12648,13 +12648,13 @@ THREE.ObjectLoader.prototype = {
if ( geometry === undefined ) {
console.error( 'THREE.ObjectLoader: Undefined geometry ' + data.geometry );
console.warn( 'THREE.ObjectLoader: Undefined geometry', data.geometry );
}
if ( material === undefined ) {
console.error( 'THREE.ObjectLoader: Undefined material ' + data.material );
console.warn( 'THREE.ObjectLoader: Undefined material', data.material );
}
......@@ -12668,7 +12668,7 @@ THREE.ObjectLoader.prototype = {
if ( material === undefined ) {
console.error( 'THREE.ObjectLoader: Undefined material ' + data.material );
console.warn( 'THREE.ObjectLoader: Undefined material', data.material );
}
......
......@@ -278,9 +278,9 @@ e=0,g=a.length;e<g;e++){var f,h=a[e];switch(h.type){case "PlaneGeometry":f=new T
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 "BufferGeometry":f=
d.parse(h.data);break;case "Geometry":f=c.parse(h.data).geometry}f.uuid=h.uuid;void 0!==h.name&&(f.name=h.name);b[h.uuid]=f}return b},parseMaterials:function(a){var b={};if(void 0!==a)for(var c=new THREE.MaterialLoader,d=0,e=a.length;d<e;d++){var g=a[d],f=c.parse(g);f.uuid=g.uuid;void 0!==g.name&&(f.name=g.name);b[g.uuid]=f}return b},parseObject:function(){var a=new THREE.Matrix4;return function(b,c,d){var e;switch(b.type){case "Scene":e=new THREE.Scene;break;case "PerspectiveCamera":e=new THREE.PerspectiveCamera(b.fov,
b.aspect,b.near,b.far);break;case "OrthographicCamera":e=new THREE.OrthographicCamera(b.left,b.right,b.top,b.bottom,b.near,b.far);break;case "AmbientLight":e=new THREE.AmbientLight(b.color);break;case "DirectionalLight":e=new THREE.DirectionalLight(b.color,b.intensity);break;case "PointLight":e=new THREE.PointLight(b.color,b.intensity,b.distance);break;case "SpotLight":e=new THREE.SpotLight(b.color,b.intensity,b.distance,b.angle,b.exponent);break;case "HemisphereLight":e=new THREE.HemisphereLight(b.color,
b.groundColor,b.intensity);break;case "Mesh":e=c[b.geometry];var g=d[b.material];void 0===e&&console.error("THREE.ObjectLoader: Undefined geometry "+b.geometry);void 0===g&&console.error("THREE.ObjectLoader: Undefined material "+b.material);e=new THREE.Mesh(e,g);break;case "Sprite":g=d[b.material];void 0===g&&console.error("THREE.ObjectLoader: Undefined material "+b.material);e=new THREE.Sprite(g);break;case "Group":e=new THREE.Group;break;default:e=new THREE.Object3D}e.uuid=b.uuid;void 0!==b.name&&
(e.name=b.name);void 0!==b.matrix?(a.fromArray(b.matrix),a.decompose(e.position,e.quaternion,e.scale)):(void 0!==b.position&&e.position.fromArray(b.position),void 0!==b.rotation&&e.rotation.fromArray(b.rotation),void 0!==b.scale&&e.scale.fromArray(b.scale));void 0!==b.visible&&(e.visible=b.visible);void 0!==b.userData&&(e.userData=b.userData);if(void 0!==b.children)for(var f in b.children)e.add(this.parseObject(b.children[f],c,d));return e}}()};
THREE.TextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};THREE.TextureLoader.prototype={constructor:THREE.TextureLoader,load:function(a,b,c,d){var e=new THREE.ImageLoader(this.manager);e.setCrossOrigin(this.crossOrigin);e.load(a,function(a){a=new THREE.Texture(a);a.needsUpdate=!0;void 0!==b&&b(a)},c,d)},setCrossOrigin:function(a){this.crossOrigin=a}};THREE.CompressedTextureLoader=function(){this._parser=null};
b.groundColor,b.intensity);break;case "Mesh":e=c[b.geometry];var g=d[b.material];void 0===e&&console.warn("THREE.ObjectLoader: Undefined geometry",b.geometry);void 0===g&&console.warn("THREE.ObjectLoader: Undefined material",b.material);e=new THREE.Mesh(e,g);break;case "Sprite":g=d[b.material];void 0===g&&console.warn("THREE.ObjectLoader: Undefined material",b.material);e=new THREE.Sprite(g);break;case "Group":e=new THREE.Group;break;default:e=new THREE.Object3D}e.uuid=b.uuid;void 0!==b.name&&(e.name=
b.name);void 0!==b.matrix?(a.fromArray(b.matrix),a.decompose(e.position,e.quaternion,e.scale)):(void 0!==b.position&&e.position.fromArray(b.position),void 0!==b.rotation&&e.rotation.fromArray(b.rotation),void 0!==b.scale&&e.scale.fromArray(b.scale));void 0!==b.visible&&(e.visible=b.visible);void 0!==b.userData&&(e.userData=b.userData);if(void 0!==b.children)for(var f in b.children)e.add(this.parseObject(b.children[f],c,d));return e}}()};THREE.TextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
THREE.TextureLoader.prototype={constructor:THREE.TextureLoader,load:function(a,b,c,d){var e=new THREE.ImageLoader(this.manager);e.setCrossOrigin(this.crossOrigin);e.load(a,function(a){a=new THREE.Texture(a);a.needsUpdate=!0;void 0!==b&&b(a)},c,d)},setCrossOrigin:function(a){this.crossOrigin=a}};THREE.CompressedTextureLoader=function(){this._parser=null};
THREE.CompressedTextureLoader.prototype={constructor:THREE.CompressedTextureLoader,load:function(a,b,c){var d=this,e=[],g=new THREE.CompressedTexture;g.image=e;var f=new THREE.XHRLoader;f.setResponseType("arraybuffer");if(a instanceof Array){var h=0;c=function(c){f.load(a[c],function(a){a=d._parser(a,!0);e[c]={width:a.width,height:a.height,format:a.format,mipmaps:a.mipmaps};h+=1;6===h&&(1==a.mipmapCount&&(g.minFilter=THREE.LinearFilter),g.format=a.format,g.needsUpdate=!0,b&&b(g))})};for(var k=0,n=
a.length;k<n;++k)c(k)}else f.load(a,function(a){a=d._parser(a,!0);if(a.isCubemap)for(var c=a.mipmaps.length/a.mipmapCount,f=0;f<c;f++){e[f]={mipmaps:[]};for(var h=0;h<a.mipmapCount;h++)e[f].mipmaps.push(a.mipmaps[f*a.mipmapCount+h]),e[f].format=a.format,e[f].width=a.width,e[f].height=a.height}else g.image.width=a.width,g.image.height=a.height,g.mipmaps=a.mipmaps;1===a.mipmapCount&&(g.minFilter=THREE.LinearFilter);g.format=a.format;g.needsUpdate=!0;b&&b(g)});return g}};
THREE.Material=function(){Object.defineProperty(this,"id",{value:THREE.MaterialIdCount++});this.uuid=THREE.Math.generateUUID();this.name="";this.type="Material";this.side=THREE.FrontSide;this.opacity=1;this.transparent=!1;this.blending=THREE.NormalBlending;this.blendSrc=THREE.SrcAlphaFactor;this.blendDst=THREE.OneMinusSrcAlphaFactor;this.blendEquation=THREE.AddEquation;this.depthWrite=this.depthTest=!0;this.polygonOffset=!1;this.overdraw=this.alphaTest=this.polygonOffsetUnits=this.polygonOffsetFactor=
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册