Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change *IdCount functions back to variables #9558

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Three.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export { CompressedTexture } from './textures/CompressedTexture.js';
export { CubeTexture } from './textures/CubeTexture.js';
export { CanvasTexture } from './textures/CanvasTexture.js';
export { DepthTexture } from './textures/DepthTexture.js';
export { TextureIdCount, Texture } from './textures/Texture.js';
export { Texture } from './textures/Texture.js';
export { ShadowMaterial } from './materials/ShadowMaterial.js';
export { SpriteMaterial } from './materials/SpriteMaterial.js';
export { RawShaderMaterial } from './materials/RawShaderMaterial.js';
Expand All @@ -61,7 +61,7 @@ export { MeshDepthMaterial } from './materials/MeshDepthMaterial.js';
export { MeshBasicMaterial } from './materials/MeshBasicMaterial.js';
export { LineDashedMaterial } from './materials/LineDashedMaterial.js';
export { LineBasicMaterial } from './materials/LineBasicMaterial.js';
export { MaterialIdCount, Material } from './materials/Material.js';
export { Material } from './materials/Material.js';
export { CompressedTextureLoader } from './loaders/CompressedTextureLoader.js';
export { BinaryTextureLoader, DataTextureLoader } from './loaders/BinaryTextureLoader.js';
export { CubeTextureLoader } from './loaders/CubeTextureLoader.js';
Expand Down Expand Up @@ -113,7 +113,7 @@ export { Uniform } from './core/Uniform.js';
export { InstancedBufferGeometry } from './core/InstancedBufferGeometry.js';
export { BufferGeometry } from './core/BufferGeometry.js';
export { DirectGeometry } from './core/DirectGeometry.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';
Expand All @@ -132,7 +132,7 @@ export {
BufferAttribute
} from './core/BufferAttribute.js';
export { Face3 } from './core/Face3.js';
export { Object3DIdCount, Object3D } from './core/Object3D.js';
export { Object3D } from './core/Object3D.js';
export { Raycaster } from './core/Raycaster.js';
export { Layers } from './core/Layers.js';
export { EventDispatcher } from './core/EventDispatcher.js';
Expand Down
4 changes: 2 additions & 2 deletions src/core/BufferGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Object3D } from './Object3D';
import { Matrix4 } from '../math/Matrix4';
import { Matrix3 } from '../math/Matrix3';
import { _Math } from '../math/Math';
import { GeometryIdCount } from './Geometry';
import { Geometry } from './Geometry';

/**
* @author alteredq / http://alteredqualia.com/
Expand All @@ -17,7 +17,7 @@ import { GeometryIdCount } from './Geometry';

function BufferGeometry() {

Object.defineProperty( this, 'id', { value: GeometryIdCount() } );
Object.defineProperty( this, 'id', { value: Geometry.IdCount ++ } );

this.uuid = _Math.generateUUID();

Expand Down
4 changes: 2 additions & 2 deletions src/core/DirectGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { Geometry } from './Geometry';
import { EventDispatcher } from './EventDispatcher';
import { Vector2 } from '../math/Vector2';
import { _Math } from '../math/Math';
import { GeometryIdCount } from './Geometry';
import { Geometry } from './Geometry';

/**
* @author mrdoob / http://mrdoob.com/
*/

function DirectGeometry() {

Object.defineProperty( this, 'id', { value: GeometryIdCount() } );
Object.defineProperty( this, 'id', { value: Geometry.IdCount ++ } );

this.uuid = _Math.generateUUID();

Expand Down
7 changes: 3 additions & 4 deletions src/core/Geometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { _Math } from '../math/Math';

function Geometry() {

Object.defineProperty( this, 'id', { value: GeometryIdCount() } );
Object.defineProperty( this, 'id', { value: Geometry.IdCount ++ } );

this.uuid = _Math.generateUUID();

Expand Down Expand Up @@ -1216,8 +1216,7 @@ Object.assign( Geometry.prototype, EventDispatcher.prototype, {

} );

var count = 0;
function GeometryIdCount() { return count++; };
Geometry.IdCount = 0;


export { GeometryIdCount, Geometry };
export { Geometry };
7 changes: 3 additions & 4 deletions src/core/Object3D.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { _Math } from '../math/Math';

function Object3D() {

Object.defineProperty( this, 'id', { value: Object3DIdCount() } );
Object.defineProperty( this, 'id', { value: Object3D.IdCount ++ } );

this.uuid = _Math.generateUUID();

Expand Down Expand Up @@ -724,8 +724,7 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {

} );

var count = 0;
function Object3DIdCount() { return count++; };
Object3D.IdCount = 0;


export { Object3DIdCount, Object3D };
export { Object3D };
7 changes: 3 additions & 4 deletions src/materials/Material.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { _Math } from '../math/Math';

function Material() {

Object.defineProperty( this, 'id', { value: MaterialIdCount() } );
Object.defineProperty( this, 'id', { value: Material.IdCount ++ } );

this.uuid = _Math.generateUUID();

Expand Down Expand Up @@ -338,8 +338,7 @@ Material.prototype = {

Object.assign( Material.prototype, EventDispatcher.prototype );

var count = 0;
function MaterialIdCount() { return count++; };
Material.IdCount = 0;


export { MaterialIdCount, Material };
export { Material };
7 changes: 3 additions & 4 deletions src/textures/Texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Vector2 } from '../math/Vector2';

function Texture( image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ) {

Object.defineProperty( this, 'id', { value: TextureIdCount() } );
Object.defineProperty( this, 'id', { value: Texture.IdCount ++ } );

this.uuid = _Math.generateUUID();

Expand Down Expand Up @@ -286,8 +286,7 @@ Texture.prototype = {

Object.assign( Texture.prototype, EventDispatcher.prototype );

var count = 0;
function TextureIdCount() { return count++; };
Texture.IdCount = 0;


export { TextureIdCount, Texture };
export { Texture };