diff --git a/docs/api/en/renderers/WebGLRenderer.html b/docs/api/en/renderers/WebGLRenderer.html index 470974ce2848e04e72c44065426419399ffc1ada..a03593ced566536c91956beb06646475bfb5da3b 100644 --- a/docs/api/en/renderers/WebGLRenderer.html +++ b/docs/api/en/renderers/WebGLRenderer.html @@ -92,9 +92,13 @@ Default is *true*.

-

[property:WebGLRendererDebug debug]

+

[property:Boolean debug.checkShaderErrors]

- Contains debug configuration of the renderer + If [page:.checkShaderErrors checkShaderErrors] is true, defines whether material shader programs are checked + for errors during compilation and linkage process. It may be useful to disable this check in production for performance gain. + It is strongly recommended to keep these checks enabled during development. + If the shader does not compile and link - it will not work and associated material will not render. + Default is *true*.

[property:Object capabilities]

diff --git a/docs/api/en/renderers/WebGLRendererDebug.html b/docs/api/en/renderers/WebGLRendererDebug.html deleted file mode 100644 index 5b84835d95644115244e50382b095c1b1eed4f4b..0000000000000000000000000000000000000000 --- a/docs/api/en/renderers/WebGLRendererDebug.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - -

[name]

- -

- The debug configuration container for WebGLRenderer -

- - -

Properties

- -

[property:Boolean checkShaderErrors]

-

- If [page:.checkShaderErrors checkShaderErrors] is true, defines whether material shader programs are checked - for errors during compilation and linkage process. It may be useful to disable this check in production for performance gain. - It is strongly recommended to keep these checks enabled during development. - If the shader does not compile and link - it will not work and associated material will not render. - Default is *true*. -

- -

Source

- - [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] - - diff --git a/docs/api/zh/renderers/WebGLRenderer.html b/docs/api/zh/renderers/WebGLRenderer.html index 7aab808d52a9a146f9c14cebc04eb9c336dd5a44..36159deef9e32cffee9392849ed3c1cc93a6ef54 100644 --- a/docs/api/zh/renderers/WebGLRenderer.html +++ b/docs/api/zh/renderers/WebGLRenderer.html @@ -79,9 +79,13 @@ 默认是*true*

-

[property:WebGLRendererDebug debug]

+

[property:Boolean debug.checkShaderErrors]

- 包含渲染器的调试配置。 + 如果[page:.checkShaderErrors checkShaderErrors]为true,定义是否检查材质着色器程序 + 编译和链接过程中的错误。 禁用此检查生产以获得性能增益可能很有用。 + 强烈建议在开发期间保持启用这些检查。 + 如果着色器没有编译和链接 - 它将无法工作,并且相关材料将不会呈现。 + 默认是*true*

[property:Object capabilities]

diff --git a/docs/api/zh/renderers/WebGLRendererDebug.html b/docs/api/zh/renderers/WebGLRendererDebug.html deleted file mode 100644 index b0e225b06fbeb16684e7b4899e139bab28d15380..0000000000000000000000000000000000000000 --- a/docs/api/zh/renderers/WebGLRendererDebug.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -

[name]

- -

- The debug configuration container for WebGLRenderer -

- - -

Properties

- -

[property:Boolean checkShaderErrors]

-

- - 如果[page:.checkShaderErrors checkShaderErrors]为true,定义是否检查材质着色器程序 - 编译和链接过程中的错误。 禁用此检查生产以获得性能增益可能很有用。 - 强烈建议在开发期间保持启用这些检查。 - 如果着色器没有编译和链接 - 它将无法工作,并且相关材料将不会呈现。 - 默认是*true* -

- -

Source

- - [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] - - diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index eddb3779c69cf2178011df46619caff86c64b5dc..2d191bbefec70e3b3e2a26c9ecdb4073d3ae0b9f 100644 --- a/src/renderers/WebGLRenderer.js +++ b/src/renderers/WebGLRenderer.js @@ -36,7 +36,6 @@ import { WebGLPrograms } from './webgl/WebGLPrograms.js'; import { WebGLProperties } from './webgl/WebGLProperties.js'; import { WebGLRenderLists } from './webgl/WebGLRenderLists.js'; import { WebGLRenderStates } from './webgl/WebGLRenderStates.js'; -import { WebGLRendererDebug } from "./WebGLRendererDebug.js"; import { WebGLShadowMap } from './webgl/WebGLShadowMap.js'; import { WebGLState } from './webgl/WebGLState.js'; import { WebGLTextures } from './webgl/WebGLTextures.js'; @@ -78,7 +77,15 @@ function WebGLRenderer( parameters ) { this.domElement = _canvas; this.context = null; - this.debug = new WebGLRendererDebug(); + // Debug configuration container + this.debug = { + + /** + * Enables error checking and reporting when shader programs are being compiled + * @type {boolean} + */ + checkShaderErrors: false + }; // clearing diff --git a/src/renderers/WebGLRendererDebug.js b/src/renderers/WebGLRendererDebug.js deleted file mode 100644 index 14856942d0f4a0bb1b395d86c26c964f1aa7582b..0000000000000000000000000000000000000000 --- a/src/renderers/WebGLRendererDebug.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @author Alex Goldring | https://github.com/Usnul - */ - -function WebGLRendererDebug() { - - /** - * Enables error checking and reporting when shader programs are being compiled - * @type {boolean} - */ - this.checkShaderErrors = true; - -} - -export { WebGLRendererDebug };