SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<style>
*{margin:0;padding:0}
body{background:#111}
canvas{width:100vw;height:100vh;display:block}
</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const c=document.getElementById('c'),ctx=c.getContext('2d');
c.width=innerWidth*devicePixelRatio;
c.height=innerHeight*devicePixelRatio;
ctx.scale(devicePixelRatio,devicePixelRatio);
c.onclick=e=>{
    ctx.strokeStyle="#fff";
    ctx.lineWidth=2;
    ctx.beginPath();
    ctx.moveTo(e.clientX,e.clientY);
    for(let i=0;i<8;i++){
        let ang=Math.random()*Math.PI*2;
        let len=Math.random()*120+30;
        ctx.lineTo(e.clientX+Math.cos(ang)*len,e.clientY+Math.sin(ang)*len);
    }
    ctx.stroke();
}
</script>
</body>
</html>