Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
zodiac (complete rewrite) #15
a complete rewrite of particleground.js
only a third file size (to be fair: without jQuery-stuff and, raf polyfill), better performance, and some additional options.
even if it has almost no impact on the performance, code like this...
var ratioX = (winW - 0) / (30 - -30); pointerX = (tiltX - -30) * ratioX + 0;
...is bloat! What is wrong with:
pointerX = (tiltX +30) * (winW/60);
The thing that really hits performance is the drawing routine. It is possible to only call
even if there is no equal codebase anymore, you maybe want to merge some of these _ideas_ into your library:
Thanks @indus, this looks really cool. I won't merge the pull request wholesale into Particleground due to the removal of jQuery, removal of functionality I consider important (e.g. pause and destroy methods) and renaming of the library, but I'd love to cherry pick some of your ideas, especially those which improve rendering performance.