function getTouchInfo(canvas, w, h, e, i) {
  i = i || 0;
  var rect = canvas.getBoundingClientRect();
  var sx = canvas.scrollWidth / w;
  var sy = canvas.scrollHeight / h;
  var touch = e.touches[i] || e.changedTouches[i];
  return {
    x: (touch.clientX - rect.left) / sx,
    y: (touch.clientY - rect.top) / sy,
    winX: touch.clientX,
    winY: touch.clientY,
    id: touch.identifier
  };
}
The touchStarted() function is called once after every time a touch is
registered. If no touchStarted() function is defined, the mousePressed()
function will be called instead if it is defined.<br><br>
Browsers may have different default behaviors attached to various touch
events. To prevent any default behavior for this event, add "return false"
to the end of the method.

@method touchStarted
@example
<div>
<code>
// Touch within the image to change
// the value of the rectangle

var value = 0;
function draw() {
  fill(value);
  rect(25, 25, 50, 50);
}
function touchStarted() {
  if (value == 0) {
    value = 255;
  } else {
    value = 0;
  }
}
</code>
</div>

<div class="norender">
<code>
function touchStarted() {
  ellipse(mouseX, mouseY, 5, 5);
  // prevent default
  return false;
}
</code>
</div>

@alt
50x50 black rect turns white with touch event.
no image displayed