-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* update one more frame after canvas source paused Calling `canvasSource.pause()` lets us know we can stop pulling in updates from it. Since it is possible that changes were made to the canvas source since the last render we should pull in one more update before stopping. This also lets you call play and pause immediately to render just one frame: ctx.fillRect(10, 10, 50, 50); canvasSource.play(); canvasSource.pause(); * add test * don't render changes made after canvasSource.pause() * optimize * optimize
- Loading branch information
Showing
5 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 64, | ||
"height": 64, | ||
"addFakeCanvas": { | ||
"id": "fake-canvas", | ||
"image": "./image/0.png" | ||
}, | ||
"operations": [ | ||
["wait"], | ||
["updateFakeCanvas", "canvas", "./image/1.png", "./image/0.png"] | ||
] | ||
} | ||
}, | ||
"center": [ | ||
-122.514426, | ||
37.562984 | ||
], | ||
"zoom": 14, | ||
"sources": { | ||
"canvas": { | ||
"type": "canvas", | ||
"animate": false, | ||
"coordinates": [ | ||
[ | ||
-122.51596391201019, | ||
37.56238816766053 | ||
], | ||
[ | ||
-122.51467645168304, | ||
37.56410183312965 | ||
], | ||
[ | ||
-122.51309394836426, | ||
37.563391708549425 | ||
], | ||
[ | ||
-122.51423120498657, | ||
37.56161849366671 | ||
] | ||
], | ||
"canvas": "fake-canvas" | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "canvas", | ||
"type": "raster", | ||
"source": "canvas", | ||
"paint": { | ||
"raster-fade-duration": 0 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters