Mr Speaker


Warning: count(): Parameter must be an array or an object that implements Countable in /home/mrspeak/public_html/wp-content/themes/stuartspeaker/functions.php on line 24

Warning: count(): Parameter must be an array or an object that implements Countable in /home/mrspeak/public_html/wp-content/themes/stuartspeaker/functions.php on line 27

Warning: count(): Parameter must be an array or an object that implements Countable in /home/mrspeak/public_html/wp-content/themes/stuartspeaker/functions.php on line 29

Sine Scrollbars

Sine Scrollbars
Here's a lil' Scrollbar Experiment. It's pretty.


Warning: count(): Parameter must be an array or an object that implements Countable in /home/mrspeak/public_html/wp-content/themes/stuartspeaker/functions.php on line 33

3 Comments

  1. You clearly have too much time on your hands. Extremely cool.

    Monday, January 18, 2010 at 7:27 pm | Permalink
  2. In your code I noticed you used a funtion name “~~()”. Can you explain what this function does and if it is a part of the core Javascript language.

    Thanks

    Friday, January 22, 2010 at 4:32 pm | Permalink
  3. That’s just a lil’ trick: the ~ is JavaScript’s bitwise NOT operator. Applying it twice (NOT NOT) is just a cheeky way of doing a Math.floor for positive numbers. But it’s waaaay faster than “Math.floor” (and just slightly faster than “<<0″)

    Though in this case, speed is not really an issue and I should have just done Math.floor for readability. Sorry 'bout that!

    Friday, January 22, 2010 at 4:46 pm | Permalink
Captcha! Please type 'radical' here: *
How did you find this thingo? *