screenshot-v1
Add extra methods to the Scene to capture screenshots of the canvas.
stage = (new Stage()).go()
// creates new image
stage.screenshot.toNewImage()
Download a jpg file:
stage = new Stage
stage.screenshot.downloadImage("my-filename.jpg")
Or spawn a link:
stage.screenshot.asDownloadLink()
// Click the newly DOM inserted link
Meta Data
| filepath_exists | True |
| path | screenshot-v1 |
| filepath | screenshot-v1.js |
| clean_files | () |
-
ClassDeclarationclass
Screenshot
extends Noneclass comments:Add extra methods to the `Scene` to capture screenshots of the canvas. stage = (new Stage()).go() // creates new image stage.screenshot.toNewImage() Download a jpg file: stage = new Stage stage.screenshot.downloadImage("my-filename.jpg") Or spawn a link: stage.screenshot.asDownloadLink() // Click the newly DOM inserted linkoptional, but you can give the file a nameExpressionStatement:
dict_keys(['type', 'expression', 'pos'])ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])VariableDeclarationVariableDeclarationExpressionStatement:
dict_keys(['type', 'expression', 'pos'])