Texture.js 371 B

12345678910111213141516171819202122
  1. import {getTransferedObjectUUID} from './classUtils';
  2. const name = 'WebGLTexture';
  3. function uuid(id) {
  4. return getTransferedObjectUUID(name, id);
  5. }
  6. export default class WebGLTexture {
  7. className = name;
  8. constructor(id, type) {
  9. this.id = id;
  10. this.type = type;
  11. }
  12. static uuid = uuid;
  13. uuid() {
  14. return uuid(this.id);
  15. }
  16. }