rex_canvasext
Introduction
Extension of canvas plugin.
Extension of canvas plugin.
Usage
Load image from URL
Sample capx
Call "Action:Load image from URL" to load image from url, "Condition:On image URL loaded" will be triggered while loading finished.
Sample capx
Call "Action:Load image from URL" to load image from url, "Condition:On image URL loaded" will be triggered while loading finished.
Compare with sprite object
Sprite object has the same feature, too. But it will replace the image of frame for all sprite instances. The loading image of this behavior will affect only this canvas instance.
Sprite object has the same feature, too. But it will replace the image of frame for all sprite instances. The loading image of this behavior will affect only this canvas instance.
Shadow
Sample capx
"Action:Set shadow" could add a shadow to next drawing actions. Set shadow to default value ( offset = (0, 0). blur = 0, color = "black" to disable the shadow.
Sample capx
"Action:Set shadow" could add a shadow to next drawing actions. Set shadow to default value ( offset = (0, 0). blur = 0, color = "black" to disable the shadow.
Run javascript code
Sample capx
Call "Action:Eval" to draw by javascript code on "ctx" variable. The drawing api of canvas could be found in this page.
For example, these code could draw a box.
Sample capx
Call "Action:Eval" to draw by javascript code on "ctx" variable. The drawing api of canvas could be found in this page.
For example, these code could draw a box.
Override original saving/loading
Sample capx
Set property "Override SL" to "Zlib" to override original saving/loading functions defined in canvas plugin by zlib saving/loading. It could decrease output size very much.
Or get saving zlib string by "Expression:AsJSON", then load image back by "Action:Load". (Sample capx)
Sample capx
Set property "Override SL" to "Zlib" to override original saving/loading functions defined in canvas plugin by zlib saving/loading. It could decrease output size very much.
Or get saving zlib string by "Expression:AsJSON", then load image back by "Action:Load". (Sample capx)