ShadedRectangle¶
Under Construction
This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/scenery-phet/blob/main/js/ShadedRectangle.ts for the most up-to-date information.
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.