DIR : /home/kozerus/public_html/jkwii/js/jsdoit/jsdoit10/index.js
/home/kozerus/public_html/jkwii/js/jsdoit/jsdoit10
$(function() {
/**
* Atttack button.
*/
$('#attack').click(function() {
$('<div class="explode"></div>').appendTo('.effect');
_lightemit();
$('#enemy').addClass('start');
});
/**
* Effect events.
*/
$('.explode').live('animationend webkitAnimationEnd mozAnimationEnd', function() {
$(this).remove();
});
$('#enemy').bind('animationend webkitAnimationEnd mozAnimationEnd', function() {
$(this).removeClass('start').addClass('end');
});
///////////////////////////////////
function _lightemit() {
var lights = [],
x, y, random = Math.random,
max = 20;
while (max--) {
x = (random() * 270 << 0);
y = (random() * 270 << 0);
lights.push(
_createLight().css({
'top': y, 'left': x
}).appendTo('.explode'));
}
}
function _createLight() {
var $light = $('<div class="light" />').bind('animationend webkitAnimationEnd mozAnimationEnd', function() {
$(this).remove();
});
return $light;
}
});
//
koh5_pano
Drag mouse to navigate.
Navigation
- Left/Right Mouse drag: Changes camera heading.
- Up/Sown Mouse drag: Changes camera pitch.
- Scroll wheel: Changes camera field of view.
- I-Key: Displays Info panel with canvas size, image size and FPS.
17.Aug.2010, Martin Wengenmayer