Antoine: Well, the idea was to
- make Arrays of Objects (AofO) smaller by making the individual O’s much smaller by having two instance layers, one shared by all the O’s in the A, and the second, top-most, being “exceptions to the rule” so to speak .. overriding the shared values.
- Not only save space but also have the shared approach: changing the “default” variable immediately changes it for all the Os.
Interestingly enough, we did consider an OofAs approach. Rather than having an Array with lots of Os, have a single O with a typed array for each variable. This is smaller in general, and more performant in many situations, especially when using the TAs for THREE.js/WebGL.
We still use a hybrid approach which takes a few variables and makes them stand-alone typed arrays.
Not sure if this is what you were getting at. But TAs are a Family Favorite in our team’s code!