Skip to content

Helper

Overview

Some in-simulation utilities designed to help designers and developers

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

Class Helper

import { Helper } from 'scenerystack/sim';

Constructor

new Helper( sim : Sim, simDisplay : SimDisplay )

Instance Methods

Instance Properties

inputBasedPickingProperty : Property<boolean>

Whether we should use the input system for picking, or if we should ignore it (and the flags) for what is visual

useLeafNodeProperty : Property<boolean>

Whether we should return the leaf-most Trail (instead of finding the one with input listeners)

pointerAreaTypeProperty : Property<PointerAreaType>

activeProperty : TProperty<boolean>

Whether the helper is visible (active) or not

visualTreeVisibleProperty : Property<boolean>

pdomTreeVisibleProperty : Property<boolean>

underPointerVisibleProperty : Property<boolean>

optionsVisibleProperty : Property<boolean>

previewVisibleProperty : Property<boolean>

selectedNodeContentVisibleProperty : Property<boolean>

selectedTrailContentVisibleProperty : Property<boolean>

highlightVisibleProperty : Property<boolean>

boundsVisibleProperty : Property<boolean>

selfBoundsVisibleProperty : Property<boolean>

getHelperNodeVisibleProperty : Property<boolean>

helperVisibleProperty : Property<boolean>

Whether the entire helper is visible (or collapsed)

pointerPositionProperty : TProperty<Vector2>

Where the current pointer is

overInterfaceProperty : Property<boolean>

Whether the pointer is over the UI interface

selectedTrailProperty : TProperty<Trail | null>

If the user has clicked on a Trail and selected it

treeHoverTrailProperty : TProperty<Trail | null>

What Trail the user is over in the tree UI

pointerTrailProperty : TReadOnlyProperty<Trail | null>

What Trail the pointer is over right now

previewTrailProperty : TReadOnlyProperty<Trail | null>

What Trail to show as a preview (and to highlight) - selection overrides what the pointer is over

helperNodeProperty : TReadOnlyProperty<Node | null>

A helper-displayed Node created to help with debugging various types

previewShapeProperty : TReadOnlyProperty<Shape | null>

The global shape of what is selected

screenViewProperty : TProperty<ScreenView | null>

imageDataProperty : TProperty<ImageData | null>

ImageData from the sim

colorProperty : TReadOnlyProperty<Color>

The pixel color under the pointer

Static Methods

initialize( sim : Sim, simDisplay : SimDisplay )

Static Properties

helper : Helper

Singleton, lazily created so we don't slow down startup

Source Code

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