-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Closed
Description
Describe the bug
Please don't be too aggressive to using the new JS feature syntax in build files.
The syntax of ES2020 features has been used in the current code and these will cause problems in dependent projects.
Given that the Three.js project is extremely widely used in the community, I think we should be cautious about these new features and maintain backward compatibility.
It is too radical at the moment.
To Reproduce
Code
// File: three.js/build/three.module.js Line: 15293
this._setSize( texture.image.length === 0 ? 16 : texture.image[ 0 ].width ?? texture.image[ 0 ].image.width );
^------ ES2020 Nullish CoalescingLive example
Expected behavior
We should avoid using new feature syntaxes prematurely in the build files, and provide good compatibility as much as possible.
Or put a backwards compatible version in the build folder at least.
Screenshots
Platform:
- Device: [Desktop, Mobile]
- OS: [Windows, MacOS, Linux, Android, iOS]
- Browser: [Chrome, Firefox, Safari, Edge]
- Three.js version: [dev, 0946935]
codytodonnell
Metadata
Metadata
Assignees
Labels
No labels
