You need to sign in or sign up before continuing.
Name Last Update
..
README.md Loading commit data...
rough.js.modified Loading commit data...
rough.js.orig Loading commit data...
rough.min.js Loading commit data...

To change rough.js for IE11

  • Formatted code from debugger
  • Ran through BabelJs
  • Replace ** with Math.pow, eg x ** y produces the same result as Math.pow(x,y)
  • Add 2 polyfills:

if (!Array.from) { Array.from = function (object) { 'use strict'; return [].slice.call(object); }; }

Math.imul = Math.imul || function(a, b) { var ah = (a >>> 16) & 0xffff; var al = a & 0xffff; var bh = (b >>> 16) & 0xffff; var bl = b & 0xffff; // the shift by 0 fixes the sign on the high part // the final |0 converts the unsigned value into a signed value return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); };