Skip to content

Commit

Permalink
Source: Added id.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed May 8, 2023
1 parent 0a006e1 commit e296032
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/textures/Source.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit e296032

Please sign in to comment.