Class: VideoTexture
Video Texture
Hierarchy
Texture
↳
VideoTexture
Properties
- media
- name
- url
- pid
- view
- gpuSampler
- gpuSampler_comparison
- format
- usage
- width
- height
- depthOrArrayLayers
- numberLayer
- viewDescriptor
- textureDescriptor
- visibility
- textureBindingLayout
- samplerBindingLayout
- sampler_comparisonBindingLayout
- flipY
- isVideoTexture
- mipmapCount
Constructors
Methods
Accessors
- useMipmap
- addressModeU
- addressModeV
- addressModeW
- magFilter
- minFilter
- mipmapFilter
- lodMinClamp
- lodMaxClamp
- compare
- maxAnisotropy
Properties
media
• media: HTMLVideoElement
Defined in
packages/media-extention/VideoTexture.ts:8
name
• name: string
name of texture
Inherited from
Texture.name
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:14
url
• url: string
source url
Inherited from
Texture.url
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:18
pid
• pid: number
Return index in texture array
Inherited from
Texture.pid
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:27
view
• view: GPUTextureView
GPUTextureView
Inherited from
Texture.view
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:32
gpuSampler
• gpuSampler: GPUSampler
GPUSampler
Inherited from
Texture.gpuSampler
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:37
gpuSampler_comparison
• gpuSampler_comparison: GPUSampler
GPUSampler for comparison
Inherited from
Texture.gpuSampler_comparison
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:42
format
• format: GPUTextureFormat
GPUTextureFormat
Inherited from
Texture.format
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:47
usage
• usage: number
GPUTextureUsage
Inherited from
Texture.usage
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:51
width
• width: number
= 4
texture width
Inherited from
Texture.width
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:55
height
• height: number
= 4
texture height
Inherited from
Texture.height
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:59
depthOrArrayLayers
• depthOrArrayLayers: number
= 1
depth or layers, default value is 1
Inherited from
Texture.depthOrArrayLayers
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:63
numberLayer
• numberLayer: number
= 1
depth or layers, default value is 1
Inherited from
Texture.numberLayer
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:67
viewDescriptor
• viewDescriptor: GPUTextureViewDescriptor
GPUTextureViewDescriptor
Inherited from
Texture.viewDescriptor
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:71
textureDescriptor
• textureDescriptor: GPUTextureDescriptor
GPUTextureDescriptor
Inherited from
Texture.textureDescriptor
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:75
visibility
• visibility: number
GPUShaderStage
Inherited from
Texture.visibility
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:79
textureBindingLayout
• textureBindingLayout: GPUTextureBindingLayout
GPUTextureBindingLayout, contains viewDimension and multisampled
Inherited from
Texture.textureBindingLayout
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:84
samplerBindingLayout
• samplerBindingLayout: GPUSamplerBindingLayout
GPUSamplerBindingLayout
Inherited from
Texture.samplerBindingLayout
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:91
sampler_comparisonBindingLayout
• sampler_comparisonBindingLayout: GPUSamplerBindingLayout
GPUSamplerBindingLayout
Inherited from
Texture.sampler_comparisonBindingLayout
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:97
flipY
• flipY: boolean
whether to flip the image on the y-axis
Inherited from
Texture.flipY
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:104
isVideoTexture
• Optional
isVideoTexture: boolean
whether is video texture
Inherited from
Texture.isVideoTexture
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:108
mipmapCount
• mipmapCount: number
= 1
mipmap Count, default value is 1
Inherited from
Texture.mipmapCount
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:116
Constructors
constructor
• new VideoTexture()
Overrides
Texture.constructor
Defined in
packages/media-extention/VideoTexture.ts:11
Methods
load
▸ load(video
): Promise
<void
>
load one Video Source
Parameters
Name | Type | Description |
---|---|---|
video | string | HTMLVideoElement | MediaStream | the url of a video source, or a MediaStream object, or a HTMLVideoElement |
Returns
Promise
<void
>
Defined in
packages/media-extention/VideoTexture.ts:22
getGPUTexture
▸ getGPUTexture(): any
Returns
any
Overrides
Texture.getGPUTexture
Defined in
packages/media-extention/VideoTexture.ts:51
getGPUView
▸ getGPUView(): GPUExternalTexture
Returns
GPUExternalTexture
Overrides
Texture.getGPUView
Defined in
packages/media-extention/VideoTexture.ts:58
init
▸ init(): VideoTexture
Returns
Inherited from
Texture.init
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:138
bindStateChange
▸ bindStateChange(fun
, ref
): void
Parameters
Name | Type |
---|---|
fun | Function |
ref | any |
Returns
void
Inherited from
Texture.bindStateChange
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:313
unBindStateChange
▸ unBindStateChange(ref
): void
Parameters
Name | Type |
---|---|
ref | any |
Returns
void
Inherited from
Texture.unBindStateChange
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:317
destoryView
▸ destoryView(): VideoTexture
Returns
Inherited from
Texture.destoryView
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:328
destroy
▸ destroy(): void
release the texture
Returns
void
Inherited from
Texture.destroy
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:336
Accessors
useMipmap
• get
useMipmap(): boolean
enable/disable mipmap
Returns
boolean
Inherited from
Texture.useMipmap
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:233
• set
useMipmap(value
): void
get mipmap
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Texture.useMipmap
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:240
addressModeU
• get
addressModeU(): GPUAddressMode
Returns
GPUAddressMode
Inherited from
Texture.addressModeU
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:346
• set
addressModeU(value
): void
Parameters
Name | Type |
---|---|
value | GPUAddressMode |
Returns
void
Inherited from
Texture.addressModeU
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:349
addressModeV
• get
addressModeV(): GPUAddressMode
Returns
GPUAddressMode
Inherited from
Texture.addressModeV
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:358
• set
addressModeV(value
): void
Parameters
Name | Type |
---|---|
value | GPUAddressMode |
Returns
void
Inherited from
Texture.addressModeV
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:361
addressModeW
• get
addressModeW(): GPUAddressMode
Returns
GPUAddressMode
Inherited from
Texture.addressModeW
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:372
• set
addressModeW(value
): void
Parameters
Name | Type |
---|---|
value | GPUAddressMode |
Returns
void
Inherited from
Texture.addressModeW
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:375
magFilter
• get
magFilter(): GPUFilterMode
Returns
GPUFilterMode
Inherited from
Texture.magFilter
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:386
• set
magFilter(value
): void
Parameters
Name | Type |
---|---|
value | GPUFilterMode |
Returns
void
Inherited from
Texture.magFilter
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:389
minFilter
• get
minFilter(): GPUFilterMode
Returns
GPUFilterMode
Inherited from
Texture.minFilter
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:399
• set
minFilter(value
): void
Parameters
Name | Type |
---|---|
value | GPUFilterMode |
Returns
void
Inherited from
Texture.minFilter
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:402
mipmapFilter
• get
mipmapFilter(): GPUMipmapFilterMode
Returns
GPUMipmapFilterMode
Inherited from
Texture.mipmapFilter
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:412
• set
mipmapFilter(value
): void
Parameters
Name | Type |
---|---|
value | GPUMipmapFilterMode |
Returns
void
Inherited from
Texture.mipmapFilter
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:415
lodMinClamp
• get
lodMinClamp(): number
Returns
number
Inherited from
Texture.lodMinClamp
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:424
• set
lodMinClamp(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
Texture.lodMinClamp
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:427
lodMaxClamp
• get
lodMaxClamp(): number
Returns
number
Inherited from
Texture.lodMaxClamp
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:438
• set
lodMaxClamp(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
Texture.lodMaxClamp
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:441
compare
• get
compare(): GPUCompareFunction
Returns
GPUCompareFunction
Inherited from
Texture.compare
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:454
• set
compare(value
): void
Parameters
Name | Type |
---|---|
value | GPUCompareFunction |
Returns
void
Inherited from
Texture.compare
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:457
maxAnisotropy
• get
maxAnisotropy(): number
Returns
number
Inherited from
Texture.maxAnisotropy
Defined in
src/gfx/graphics/webGpu/core/texture/Texture.ts:470
• set
maxAnisotropy(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
Texture.maxAnisotropy