Class: HDRTextureCube
HDR TextureCube
Hierarchy
TextureCube
↳
HDRTextureCube
Constructors
Properties
- name
- url
- pid
- view
- gpuSampler
- gpuSampler_comparison
- format
- usage
- numberLayer
- viewDescriptor
- textureDescriptor
- sampler_comparisonBindingLayout
- flipY
- isVideoTexture
- isHDRTexture
- mipmapCount
- width
- height
- depthOrArrayLayers
- visibility
- textureBindingLayout
- samplerBindingLayout
Accessors
- useMipmap
- sourceImageData
- addressModeU
- addressModeV
- addressModeW
- magFilter
- minFilter
- mipmapFilter
- lodMinClamp
- lodMaxClamp
- compare
- maxAnisotropy
Methods
- init
- getMipmapCount
- getGPUTexture
- getGPUView
- bindStateChange
- unBindStateChange
- destroy
- delayDestroyTexture
- destroyTexture
- createFromHDRData
- createFromTexture
- load
Constructors
constructor
• new HDRTextureCube(): HDRTextureCube
create a cube texture, it's high dynamic range texture
Returns
Overrides
TextureCube.constructor
Defined in
src/textures/HDRTextureCube.ts:23
Properties
name
• name: string
name of texture
Inherited from
TextureCube.name
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:15
url
• url: string
source url
Inherited from
TextureCube.url
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:20
pid
• pid: number
Return index in texture array
Inherited from
TextureCube.pid
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:30
view
• view: GPUTextureView
| GPUExternalTexture
GPUTextureView
Inherited from
TextureCube.view
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:35
gpuSampler
• gpuSampler: GPUSampler
GPUSampler
Inherited from
TextureCube.gpuSampler
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:40
gpuSampler_comparison
• gpuSampler_comparison: GPUSampler
GPUSampler for comparison
Inherited from
TextureCube.gpuSampler_comparison
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:45
format
• format: GPUTextureFormat
GPUTextureFormat
Inherited from
TextureCube.format
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:50
usage
• usage: number
GPUTextureUsage
Inherited from
TextureCube.usage
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:55
numberLayer
• numberLayer: number
= 1
depth or layers, default value is 1
Inherited from
TextureCube.numberLayer
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:75
viewDescriptor
• viewDescriptor: GPUTextureViewDescriptor
GPUTextureViewDescriptor
Inherited from
TextureCube.viewDescriptor
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:80
textureDescriptor
• textureDescriptor: GPUTextureDescriptor
GPUTextureDescriptor
Inherited from
TextureCube.textureDescriptor
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:85
sampler_comparisonBindingLayout
• sampler_comparisonBindingLayout: GPUSamplerBindingLayout
GPUSamplerBindingLayout
Inherited from
TextureCube.sampler_comparisonBindingLayout
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:111
flipY
• flipY: boolean
whether to flip the image on the y-axis
Inherited from
TextureCube.flipY
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:118
isVideoTexture
• Optional
isVideoTexture: boolean
whether is video texture
Inherited from
TextureCube.isVideoTexture
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:123
isHDRTexture
• Optional
isHDRTexture: boolean
Inherited from
TextureCube.isHDRTexture
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:124
mipmapCount
• mipmapCount: number
= 1
mipmap Count, default value is 1
Inherited from
TextureCube.mipmapCount
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:191
width
• width: number
= 4
texture width, default value is 4
Inherited from
TextureCube.width
Defined in
src/gfx/graphics/webGpu/core/texture/TextureCube.ts:12
height
• height: number
= 4
texture height, default value is 4
Inherited from
TextureCube.height
Defined in
src/gfx/graphics/webGpu/core/texture/TextureCube.ts:16
depthOrArrayLayers
• depthOrArrayLayers: number
= 6
depth or array layers, default value is 6
Inherited from
TextureCube.depthOrArrayLayers
Defined in
src/gfx/graphics/webGpu/core/texture/TextureCube.ts:20
visibility
• visibility: number
= GPUShaderStage.FRAGMENT
GPUShaderStage
Inherited from
TextureCube.visibility
Defined in
src/gfx/graphics/webGpu/core/texture/TextureCube.ts:25
textureBindingLayout
• textureBindingLayout: GPUTextureBindingLayout
GPUTextureBindingLayout
Inherited from
TextureCube.textureBindingLayout
Defined in
src/gfx/graphics/webGpu/core/texture/TextureCube.ts:30
samplerBindingLayout
• samplerBindingLayout: GPUSamplerBindingLayout
GPUSamplerBindingLayout
Inherited from
TextureCube.samplerBindingLayout
Defined in
src/gfx/graphics/webGpu/core/texture/TextureCube.ts:38
Accessors
useMipmap
• get
useMipmap(): boolean
enable/disable mipmap
Returns
boolean
Inherited from
TextureCube.useMipmap
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:315
• set
useMipmap(value
): void
get mipmap
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
TextureCube.useMipmap
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:322
sourceImageData
• get
sourceImageData(): HTMLCanvasElement
| ImageBitmap
| OffscreenCanvas
Returns
HTMLCanvasElement
| ImageBitmap
| OffscreenCanvas
Inherited from
TextureCube.sourceImageData
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:353
addressModeU
• get
addressModeU(): GPUAddressMode
Returns
GPUAddressMode
Inherited from
TextureCube.addressModeU
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:438
• set
addressModeU(value
): void
Parameters
Name | Type |
---|---|
value | GPUAddressMode |
Returns
void
Inherited from
TextureCube.addressModeU
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:442
addressModeV
• get
addressModeV(): GPUAddressMode
Returns
GPUAddressMode
Inherited from
TextureCube.addressModeV
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:449
• set
addressModeV(value
): void
Parameters
Name | Type |
---|---|
value | GPUAddressMode |
Returns
void
Inherited from
TextureCube.addressModeV
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:453
addressModeW
• get
addressModeW(): GPUAddressMode
Returns
GPUAddressMode
Inherited from
TextureCube.addressModeW
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:460
• set
addressModeW(value
): void
Parameters
Name | Type |
---|---|
value | GPUAddressMode |
Returns
void
Inherited from
TextureCube.addressModeW
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:464
magFilter
• get
magFilter(): GPUFilterMode
Returns
GPUFilterMode
Inherited from
TextureCube.magFilter
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:471
• set
magFilter(value
): void
Parameters
Name | Type |
---|---|
value | GPUFilterMode |
Returns
void
Inherited from
TextureCube.magFilter
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:475
minFilter
• get
minFilter(): GPUFilterMode
Returns
GPUFilterMode
Inherited from
TextureCube.minFilter
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:482
• set
minFilter(value
): void
Parameters
Name | Type |
---|---|
value | GPUFilterMode |
Returns
void
Inherited from
TextureCube.minFilter
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:486
mipmapFilter
• get
mipmapFilter(): GPUMipmapFilterMode
Returns
GPUMipmapFilterMode
Inherited from
TextureCube.mipmapFilter
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:493
• set
mipmapFilter(value
): void
Parameters
Name | Type |
---|---|
value | GPUMipmapFilterMode |
Returns
void
Inherited from
TextureCube.mipmapFilter
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:497
lodMinClamp
• get
lodMinClamp(): number
Returns
number
Inherited from
TextureCube.lodMinClamp
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:504
• set
lodMinClamp(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
TextureCube.lodMinClamp
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:508
lodMaxClamp
• get
lodMaxClamp(): number
Returns
number
Inherited from
TextureCube.lodMaxClamp
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:515
• set
lodMaxClamp(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
TextureCube.lodMaxClamp
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:519
compare
• get
compare(): GPUCompareFunction
Returns
GPUCompareFunction
Inherited from
TextureCube.compare
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:526
• set
compare(value
): void
Parameters
Name | Type |
---|---|
value | GPUCompareFunction |
Returns
void
Inherited from
TextureCube.compare
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:530
maxAnisotropy
• get
maxAnisotropy(): number
Returns
number
Inherited from
TextureCube.maxAnisotropy
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:537
• set
maxAnisotropy(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
TextureCube.maxAnisotropy
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:541
Methods
init
▸ init(): this
Returns
this
Inherited from
TextureCube.init
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:215
getMipmapCount
▸ getMipmapCount(): number
Returns
number
Inherited from
TextureCube.getMipmapCount
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:357
getGPUTexture
▸ getGPUTexture(): GPUTexture
create or get GPUTexture
Returns
GPUTexture
GPUTexture
Inherited from
TextureCube.getGPUTexture
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:384
getGPUView
▸ getGPUView(index?
): GPUTextureView
| GPUExternalTexture
create or get GPUTextureView
Parameters
Name | Type | Default value |
---|---|---|
index | number | 0 |
Returns
GPUTextureView
| GPUExternalTexture
GPUTextureView | GPUExternalTexture
Inherited from
TextureCube.getGPUView
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:395
bindStateChange
▸ bindStateChange(fun
, ref
): void
Parameters
Name | Type |
---|---|
fun | Function |
ref | any |
Returns
void
Inherited from
TextureCube.bindStateChange
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:408
unBindStateChange
▸ unBindStateChange(ref
): void
Parameters
Name | Type |
---|---|
ref | any |
Returns
void
Inherited from
TextureCube.unBindStateChange
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:412
destroy
▸ destroy(force?
): void
release the texture
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void
Inherited from
TextureCube.destroy
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:426
delayDestroyTexture
▸ delayDestroyTexture(tex
): void
Parameters
Name | Type |
---|---|
tex | GPUTexture |
Returns
void
Inherited from
TextureCube.delayDestroyTexture
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:549
destroyTexture
▸ destroyTexture(): void
Returns
void
Inherited from
TextureCube.destroyTexture
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:555
createFromHDRData
▸ createFromHDRData(size
, data
): this
fill this texture by array of numbers;the format as [red0, green0, blue0, alpha0, red1, green1, blue1, alpha1...]
Parameters
Name | Type | Description |
---|---|---|
size | number | assign the cube texture size |
data | Object | raw data of cubeTexture; the format is { width: number; height: number; array: Uint8Array } |
data.width | number | - |
data.height | number | - |
data.array | Uint8Array | - |
Returns
this
Defined in
src/textures/HDRTextureCube.ts:37
createFromTexture
▸ createFromTexture(size
, texture
): this
fill this texture by a texture2D, which is a 360 panorama image
Parameters
Name | Type | Description |
---|---|---|
size | number | assign the cube texture size |
texture | Texture | the image texture |
Returns
this
Defined in
src/textures/HDRTextureCube.ts:52
load
▸ load(url
, loaderFunctions?
): Promise
<HDRTextureCube
>
load texture data from web url, which is a 360 panorama image
Parameters
Name | Type | Description |
---|---|---|
url | string | web url |
loaderFunctions? | LoaderFunctions | callback function when load complete |
Returns
Promise
<HDRTextureCube
>