UNPKG

scrawl-canvas

Version:
75 lines (59 loc) 2.36 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 Particles 011</title> <link href="css/normalize.css" rel="stylesheet" /> <link href="css/tests.css" rel="stylesheet" /> <style> .controls { grid-template-columns: 1fr 2fr 1fr 2fr; } canvas { margin: 0 auto; } </style> </head> <body> <h1><a href="index.html">Scrawl-canvas v8</a> - Particles test 011</h1> <h2>Tracer entity: generation and functionality</h2> <div class="controls"> <div class="green label">Select filter</div> <div class="green"> <select class="controlItem" id="filter"> <option value="">none</option> <option value="grayscale">grayscale</option> <option value="invert">invert</option> <option value="matrix">matrix</option> <option value="tint">tint</option> </select> </div> <div class="green label">&nbsp;</div> <div class="green">&nbsp;</div> </div> <canvas id="mycanvas" width="600" height="400" data-scrawl-canvas data-base-background-color="aliceblue" ></canvas> <p id="reportmessage"></p> <div class="testinfo"> <h4>Test purpose</h4> <p><b>Be aware</b> that applying a filter to a particle system can cause it to fail in interesting yet mysterious ways! In some browsers, the addition of a filter can also cause a significant degradation in canvas animation speeds</p> <ul> <li>Create a path-based Shape entity.</li> <li>Create a Tracer entity; set it to delta-animate along the Shape entity's path.</li> <li>Clone the tracer entity (twice), giving each a clone of the original's artefact, and its own 'stampAction' function.</li> <li>Add a selection of Filter objects to the demo; check that applying a filter to one of the Tracer entitys displays as expected.</li> <li>Make the Shape entity draggable; check that the Tracer entitys keep up with the Shape (though their history details will not update).</li> </ul> <p><b>Touch test:</b> should work as expected</p> <p><a href="../docs/demo/particles-011.html">Annotated code</a></p> </div> <script src="particles-011.js" type="module"></script> </body> </html>