Class: Trail

Trail aspect of an entity. Similar to a Renderable in many ways but uses the entity’s position from each physics update to update a PIXI.Rope mesh to leave a trail behind the object.

Constructors

constructor

new Trail(config): Trail

Parameters

Name Type
config TrailConfig

Returns

Trail

Properties

container

Readonly container: Container<DisplayObject>


points

Private Readonly points: Point[]


positions

Private Readonly positions: Point[]


rope

Readonly rope: SimpleRope


step

Private step: number

Methods

setPosition

setPosition(position): void

Parameters

Name Type
position Point

Returns

void


updateRope

updateRope(t): void

Parameters

Name Type
t number

Returns

void