@wesreisz
http://www.wesleyreisz.com
wes@wesleyreisz.com
http://reisz-kickass.appspot.com
press → key to advance.
window.addEventListener('deviceorientation', function(event) {
var a = event.alpha;
var b = event.beta;
var g = event.gamma;
}, false);





Kick Ass Technique 1: Let's animate something with canvas
$('document').ready(function(){
var canvas = $('#kickass')[0];
var ctx = canvas.getContext('2d');
...
ctx.textAlign = "center";
ctx.font = 'bold 30px sans-serif';
ctx.strokeText('Code PaLOUsa', canvas.width/2, 50);
});
//this clear's the last screen ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.translate(x, y);
Kick Ass Technique 1: Let's animate something with canvas
Kick Ass Technique 2: Let's make something explode
game.ballSize = 55; ... ctx.save(); ctx.translate(x, y); game.ctx.drawImage(imageObject, step*game.ballSize, 0,
game.ballSize, game.ballSize, -game.ballSize/2, -game.ballSize/2,
game.ballSize, game.ballSize); ctx.restore(); //advances the step if (step<=MAX_STEP){ step = step +1; }else{ step = MAX_STEP; } return step;
Kick Ass Technique 2: Let's make something explode
Kick Ass Technique 2:
Seth Ladd
ASSET_MANAGER.queueSound('falling', theme.sounds.FALLING);
ASSET_MANAGER.queueDownload(theme.images.CHARACTER);
ASSET_MANAGER.getSound(theme.sounds.START).play();
ASSET_MANAGER.getAsset(theme.images.SPECIAL);
this.cache[path] = soundManager.createSound({
id: id,
autoLoad: true,
url: path,
onload: function() {
that.successCount += 1;
if (that.isDone()) {
soundsCallback();
}
}
});
if(Math.floor(Math.random() * 10)===5){
b.ballType = ASSET_MANAGER.getAsset(theme.images.SPECIAL);
ASSET_MANAGER.getAsset(theme.sounds.FALLING).play({volume: 50});
b.BASE_VALUE = 10;
}else{
b.BASE_VALUE = 1;
b.ballType = ASSET_MANAGER.getAsset(theme.images.BALL);
}
Technique 3/4 Observations:
script type="text/javascript" src="scripts/stats.js"
...
game.stats = new Stats();
...
$("#myFps").append(game.stats.domElement);
// I only did this because I wanted it to float
Let's read the code as a whole
Overall Observations:
var worker = new Worker('my_task.js');
worker.onmessage = function(event) {
console.log("Called back by the worker!\n");
};
my_task.js
self.onmessage = function(event) {
self.postMessage('Hi there!');
};
@wesreisz
http://www.wesleyreisz.com
wes@wesleyreisz.com
http://reisz-kickass.appspot.com
press → key to advance.