Changed HTML5 to use fixed-size frames.
This commit is contained in:
parent
3ff0c79189
commit
596c69f9cf
7
base.js
7
base.js
|
|
@ -32,6 +32,7 @@ function _timerBase () {
|
||||||
this.remove = function (item) {
|
this.remove = function (item) {
|
||||||
delete this.funcs[item._id];
|
delete this.funcs[item._id];
|
||||||
}
|
}
|
||||||
|
this.nextime = new Date().getTime()
|
||||||
this.iterate = function() {
|
this.iterate = function() {
|
||||||
canvas = Buffers[DrawingBuffer];
|
canvas = Buffers[DrawingBuffer];
|
||||||
|
|
||||||
|
|
@ -59,10 +60,14 @@ function _timerBase () {
|
||||||
Buffers[1-DrawingBuffer].style.visibility='hidden';
|
Buffers[1-DrawingBuffer].style.visibility='hidden';
|
||||||
Buffers[DrawingBuffer].style.visibility='visible';
|
Buffers[DrawingBuffer].style.visibility='visible';
|
||||||
_lastmouse=[_root._xmouse,_root._ymouse]
|
_lastmouse=[_root._xmouse,_root._ymouse]
|
||||||
|
this.nextime = this.nextime+1000/fps
|
||||||
|
setTimeout('Timer.iterate()', this.nextime-new Date().getTime())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setInterval('Timer.iterate()', 1000/fps)
|
setTimeout('Timer.iterate()', 1000/fps)
|
||||||
|
|
||||||
|
//setInterval('Timer.iterate()', 1000/fps)
|
||||||
}
|
}
|
||||||
|
|
||||||
function _eventBase () {
|
function _eventBase () {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue