Question: I couldn’t figure out how to export properties that were writable in JS. I describe the problem in Entity.js. Any pointers would be much appreciated! :)
The autogenerated bindings from JS <-> ObjC/Swift are pretty opaque and if it doesn't handle your use case then there isn't much you can do without manually binding everything you need.
I might recommend using a custom class with getters/setters that don't use the subscript operator. I think on the JS side you can run some code to override [] and point it to the correct functions but I've never tried it out so ymmv.
entity.position = [0,0,0];
Is ok but:
entity.position[0] = 1; entity.position[1] = 1; entity.position[3] = 1;
Fails (and ChatGPT occasionally tries to do the latter).