Create Phaser Sprite with stroke
craft.$stroke(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 framesize
<Number> Stroke sizecache
<Boolean> Cache strokepixel
<Number> Gap size between the stroke drawing (smaller more resource will be used, recommended bigger than 3) Default=1
inside
<Boolean> If set false
the middle part become a flat colored shapex
<Number> Position xy
<Number> Position yframe
<Number> Phaser sprite framegroup
<Number> Phaser group//simple
var stroke = craft.$stroke('phaserDude',{
size:2,
color:'#FF00FF',
});
//full default values
craft.$stoke('main',{
frame:'banana',
x:0,
y:0,
group:undefined,
cache:true,
size:1,
pixel:1,
inside:true,
color:'#FF0000'
)
// second parameter can be used as string to call a frame
craft.$shape('atlas','banana',{
size:2,
color:'#FF00FF',
});