• Tuesday, 26 May 2015

    Katamari Hack for Fun

    How to do Katamari Hack?

    It works with a JavaScript code which creates a ball that collects all written data on the website and erase it, Well this erasing only happens on your screen i.e- NOT ON THE REAL WEBSITE.

    javascript:var i,s,ss=['http://kathack.com/js/kh.js','http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js'];for(i=0;i!=ss.length;i++){s=document.createElement('script');s.src=ss[i];document.body.appendChild(s);}void(0);

    Just copy and paste this code on the address bar and drag the ball to your open website.
    (note- when you will paste this code to your address bar the javascript: will be automatically removed so don't forget to write it again before"var")

    This hack works best with CHROME and FIREFOX). 



    How does it work?

    Short version: css transforms (for things stuck to the katamari), canvas (drawing the katamari), and z-index (illusion of depth).
    Long version: The bookmarklet loads jQuery and kh.js into the current page. jQuery is used mostly for .offset() and .css().  kh.js is where all the action happens:
    • Splits all the text on the page into words/spans. (StickyNodes::addWords)
    • Builds a grid data structure so that intersections with elements can be found quickly (StickyNodes::finalize). Essentially grid[floor(x / 100)][floor(y / 100)] is a list of elements in a 100x100 pixel block. This should probably be an R-tree, but the hot-spot in this program is definitely in the rendering.
    • The ball and stripes are drawn in a canvas that gets moved around the page (i.e. position: absolute; left: x; top: y;). See PlayerBall::drawBall.
    • When an element is attached to the katamari, a clone is made. The original element is hidden. The new element is moved around by setting -webkit-transform. The transform rotates the element about the rolling axis of the katamari and scales the element to make it look like it's coming out of the page. See PlayerBall::drawAttached, transform_test.html, and transform_test2.html.
    source- http://kathack.com/

    No comments:

    Post a Comment

    Labels

    apps (5) beauty (4) Bollywood (1) car (1) compare (3) food (2) functions (6) gaming (2) hacks (10) how to (34) laptop (2) life (1) mobile (4) movie (4) music (6) news (3) product (14) review (18) science (9) specifications (9) tech (20) tips (10) Tricks (25) windows (5)

    Contact Form

    Name

    Email *

    Message *