Skip to content

Commit bca2024

Browse files
committed
Update ex.Canvas snippet
1 parent 57f468d commit bca2024

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/canvas/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const game = new ex.Engine({
77

88
// start-snippet{canvas}
99
const canvas = new ex.Canvas({
10+
width: 200,
11+
height: 200,
1012
cache: true, // If true draw once until flagged dirty again, otherwise draw to Canvas every frame
1113
draw: (ctx) => {
1214
console.log('With cache=true I draw once');

0 commit comments

Comments
 (0)