Skip to content

ImageDataRenderer

Overview

Utility type for rendering to a canvas via putImageData.

@author Sam Reid (PhET Interactive Simulations)

Class ImageDataRenderer

import { ImageDataRenderer } from 'scenerystack/scenery-phet';

Constructor

new ImageDataRenderer( width : number, height : number )

Instance Methods

putImageData( x, y )

Paints image data onto the canvas.

Instance Properties

canvas : HTMLCanvasElement

(readonly)

data : Uint8ClampedArray

(readonly)

Source Code

See the source for ImageDataRenderer.ts in the scenery-phet repository.