From a520da59e1629f929cc66e1611b30921a0f5f1ae Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Tue, 7 Jan 2025 13:01:56 -0500 Subject: [PATCH] fix: type compatibility with @types/three@0.172.0 The `Renderer` interface was removed in @types/three@0.172.0. This PR removes usages so that `three-stdlib` works with @types/three@0.172.0. --- src/postprocessing/Pass.ts | 4 ++-- src/utils/ShadowMapViewer.d.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/postprocessing/Pass.ts b/src/postprocessing/Pass.ts index c69f0c9b..8984538c 100644 --- a/src/postprocessing/Pass.ts +++ b/src/postprocessing/Pass.ts @@ -1,4 +1,4 @@ -import { OrthographicCamera, PlaneGeometry, Mesh, Material, Renderer, WebGLRenderer, WebGLRenderTarget } from 'three' +import { OrthographicCamera, PlaneGeometry, Mesh, Material, WebGLRenderer, WebGLRenderTarget } from 'three' class Pass { // if set to true, the pass is processed by the composer @@ -50,7 +50,7 @@ class FullScreenQuad { this.mesh.geometry.dispose() } - public render(renderer: Renderer): void { + public render(renderer: WebGLRenderer): void { renderer.render(this.mesh, this.camera) } } diff --git a/src/utils/ShadowMapViewer.d.ts b/src/utils/ShadowMapViewer.d.ts index 641c39e3..74b5e627 100644 --- a/src/utils/ShadowMapViewer.d.ts +++ b/src/utils/ShadowMapViewer.d.ts @@ -1,4 +1,4 @@ -import { Light, Renderer } from 'three' +import { Light, WebGLRenderer } from 'three' export interface Size { width: number @@ -18,7 +18,7 @@ export class ShadowMapViewer { enabled: boolean size: Size position: Position - render(renderer: Renderer): void + render(renderer: WebGLRenderer): void updateForWindowResize(): void update(): void }