diff --git a/src/objects/Reflector.d.ts b/src/objects/Reflector.d.ts index bdae2e9e..491e75c5 100644 --- a/src/objects/Reflector.d.ts +++ b/src/objects/Reflector.d.ts @@ -1,4 +1,5 @@ -import { Mesh, BufferGeometry, Color, TextureEncoding, WebGLRenderTarget, PerspectiveCamera } from 'three' +import { Mesh, BufferGeometry, Color, WebGLRenderTarget, PerspectiveCamera } from 'three' +import { TextureEncoding } from '../types/shared' export interface ReflectorOptions { color?: Color | string | number diff --git a/src/objects/Refractor.d.ts b/src/objects/Refractor.d.ts index 37b5bb7f..83ed8e1f 100644 --- a/src/objects/Refractor.d.ts +++ b/src/objects/Refractor.d.ts @@ -1,4 +1,5 @@ -import { Mesh, BufferGeometry, Color, TextureEncoding, WebGLRenderTarget, PerspectiveCamera } from 'three' +import { Mesh, BufferGeometry, Color, WebGLRenderTarget, PerspectiveCamera } from 'three' +import { TextureEncoding } from '../types/shared' export interface RefractorOptions { color?: Color | string | number diff --git a/src/objects/Water2.d.ts b/src/objects/Water2.d.ts index 23a53e91..2bfdc53d 100644 --- a/src/objects/Water2.d.ts +++ b/src/objects/Water2.d.ts @@ -1,4 +1,5 @@ -import { BufferGeometry, Color, Mesh, ShaderMaterial, Texture, TextureEncoding, Vector2 } from 'three' +import { BufferGeometry, Color, Mesh, ShaderMaterial, Texture, Vector2 } from 'three' +import { TextureEncoding } from '../types/shared' export interface Water2Options { color?: Color | string | number diff --git a/src/types/shared.ts b/src/types/shared.ts index f13fe65b..c8edf4be 100644 --- a/src/types/shared.ts +++ b/src/types/shared.ts @@ -19,3 +19,10 @@ export type TypedArrayConstructors = | Uint32Array['constructor'] | Float32Array['constructor'] | Float64Array['constructor'] + +type LinearEncoding = 3000 +type sRGBEncoding = 3001 +/** + * Stub for `TextureEncoding` type since it was removed in r162. + */ +export type TextureEncoding = LinearEncoding | sRGBEncoding