File: VideoFrameTexture.md | Updated: 11/15/2025
This class can be used as an alternative way to define video data. Instead of using an instance of HTMLVideoElement like with VideoTexture, VideoFrameTexture expects each frame is defined manually via VideoFrameTexture#setFrame. A typical use case for this module is when video frames are decoded with the WebCodecs API.
const texture = new THREE.VideoFrameTexture();
texture.setFrame( frame );
Constructs a new video frame texture.
mapping | The texture mapping. Default is Texture.DEFAULT_MAPPING.
---|---
wrapS | The wrapS value. Default is ClampToEdgeWrapping.
wrapT | The wrapT value. Default is ClampToEdgeWrapping.
magFilter | The mag filter value. Default is LinearFilter.
minFilter | The min filter value. Default is LinearFilter.
format | The texture format. Default is RGBAFormat.
type | The texture type. Default is UnsignedByteType.
anisotropy | The anisotropy value. Default is Texture.DEFAULT_ANISOTROPY.
This flag can be used for type testing.
Default is true.
Sets the current frame of the video. This will automatically update the texture so the data can be used for rendering.
frame | The video frame.
---|---
This method overwritten with an empty implementation since this type of texture is updated via setFrame().
Overrides: VideoTexture#update