Skip to content

Documentation / @debuffjp/juice / Trail

Class: Trail ​

Defined in: trail.ts:4

Fading polyline behind a moving point (dashes, projectiles, swipes).

Constructors ​

Constructor ​

new Trail(length?, color?, width?): Trail

Defined in: trail.ts:8

Parameters ​

length? ​

number = 12

color? ​

string = "#fff"

width? ​

number = 3

Returns ​

Trail

Properties ​

color ​

color: string = "#fff"

Defined in: trail.ts:10


length ​

readonly length: number = 12

Defined in: trail.ts:9


width ​

width: number = 3

Defined in: trail.ts:11

Methods ​

clear() ​

clear(): void

Defined in: trail.ts:23

Returns ​

void


draw() ​

draw(draw): void

Defined in: trail.ts:28

Parameters ​

draw ​

DrawLike

Returns ​

void


push() ​

push(x, y): void

Defined in: trail.ts:14

Parameters ​

x ​

number

y ​

number

Returns ​

void