Grape.SpriteVisualizer Class
Visualizes a sprite. If no sprite is set, draws a question mark to indicate the error.
Constructor
Grape.SpriteVisualizer
(
-
[opts]
Parameters:
-
[opts]
Object optionalInitial values of properties
Methods
visualize
(
-
ctx
This abstract method is called each render frame if visible is set to true.
Parameters:
-
ctx
CanvasRenderingContext2DThe rendering context
Properties
alpha
Number
The alpha value set before calling the visualize method
Default: 1
subimage
Number
The image index of the sprite to show
Default: 0
visible
Number
If set false, the visualize method is not called.
Default: true