-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MoleculeIO needs more specific stateSchema for atoms and atomicBonds #40
Comments
This issue is > 2 years old. @jbphet is this issue still relevant? |
Hey @samreid - there has been a lot of phet-io water under the bridge since you created this issue, and the GitHub history shows you as the author of |
Yes, it still seems relevant. MoleculeIO has a schema listed like so: Molecule.MoleculeIO = new IOType( 'MoleculeIO', {
valueType: Molecule,
toStateObject: molecule => molecule.toStateObject(),
fromStateObject: Molecule.fromStateObject,
stateSchema: {
highElectronicEnergyState: BooleanIO,
centerOfGravity: Vector2.Vector2IO,
// TODO: https://github.com/phetsims/greenhouse-effect/issues/40 more specific schema
atoms: ArrayIO( ObjectLiteralIO ),
atomicBonds: ArrayIO( ObjectLiteralIO ),
velocity: Vector2.Vector2IO,
absorptionHysteresisCountdownTime: NumberIO,
currentVibrationRadians: NumberIO,
currentRotationRadians: NumberIO
}
} ); The problem is that the atoms: ArrayIO( Atom.AtomIO ),
atomicBonds: ArrayIO( AtomicBond.AtomicBondIO ), Where |
Thanks for the update @samreid. I'm going to defer this issue. I just checked the published phet-io version of this sim at https://phet-io.colorado.edu/sims/molecules-and-light/1.3/wrappers/index/, and it looks quite old. The "Studio" wrapper isn't shown, which has been around for a long time now. I expect that there will be a moment in the future when this sim needs a full phet-io update, so I'll defer until that time. It just doesn't seem like it would be worth the time and effort to fix this up now. |
From https://github.com/phetsims/phet-io/issues/1774, MoleculeIO needs more specific stateSchema for atoms and atomicBonds. Specifically, create new IO Types rather than using ObjectLiteralIO.
The text was updated successfully, but these errors were encountered: