diff --git a/types/three/src/renderers/WebGLRenderer.d.ts b/types/three/src/renderers/WebGLRenderer.d.ts index b53a9d3c3..f16d65506 100644 --- a/types/three/src/renderers/WebGLRenderer.d.ts +++ b/types/three/src/renderers/WebGLRenderer.d.ts @@ -15,7 +15,7 @@ import { Scene } from "../scenes/Scene.js"; import { Data3DTexture } from "../textures/Data3DTexture.js"; import { DataArrayTexture } from "../textures/DataArrayTexture.js"; import { OffscreenCanvas, Texture } from "../textures/Texture.js"; -import { WebGLCapabilities } from "./webgl/WebGLCapabilities.js"; +import { WebGLCapabilities, WebGLCapabilitiesParameters } from "./webgl/WebGLCapabilities.js"; import { WebGLExtensions } from "./webgl/WebGLExtensions.js"; import { WebGLInfo } from "./webgl/WebGLInfo.js"; import { WebGLProgram } from "./webgl/WebGLProgram.js"; @@ -33,7 +33,7 @@ export interface Renderer { setSize(width: number, height: number, updateStyle?: boolean): void; } -export interface WebGLRendererParameters { +export interface WebGLRendererParameters extends WebGLCapabilitiesParameters { /** * A Canvas where the renderer draws its output. */ @@ -46,11 +46,6 @@ export interface WebGLRendererParameters { */ context?: WebGLRenderingContext | undefined; - /** - * shader precision. Can be "highp", "mediump" or "lowp". - */ - precision?: string | undefined; - /** * default is false. */ @@ -86,11 +81,6 @@ export interface WebGLRendererParameters { */ depth?: boolean | undefined; - /** - * default is false. - */ - logarithmicDepthBuffer?: boolean | undefined; - /** * default is false. */ diff --git a/types/three/src/renderers/webgl/WebGLCapabilities.d.ts b/types/three/src/renderers/webgl/WebGLCapabilities.d.ts index c0f3aae41..c36a9b0f2 100644 --- a/types/three/src/renderers/webgl/WebGLCapabilities.d.ts +++ b/types/three/src/renderers/webgl/WebGLCapabilities.d.ts @@ -1,8 +1,20 @@ import { PixelFormat, TextureDataType } from "../../constants.js"; export interface WebGLCapabilitiesParameters { + /** + * shader precision. Can be "highp", "mediump" or "lowp". + */ precision?: string | undefined; + + /** + * default is false. + */ logarithmicDepthBuffer?: boolean | undefined; + + /** + * default is false. + */ + reverseDepthBuffer?: boolean | undefined; } export class WebGLCapabilities { @@ -18,6 +30,7 @@ export class WebGLCapabilities { precision: string; logarithmicDepthBuffer: boolean; + reverseDepthBuffer: boolean; maxTextures: number; maxVertexTextures: number;