LogoPixi’VN
pixi-jsInterfaces

Interface: VideoSourceOptions

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/VideoSource.d.ts:18

Options for video sources.

Advanced

Extends

Properties

_maxAnisotropy?

> optional _maxAnisotropy?: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:93

Internal

Specifies the maximum anisotropy value clamp used by the sampler. Note: Most implementations support TextureStyle#maxAnisotropy values in range between 1 and 16, inclusive. The used value of TextureStyle#maxAnisotropy will be clamped to the maximum value that the platform supports.

Inherited from

TextureStyle._maxAnisotropy


_resourceId?

> optional _resourceId?: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:114

Inherited from

TextureSourceOptions._resourceId


_resourceType?

> optional _resourceType?: string

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:57

Internal

Inherited from

TextureStyle._resourceType


_touched?

> optional _touched?: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:59

Internal

Inherited from

TextureStyle._touched


addListener?

> optional addListener?: <T>(event, fn, context?) => this

Defined in: node_modules/eventemitter3/index.d.ts:45

Type Parameters

T

T extends "change" | "destroy"

Parameters

event

T

fn

(...args) => void

context?

any

Returns

this

Inherited from

TextureSourceOptions.addListener


addressMode?

> optional addressMode?: WRAP_MODE

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:11

setting this will set wrapModeU,wrapModeV and wrapModeW all at once!

Inherited from

TextureSourceOptions.addressMode


addressModeU?

> optional addressModeU?: WRAP_MODE

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:13

specifies the address modes for the texture width, height, and depth coordinates, respectively.

Inherited from

TextureSourceOptions.addressModeU


addressModeV?

> optional addressModeV?: WRAP_MODE

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:15

specifies the address modes for the texture width, height, and depth coordinates, respectively.

Inherited from

TextureSourceOptions.addressModeV


addressModeW?

> optional addressModeW?: WRAP_MODE

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:17

Specifies the address modes for the texture width, height, and depth coordinates, respectively.

Inherited from

TextureSourceOptions.addressModeW


alphaMode?

> optional alphaMode?: ALPHA_MODES

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/VideoSource.d.ts:38

The alpha mode of the video.

Overrides

TextureSourceOptions.alphaMode


antialias?

> optional antialias?: boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:40

Only really affects RenderTextures. Should we use antialiasing for this texture. It will look better, but may impact performance as a Blit operation will be required to resolve the texture.

Inherited from

TextureSourceOptions.antialias


arrayLayerCount?

> optional arrayLayerCount?: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:58

The number of array layers for this texture source.

This maps to WebGPU's GPUTextureDescriptor.size.depthOrArrayLayers and is used for array-backed textures such as cube maps (6 layers).

Default

1

Advanced

Inherited from

TextureSourceOptions.arrayLayerCount


autoGarbageCollect?

> optional autoGarbageCollect?: boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:75

If true, the Garbage Collector will unload this texture if it is not used after a period of time

Inherited from

TextureSourceOptions.autoGarbageCollect


autoGenerateMipmaps?

> optional autoGenerateMipmaps?: boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:69

Should we auto generate mipmaps for this texture? This will automatically generate mipmaps for this texture when uploading to the GPU. Mipmapped textures take up more memory, but can look better when scaled down.

For performance reasons, it is recommended to NOT use this with RenderTextures, as they are often updated every frame. If you do, make sure to call updateMipmaps after you update the texture.

Inherited from

TextureSourceOptions.autoGenerateMipmaps


autoLoad?

> optional autoLoad?: boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/VideoSource.d.ts:20

If true, the video will start loading immediately.


autoPlay?

> optional autoPlay?: boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/VideoSource.d.ts:22

If true, the video will start playing as soon as it is loaded.


compare?

> optional compare?: COMPARE_FUNCTION

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:36

When provided the sampler will be a comparison sampler with the specified COMPARE_FUNCTION. Note: Comparison samplers may use filtering, but the sampling results will be implementation-dependent and may differ from the normal filtering rules.

