Open zepumph opened 2 weeks ago
Noting how this should be have originally been done in https://github.com/phetsims/buoyancy/issues/61
@AgustinVallejo @samreid and I would like to proceed by having a single PhetioCapsule per MassShape per object. So ObjectA gets a whole set of PhetioCapsules, and so does ObjectB. Here is the potential studio tree look:
objects
objectA
elementProperty
capsules
blockCapsule
coneCapsule
etc
objectB
elementProperty
capsules
blockCapsule
coneCapsule
etc
I considered that center and variability became much simpler when we eliminated the phet-io group, and we designed projectile data lab to have no PhetioGroup or PhetioCapsule. I tested creating each shape statically during startup in this context and saw that in a built sim, the memory footprint was still only 75MB which is acceptable. So this simulation will be better off without any PhetioCapsules at all. After the change, I confirmed that Studio=>Launch works well and preserves the shape selection and customization. Closing.
Reopening because there is a TODO marked for this issue.
Moved unrelated TODOs to side issues, closing.
@AgustinVallejo recommended running this past @zepumph so he is aware that the static preallocation was a good solution here. Reopening for review, please close if all is well.
https://github.com/phetsims/buoyancy/issues/153 is breaking CT and showing that we are not currently supporting dynamic shape instances well. I'll create a new issue to discuss.
@samreid and I dug up https://github.com/phetsims/phet-io/issues/1454 as we remembered out history with heterogeneous dynamic element containers, most importantly about how we decided not to support them. Here are some quotes:
We outlined two problems that may need attention:
Noting here that the assertion over in https://github.com/phetsims/buoyancy/issues/153 isn't just for the type itself. It will also fail out because the
radiusProperty
etc isn't in the archetype. So more discussion here is needed.