Three.js: Examples: Problems with converting timeliner_gui to a module.

Created on 1 May 2020  路  8Comments  路  Source: mrdoob/three.js

timeliner_gui is one of the last libs in examples which is not yet available as a module. I've tried to convert it today but encountered many runtime errors. After some investigations it turned out that the code in timeliner_gui is not compatible with strict mode. Meaning you can reproduce the same runtime errors by adding 'use strict'; at the top of js/libs/timeliner_gui.min.js.

Since ES6 modules are always in strict mode, I see no obvious approach to convert the library to a module. Unfortunately, it also seems that the project is not maintained anymore.

Should we remove timeliner_gui.js and misc_animation_authoring.html from the repo?

Examples

Most helpful comment

just a little update, I managed to get timeliner fully migrated to es modules. however I noticed that my internals and apis have diverged from the timeliner gui used in three.js example and so I'll be planning to add a little compatibility layer for it. hopefully, something that can be done in the next week.

All 8 comments

/ping @zz85

ah this looks like @tschw's fork of the timeliner project. i could take a shot at reliving and modularising my timeliner version again, and see the example could be converted. i'm also cool if there's a desire to remove example for improved maintainability

I'm fine with retaining the example as long as somebody helps to modularize it 馃槆.

just a little update, I managed to get timeliner fully migrated to es modules. however I noticed that my internals and apis have diverged from the timeliner gui used in three.js example and so I'll be planning to add a little compatibility layer for it. hopefully, something that can be done in the next week.

Sounds great!

@zz85 I remember that I sent you a PR of all changes before forking / stripping it down to become a pure keyframe editor. Your new version would have to be able to serve as that and leave the interpolation to the animation system, or the point of the example would shift from authoring Three.js animations to animating something with timeliner. Maybe it would be easier to just migrate the fork too? It's still basically your code, just less of it and somewhat refactored for my understanding (and possibly that of others).

Somewhat related: #9506

Maybe it would be easier to just migrate the fork too?

That would be a good start, IMO. It would finally allow us to move misc_animation_authoring fully to ES6 modules (meaning no imports via <script src=""> anymore.

Closing, see #20363.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danieljack picture danieljack  路  3Comments

filharvey picture filharvey  路  3Comments

clawconduce picture clawconduce  路  3Comments

fuzihaofzh picture fuzihaofzh  路  3Comments

scrubs picture scrubs  路  3Comments