Three.js: PropertyMixer unsupported Array methods break Internet Explorer 11

Created on 4 May 2020  路  16Comments  路  Source: mrdoob/three.js

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
  • [x] Dev
  • [x] r116
  • [ ] ...
Browser
  • [ ] All of them
  • [ ] Chrome
  • [ ] Firefox
  • [x] Internet Explorer
OS
  • [ ] All of them
  • [x] Windows
  • [ ] macOS
  • [ ] Linux
  • [ ] Android
  • [ ] iOS
Hardware Requirements (graphics card, VR Device, ...)
Regression

Most helpful comment

Here's the PR with the fix: https://github.com/mrdoob/three.js/pull/19297

All 16 comments

Didn't know about polyfills.js! That would definitely fix the problem for IE 11 users.

Okay, so there are three options now:

  • Adding the polyfills to the lib.
  • Remove the usage of Array.prototype.fill() and Array.prototype.copyWithin() from PropertyMixer.
  • Stop IE 11 support and add note to migration guide.

Some of the users of our platform still use IE 11 and we've been trying to nudge them towards more modern browsers with warnings, which helps, but there's still a significant amount of users that persists.

We hope we can drop support next year, so for our platform the third option would not be ideal, although I get that we all have to move on sooner rather than later to reduce all the unnecessary time and effort spent on keeping a legacy browser supported.

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.

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.

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.

@c-morten

I can submit a PR with that change.

That world be great! 馃檹

Are we transpiling ES6 classes? That's another thing likely to break IE11 over the coming months, and requires that either (a) three.js transpiles, or (b) the developer's application transpiles.

Are we transpiling ES6 classes?

Yes, the project uses Bubl茅 for this:

https://github.com/mrdoob/three.js/blob/8018d51038ec7ab0c6b537e6c44bfd12da989f72/utils/build/rollup.config.js#L210-L215

Are we transpiling ES6 classes?

Yes, the project uses Bubl茅 for this [...]

@Mugen87 would it be ok if I jump back into trying work through the class migration? I promise to do more testing before making PR's 馃И 馃挴 馃帀

Here's the PR with the fix: https://github.com/mrdoob/three.js/pull/19297

would it be ok if I jump back into trying work through the class migration?

@DefinitelyMaybe Please don't. IMO, I think it's better when the collaborators handle this topic when the time for this is right.

I'm reading low-trust and higher-priorities. progress is slow.

Not that I'm saying other things shouldn't have higher priorities and trust of an unknown developer is likely low anyway. More that we've been down this road before and I grow weary of waiting on a couple of whims.

@DefinitelyMaybe It's not about "trust of an unknown developer", is about us maintainers not being ready for that change yet.

well I want to help that process along, what can I do?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

boyravikumar picture boyravikumar  路  3Comments

akshaysrin picture akshaysrin  路  3Comments

filharvey picture filharvey  路  3Comments

makc picture makc  路  3Comments

scrubs picture scrubs  路  3Comments