UNPKG

scrawl-canvas

Version:
87 lines (71 loc) 2.57 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 003</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; } canvas { margin: 0 auto; } </style> </head> <body> <h1><a href="index.html">Scrawl-canvas v8</a> - Particles test 003</h1> <h2>Position Emitter entity: start; pivot; mimic; path; mouse; drag-and-drop</h2> <h3>The Emitter is draggable</h3> <div class="controls"> <div class="pink label">Artefact</div> <div class="pink"> <select class="controlItem" id="artefact"> <option value="star">Star</option> <option value="wheel">Wheel</option> <option value="block">Block</option> <option value="picture">Picture</option> </select> </div> <div class="pink label">Position lock</div> <div class="pink"> <select class="controlItem" id="position"> <option value="start">Start</option> <option value="pivot">Pivot</option> <option value="mimic">Mimic</option> <option value="path">Path</option> <option value="mouse">Mouse</option> </select> </div> </div> <canvas id="mycanvas" width="600" height="600" data-scrawl-canvas data-base-background-color="aliceblue" ></canvas> <p id="reportmessage"></p> <div class="testinfo"> <h4>Test purpose</h4> <ul> <li>Create a range of entitys to act as a pivot, a mimic, and a path</li> <li>Create a particle world object, a range of visual entitys (Star, Wheel, Block, Picture) alongside a fill gradient, and a particle Emitter entity using them</li> <li>Check that the Emitter entity can lock to the pivot, mimic and path entitys</li> <li>Check that the emitter can use pivot, mimic and path roll values</li> <li>Check that the Emitter entity can be dragged and dropped</li> <li>Make sure the gradient works as expected - applied at Cell level for the Wheel entity; applied at entity level for the Block entity</li> </ul> <p><b>Touch test:</b> should work as expected</p> <p><a href="../docs/demo/particles-003.html">Annotated code</a></p> </div> <script src="particles-003.js" type="module"></script> <img id="bunny" src="img/bunny.png" /> </body> </html>