diff --git a/examples-testing/index.js b/examples-testing/index.js index 56658adf9..e7a53c5a6 100644 --- a/examples-testing/index.js +++ b/examples-testing/index.js @@ -80,6 +80,7 @@ const exceptionList = [ 'webgpu_tsl_transpiler', 'webgpu_tsl_vfx_linkedparticles', 'webgpu_tsl_vfx_tornado', + 'webgpu_video_frame', 'webgpu_volume_cloud', 'webgpu_volume_perlin', 'webxr_vr_handinput_cubes', diff --git a/three.js b/three.js index 73eddcbc3..48df2ee36 160000 --- a/three.js +++ b/three.js @@ -1 +1 @@ -Subproject commit 73eddcbc3e5595602144be6f375293496365a87c +Subproject commit 48df2ee36336710364d7e268c34b0f03be3df16f diff --git a/types/three/src/Three.Core.d.ts b/types/three/src/Three.Core.d.ts index 07d3a09d7..1cc81e9b1 100644 --- a/types/three/src/Three.Core.d.ts +++ b/types/three/src/Three.Core.d.ts @@ -155,5 +155,6 @@ export * from "./textures/DepthTexture.js"; export * from "./textures/FramebufferTexture.js"; export * from "./textures/Source.js"; export * from "./textures/Texture.js"; +export * from "./textures/VideoFrameTexture.js"; export * from "./textures/VideoTexture.js"; export { createCanvasElement } from "./utils.js"; diff --git a/types/three/src/textures/VideoFrameTexture.d.ts b/types/three/src/textures/VideoFrameTexture.d.ts new file mode 100644 index 000000000..08a83c476 --- /dev/null +++ b/types/three/src/textures/VideoFrameTexture.d.ts @@ -0,0 +1,27 @@ +import { + MagnificationTextureFilter, + Mapping, + MinificationTextureFilter, + PixelFormat, + TextureDataType, + Wrapping, +} from "../constants.js"; +import { VideoTexture } from "./VideoTexture.js"; + +declare class VideoFrameTexture extends VideoTexture { + constructor( + mapping?: Mapping, + wrapS?: Wrapping, + wrapT?: Wrapping, + magFilter?: MagnificationTextureFilter, + minFilter?: MinificationTextureFilter, + format?: PixelFormat, + type?: TextureDataType, + anisotropy?: number, + ); + + // FIXME Replace with VideoFrame when we no longer need to support TypeScript 5.0 + setFrame(frane: unknown): void; +} + +export { VideoFrameTexture };