Class: SolidColorSky
Defined in: src/textures/SolidColorSky.ts:12
create a cube texture, which filled by solid color.
Extends
Constructors
Constructor
new SolidColorSky(
color,ctx?):SolidColorSky
Defined in: src/textures/SolidColorSky.ts:23
create a cube texture, which filled by solid color.
Parameters
color
solid color
ctx?
Returns
SolidColorSky
Overrides
Properties
_boundCtx
_boundCtx:
Context3D=null
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:19
The Context3D this texture is bound to. Set on first GPU use.
Inherited from
name
name:
string
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:39
name of texture
Inherited from
url
url:
string
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:44
source url
Inherited from
pid
pid:
number
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:94
Return index in texture array
Inherited from
format
format:
GPUTextureFormat
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:153
GPUTextureFormat
Inherited from
usage
usage:
number
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:158
GPUTextureUsage
Inherited from
numberLayer
numberLayer:
number=1
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:178
depth or layers, default value is 1
Inherited from
viewDescriptor
viewDescriptor:
GPUTextureViewDescriptor
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:183
GPUTextureViewDescriptor
Inherited from
textureDescriptor
textureDescriptor:
GPUTextureDescriptor
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:188
GPUTextureDescriptor
Inherited from
LDRTextureCube.textureDescriptor
sampler_comparisonBindingLayout
sampler_comparisonBindingLayout:
GPUSamplerBindingLayout
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:214
GPUSamplerBindingLayout
Inherited from
LDRTextureCube.sampler_comparisonBindingLayout
flipY
flipY:
boolean
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:221
whether to flip the image on the y-axis
Inherited from
isVideoTexture?
optionalisVideoTexture?:boolean
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:226
whether is video texture
Inherited from
isHDRTexture?
optionalisHDRTexture?:boolean
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:230
whether this texture holds HDR (high dynamic range) image data
Inherited from
mipmapCount
mipmapCount:
number=1
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:297
mipmap Count, default value is 1
Inherited from
width
width:
number=4
Defined in: src/gfx/graphics/webGpu/core/texture/TextureCube.ts:11
texture width, default value is 4
Inherited from
height
height:
number=4
Defined in: src/gfx/graphics/webGpu/core/texture/TextureCube.ts:15
texture height, default value is 4
Inherited from
depthOrArrayLayers
depthOrArrayLayers:
number=6
Defined in: src/gfx/graphics/webGpu/core/texture/TextureCube.ts:19
depth or array layers, default value is 6
Inherited from
LDRTextureCube.depthOrArrayLayers
visibility
visibility:
number=GPUShaderStage.FRAGMENT
Defined in: src/gfx/graphics/webGpu/core/texture/TextureCube.ts:24
GPUShaderStage
Inherited from
textureBindingLayout
textureBindingLayout:
GPUTextureBindingLayout
Defined in: src/gfx/graphics/webGpu/core/texture/TextureCube.ts:29
GPUTextureBindingLayout
Inherited from
LDRTextureCube.textureBindingLayout
samplerBindingLayout
samplerBindingLayout:
GPUSamplerBindingLayout
Defined in: src/gfx/graphics/webGpu/core/texture/TextureCube.ts:37
GPUSamplerBindingLayout
Inherited from
LDRTextureCube.samplerBindingLayout
Accessors
view
Get Signature
get view():
GPUTextureView|GPUExternalTexture
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:101
Returns
GPUTextureView | GPUExternalTexture
Set Signature
set view(
v):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:111
Parameters
v
GPUTextureView | GPUExternalTexture
Returns
void
Inherited from
gpuSampler
Get Signature
get gpuSampler():
GPUSampler
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:120
Returns
GPUSampler
Set Signature
set gpuSampler(
v):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:127
Parameters
v
GPUSampler
Returns
void
Inherited from
gpuSampler_comparison
Get Signature
get gpuSampler_comparison():
GPUSampler
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:136
Returns
GPUSampler
Set Signature
set gpuSampler_comparison(
v):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:146
Parameters
v
GPUSampler
Returns
void
Inherited from
LDRTextureCube.gpuSampler_comparison
useMipmap
Get Signature
get useMipmap():
boolean
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:469
enable/disable mipmap
Returns
boolean
Set Signature
set useMipmap(
value):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:476
get mipmap
Parameters
value
boolean
Returns
void
Inherited from
sourceImageData
Get Signature
get sourceImageData():
HTMLCanvasElement|ImageBitmap|OffscreenCanvas
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:507
the cached CPU source image used to (re)upload the GPU texture
Returns
HTMLCanvasElement | ImageBitmap | OffscreenCanvas
Inherited from
LDRTextureCube.sourceImageData
addressModeU
Get Signature
get addressModeU():
GPUAddressMode
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:621
Sampler address mode for the U (width) texture coordinate.
Returns
GPUAddressMode
Set Signature
set addressModeU(
value):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:625
Parameters
value
GPUAddressMode
Returns
void
Inherited from
addressModeV
Get Signature
get addressModeV():
GPUAddressMode
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:635
Sampler address mode for the V (height) texture coordinate.
Returns
GPUAddressMode
Set Signature
set addressModeV(
value):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:639
Parameters
value
GPUAddressMode
Returns
void
Inherited from
addressModeW
Get Signature
get addressModeW():
GPUAddressMode
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:649
Sampler address mode for the W (depth) texture coordinate.
Returns
GPUAddressMode
Set Signature
set addressModeW(
value):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:653
Specifies the GPUAddressMode | address modes for the texture width, height, and depth coordinates, respectively.
Parameters
value
GPUAddressMode
Returns
void
Inherited from
magFilter
Get Signature
get magFilter():
GPUFilterMode
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:664
Sampling filter used when the sample footprint is smaller than or equal to one texel (magnification).
Returns
GPUFilterMode
Set Signature
set magFilter(
value):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:668
Specifies the sampling behavior when the sampled area is smaller than or equal to one texel.
Parameters
value
GPUFilterMode
Returns
void
Inherited from
minFilter
Get Signature
get minFilter():
GPUFilterMode
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:679
Sampling filter used when the sample footprint is larger than one texel (minification).
Returns
GPUFilterMode
Set Signature
set minFilter(
value):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:683
Specifies the sampling behavior when the sampled area is larger than one texel.
Parameters
value
GPUFilterMode
Returns
void
Inherited from
mipmapFilter
Get Signature
get mipmapFilter():
GPUMipmapFilterMode
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:693
Filter used when sampling between mipmap levels.
Returns
GPUMipmapFilterMode
Set Signature
set mipmapFilter(
value):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:697
Specifies behavior for sampling between mipmap levels.
Parameters
value
GPUMipmapFilterMode
Returns
void
Inherited from
lodMinClamp
Get Signature
get lodMinClamp():
number
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:707
Minimum level-of-detail clamp used internally when sampling.
Returns
number
Set Signature
set lodMinClamp(
value):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:711
Parameters
value
number
Returns
void
Inherited from
lodMaxClamp
Get Signature
get lodMaxClamp():
number
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:721
Maximum level-of-detail clamp used internally when sampling.
Returns
number
Set Signature
set lodMaxClamp(
value):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:725
Specifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture.
Parameters
value
number
Returns
void
Inherited from
compare
Get Signature
get compare():
GPUCompareFunction
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:735
Comparison function; when set the sampler becomes a comparison sampler.
Returns
GPUCompareFunction
Set Signature
set compare(
value):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:739
When provided the sampler will be a comparison sampler with the specified GPUCompareFunction. Note: Comparison samplers may use filtering, but the sampling results will be implementation-dependent and may differ from the normal filtering rules.
Parameters
value
GPUCompareFunction
Returns
void
Inherited from
maxAnisotropy
Get Signature
get maxAnisotropy():
number
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:749
Maximum anisotropy clamp used by the sampler.
Returns
number
Set Signature
set maxAnisotropy(
value):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:753
Specifies the maximum anisotropy value clamp used by the sampler. Anisotropic filtering is enabled when GPUSamplerDescriptor#maxAnisotropy is > 1 and the implementation supports it. Anisotropic filtering improves the image quality of textures sampled at oblique viewing angles. Higher GPUSamplerDescriptor#maxAnisotropy values indicate the maximum ratio of anisotropy supported when filtering.
Parameters
value
number
Returns
void
Inherited from
ldrImageUrl
Get Signature
get ldrImageUrl():
string
Defined in: src/textures/LDRTextureCube.ts:21
constructor: create a cube texture, it's low dynamic range texture
Returns
string
Inherited from
color
Get Signature
get color():
Color
Defined in: src/textures/SolidColorSky.ts:43
Returns
Set Signature
set color(
value):void
Defined in: src/textures/SolidColorSky.ts:52
change solid color
Parameters
value
target color
Returns
void
Methods
_ensureBound()
_ensureBound(
ctx?):Context3D
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:28
Ensure this texture is bound to a Context3D and return it. Resolution order: explicit arg, prior bindCtx(), then the single-engine default (same contract as Engine3D._defaultContext() for no-arg material constructors). Throws only when the choice is ambiguous — no engine yet, or several engines alive without an explicit ctx.
Parameters
ctx?
Returns
Inherited from
init()
init():
this
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:327
Run the optional internal create hooks (binding layout, texture, view, sampler) if a subclass provides them.
Returns
this
this texture, for chaining
Inherited from
getMipmapCount()
getMipmapCount():
number
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:515
Compute the full mipmap chain length for the current texture size.
Returns
number
number of mip levels
Inherited from
getGPUTexture()
getGPUTexture():
GPUTexture
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:553
create or get GPUTexture (delegates to the per-context gpuTexture getter, which handles lazy creation + source-image upload).
Returns
GPUTexture
Inherited from
getGPUView()
getGPUView(
_index?):GPUTextureView|GPUExternalTexture
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:561
create or get GPUTextureView (delegates to the per-context view getter, which handles lazy creation from viewDescriptor).
Parameters
_index?
number = 0
Returns
GPUTextureView | GPUExternalTexture
Inherited from
bindStateChange()
bindStateChange(
fun,ref):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:573
Register a callback invoked when this texture's GPU resources change.
Parameters
fun
Function
callback to invoke on change
ref
any
owner reference used as the key for later unbinding
Returns
void
Inherited from
LDRTextureCube.bindStateChange
unBindStateChange()
unBindStateChange(
ref):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:581
Remove a previously registered state-change callback.
Parameters
ref
any
owner reference used when binding the callback
Returns
void
Inherited from
LDRTextureCube.unBindStateChange
destroy()
destroy(
force?):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:602
release the materialized texture and all GPU slots
Parameters
force?
boolean
Returns
void
Inherited from
delayDestroyTexture()
staticdelayDestroyTexture(ctx,tex):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:773
Queue a GPU texture for deferred destruction on the given context.
Parameters
ctx
the owning context
tex
GPUTexture
the GPU texture to destroy later
Returns
void
Inherited from
LDRTextureCube.delayDestroyTexture
destroyTexture()
staticdestroyTexture(ctx):void
Defined in: src/gfx/graphics/webGpu/core/texture/Texture.ts:784
Destroy all GPU textures queued for deferred destruction on the context.
Parameters
ctx
the context whose queued textures are destroyed
Returns
void
Inherited from
load()
load(
url,loaderFunctions?,ctx?):Promise<LDRTextureCube>
Defined in: src/textures/LDRTextureCube.ts:37
load texture data from web url, which is a 360 panorama image
Parameters
url
string
web url
loaderFunctions?
callback function when load complete
ctx?
Returns
Promise<LDRTextureCube>
Inherited from
createFromTexture()
createFromTexture(
size,texture,ctx?):this
Defined in: src/textures/LDRTextureCube.ts:66
create cube texture by environment image
Parameters
size
number
size of cube texture
texture
source texture
ctx?
Returns
this

