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

Simplified DirectGeometry.

上级 1d873a81
import { Geometry } from './Geometry';
import { EventDispatcher } from './EventDispatcher';
import { Vector2 } from '../math/Vector2';
import { _Math } from '../math/Math';
import { GeometryIdCount } from './Geometry';
/**
* @author mrdoob / http://mrdoob.com/
*/
function DirectGeometry() {
Object.defineProperty( this, 'id', { value: GeometryIdCount() } );
this.uuid = _Math.generateUUID();
import { Vector2 } from '../math/Vector2';
this.name = '';
this.type = 'DirectGeometry';
function DirectGeometry() {
this.indices = [];
this.vertices = [];
......@@ -46,22 +35,7 @@ function DirectGeometry() {
}
Object.assign( DirectGeometry.prototype, EventDispatcher.prototype, {
computeBoundingBox: Geometry.prototype.computeBoundingBox,
computeBoundingSphere: Geometry.prototype.computeBoundingSphere,
computeFaceNormals: function () {
console.warn( 'THREE.DirectGeometry: computeFaceNormals() is not a method of this type of geometry.' );
},
computeVertexNormals: function () {
console.warn( 'THREE.DirectGeometry: computeVertexNormals() is not a method of this type of geometry.' );
},
Object.assign( DirectGeometry.prototype, {
computeGroups: function ( geometry ) {
......@@ -281,12 +255,6 @@ Object.assign( DirectGeometry.prototype, EventDispatcher.prototype, {
return this;
},
dispose: function () {
this.dispatchEvent( { type: 'dispose' } );
}
} );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册