Skip to content

Instantly share code, notes, and snippets.

@jeremyckahn
jeremyckahn / psuedo_keyframe.js
Last active December 23, 2015 20:59
Psuedocode for a keyframing API.
keyframeableObject
.keyframe(0, {
x: 0,
y: 25
}).keyframe(1000, {
x: 50,
y: 75
});
@jeremyckahn
jeremyckahn / psuedo_tween.js
Created September 22, 2013 14:44
Psuedocode for a tweening API.
tweenableObject.tween({
from: 0,
to: 100
duration: 1500
});
@jeremyckahn
jeremyckahn / shifty-bezier-api-sketch.md
Last active December 22, 2015 22:39
Some API sketching for Bezier support in Shifty.

Shifty Bezier API

Tweenable.setBezierFunction('bezier-linear', 0.250, 0.250, 0.750, 0.750);

var tweenable = new Tweenable();
tweenable.tween({ from: {x:1}, to: {x:10}, easing: 'bezier-linear', duration: 1000});

Tweenable.interpolate({x:1}, {x:10}, 0.5, 'bezier-linear'); // 5
@jeremyckahn
jeremyckahn / birch_outline.md
Last active December 21, 2015 10:09
This is a proposed project outline for a game development project I want to build called Birch.

Birch project outline

License: GPL v2

Description: Birch is a platform for building games in a web browser.

Goal: To allow users to create a game on any device with a browser and be able to play that game on any other device with a browser. For example, a Birch game can be built on a tablet and played on another tablet, mobile phone, or desktop.

Architecture: Birch is comprised of a collection of integrated editors. Each editor focuses on creating a certain type of game component, such as an animation, character graphic, or logic. Each editor can integrate with another editor as needed. Birch keeps track of all of the content created by each editor.

<!DOCTYPE html>
<!-- This is all from http://desandro.github.io/3dtransforms/docs/cube.html -->
<html>
<head>
<style>
.container {
width: 200px;
height: 200px;
position: relative;
-webkit-perspective: 1000px;
@jeremyckahn
jeremyckahn / gist:6049211
Last active December 20, 2015 01:29
This is a CSS animation that starts and ends the loop in the middle of the animation timeline.
<!DOCTYPE html>
<html>
<head>
<style>
.stylie {
-webkit-animation-name: stylie-transform-keyframes;
-webkit-animation-duration: 2000ms;
-webkit-animation-delay: 0ms;
-webkit-animation-fill-mode: forwards;
@jeremyckahn
jeremyckahn / gist:5992317
Last active December 19, 2015 17:38
Faulty Stylie output, used for debugging
.stylie {
animation-name: stylie-transform-keyframes;
animation-duration: 2000ms;
animation-delay: 0ms;
animation-fill-mode: forwards;
animation-timing-function: linear;
animation-iteration-count: infinite;
transform-origin: 0 0;
}
@keyframes stylie-transform-keyframes {
@jeremyckahn
jeremyckahn / gist:5792665
Created June 16, 2013 17:02
Traceback for AutoCopy Chrome extension.
Port: Could not establish connection. Receiving end does not exist. [VM] lastError (606):29
Error in event handler for 'undefined': Cannot read property 'command' of undefined TypeError: Cannot read property 'command' of undefined
at getOptions (chrome-extension://dnejpbhppnaekhejffmdallnhfgleene/contentScript.js:10:14)
at <error: illegal access>
at Event.dispatchToListener (event_bindings:356:21)
at Event.dispatch_ (event_bindings:342:27)
at Event.dispatch (event_bindings:362:17)
at Object.chromeHidden.Port.dispatchOnDisconnect (miscellaneous_bindings:258:27) [VM] event_bindings (619):346
<div class="wrapper">
<div class="title_bar">
...
</div>
<div class="mydiv">
### All text content goes in here ###
</div>
<div class="mylinks">
...
</div>
@jeremyckahn
jeremyckahn / gist:5658189
Last active December 17, 2015 19:09
Tutoring notes — 5/27/2013
var increment = (function () {
var foo = 1;
return function () {
return foo++;
};
} ());