Skip to content

Commit

Permalink
Chore: Update example code
Browse files Browse the repository at this point in the history
  • Loading branch information
bigtimebuddy authored Mar 20, 2024
1 parent a3838fb commit f679ada
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,13 @@ app.ticker.add(() => {

// extract and save the stage
app.renderer.render(app.stage);
const base64Image = app.renderer.extract
.canvas(app.stage)
.toDataURL('image/png');

const base64Image = app.renderer.view.toDataURL('image/png');
const base64Data = base64Image.replace(/^data:image\/png;base64,/, '');
const output = `./test.png`;

writeFileSync(output, base64Data, 'base64');

process.exit(0);
```

## Full environment setup with Docker 🐳
Expand Down

0 comments on commit f679ada

Please sign in to comment.