Class Index | File Index

Classes


Class punx.Sprite


Defined in: punx.dist.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
punx.Sprite(args)
A screen object.
Field Summary
Field Attributes Field Name and Description
 
h
Sprite's crop height in the sprite sheet.
 
Sprite sheet to draw from.
 
w
Sprite's crop width in the sprite sheet.
 
x
Sprite's X crop offset in the sprite sheet.
 
y
Sprite's Y crop offset in the sprite sheet.
Method Summary
Method Attributes Method Name and Description
 
draw(ctx, x, y, w, h)
Sprite draws itself to the context and position supplied.
Class Detail
punx.Sprite(args)
A screen object.
Parameters:
{object} args
Construction values for public properties.
Field Detail
{int} h
Sprite's crop height in the sprite sheet.

{Image} sheet
Sprite sheet to draw from.

{int} w
Sprite's crop width in the sprite sheet.

{int} x
Sprite's X crop offset in the sprite sheet.

{int} y
Sprite's Y crop offset in the sprite sheet.
Method Detail
draw(ctx, x, y, w, h)
Sprite draws itself to the context and position supplied. If the sheet isn't set, a red rectangle is drawn.
Parameters:
ctx
Canvas context.
x
y
w
h

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Oct 13 2013 01:37:55 GMT-0700 (PDT)