ect size</span>
  <span class="kd">var</span> <span class="nx">ctx</span> <span class="o">=</span> <span class="nx">canvas</span><span class="p">.</span><span class="nx">getContext</span><span class="p">(</span><span class="s1">'2d'</span><span class="p">);</span>
  <span class="nx">resize</span><span class="p">();</span>

  <span class="c1">// resize canvas when window is resized</span>
  <span class="kd">function</span> <span class="nx">resize</span><span class="p">()</span> <span class="p">{</span>
    <