You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Introduced here – #16390, WebGLMultipleRenderTargets extends WebGLMultipleRenderTarget which on the surface works, however when we came to create the .d.ts file – three-types/three-ts-types#85 we began to discuss how maybe this shouldn't be the case. Calling WebGLMultipleRenderTargets.setTexture would fail because you'd either have to supply an array which would break:
Alternatively not passing an array of Textures, would break the WebGLMultipleRenderTargets.
Describe the solution you'd like
Whilst I appreciate how helpful it is to extend a lot of the features already written in WebGLMultipleRenderTarget, maybe there should be a utility/base class that they both inherit from, this would reduce duplication (which is why we extend classes in the first place) and equally avoid the edge cases described above that will impact users.
Additional context
For anyone interested, the .d.ts file will probably just duplicate the properties and methods included in WebGLMultipleRenderTarget
The text was updated successfully, but these errors were encountered:
Since #23498 removes WebGLRenderTarget.setTexture(), there is no inconsistency with WebGLMultipleRenderTargets.setTexture() anymore. So the inheritance itself should not cause any (type) issues anymore.
Is your feature request related to a problem? Please describe.
Introduced here – #16390, WebGLMultipleRenderTargets extends WebGLMultipleRenderTarget which on the surface works, however when we came to create the .d.ts file – three-types/three-ts-types#85 we began to discuss how maybe this shouldn't be the case. Calling
WebGLMultipleRenderTargets.setTexture
would fail because you'd either have to supply an array which would break:see:
three.js/src/renderers/WebGLRenderTarget.js
Line 46 in d39d829
Alternatively not passing an array of Textures, would break the
WebGLMultipleRenderTargets
.Describe the solution you'd like
Whilst I appreciate how helpful it is to extend a lot of the features already written in WebGLMultipleRenderTarget, maybe there should be a utility/base class that they both inherit from, this would reduce duplication (which is why we extend classes in the first place) and equally avoid the edge cases described above that will impact users.
Additional context
For anyone interested, the
.d.ts
file will probably just duplicate the properties and methods included inWebGLMultipleRenderTarget
The text was updated successfully, but these errors were encountered: