Skip to content

Sprite

Overview

Represents a single sprite for the Sprites node, whose image can change over time (if it gets regenerated, etc.).

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

Class Sprite

import { Sprite } from 'scenerystack/scenery';

Constructor

new Sprite( spriteImage : SpriteImage )

Instance Methods

getShape() : Shape

Returns a Shape that represents the hit-testable area of this Sprite.

containsPoint( point : Vector2 ) : boolean

Returns whether a given point is considered "inside" the Sprite

Instance Properties

imageProperty : TProperty<SpriteImage>

(readonly)

Source Code

See the source for Sprite.ts in the scenery repository.