提交 5458c757 编写于 作者: B Ben Houston

remove GeometryLoader - it is broken and unused.

上级 5df5fc57
/**
* @author mrdoob / http://mrdoob.com/
*/
THREE.GeometryLoader = function ( manager ) {
this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;
};
THREE.GeometryLoader.prototype = {
constructor: THREE.GeometryLoader,
load: function ( url, onLoad, onProgress, onError ) {
var scope = this;
var loader = new THREE.XHRLoader( this.manager );
loader.setCrossOrigin( this.crossOrigin );
loader.load( url, function ( text ) {
onLoad( scope.parse( JSON.parse( text ) ) );
}, onProgress, onError );
},
setCrossOrigin: function ( value ) {
this.crossOrigin = value;
},
parse: function ( json ) {
var geometry = new THREE.Geometry();
geometry.indices = json.indices;
geometry.vertices = json.vertices;
geometry.normals = json.normals;
geometry.uvs = json.uvs;
var boundingSphere = json.boundingSphere;
if ( boundingSphere !== undefined ) {
var center = new THREE.Vector3();
if ( boundingSphere.center !== undefined ) {
center.fromArray( boundingSphere.center );
}
geometry.boundingSphere = new THREE.Sphere( center, boundingSphere.radius );
}
return geometry;
}
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册