UNPKG

scrawl-canvas

Version:
77 lines (57 loc) 2.23 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 011</title> <link href="css/normalize.css" rel="stylesheet" /> <link href="css/tests.css" rel="stylesheet" /> <style> #my-image-store { display: none; } .controls { grid-template-columns: 1fr 2fr 1fr 2fr; } </style> </head> <body> <h1><a href="index.html">Scrawl-canvas v8</a> - Filters test 011</h1> <h2>Parameters for: chromakey filter</h2> <h3>Where red represents the background color -<br />only shows through where pixels have been removed by the filter</h3> <h3>To change image, drag-and-drop an image file over the canvas</h3> <div class="controls"> <div class="blue label">Transparent at</div> <div class="blue"><input class="controlItem" id="transparentAt" type="range" value="0" min="0" max="1" step="0.01" /></div> <div class="blue label">Opaque at</div> <div class="blue"><input class="controlItem" id="opaqueAt" type="range" value="1" min="0" max="1" step="0.01" /></div> <div class="green label">Reference color</div> <div class="green"><input class="controlItem" id="reference" type="color" value="#007700" /></div> <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="400" data-scrawl-canvas data-base-background-color="red" ></canvas> <p id="reportmessage"></p> <div class="testinfo"> <h4>Test purpose</h4> <ul> <li>Create a test Picture entity</li> <li>Create a chromakey filter and apply it to the test entity</li> <li>Update filter attributes and observe the effect they have on the entity</li> </ul> <p><b>Touch test:</b> not required</p> <p><a href="../docs/demo/filters-011.html">Annotated code</a></p> </div> <div id="my-image-store"> <img id="iris" src="img/iris.png" class="flowers" /> </div> <script src="filters-011.js" type="module"></script> </body> </html>