From 0c348b35b7bf7e0ed0504262ea1cace24117de9a Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Sun, 20 Nov 2016 00:03:57 -0800 Subject: [PATCH] Simplified DirectGeometry. --- src/core/DirectGeometry.js | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/src/core/DirectGeometry.js b/src/core/DirectGeometry.js index 4da985ace5..ce35e5a2cc 100644 --- a/src/core/DirectGeometry.js +++ b/src/core/DirectGeometry.js @@ -1,21 +1,10 @@ -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' } ); - } } ); -- GitLab