externalTexture.d.ts 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import { InternalTexture } from "./internalTexture";
  2. /**
  3. * Class used to store an external texture (like GPUExternalTexture in WebGPU)
  4. */
  5. export declare class ExternalTexture {
  6. /**
  7. * Checks if a texture is an external or internal texture
  8. * @param texture the external or internal texture
  9. * @returns true if the texture is an external texture, else false
  10. */
  11. static IsExternalTexture(texture: ExternalTexture | InternalTexture): texture is ExternalTexture;
  12. private _video;
  13. /**
  14. * Get the class name of the texture.
  15. * @returns "ExternalTexture"
  16. */
  17. getClassName(): string;
  18. /**
  19. * Gets the underlying texture object
  20. */
  21. get underlyingResource(): any;
  22. /**
  23. * Gets a boolean indicating if the texture uses mipmaps
  24. */
  25. useMipMaps: boolean;
  26. /**
  27. * The type of the underlying texture is implementation dependent, so return "UNDEFINED" for the type
  28. */
  29. readonly type = 16;
  30. /**
  31. * The format of the underlying texture is implementation dependent, so return "UNDEFINED" for the format
  32. */
  33. readonly format = 4294967295;
  34. /**
  35. * Gets the unique id of this texture
  36. */
  37. readonly uniqueId: number;
  38. /**
  39. * Constructs the texture
  40. * @param video The video the texture should be wrapped around
  41. */
  42. constructor(video: HTMLVideoElement);
  43. /**
  44. * Get if the texture is ready to be used (downloaded, converted, mip mapped...).
  45. * @returns true if fully ready
  46. */
  47. isReady(): boolean;
  48. /**
  49. * Dispose the texture and release its associated resources.
  50. */
  51. dispose(): void;
  52. }