SpinningIndicatorNode¶
Overview¶
SpinningIndicatorNode is a spinning progress indicator, used to indicate operation is in progress (but with no indication of how far along it is). It spins in a circular clockwise pattern.
The actual rectangles/circles/etc. (called elements in the documentation) stay in fixed positions, but their fill is changed to give the impression of rotation.
@author Jonathan Olson <jonathan.olson@colorado.edu> @author Chris Malley (PixelZoom, Inc.)
Class SpinningIndicatorNode¶
Constructor¶
new SpinningIndicatorNode( providedOptions? : SpinningIndicatorNodeOptions )¶
Instance Methods¶
step( dt : number )¶
dispose()¶
Static Methods¶
rectangleFactory( diameter : number, numberOfElements : number ) : Rectangle¶
Factory method for creating rectangle-shaped elements, sized to fit.
circleFactory( diameter : number, numberOfElements : number ) : Circle¶
Factory method for creating circle-shaped elements, sized to fit.
Type SpinningIndicatorNodeOptions¶
- diameter?: number
Diameter of the indicator - speed?: number
A multiplier for how fast/slow the indicator will spin. - numberOfElements?: number
The number of elements that make up the indicator - elementFactory?: ( diameter: number, numberOfElements: number ) => Path
Creates one of the elements (Path) that make up the indicator - activeColor?: Color | string
The active "mostly visible" color at the lead. - inactiveColor?: Color | string
The inactive "mostly invisible" color at the tail. - & StrictOmit<NodeOptions, "children">
Source Code¶
See the source for SpinningIndicatorNode.ts in the scenery-phet repository.