Inherited from

TextureSourceOptions.compare


crossorigin?

> optional crossorigin?: string | boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/VideoSource.d.ts:26

If true, the video will be loaded with the crossorigin attribute.


destroy?

> optional destroy?: () => void

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:118

Destroys the style

Returns

void

Inherited from

TextureStyle.destroy


destroyed?

> readonly optional destroyed?: boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:98

Has the style been destroyed?

Inherited from

TextureStyle.destroyed


dimensions?

> optional dimensions?: TEXTURE_DIMENSIONS

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:42

how many dimensions does this texture have? currently v8 only supports 2d

Inherited from

TextureSourceOptions.dimensions


dynamic?

> optional dynamic?: boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:77

Used by RenderTexture.create to allow resizing. Not used by TextureSource itself.

Inherited from

TextureSourceOptions.dynamic


emit?

> optional emit?: <T>(event, ...args) => boolean

Defined in: node_modules/eventemitter3/index.d.ts:32

Calls each of the listeners registered for a given event.

Type Parameters

T

T extends "change" | "destroy"

Parameters

event

T

args

...ArgumentMap<{ change: TextureStyle; destroy: TextureStyle; }>[Extract<T, "change" | "destroy">]

Returns

boolean

Inherited from

TextureSourceOptions.emit


eventNames?

> optional eventNames?: () => ("change" | "destroy")[]

Defined in: node_modules/eventemitter3/index.d.ts:15

Return an array listing the events for which the emitter has registered listeners.

Returns

("change" | "destroy")[]

Inherited from

TextureSourceOptions.eventNames


format?

> optional format?: TEXTURE_FORMATS

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:29

the format that the texture data has

Inherited from

TextureSourceOptions.format


height?

> optional height?: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:25

the pixel height of this texture source. This is the REAL pure number, not accounting resolution

Inherited from

TextureSourceOptions.height


label?

> optional label?: string

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:73

optional label, can be used for debugging

Inherited from

TextureSourceOptions.label


listenerCount?

> optional listenerCount?: (event) => number

Defined in: node_modules/eventemitter3/index.d.ts:27

Return the number of listeners listening to a given event.

Parameters

event

"change" | "destroy"

Returns

number

Inherited from

TextureSourceOptions.listenerCount


listeners?

> optional listeners?: <T>(event) => (...args) => void[]

Defined in: node_modules/eventemitter3/index.d.ts:20

Return the listeners registered for a given event.

Type Parameters

T

T extends "change" | "destroy"

Parameters

event

T

Returns

(...args) => void[]

Inherited from

TextureSourceOptions.listeners


lodMaxClamp?

> optional lodMaxClamp?: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:29

Specifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture.

Inherited from

TextureSourceOptions.lodMaxClamp


lodMinClamp?

> optional lodMinClamp?: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:27

specifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture.

Inherited from

TextureSourceOptions.lodMinClamp


loop?

> optional loop?: boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/VideoSource.d.ts:28

If true, the video will loop when it ends.


magFilter?

> optional magFilter?: SCALE_MODE

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:21

specifies the sampling behavior when the sample footprint is smaller than or equal to one texel.

Inherited from

TextureSourceOptions.magFilter


maxAnisotropy?

> optional maxAnisotropy?: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:45

Specifies the maximum anisotropy value clamp used by the sampler. Note: Most implementations support TextureStyle#maxAnisotropy values in range between 1 and 16, inclusive. The used value of TextureStyle#maxAnisotropy will be clamped to the maximum value that the platform supports.

setting this to anything higher than 1 will set scale modes to 'linear'

Inherited from

TextureSourceOptions.maxAnisotropy


minFilter?

> optional minFilter?: SCALE_MODE

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:23

specifies the sampling behavior when the sample footprint is larger than one texel.

Inherited from

TextureSourceOptions.minFilter


mipLevelCount?

> optional mipLevelCount?: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:60

The number of mip levels to generate for this texture. this is overridden if autoGenerateMipmaps is true

