Havent done a pen in the longest time, decided to put this demo together after playing around with IK, the effect turned out pretty cool! (in my biased opinion of course)
A Pen by Jason Brown on CodePen.
// Return an array of movies whos runtime is at least 100 minutes and is rated pg or pg 13 | |
// In the new array we are only concerned with the title, runtime, and rating. | |
const data = { | |
"movies": [{ | |
"id": "771315639", | |
"title": "Home", | |
"year": 2015, | |
"mpaa_rating": "PG", | |
"runtime": 93, |
javascript:(function()%7Bvar%20els%20%3D%20document.querySelector('html')%2CkeyFrames%20%3D%20'%40-webkit-keyframes%20blurAnim%20%7B%200%25%20%7B-webkit-filter%3A%20blur(0.2px)%3B%20%7D40%25%20%7B-webkit-filter%3A%20blur(0.6px)%3B%20%7D80%25%20%7B-webkit-filter%3A%20blur(0.3px)%3B%7D100%25%20%7B-webkit-filter%3A%20blur(0px)%3B%7D%7D'%3Bdocument.styleSheets%5B0%5D.insertRule(keyFrames%2C%200)%3Bels.style.webkitAnimation%20%3D%20'blurAnim%2010s%20infinite'%7D)() |
var fs = require('fs'); | |
// ignore missing file error | |
function fsOperationFailed(stream, sourceFile, err) { | |
if (err) { | |
if (err.code !== 'ENOENT') { | |
stream.emit('error', new gutil.PluginError('gulp-changed', err, { | |
fileName: sourceFile.path | |
})); | |
} |
Havent done a pen in the longest time, decided to put this demo together after playing around with IK, the effect turned out pretty cool! (in my biased opinion of course)
A Pen by Jason Brown on CodePen.
var timer = function (waitTime, callBack, forever, start) { | |
this.lastTime = Date.now(); | |
this.waitTime = waitTime; | |
this.forever = forever; | |
this.running = start; | |
this.callBack = callBack; | |
this.tick = function () { | |
if (this.running) { | |
if (Date.now() > this.lastTime + this.waitTime) { |
/* | |
* | |
* What Im trying to get to work | |
* | |
*/ | |
function playersGameName(options){ | |
// stuff in here to init whatevs. | |
} |
console.log('%cTHIS IS SO MUCH FUN', 'color:red; background:yellow; font-size: 2em;') |
javascript:(function(){var script=document.createElement('script');script.src='http://github.com/mrdoob/stats.js/raw/master/build/stats.min.js';document.body.appendChild(script);script=document.createElement('script');script.innerHTML='var interval=setInterval(function(){if(typeof Stats==\'function\'){clearInterval(interval);var stats=new Stats();stats.domElement.style.position=\'fixed\';stats.domElement.style.left=\'0px\';stats.domElement.style.top=\'0px\';stats.domElement.style.zIndex=\'10000\';document.body.appendChild(stats.domElement);setInterval(function(){stats.update();},1000/60);}},100);';document.body.appendChild(script);})(); |
/** | |
* jGame.update() | |
* | |
* Main update loop for the game, updates all objects, and calls the renderer. | |
**/ | |
update : function(){ | |
var curTime = (new Date()).getTime(), | |
update = this.update; | |
this.deltaTime = curTime - this.lastTime; |
function r() { | |
return Math.floor(Math.random() * 255); | |
} | |
function lemon() { | |
var cycle = parseFloat(this.dataset.cycle); | |
if(isNaN(cycle)){ | |
cycle = ~~(Math.random()*100); | |
} |