Opacity¶
Under Construction
This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/scenery/blob/main/js/filters/Opacity.ts for the most up-to-date information.
Overview¶
Opacity filter
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class Opacity¶
Constructor¶
new Opacity( amount : number )¶
Instance Methods¶
getCSSFilterString() : string¶
Returns the CSS-style filter substring specific to this single filter, e.g. grayscale(1)
. This should be used for both DOM elements (https://developer.mozilla.org/en-US/docs/Web/CSS/filter) and when supported, Canvas (https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/filter).
isDOMCompatible() : boolean¶
applyCanvasFilter( wrapper : CanvasContextWrapper )¶
applySVGFilter( svgFilter : SVGFilterElement, inName : string, resultName? : string )¶
Source Code¶
See the source for Opacity.ts in the scenery repository.