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

Removed GeometryIdCount(). See #10095.

上级 fef8ac95
......@@ -84,7 +84,7 @@ export { AnimationClip } from './animation/AnimationClip.js';
export { Uniform } from './core/Uniform.js';
export { InstancedBufferGeometry } from './core/InstancedBufferGeometry.js';
export { BufferGeometry } from './core/BufferGeometry.js';
export { GeometryIdCount, Geometry } from './core/Geometry.js';
export { Geometry } from './core/Geometry.js';
export { InterleavedBufferAttribute } from './core/InterleavedBufferAttribute.js';
export { InstancedInterleavedBuffer } from './core/InstancedInterleavedBuffer.js';
export { InterleavedBuffer } from './core/InterleavedBuffer.js';
......
......@@ -9,16 +9,17 @@ import { Matrix4 } from '../math/Matrix4.js';
import { Matrix3 } from '../math/Matrix3.js';
import { _Math } from '../math/Math.js';
import { arrayMax } from '../utils.js';
import { GeometryIdCount } from './Geometry.js';
/**
* @author alteredq / http://alteredqualia.com/
* @author mrdoob / http://mrdoob.com/
*/
var bufferGeometryId = 1; // BufferGeometry uses odd numbers as Id
function BufferGeometry() {
Object.defineProperty( this, 'id', { value: GeometryIdCount() } );
Object.defineProperty( this, 'id', { value: bufferGeometryId += 2 } );
this.uuid = _Math.generateUUID();
......
......@@ -19,17 +19,11 @@ import { _Math } from '../math/Math.js';
* @author bhouston / http://clara.io
*/
var count = 0;
function GeometryIdCount() {
return count ++;
}
var geometryId = 0; // Geometry uses even numbers as Id
function Geometry() {
Object.defineProperty( this, 'id', { value: GeometryIdCount() } );
Object.defineProperty( this, 'id', { value: geometryId += 2 } );
this.uuid = _Math.generateUUID();
......@@ -1440,4 +1434,4 @@ Object.assign( Geometry.prototype, EventDispatcher.prototype, {
} );
export { GeometryIdCount, Geometry };
export { Geometry };
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册