Skip to content

StopSignNode

StopSignNode (from scenerystack/scenery-phet) draws a classic octagonal stop-sign icon: a red octagon, a thin white border, and a thin black outer border, built from three concentric regular-octagon Paths. It's a static, non-interactive icon — for the circle-slash "not allowed" icon instead, see BannedNode.

ts
import { StopSignNode } from 'scenerystack/scenery-phet';
import { Tandem } from 'scenerystack/tandem';

A minimal example

ts
const stopIcon = new StopSignNode( {
  fillRadius: 18,
  tandem: Tandem.REQUIRED.createTandem( 'stopIcon' )
} );

Constructor

ts
new StopSignNode( providedOptions?: StopSignNodeOptions )

Options

OptionDefaultEffect
fillRadius23Radius of the innermost (red) octagon
innerStrokeWidth2Width of the white border, added on top of fillRadius
outerStrokeWidth1Width of the black border, added on top of fillRadius + innerStrokeWidth
fill'red'Color of the innermost octagon
innerStroke'white'Color of the middle border ring
outerStroke'black'Color of the outermost border ring

The three borders are built as three separate, fully-filled octagon Paths stacked in z-order (outer, then inner-stroke, then fill) rather than as actual strokes on a single Path — that's why they're configured as fillRadius/innerStrokeWidth/outerStrokeWidth instead of ordinary Path stroke/lineWidth options.

tandem is required by default

StopSignNode's options default tandem: Tandem.REQUIRED (with tandemNameSuffix: 'StopSignNode') — omitting tandem will assert in an instrumented sim. Pass Tandem.OPT_OUT explicitly if this particular icon genuinely doesn't need PhET-iO instrumentation.