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
documented support for html thumbs
- Loading branch information
Alan Luo
committed
Jul 26, 2017
1 parent
14545b4
commit 44af003
Showing
5 changed files
with
75 additions
and
2 deletions.
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
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,22 @@ | ||
<style type="text/css"> | ||
#mycontent { | ||
padding:1em; | ||
} | ||
#contentcanvas { | ||
border:1px solid black; | ||
width:100%; | ||
} | ||
</style> | ||
<p id="mycontent">You can also make dynamic HTML thumbnails.</p> | ||
<canvas id="contentcanvas" width="100" height="100"></canvas> | ||
|
||
<script> | ||
var contentcanvas = document.getElementById("contentcanvas"); | ||
var cctx = contentcanvas.getContext('2d'); | ||
function drawContent() { | ||
cctx.fillStyle="hsl("+((Date.now()*0.1)%360)+",50%, 50%)"; | ||
cctx.fillRect(0, 0, contentcanvas.width, contentcanvas.height); | ||
window.requestAnimationFrame(drawContent); | ||
} | ||
window.requestAnimationFrame(drawContent); | ||
</script> |
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
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