Skip to content

Commit

Permalink
supply phetioReadOnly, phetioHighFrequency, and phetioDocumentation, #…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Sep 21, 2021
1 parent b603941 commit 84d3aad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion js/friction/model/Atom.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class Atom extends PhetioObject {
// @public - the position of the atom
this.positionProperty = new Vector2Property( initialPosition, {
tandem: config.tandem.createTandem( 'positionProperty' ),
phetioHighFrequency: true
phetioHighFrequency: true,
phetioReadOnly: true
} );

// @private {Vector2} - the center position, around which oscillations occur
Expand Down
16 changes: 12 additions & 4 deletions js/friction/model/FrictionModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ class FrictionModel extends PhetioObject {
// @public (phet-io) - Instrumented so that PhET-iO clients can get a message when an atom evaporates
this.evaporationEmitter = new Emitter( {
tandem: tandem.createTandem( 'evaporationEmitter' ),
phetioDocumentation: 'Emits when atoms evaporate from the top book'
phetioDocumentation: 'Emits when atoms evaporate from the top book',
phetioReadOnly: true
} );

// @public (read-only) {Atom[][]}- array of all atoms which are able to evaporate organized by row such that the
Expand All @@ -208,7 +209,8 @@ class FrictionModel extends PhetioObject {

// @public {NumberProperty} - distance between books
this.distanceBetweenBooksProperty = new NumberProperty( MAGNIFIED_ATOMS_INFO.distance, {
tandem: tandem.createTandem( 'distanceBetweenBooksProperty' )
tandem: tandem.createTandem( 'distanceBetweenBooksProperty' ),
phetioHighFrequency: true
} );

// @public {NumberProperty} - additional offset, results from drag
Expand All @@ -223,7 +225,9 @@ class FrictionModel extends PhetioObject {

// @private - are books in contact?
this.contactProperty = new BooleanProperty( false, {
tandem: tandem.createTandem( 'contactProperty' )
tandem: tandem.createTandem( 'contactProperty' ),
phetioReadOnly: true,
phetioDocumentation: 'This Property will be true when the two books are in contact, with not space between their atoms.'
} );

// @public {BooleanProperty} - Show hint icon. Only set by model and on a11y grab interaction.
Expand Down Expand Up @@ -252,7 +256,11 @@ class FrictionModel extends PhetioObject {
// {boolean} - has the atom been "successfully" interacted with. This subjective term is defined based on the
// pedagogical goals of the sim (to rub the other book)
this.successfullyInteractedWithProperty = new BooleanProperty( false, {
tandem: tandem.createTandem( 'successfullyInteractedWithProperty' )
tandem: tandem.createTandem( 'successfullyInteractedWithProperty' ),
phetioReadOnly: true,
phetioDocumentation: 'This somewhat subjective term is defined based on the pedagogical goals of the sim, which ' +
'is to rub the book on the other to make friction. This Property will be true when any amount ' +
'of friction is created.'
} );

this.vibrationAmplitudeProperty.link( amplitude => {
Expand Down

0 comments on commit 84d3aad

Please sign in to comment.