Skip to content

Commit

Permalink
commented out cpu error
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyko committed Sep 14, 2014
1 parent 5a1098a commit 0d0ca86
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
16 changes: 8 additions & 8 deletions src/physics/modules/physics.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ class $z.Physics # numerical integration module for solving differential equatio
return true if Physics.off
# requestAnimFrame(Physics.integrate) # keep running the loop
Physics.elapsedTime = t - Physics.timestamp
if Physics.elapsedTime > Physics.maxElapsedTime
dur = 2000
Physics.stop()
$z.Game.instance.message(
'CPU SPEED ERROR'
-> $z.Game.instance.stop()
dur
)
# if Physics.elapsedTime > Physics.maxElapsedTime
# dur = 2000
# Physics.stop()
# $z.Game.instance.message(
# 'CPU SPEED ERROR'
# -> $z.Game.instance.stop()
# dur
# )
if Physics.debug
fps = 1000 / elapsedTime # instantaneous frames per second (noisy)
console.log('Physics.integrate:', 'dt: ', elapsedTime, 't: ', t, 'timestamp: ', Physics.timestamp, 'dt_chk: ', t - Physics.timestamp, 'fps: ' + fps)
Expand Down
9 changes: 1 addition & 8 deletions test/rainflow/lib/rainflow.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0d0ca86

Please sign in to comment.