Skip to content

SimDisplay

Overview

Wrap the Display class in sim-specific logic. This includes fuzzing support, browser workarounds that have come up over the years, and many listeners added the Display Instance.

@author Sam Reid (PhET Interactive Simulations) @author Chris Malley (PixelZoom, Inc.) @author Jonathan Olson <jonathan.olson@colorado.edu> @author Michael Kauzmann (PhET Interactive Simulations) @author Jesse Greenberg (PhET Interactive Simulations)

Class SimDisplay

import { SimDisplay } from 'scenerystack/sim';

Constructor

new SimDisplay( providedOptions : SimDisplayOptions )

Instance Methods

fuzzInputEvents()

Handle synthetic input event fuzzing

step( dt : number )

Instance Properties

simulationRoot : Node

(readonly)

root for the simulation and the target for AnimatedPanZoomListener to support magnification since the Display rootNode cannot be transformed

Static Properties

DEFAULT_WEBGL

(readonly)

For consistent option defaults

Type SimDisplayOptions

import type { SimDisplayOptions } from 'scenerystack/sim';

Source Code

See the source for SimDisplay.ts in the joist repository.