rawTexture2DArray.d.ts 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import { Texture } from "./texture";
  2. import "../../Engines/Extensions/engine.rawTexture";
  3. import type { Nullable } from "../../types";
  4. import type { Scene } from "../../scene";
  5. /**
  6. * Class used to store 2D array textures containing user data
  7. */
  8. export declare class RawTexture2DArray extends Texture {
  9. /** Gets or sets the texture format to use */
  10. format: number;
  11. private _depth;
  12. /**
  13. * Gets the number of layers of the texture
  14. */
  15. get depth(): number;
  16. /**
  17. * Create a new RawTexture2DArray
  18. * @param data defines the data of the texture
  19. * @param width defines the width of the texture
  20. * @param height defines the height of the texture
  21. * @param depth defines the number of layers of the texture
  22. * @param format defines the texture format to use
  23. * @param scene defines the hosting scene
  24. * @param generateMipMaps defines a boolean indicating if mip levels should be generated (true by default)
  25. * @param invertY defines if texture must be stored with Y axis inverted
  26. * @param samplingMode defines the sampling mode to use (Texture.TRILINEAR_SAMPLINGMODE by default)
  27. * @param textureType defines the texture Type (Engine.TEXTURETYPE_UNSIGNED_INT, Engine.TEXTURETYPE_FLOAT...)
  28. * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
  29. */
  30. constructor(data: Nullable<ArrayBufferView>, width: number, height: number, depth: number,
  31. /** Gets or sets the texture format to use */
  32. format: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number, textureType?: number, creationFlags?: number);
  33. /**
  34. * Update the texture with new data
  35. * @param data defines the data to store in the texture
  36. */
  37. update(data: ArrayBufferView): void;
  38. /**
  39. * Creates a RGBA texture from some data.
  40. * @param data Define the texture data
  41. * @param width Define the width of the texture
  42. * @param height Define the height of the texture
  43. * @param depth defines the number of layers of the texture
  44. * @param scene defines the scene the texture will belong to
  45. * @param generateMipMaps Define whether or not to create mip maps for the texture
  46. * @param invertY define if the data should be flipped on Y when uploaded to the GPU
  47. * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
  48. * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
  49. * @returns the RGBA texture
  50. */
  51. static CreateRGBATexture(data: ArrayBufferView, width: number, height: number, depth: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number, type?: number): RawTexture2DArray;
  52. }