Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Jeong Seong Dae jeongsd

🎯
Focusing
View GitHub Profile
@jeongsd
jeongsd / 0_reuse_code.js
Created May 23, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jeongsd
jeongsd / limitLoop.js
Created Mar 5, 2017 — forked from addyosmani/limitLoop.js
Limit the frame-rate being targeted with requestAnimationFrame
View limitLoop.js
/*
limitLoop.js - limit the frame-rate when using requestAnimation frame
Released under an MIT license.
When to use it?
----------------
A consistent frame-rate can be better than a janky experience only
occasionally hitting 60fps. Use this trick to target a specific frame-
rate (e.g 30fps, 48fps) until browsers better tackle this problem
@jeongsd
jeongsd / AnimationFrame.js
Last active Mar 5, 2017 — forked from addyosmani/limitLoop.js
Limit the frame-rate being targeted with requestAnimationFrame
View AnimationFrame.js
/*
http://cssdeck.com/labs/embed/gvxnxdrh/0/output
http://codetheory.in/controlling-the-frame-rate-with-requestanimationframe/
*/
class AnimationFrame {
constructor(fps = 60, animate) {
this.requestID = 0;
this.fps = fps;
this.animate = animate;
}