HeaterCoolerFront¶
Overview¶
Front of the HeaterCoolerNode. It is independent from the HeaterCoolerBack so that one can easily layer objects inside of the HeaterCoolerNode. The HeaterCoolerFront contains the heater body, labels, and control slider.
@author Siddhartha Chinthapally (Actual Concepts) on 20-11-2014. @author Jesse Greenberg
Class HeaterCoolerFront¶
Constructor¶
new HeaterCoolerFront( heatCoolAmountProperty : NumberProperty, providedOptions? : HeaterCoolerFrontOptions )¶
Instance Methods¶
dispose()¶
Instance Properties¶
slider : VSlider¶
(readonly)
please use judiciously, see https://github.com/phetsims/scenery-phet/issues/442
Static Properties¶
DEFAULT_BASE_COLOR¶
(readonly)
SET_TO_ZERO_HOTKEY_DATA : HotkeyData¶
(readonly)
Type HeaterCoolerFrontOptions¶
- baseColor?: Color | string
- width?: number
- heatEnabled?: boolean
- coolEnabled?: boolean
- snapToZero?: boolean
- snapToZeroThreshold?: number
the percentage of the slider's minimum and maximum range at which the slider should snap to zero when released. Note that it's only used when this.snapToZeroProperty is false and when both heating and cooling are enabled. A value of 1 is the same as snapToZero: true, and a value of 0 removes snapping entirely. Default value empirically determined, see https://github.com/phetsims/scenery-phet/issues/568 - heatString?: string | TReadOnlyProperty<string>
slider label options - coolString?: string | TReadOnlyProperty<string>
- labelFont?: Font
- labelMaxWidth?: number
- thumbSize?: Dimension2
slider options - thumbTouchAreaXDilation?: number
- thumbTouchAreaYDilation?: number
- thumbMouseAreaXDilation?: number
- thumbMouseAreaYDilation?: number
- thumbFill?: TColor
- thumbFillHighlighted?: TColor
- heaterCoolerBack?: HeaterCoolerBack | null
links the NodeIO Properties of the provided HeaterCoolerBack to this HeaterCoolerFront - sliderOptions?: SliderOptions
- snapToZeroPropertyOptions?: BooleanPropertyOptions
Passed to snapToZeroProperty - phetioInstrument?: boolean
HeaterCoolerFront is sometimes instrumented as a parent component, and is sometimes a sub-compoent to HeaterCoolerNode.js. This option provides the ability to limit the number of intermediate Nodes in the instrumented tree. This doesn't affect the instrumentation of sub-components like the slider. - & NodeOptions
Source Code¶
See the source for HeaterCoolerFront.ts in the scenery-phet repository.