This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //GLOBALS | |
| var triangleVertexPositionBuffer; | |
| var squareVertexPositionBuffer; | |
| var mvMatrix = mat4.create(); | |
| var pMatrix = mat4.create(); | |
| var gl; | |
| var shaderProgram; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Snow = (function() { | |
| var requestAnimationFrame = | |
| window.requestAnimationFrame || | |
| window.webkitRequestAnimationFrame || | |
| window.mozRequestAnimationFrame || | |
| function(callback) { | |
| return setTimeout(function() { | |
| callback(performance.now()); | |
| }, 16); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function sleepSort(res, arr) { | |
| arr.forEach(function(val) { | |
| setTimeout(function() { | |
| res.push(val); | |
| }, val * 5); | |
| }) | |
| } | |
| var res = []; | |
| sleepSort(res, [4, 6, 2, 9, 3, 5, 1]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var lifx = require('lifx'); | |
| var lx = lifx.init(); | |
| lx.on('bulb', function(bulb) { | |
| queueLights([ | |
| [255, 255, 255], | |
| [255, 0, 0], | |
| [0, 255, 0], | |
| [0, 0, 255], | |
| [255, 255, 0], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $("html, body").animate({ scrollTop: 0 }, { | |
| duration: 250, | |
| complete: function() { | |
| var elem = document.documentElement; | |
| // setting a padding top on document element will force repaint, but not show any visual effect | |
| elem.style.paddingTop = '1px'; | |
| setTimeout(function() { | |
| elem.style.paddingTop = '0'; | |
| }, 0); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| var sources = [ | |
| 'http://i2.kym-cdn.com/photos/images/newsfeed/000/697/069/753.png', | |
| 'http://i2.kym-cdn.com/entries/icons/original/000/001/030/dickbutt.jpg', | |
| 'http://i0.kym-cdn.com/photos/images/newsfeed/000/714/090/08e.jpg', | |
| 'http://i3.kym-cdn.com/photos/images/masonry/000/711/605/f6d.jpg' | |
| ]; | |
| var index = parseInt(Math.random() * sources.length, 10); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Prefixes | |
| (function() { | |
| var w = window; | |
| // performance.now | |
| var p = w.performance = w.performance || {}; | |
| p.now = | |
| p.now || | |
| p.webkitNow || | |
| p.mozNow || |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="import" href="../paper-button/paper-button.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { | |
| position: absolute; | |
| width: 100%; | |
| height: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var current = 0; | |
| var target = 0; | |
| var updateDelay = 0; | |
| var speed = 30 / 1000; | |
| var lastTime = performance.now(); | |
| function step() { | |
| requestAnimationFrame(step); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://fediafedia.com/prank/win7/index.html |
OlderNewer