Closed ppillot closed 5 months ago
@fredludlow I've made some further tests and, noticed that one of my projects, it breaks the Typescrip checks. If I ignore the checks, the code works well though.
I'll investigate further.
Issue resolved: it was a missing typescript definition for the argument of the addScheme
method.
I've checked on a personal project and in every "Color" example of the NGL webapp.
That is a little strange, and surprising why the existing classical (explicit prototype) method fails, but switching to the class syntax reads more clearly anyway.
I am wondering if that's not an issue with terser, which can turn function
declarations in more compact arrow functions. It's supposed to avoid doing so when there a this
in the function body...
This PR fixes issue #1010 where the syntax for registering a ColorMaker does not generate valid JS.
After bissection, I've found out that this issue has been introduced with the recent changes to the build process (PR #993). It's possible that the transpilation + bundling results in invalid JS code (?). The fix was already done in the update-three,js ongoing branch, and had been cherry-picked from there.