ShadedRectangle¶
Overview¶
A rectangle with pseudo-3D shading.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class ShadedRectangle¶
Constructor¶
new ShadedRectangle( rectBounds : Bounds2, providedOptions? : ShadedRectangleOptions )¶
Instance Methods¶
dispose()¶
Type ShadedRectangleOptions¶
- baseColor?: TColor
- lightFactor?: number
- lighterFactor?: number
- darkFactor?: number
- darkerFactor?: number
- cornerRadius?: number
- lightSource?: LightSource
- lightOffset?: number
What fraction of the cornerRadius should the light and dark gradients extend into the rectangle? Should always be less than 1. - darkOffset?: number
- & NodeOptions
Source Code¶
See the source for ShadedRectangle.ts in the scenery-phet repository.