Inherited from

TextureSourceOptions.mipLevelCount


mipmapFilter?

> optional mipmapFilter?: SCALE_MODE

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:25

specifies behavior for sampling between mipmap levels.

Inherited from

TextureSourceOptions.mipmapFilter


muted?

> optional muted?: boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/VideoSource.d.ts:30

If true, the video will be muted.


off?

> optional off?: <T>(event, fn?, context?, once?) => this

Defined in: node_modules/eventemitter3/index.d.ts:69

Type Parameters

T

T extends "change" | "destroy"

Parameters

event

T

fn?

(...args) => void

context?

any

once?

boolean

Returns

this

Inherited from

TextureSourceOptions.off


on?

> optional on?: <T>(event, fn, context?) => this

Defined in: node_modules/eventemitter3/index.d.ts:40

Add a listener for a given event.

Type Parameters

T

T extends "change" | "destroy"

Parameters

event

T

fn

(...args) => void

context?

any

Returns

this

Inherited from

TextureSourceOptions.on


once?

> optional once?: <T>(event, fn, context?) => this

Defined in: node_modules/eventemitter3/index.d.ts:54

Add a one-time listener for a given event.

Type Parameters

T

T extends "change" | "destroy"

Parameters

event

T

fn

(...args) => void

context?

any

Returns

this

Inherited from

TextureSourceOptions.once


playsinline?

> optional playsinline?: boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/VideoSource.d.ts:32

If true, the video will play inline.


preload?

> optional preload?: boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/VideoSource.d.ts:34

If true, the video will be preloaded.


preloadTimeoutMs?

> optional preloadTimeoutMs?: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/VideoSource.d.ts:36

The time in milliseconds to wait for the video to preload before timing out.


removeAllListeners?

> optional removeAllListeners?: (event?) => this

Defined in: node_modules/eventemitter3/index.d.ts:79

Remove all listeners, or those of the specified event.

Parameters

event?

"change" | "destroy"

Returns

this

Inherited from

TextureSourceOptions.removeAllListeners


removeListener?

> optional removeListener?: <T>(event, fn?, context?, once?) => this

Defined in: node_modules/eventemitter3/index.d.ts:63

Remove the listeners of a given event.

Type Parameters

T

T extends "change" | "destroy"

Parameters

event

T

fn?

(...args) => void

context?

any

once?

boolean

Returns

this

Inherited from

TextureSourceOptions.removeListener


resolution?

> optional resolution?: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:27

the resolution of the texture.

Inherited from

TextureSourceOptions.resolution


resource?

> optional resource?: HTMLVideoElement

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:21

the resource that will be uploaded to the GPU. This is where we get our pixels from eg an ImageBimt / Canvas / Video etc

Inherited from

TextureSourceOptions.resource


scaleMode?

> optional scaleMode?: SCALE_MODE

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:19

setting this will set magFilter,minFilter and mipmapFilter all at once!

Inherited from

TextureSourceOptions.scaleMode


update?

> optional update?: () => void

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:115

Returns

void

Inherited from

TextureStyle.update


updateFPS?

> optional updateFPS?: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/VideoSource.d.ts:24

The number of times a second to update the texture from the video. Leave at 0 to update at every render.


viewDimension?

> optional viewDimension?: TEXTURE_VIEW_DIMENSIONS

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:49

How this texture is viewed/sampled by shaders.

This aligns with WebGPU's GPUTextureViewDescriptor.dimension. For example, cube maps are typically stored as a 2D texture with 6 array layers (dimensions: '2d') but viewed as viewDimension: 'cube'.

Inherited from

TextureSourceOptions.viewDimension


width?

> optional width?: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.d.ts:23

the pixel width of this texture source. This is the REAL pure number, not accounting resolution

Inherited from

TextureSourceOptions.width


wrapMode?

> optional wrapMode?: WRAP_MODE

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.d.ts:106

Inherited from

TextureSourceOptions.wrapMode