Skip to content

spawnLine

spawnLine(game, x1, y1, x2, y2, options?): number

Spawns a straight line from (x1, y1) to (x2, y2): a sprite stretched between them and rotated, so it batches like any other sprite. Move it later with moveLine. spawnLine(game, 0, 0, 100, 50, { width: 2, tint: 0xff0000 })

Game

number

number

number

number

number

number

number

number

number