Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix depthTexture types in WebGLRenderTarget.d.ts #17387

Merged
merged 1 commit into from
Aug 30, 2019
Merged

Conversation

sam6321
Copy link
Contributor

@sam6321 sam6321 commented Aug 30, 2019

I noticed a few missing type definitions for render targets.
In this change:

  • Added missing depthTexture argument to WebGLRenderTargetOptions.
  • Changed depthTexture property on WebGLRenderTarget to be of DepthTexture type instead of Texture type.

I took a look inside of WebGLTextures and noticed the depthTexture property of a render target is a required to be a DepthTexture rather than just a Texture:

if ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {

	throw new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' );

}

Added depthTexture argument to WebGLRenderTargetOptions and changed depthTexture property on WebGLRenderTarget to be of DepthTexture type instead of Texture type.
@mrdoob mrdoob added this to the r109 milestone Aug 30, 2019
@mrdoob mrdoob merged commit 11c7e50 into mrdoob:dev Aug 30, 2019
@mrdoob
Copy link
Owner

mrdoob commented Aug 30, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants