Skip to content

RectangularMomentaryButton

Overview

RectangularMomentaryButton is a rectangular momentary button that toggles a Property between 2 values. The 'off value' is the value when the button is not pressed. The 'on value' is the value when the button is pressed.

TODO: Not supported with alternative input, see https://github.com/phetsims/scenery/issues/1117

@author Chris Malley (PixelZoom, Inc.)

Class RectangularMomentaryButton

import { RectangularMomentaryButton } from 'scenerystack/sun';

Constructor

new RectangularMomentaryButton( property : TProperty<T>, valueOff : T, valueOn : T, providedOptions? : RectangularMomentaryButtonOptions )

Instance Methods

dispose()

Type RectangularMomentaryButtonOptions

import type { RectangularMomentaryButtonOptions } from 'scenerystack/sun';

Source Code

See the source for RectangularMomentaryButton.ts in the sun repository.