Closed netpoetica closed 3 years ago
I will make a PR for this, I am just curious if there is a reason why it you didn't do it - maybe it is undefined behavior, something like this @giniedp
I am not sure any more why i left them out. My initial implementation was based on the binding description of ammo.js https://github.com/kripken/ammo.js/ where it states
Native JavaScript getters and setters could give a slightly nicer API here, however their performance is potentially problematic.
So maybe i just focused on the getters and setters.
Official documentation has no mention about performance. https://emscripten.org/docs/porting/connecting_cpp_and_javascript/WebIDL-Binder.html#attributes
Regardless of the potential performance penalty i agree with you, the properties should also be part of the generated type.
should be fixed now. Thanks for the report.
In this case, the WebIDL looks like
and the TS type is like
but the actual object has more than just a getter and setter:
And the live object can definitely be used like
vec.x = 10
orconsole.log(vec.x)
. Shouldn't the TS type contain x and y as number type, no?