THREE.JS / WEBCODECS / WEBGPU
Frames without a video element.
The pinned video-frame example decodes an MP4 with WebCodecs and places each VideoFrame into a VideoFrameTexture. This lab keeps that ownership and close-before-replace lifecycle while using deterministic local canvas frames in place of the missing official MP4 asset.
Initializing—
Preparing the frame texture and decoder-shaped loop.
- backend
- —
- texture
- —
- source
- —
- frame
- —
- size
- —
- sample
- —
- closed frames
- —
- running
- —
- plane
- —
Selected source contractMP4Demuxer → VideoDecoder → VideoFrameTexture.setFrame()
The native lane uses the installed VideoFrameTexture and closes the previous VideoFrame before replacing it. The WebGL2 lane is an explicit canvas-texture reference; MP4 parsing, exact video pixels, decoder throughput, broad codec/device matrices, and whole-example fidelity remain separate.
Derived from the pinned WebGPU Video Frames example. Use ?backend=webgl for the explicit WebGL2 reference lane.
Study issue