Closed ssatguru closed 8 years ago
Thanks for reporting this bug. I am on it.
Status update. I have improved the algorithm to detect clashes with Object methods so that clone does not need to be capitalized anymore (it is actually not clashing with the Object's clone method). So if you update your Babylonjs candy and rename Clone to clone, it should work. However, I am still working on it because I found some other problems. For example the Mesh empty constructor is not valid (there are other constructors that are actually valid and you should call new Mesh("name", null) for instance). I am trying to understand why this empty constructor is generated and fix it (amongst other details in the API generator).
You can use it right now but be aware that I am working on small details, so the APIs may slightly evolve to make it safer... nothing too impacting for sure anyway (most probably you will not even see it for your use cases).
Nice. I got around the clone issue by using .$get() method and casting that to jsweet Function class I missed the Mesh empty contructor issue :)
Really cool workaround hack. Well done ;)
Most issues are now solved. The empty constructor should now be protected (not visible). Thanks.
Great, Thanks
"babylon.d.ts" has a
with method
JSweet coompiles this to
that is clone with capital C
See https://jsweet.org/apidocs/snapshots/org/jsweet/candies/babylonjs--babylon/2.2.2-SNAPSHOT/def/babylonjs/babylon/Mesh.html#Clone-java.lang.String-
The TS compiler fails with this error
Here's a small program to Test