Browse Source

Source: Added id.

Mr.doob 2 years ago
parent
commit
e296032db5
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/textures/Source.js

+ 4 - 0
src/textures/Source.js

@@ -1,12 +1,16 @@
 import { ImageUtils } from '../extras/ImageUtils.js';
 import * as MathUtils from '../math/MathUtils.js';
 
+let sourceId = 0;
+
 class Source {
 
 	constructor( data = null ) {
 
 		this.isSource = true;
 
+		Object.defineProperty( this, 'id', { value: sourceId ++ } );
+
 		this.uuid = MathUtils.generateUUID();
 
 		this.data = data;