Skip to content

ImageDataRenderer

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/ImageDataRenderer.ts for the most up-to-date information.

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.