Skip to content

Commit

Permalink
instrument IntroAnimator, #69
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Dec 26, 2022
1 parent b7140dc commit b3779af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions js/intro/view/IntroAnimator.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export default class IntroAnimator {

// Vertical position of system 1, instrumented for PhET-iO to support record/playback, see #53.
const system1CenterYProperty = new NumberProperty( system1Node.centerY, {
tandem: tandem.createTandem( 'system1CenterYProperty' )
tandem: tandem.createTandem( 'system1CenterYProperty' ),
phetioReadOnly: true
} );
system1CenterYProperty.link( centerY => {
system1Node.centerY = centerY;
Expand All @@ -41,7 +42,8 @@ export default class IntroAnimator {
// Opacity of system 2, instrumented for PhET-iO to support record/playback, see #53.
const system2OpacityProperty = new NumberProperty( system2Node.opacity, {
isValidValue: value => ( value >= 0 && value <= 1 ),
tandem: tandem.createTandem( 'system2OpacityProperty' )
tandem: tandem.createTandem( 'system2OpacityProperty' ),
phetioReadOnly: true
} );
system2OpacityProperty.link( opacity => {
system2Node.opacity = opacity;
Expand Down
2 changes: 1 addition & 1 deletion js/intro/view/IntroScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default class IntroScreenView extends ScreenView {

// @private Animates the transitions between 1 and 2 systems
this.animator = new IntroAnimator( viewProperties.numberOfSystemsProperty, system1Node, system2Node,
this.layoutBounds, tandem );
this.layoutBounds, tandem.createTandem( 'animator' ) );
}

/**
Expand Down

0 comments on commit b3779af

Please sign in to comment.