DataTexture.d.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import { Texture } from './Texture';
  2. import {
  3. Mapping,
  4. Wrapping,
  5. TextureFilter,
  6. PixelFormat,
  7. TextureDataType,
  8. TextureEncoding,
  9. } from '../constants';
  10. import { TypedArray } from '../polyfills';
  11. export class DataTexture extends Texture {
  12. /**
  13. * @param data
  14. * @param width
  15. * @param height
  16. * @param [format=THREE.RGBAFormat]
  17. * @param [type=THREE.UnsignedByteType]
  18. * @param [mapping=THREE.Texture.DEFAULT_MAPPING]
  19. * @param [wrapS=THREE.ClampToEdgeWrapping]
  20. * @param [wrapT=THREE.ClampToEdgeWrapping]
  21. * @param [magFilter=THREE.NearestFilter]
  22. * @param [minFilter=THREE.NearestFilter]
  23. * @param [anisotropy=1]
  24. * @param [encoding=THREE.LinearEncoding]
  25. */
  26. constructor(
  27. data: TypedArray,
  28. width: number,
  29. height: number,
  30. format?: PixelFormat,
  31. type?: TextureDataType,
  32. mapping?: Mapping,
  33. wrapS?: Wrapping,
  34. wrapT?: Wrapping,
  35. magFilter?: TextureFilter,
  36. minFilter?: TextureFilter,
  37. anisotropy?: number,
  38. encoding?: TextureEncoding
  39. );
  40. image: ImageData;
  41. /**
  42. * @default false
  43. */
  44. flipY: boolean;
  45. /**
  46. * @default false
  47. */
  48. generateMipmaps: boolean;
  49. /**
  50. * @default 1
  51. */
  52. unpackAlignment: number;
  53. /**
  54. * @default THREE.DepthFormat
  55. */
  56. format: PixelFormat;
  57. }
粤ICP备19079148号