
}

space.add( bot );
space.bindMouse();
</code></pre>

<p><code>onMouseAction</code> function's <code>type</code> parameter gives you a string indicating the mouse action, such as “move”, “drag”, “drop”, "up" and “down”. The parameters <code>x</code> and <code>y</code> then gives you the current mouse position on the canvas.</p>
<p>Let's draw another circle and make it move with the cursor.</p>
<pre><code class="language-javascript">var another = new Circle( 100, 100 ).setRadius( 50 ); // a