1));
    function resize() {
      W = canvas.width = Math.floor(window.innerWidth * DPR);
      H = canvas.height = Math.floor(window.innerHeight * DPR);
      canvas.style.width = window.innerWidth + 'px';
      canvas.style.height = window.innerHeight + 'px';
    }
    resize();
    window.addEventListener('resize', resize);

    const state = {
      shape: 'puff',
      size: 64,
      softness: 0.85,
      wind: 12,
      painting: false,
      last: null,
      planesEnabled: true,
    };

    const 