This file contains 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
body { background-color: #DDDDDD; font: 30px sans-serif; } |
This file contains 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
window.requestAnimationFrame = do -> | |
window.requestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.oRequestAnimationFrame || | |
window.msRequestAnimationFrame || | |
(callback) -> window.setTimeout(callback, 1000 / 60) |
This file contains 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
#import "ofMain.h" | |
class Ball{ | |
public: | |
ofPoint pos; | |
ofColor col; | |
ofColor touchCol; | |
bool bDragged; |
This file contains 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
//-------------------------------------------------------------- | |
void testApp::update(){ | |
// receiving the float value | |
curTime = ofGetElapsedTimef(); | |
dt = curTime - lastTime; | |
lastTime = curTime; | |
} |
This file contains 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
#import "ofMain.h" | |
class Ball{ | |
public: | |
ofPoint position; | |
ofPoint velocity; | |
ofPoint accel; | |
float spring; | |
float friction; |
This file contains 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 mobileStatus; | |
var agent = navigator.userAgent; | |
// check whether the device is mobile or not. | |
if(agent.search(/iPhone/) != -1 || agent.search(/iPad/) != -1 || agent.search(/iPod/) != -1 || agent.search(/Android/) != -1){ | |
mobileStatus = true; | |
}else{ | |
mobileStatus = false; | |
} |
This file contains 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
@import "compass" | |
@import "compass/reset" | |
html, body | |
margin: 0 | |
padding: 0 | |
width: 100% | |
height: 100% | |
overflow: hidden |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>EaselJS demo: Dragging</title> | |
<link href="../shared/demo.css" rel="stylesheet" type="text/css"> | |
<script src="../../lib/easeljs-0.6.0.min.js"></script> | |
<script> | |
var stage, output; | |
function init() { |
This file contains 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
class this.View | |
constractor: -> | |
This file contains 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
# example | |
dragger.addEventListener "mousedown", (event) => | |
@controller.cn_mouse_down(event) |
OlderNewer