Create Phaser Sprite flat colored
craft.$shape(key, frame, options)
key
Phaser sprite keyframe
<Object> | <String> Phaser sprite frame Can be used as object to pass optionsoptions
<Object> | <String> Can be used as string to pass a framecache
<Boolean> Cache shapecolor
<String> Fill color in '#FFFFFF' or '0xFFFFFF' format.x
<Number> Position xy
<Number> Position yframe
<Number> Phaser sprite framegroup
<Number> Phaser group//simple
craft.$shape('phaserDude',{
color:'#FF00FF',
});
//full default values
craft.$shape('main',{
frame:'banana',
x:0,
y:0,
group:undefined,
cache:true,
color:'#FF0000'
)
// second parameter can be used as string to call a frame
craft.$shape('atlas','banana',{
color:'#FF00FF',
});