interface ITextureContext { needBitmap: boolean; bindoutScreenTarget(): void; bindRenderTarget( renderTarget: InternalRenderTarget, faceIndex?: number, ): void; createRenderTargetCubeInternal( size: number, colorFormat: RenderTargetFormat, depthStencilFormat: RenderTargetFormat, generateMipmap: boolean, sRGB: boolean, multiSamples: number, ): InternalRenderTarget; createRenderTargetDepthTexture( renderTarget: InternalRenderTarget, dimension: TextureDimension, width: number, height: number, ): InternalTexture; createRenderTargetInternal( width: number, height: number, format: RenderTargetFormat, depthStencilFormat: RenderTargetFormat, generateMipmap: boolean, sRGB: boolean, multiSamples: number, ): InternalRenderTarget; createTexture3DInternal( dimension: TextureDimension, width: number, height: number, depth: number, format: TextureFormat, generateMipmap: boolean, sRGB: boolean, premultipliedAlpha: boolean, ): InternalTexture; createTextureInternal( dimension: TextureDimension, width: number, height: number, format: TextureFormat, generateMipmap: boolean, sRGB: boolean, premultipliedAlpha: boolean, ): InternalTexture; initVideoTextureData(texture: InternalTexture): void; readRenderTargetPixelData( renderTarget: InternalRenderTarget, xOffset: number, yOffset: number, width: number, height: number, out: ArrayBufferView, ): ArrayBufferView; readRenderTargetPixelDataAsync( renderTarget: InternalRenderTarget, xOffset: number, yOffset: number, width: number, height: number, out: ArrayBufferView, ): Promise<ArrayBufferView>; setCubeDDSData(texture: InternalTexture, ddsInfo: DDSTextureInfo): void; setCubeImageData( texture: InternalTexture, sources: (
HTMLImageElement | HTMLCanvasElement | ImageBitmap)
[], premultiplyAlpha: boolean, invertY: boolean, ): void; setCubeKTXData(texture: InternalTexture, ktxInfo: KTXTextureInfo): void; setCubePixelsData( texture: InternalTexture, source: ArrayBufferView[], premultiplyAlpha: boolean, invertY: boolean, ): void; setCubeSubPixelData( texture: InternalTexture, source: ArrayBufferView[], mipmapLevel: number, generateMipmap: boolean, xOffset: number, yOffset: number, width: number, height: number, premultiplyAlpha: boolean, invertY: boolean, ): void; setTexture3DImageData( texture: InternalTexture, source: HTMLImageElement[] | HTMLCanvasElement[] | ImageBitmap[], depth: number, premultiplyAlpha: boolean, invertY: boolean, ): void; setTexture3DPixelsData( texture: InternalTexture, source: ArrayBufferView, depth: number, premultiplyAlpha: boolean, invertY: boolean, ): void; setTexture3DSubPixelsData( texture: InternalTexture, source: ArrayBufferView, mipmapLevel: number, generateMipmap: boolean, xOffset: number, yOffset: number, zOffset: number, width: number, height: number, depth: number, premultiplyAlpha: boolean, invertY: boolean, ): void; setTextureCompareMode( texture: InternalTexture, compareMode: TextureCompareMode, ): TextureCompareMode; setTextureDDSData(texture: InternalTexture, ddsInfo: DDSTextureInfo): void; setTextureHDRData(texture: InternalTexture, hdrInfo: HDRTextureInfo): void; setTextureImageData( texture: InternalTexture, source: HTMLImageElement | HTMLCanvasElement | ImageBitmap, premultiplyAlpha: boolean, invertY: boolean, ): void; setTextureKTXData(texture: InternalTexture, ktxInfo: KTXTextureInfo): void; setTexturePixelsData( texture: InternalTexture, source: ArrayBufferView, premultiplyAlpha: boolean, invertY: boolean, ): void; setTextureSubImageData( texture: InternalTexture, source: HTMLImageElement | HTMLCanvasElement | ImageBitmap, x: number, y: number, premultiplyAlpha: boolean, invertY: boolean, ): void; setTextureSubPixelsData( texture: InternalTexture, source: ArrayBufferView, mipmapLevel: number, generateMipmap: boolean, xOffset: number, yOffset: number, width: number, height: number, premultiplyAlpha: boolean, invertY: boolean, ): void; unbindRenderTarget(renderTarget: InternalRenderTarget): void; updateVideoTexture( texture: InternalTexture, video: HTMLVideoElement, premultiplyAlpha: boolean, invertY: boolean, ): void;} 属性
needBitmap
needBitmap: boolean
方法
bindoutScreenTarget
bindoutScreenTarget(): void
createRenderTargetCubeInternal
createRenderTargetDepthTexture
createRenderTargetInternal
createTexture3DInternal
参数
- dimension: TextureDimension
- width: number
- height: number
- depth: number
- format: TextureFormat
- generateMipmap: boolean
- sRGB: boolean
- premultipliedAlpha: boolean
readRenderTargetPixelData
readRenderTargetPixelData( renderTarget: InternalRenderTarget, xOffset: number, yOffset: number, width: number, height: number, out: ArrayBufferView,): ArrayBufferView 参数
- renderTarget: InternalRenderTarget
- xOffset: number
- yOffset: number
- width: number
- height: number
- out: ArrayBufferView
返回 ArrayBufferView
readRenderTargetPixelDataAsync
readRenderTargetPixelDataAsync( renderTarget: InternalRenderTarget, xOffset: number, yOffset: number, width: number, height: number, out: ArrayBufferView,): Promise<ArrayBufferView> 参数
- renderTarget: InternalRenderTarget
- xOffset: number
- yOffset: number
- width: number
- height: number
- out: ArrayBufferView
返回 Promise<ArrayBufferView>
setCubeImageData
setCubeImageData( texture: InternalTexture, sources: (
HTMLImageElement | HTMLCanvasElement | ImageBitmap)
[], premultiplyAlpha: boolean, invertY: boolean,): void 参数
- texture: InternalTexture
- sources: (HTMLImageElement | HTMLCanvasElement | ImageBitmap)[]
- premultiplyAlpha: boolean
- invertY: boolean
返回 void
setCubePixelsData
setCubePixelsData( texture: InternalTexture, source: ArrayBufferView[], premultiplyAlpha: boolean, invertY: boolean,): void 参数
- texture: InternalTexture
- source: ArrayBufferView[]
- premultiplyAlpha: boolean
- invertY: boolean
返回 void
setCubeSubPixelData
setCubeSubPixelData( texture: InternalTexture, source: ArrayBufferView[], mipmapLevel: number, generateMipmap: boolean, xOffset: number, yOffset: number, width: number, height: number, premultiplyAlpha: boolean, invertY: boolean,): void 参数
- texture: InternalTexture
- source: ArrayBufferView[]
- mipmapLevel: number
- generateMipmap: boolean
- xOffset: number
- yOffset: number
- width: number
- height: number
- premultiplyAlpha: boolean
- invertY: boolean
返回 void
setTexture3DImageData
setTexture3DImageData( texture: InternalTexture, source: HTMLImageElement[] | HTMLCanvasElement[] | ImageBitmap[], depth: number, premultiplyAlpha: boolean, invertY: boolean,): void 参数
- texture: InternalTexture
- source: HTMLImageElement[] | HTMLCanvasElement[] | ImageBitmap[]
- depth: number
- premultiplyAlpha: boolean
- invertY: boolean
返回 void
setTexture3DPixelsData
setTexture3DPixelsData( texture: InternalTexture, source: ArrayBufferView, depth: number, premultiplyAlpha: boolean, invertY: boolean,): void 参数
- texture: InternalTexture
- source: ArrayBufferView
- depth: number
- premultiplyAlpha: boolean
- invertY: boolean
返回 void
setTexture3DSubPixelsData
setTexture3DSubPixelsData( texture: InternalTexture, source: ArrayBufferView, mipmapLevel: number, generateMipmap: boolean, xOffset: number, yOffset: number, zOffset: number, width: number, height: number, depth: number, premultiplyAlpha: boolean, invertY: boolean,): void 参数
- texture: InternalTexture
- source: ArrayBufferView
- mipmapLevel: number
- generateMipmap: boolean
- xOffset: number
- yOffset: number
- zOffset: number
- width: number
- height: number
- depth: number
- premultiplyAlpha: boolean
- invertY: boolean
返回 void
setTextureImageData
setTextureImageData( texture: InternalTexture, source: HTMLImageElement | HTMLCanvasElement | ImageBitmap, premultiplyAlpha: boolean, invertY: boolean,): void 参数
- texture: InternalTexture
- source: HTMLImageElement | HTMLCanvasElement | ImageBitmap
- premultiplyAlpha: boolean
- invertY: boolean
返回 void
setTexturePixelsData
setTexturePixelsData( texture: InternalTexture, source: ArrayBufferView, premultiplyAlpha: boolean, invertY: boolean,): void 参数
- texture: InternalTexture
- source: ArrayBufferView
- premultiplyAlpha: boolean
- invertY: boolean
返回 void
setTextureSubImageData
setTextureSubImageData( texture: InternalTexture, source: HTMLImageElement | HTMLCanvasElement | ImageBitmap, x: number, y: number, premultiplyAlpha: boolean, invertY: boolean,): void 参数
- texture: InternalTexture
- source: HTMLImageElement | HTMLCanvasElement | ImageBitmap
- x: number
- y: number
- premultiplyAlpha: boolean
- invertY: boolean
返回 void
setTextureSubPixelsData
setTextureSubPixelsData( texture: InternalTexture, source: ArrayBufferView, mipmapLevel: number, generateMipmap: boolean, xOffset: number, yOffset: number, width: number, height: number, premultiplyAlpha: boolean, invertY: boolean,): void 参数
- texture: InternalTexture
- source: ArrayBufferView
- mipmapLevel: number
- generateMipmap: boolean
- xOffset: number
- yOffset: number
- width: number
- height: number
- premultiplyAlpha: boolean
- invertY: boolean
返回 void
updateVideoTexture
updateVideoTexture( texture: InternalTexture, video: HTMLVideoElement, premultiplyAlpha: boolean, invertY: boolean,): void 参数
- texture: InternalTexture
- video: HTMLVideoElement
- premultiplyAlpha: boolean
- invertY: boolean
返回 void
为 Texture 创建 InternalTexture