three.js: PropertyMixer unsupported Array methods break Internet Explorer 11
Description of the problem
Thank you @c-morten for implementing additive animations! We hope to use it in the future.
Unfortunately it has broken animation for Internet Explorer 11, because Array.prototype.fill
and Array.prototype.copyWithin
were used in the PropertyMixer
. If this is a deliberate decision to drop support for Internet Explorer 11 without polyfills (in src
, for some files in examples
you need polyfills anyway), it would be nice to mention this in the migration guides, so updating doesn’t unknowingly break Internet Explorer 11 in production.
Three.js version
- Dev
- r116
- …
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Hardware Requirements (graphics card, VR Device, …)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (8 by maintainers)
Commits related to this issue
- Fix for https://github.com/mrdoob/three.js/issues/19293 - Replace calls to Array.prototype.fill and Array.prototype.copyWithin with for loops to set individual values — committed to c-morten/three.js by deleted user 4 years ago
- Fix for https://github.com/mrdoob/three.js/issues/19293 - Replace calls to Array.prototype.fill and Array.prototype.copyWithin with for loops to set individual values — committed to beginor/three.js by deleted user 4 years ago
Here’s the PR with the fix: https://github.com/mrdoob/three.js/pull/19297
It would be easy enough to replace the calls to fill and copyWithin with a forloop and just use set, which appears to be supported across the board. I can submit a PR with that change.
@DefinitelyMaybe Please don’t. IMO, I think it’s better when the collaborators handle this topic when the time for this is right.
Yes, the project uses
Bublé
for this:https://github.com/mrdoob/three.js/blob/8018d51038ec7ab0c6b537e6c44bfd12da989f72/utils/build/rollup.config.js#L210-L215
I really appreciate that! We’re deeply grateful for the work you (and all the other contributors) have been doing all those years on three.js. The least we can do is report back, and, if possible, contribute.
In any event, sorry for breaking your app in IE11. The core lib still supports this browser and we should have known that the above array methods are not always available.