Skip to content

Invert

Overview

Invert filter

@author Jonathan Olson <jonathan.olson@colorado.edu>

Class Invert

import { Invert } from 'scenerystack/scenery';

Constructor

new Invert( amount )

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 )

Static Properties

FULL : Invert

(readonly)

Source Code

See the source for Invert.ts in the scenery repository.