Preparing search index...
The search index is not available
webgpu-kit
webgpu-kit
Core
Texture
Class Texture
A GPU texture object that can be used in a
BindGroup
.
Hierarchy
components
Texture
Index
Constructors
constructor
Properties
_device?
binding
canvas?
canvas
Format
context?
cpu
Buffer?
gpu
Texture?
label?
texture
Format
texture
Height
texture
Usage
texture
Width
visibility
Methods
_create
Texture
generate
Mip
Maps
get
Device
set
Canvas
set
Cpu
Buffer
set
Device
set
From
Data
set
From
Image
set
Label
set
Texture
Format
set
Texture
Size
set
Texture
Usage
update
Texture
Constructors
constructor
new
Texture
(
options
)
:
Texture
Parameters
options
:
TextureOptions
Returns
Texture
Properties
Optional
_device
_device
?:
GPUDevice
Readonly
binding
binding
:
number
Optional
canvas
canvas
?:
HTMLCanvasElement
canvas
Format
canvas
Format
:
GPUTextureFormat
= ...
Optional
context
context
?:
GPUCanvasContext
Optional
cpu
Buffer
cpu
Buffer
?:
Uint8ClampedArray & ArrayType
Optional
gpu
Texture
gpu
Texture
?:
GPUTexture
Optional
label
label
?:
string
texture
Format
texture
Format
:
GPUTextureFormat
= "rgba8unorm"
texture
Height
texture
Height
:
number
= 1
texture
Usage
texture
Usage
:
number
= ...
texture
Width
texture
Width
:
number
= 1
Readonly
visibility
visibility
:
number
Methods
_create
Texture
_create
Texture
(
replace
?
)
:
Promise
<
void
>
Parameters
replace
:
boolean
= false
Returns
Promise
<
void
>
generate
Mip
Maps
generate
Mip
Maps
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
get
Device
get
Device
(
)
:
Promise
<
GPUDevice
>
Returns
Promise
<
GPUDevice
>
set
Canvas
set
Canvas
(
canvas
)
:
void
Parameters
canvas
:
HTMLCanvasElement
Returns
void
set
Cpu
Buffer
set
Cpu
Buffer
(
buffer
)
:
void
Parameters
buffer
:
Uint8ClampedArray
Returns
void
set
Cpu
Buffer
(
buffer
)
:
void
Parameters
buffer
:
ArrayType
Returns
void
set
Device
set
Device
(
d
)
:
void
Parameters
d
:
GPUDevice
Returns
void
set
From
Data
set
From
Data
(
data
)
:
Promise
<
void
>
Parameters
data
:
ArrayType
Returns
Promise
<
void
>
set
From
Image
set
From
Image
(
image
)
:
Promise
<
void
>
Parameters
image
:
string
|
HTMLImageElement
Returns
Promise
<
void
>
set
Label
set
Label
(
label
)
:
void
Parameters
label
:
string
Returns
void
set
Texture
Format
set
Texture
Format
(
format
)
:
void
Parameters
format
:
GPUTextureFormat
Returns
void
set
Texture
Size
set
Texture
Size
(
width
,
height
)
:
void
Parameters
width
:
number
height
:
number
Returns
void
set
Texture
Usage
set
Texture
Usage
(
usage
)
:
void
Parameters
usage
:
number
Returns
void
update
Texture
update
Texture
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
constructor
_device
binding
canvas
canvas
Format
context
cpu
Buffer
gpu
Texture
label
texture
Format
texture
Height
texture
Usage
texture
Width
visibility
_create
Texture
generate
Mip
Maps
get
Device
set
Canvas
set
Cpu
Buffer
set
Device
set
From
Data
set
From
Image
set
Label
set
Texture
Format
set
Texture
Size
set
Texture
Usage
update
Texture
webgpu-kit
Core
Shaders
Generated using
TypeDoc
A GPU texture object that can be used in a BindGroup.