UNPKG

scrawl-canvas

Version:
65 lines (48 loc) 1.82 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Demo Filters 002a</title> <link href="css/normalize.css" rel="stylesheet" /> <link href="css/tests.css" rel="stylesheet" /> <style> .controls { grid-template-columns: 1fr 2fr 1fr 2fr; } img { display: none; } </style> </head> <body> <h1><a href="index.html">Scrawl-canvas v8</a> - Filters test 002a</h1> <h2>Filters - cache output to improve render speeds</h2> <div class="controls"> <div class="lavender label">Opacity</div> <div class="lavender"><input class="controlItem" id="opacity" type="range" value="1" min="0" max="1" step="0.01" /></div> </div> <canvas id="mycanvas" width="400" height="540" data-scrawl-canvas ></canvas> <img id="iris" src="img/iris-120.png" class="flowers" /> <p id="reportmessage"></p> <div class="testinfo"> <h4>Test purpose</h4> <ul> <li>Create red, green, blue, cyan, magenta, yellow, notred, notgreen, notblue, grayscale, sepia and invert filters</li> <li>Create a set of Picture entitys to display the effects of each filter on their image asset</li> <li>Cache the output of each Picture entity and create new Picture entitys from those cached images</li> <li>Add functionality to dynamically capture UI updates to the filters in the cached images</li> </ul> <p><b>Known issue:</b> capturing the cached images takes time and requires the use of setTimeout.</p> <p><b>Touch test:</b> not required</p> <p><a href="../docs/demo/filters-002a.html">Annotated code</a></p> </div> <script src="filters-002a.js" type="module"></script> </body> </html>