examples/touch/main.js
function colorForTouch(touch) {
   var id = touch.identifier + (100 * Math.random());
  var r = Math.floor(id % 16);
  var g = Math.floor(id / 3) % 16;
  var b = Math.floor(id / 7) % 16;
  r = r.toString(16);
  g = g.toString(16);
  b = b.toString(16);
  var color = "#" + r + g + b;
  gamejs.logging.log(color)
  return color;
}
function colorForTouch(touch) {
   var id = touch.identifier + (100 * Math.random());
  var r = Math.floor(id % 16);
  var g = Math.floor(id / 3) % 16;
  var b = Math.floor(id / 7) % 16;
  r = r.toString(16);
  g = g.toString(16);
  b = b.toString(16);
  var color = "#" + r + g + b;
  gamejs.logging.log(color)
  return color;
}
function colorForTouch ( touch ) { var id = touch . identifier + ( 100 * Math . random ( ) ) ; var r = Math . floor ( id % 16 ) ; var g = Math . floor ( id / 3 ) % 16 ; var b = Math . floor ( id / 7 ) % 16 ; r = r . toString ( 16 ) ; g = g . toString ( 16 ) ; b = b . toString ( 16 ) ; var color = "#" + r + g + b ; gamejs . logging . log ( color ) return color ; }
create random color from touch identifier
create random color from touch identifier