From 8449f8e325cd3015755a3e48b6796649d70ddf06 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Fri, 22 Dec 2023 23:53:50 -0500 Subject: [PATCH] fix(types): remove references to Shader type (#327) --- src/postprocessing/ShaderPass.ts | 7 ++++--- src/shaders/types.ts | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/postprocessing/ShaderPass.ts b/src/postprocessing/ShaderPass.ts index ec925f30..48ab0588 100644 --- a/src/postprocessing/ShaderPass.ts +++ b/src/postprocessing/ShaderPass.ts @@ -1,13 +1,14 @@ -import { Shader, ShaderMaterial, UniformsUtils, WebGLRenderer, WebGLRenderTarget } from 'three' +import { ShaderMaterial, UniformsUtils, WebGLRenderer, WebGLRenderTarget } from 'three' import { Pass, FullScreenQuad } from './Pass' +import { Defines, IShader, Uniforms } from '../shaders/types' class ShaderPass extends Pass { public textureID: string - public uniforms: Shader['uniforms'] + public uniforms: Uniforms public material: ShaderMaterial public fsQuad: FullScreenQuad - constructor(shader: ShaderMaterial | (Shader & { defines?: Object }), textureID = 'tDiffuse') { + constructor(shader: ShaderMaterial | IShader, textureID = 'tDiffuse') { super() this.textureID = textureID diff --git a/src/shaders/types.ts b/src/shaders/types.ts index 31a8ea9d..0914512f 100644 --- a/src/shaders/types.ts +++ b/src/shaders/types.ts @@ -1,9 +1,9 @@ -import type { IUniform, Shader } from 'three' +import type { IUniform } from 'three' -type Defines = { [key: string]: boolean | number | string } -type Uniforms = { [key: string]: IUniform } +export type Defines = { [key: string]: boolean | number | string } +export type Uniforms = { [key: string]: IUniform } -export interface IShader extends Shader { +export interface IShader { defines?: D fragmentShader: string uniforms: U