mirror of
https://github.com/scratchfoundation/scratch-render.git
synced 2025-07-23 12:38:53 -04:00
Fixed the example in README.md
I made the edit without testing, please review the change if it makes sense to you, thank you.
This commit is contained in:
parent
1063f68572
commit
196c33a161
1 changed files with 2 additions and 2 deletions
|
@ -27,13 +27,13 @@ npm install https://github.com/LLK/scratch-render.git
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var canvas = document.getElementById('myStage');
|
var canvas = document.getElementById('myStage');
|
||||||
var debug = document.getElementById('myDebugElement');
|
var debug = document.getElementById('myDebug');
|
||||||
|
|
||||||
// Instantiate the renderer
|
// Instantiate the renderer
|
||||||
var renderer = new require('scratch-render')(canvas);
|
var renderer = new require('scratch-render')(canvas);
|
||||||
|
|
||||||
// Connect to debug canvas
|
// Connect to debug canvas
|
||||||
renderer.setDebugCanvas(document.getElementById('debug-canvas'));
|
renderer.setDebugCanvas(debug);
|
||||||
|
|
||||||
// Start drawing
|
// Start drawing
|
||||||
function drawStep() {
|
function drawStep() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue