uniqueIdGenerator.ts 381 B

12345678910111213141516
  1. /**
  2. * Helper class used to generate session unique ID
  3. */
  4. export class UniqueIdGenerator {
  5. // Statics
  6. private static _UniqueIdCounter = 0;
  7. /**
  8. * Gets an unique (relatively to the current scene) Id
  9. */
  10. public static get UniqueId() {
  11. var result = this._UniqueIdCounter;
  12. this._UniqueIdCounter++;
  13. return result;
  14. }
  15. }