GaugeNode¶
Overview¶
GaugeNode is a circular gauge that depicts some dynamic value. This was originally ported from the speedometer node in forces-and-motion-basics.
@author Sam Reid (PhET Interactive Simulations) @author John Blanco (PhET Interactive Simulations)
Class GaugeNode¶
Constructor¶
new GaugeNode( valueProperty : TReadOnlyProperty<number>, labelProperty : TReadOnlyProperty<string>, range : Range, providedOptions? : GaugeNodeOptions )¶
Instance Methods¶
dispose()¶
Instance Properties¶
radius : number¶
(readonly)
Type GaugeNodeOptions¶
- radius?: number
- backgroundFill?: TColor
- backgroundStroke?: TColor
- backgroundLineWidth?: number
- maxLabelWidthScale?: number
- numberOfTicks?: number
ticks - majorTickStroke?: TColor
- minorTickStroke?: TColor
- majorTickLength?: number
- minorTickLength?: number
- majorTickLineWidth?: number
- minorTickLineWidth?: number
- labelTextOptions?: GaugeNodeLabelTextOptions
label text - span?: number
the top half of the gauge, plus PI/8 extended below the top half on each side - needleLineWidth?: number
- updateWhenInvisible?: boolean
true - always updates, even when invisible false - does not update when invisible, use to optimize performance - & NodeOptions
Source Code¶
See the source for GaugeNode.ts in the scenery-phet repository.