@feng3d/render-api - v0.0.13
Preparing search index...
Texture
Class Texture
Index
Constructors
constructor
Properties
descriptor
sources?
write
Textures?
Methods
get
Texture
Bytes
Per
Pixel
get
Texture
Data
Constructor
Constructors
constructor
new
Texture
()
:
Texture
Returns
Texture
Properties
Readonly
descriptor
descriptor
:
TextureDescriptor
纹理描述。
注:修改后将重新创建纹理。
Optional
Readonly
sources
sources
?:
readonly
TextureSource
[]
初始化纹理资源。
See
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texImage2D
https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/texImage3D
WebGPU
GPUQueue.copyExternalImageToTexture
GPUQueue.writeTexture
注:修改后将重新创建纹理。
Optional
Readonly
write
Textures
writeTextures
?:
readonly
TextureSource
[]
写入纹理资源。
See
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texSubImage2D
https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/texSubImage3D
WebGPU
GPUQueue.copyExternalImageToTexture
GPUQueue.writeTexture
Methods
Static
get
Texture
Bytes
Per
Pixel
getTextureBytesPerPixel
(
format
?:
TextureFormat
)
:
number
获取纹理每个像素占用的字节数量。
Parameters
format
:
TextureFormat
= 'rgba8unorm'
纹理格式。
Returns
number
Static
get
Texture
Data
Constructor
getTextureDataConstructor
(
format
?:
TextureFormat
,
)
:
|
Uint8ArrayConstructor
|
Int8ArrayConstructor
|
Int16ArrayConstructor
|
Uint16ArrayConstructor
|
Int32ArrayConstructor
|
Uint32ArrayConstructor
|
Float32ArrayConstructor
获取纹理数据构造函数。
Parameters
format
:
TextureFormat
= 'rgba8unorm'
纹理格式。
Returns
|
Uint8ArrayConstructor
|
Int8ArrayConstructor
|
Int16ArrayConstructor
|
Uint16ArrayConstructor
|
Int32ArrayConstructor
|
Uint32ArrayConstructor
|
Float32ArrayConstructor
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
descriptor
sources
Web
GPU
write
Textures
Web
GPU
Methods
get
Texture
Bytes
Per
Pixel
get
Texture
Data
Constructor
@feng3d/render-api - v0.0.13
Loading...
纹理描述。
注:修改后将重新创建纹理。