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
Postprocessing relies on these legacy classes to ensure backward-compatibility with older vesions of three. Dropping this code and raising the peer dependency would be a breaking change because the library would then crash for people who are still using r137 or older.
Under normal circumstances, I would just release a new major version, but I think that people expect the next major version to include most of the changes outlined in the roadmap and dropping the use of legacy code is not a pressing issue so it'll have to wait a bit longer.
As a temporary solution, you could include the required legacy classes in your custom three bundle:
// @todo Remove when postprocessing v7 lands.exportclassDataTexture3DextendsData3DTexture{constructor(data,width,height,depth){super(data,width,height,depth);}}// @todo Remove when postprocessing v7 lands.exportclassWebGLMultisampleRenderTargetextendsWebGLRenderTarget{constructor(width,height,options){super(width,height,options);this.samples=4;}}
Is your feature request related to a problem?
If a user is using a custom build of three.js which doesn't include
src/Three.Legacy.js
, this error happens when including postprocessing:This is because postprocessing is still using legacy classes which I think it's wrong.
Describe the solution you'd like
The three.js peerDependency should be updated to support three.js versions with the new classes only (
>= 0.138.0
).postprocessing/package.json
Line 85 in daba8ea
More precisely,
DataTexture3D
has been renamed toData3DTexture
in mrdoob/three.js#23498 and released in r138.WebGLMultisampleRenderTarget
has been removed in mrdoob/three.js#23455 and released in r138.I can make a PR if this is agreed upon.
Describe alternatives you've considered
Including the legacy code in my three.js custom build.
The text was updated successfully, but these errors were encountered: