API Docs for: 0.2.0
Show:

Quintus.Sprites Class

Quintus Sprites Module Class

Methods

Q._generateCollisionPoints

(
  • obj
)

Generate a square set of c.points on an object from the object transform matrix and p.points

c.points represents the collision points of an sprite in world coordinates, scaled, rotate and taking into account any parent transforms.

Parameters:

  • obj q.sprite
    • object to add collision points to

q._generatePoints

(
  • obj
  • force
)

generate a square set of p.points on an object from p.w and p.h

p.points represent the collision points for an object in object coordinates.

Parameters:

  • obj Q.Sprite
    • object to add points to
  • force Boolean
    • if set to true, will regenerate p.points even if it already exists, otherwise if p.points exist it'll be left alone

Q.compileSheets

(
  • imageAsset
  • {String
)

Create a number of Q.SpriteSheet objects from an image asset and a sprite data JSON asset

Parameters:

  • imageAsset String
  • {String Object

    spriteDataAsset

Q.sheet

(
  • name
  • [asset]
  • [options]
)

Return a Q.SpriteSheet or create a new sprite sheet

Parameters:

  • name String
    • name of sheet to return or create
  • [asset] String optional
    • if provided, will create a sprite sheet using this asset
  • [options] Object optional
    • if provided, will be passed as options to Q.SpriteSheet

Properties

Q.SPRITE_ACTIVE

Unknown final

active sprite type 4

Q.SPRITE_ALL

Unknown final

all sprite type - 0xFFFF

Q.SPRITE_DEFAULT

Unknown final

default sprite type 1

Q.SPRITE_ENEMY

Unknown final

enemy sprite type 16

Q.SPRITE_FRIENDLY

Unknown final

friendly sprite type 8

Q.SPRITE_NONE

Unknown final

Bitmask 0 to indicate no sprites

Q.SPRITE_PARTICLE

Unknown final

particle sprite type 2

Q.SPRITE_POWERUP

Unknown final

powerup sprite type 32

Q.SPRITE_UI

Unknown final

UI sprite type 64