diff --git a/v3/src/checksum.js b/v3/src/checksum.js index 36fb29e50..18ba3ec80 100644 --- a/v3/src/checksum.js +++ b/v3/src/checksum.js @@ -1,4 +1,4 @@ var CHECKSUM = { -build: '4e29a680-5b3b-11e7-beb8-2fd7d9854f0e' +build: '1eea1a70-5b41-11e7-93a3-65e728ed48e6' }; module.exports = CHECKSUM; \ No newline at end of file diff --git a/v3/src/physics/impact/UpdateVelocity.js b/v3/src/physics/impact/UpdateVelocity.js deleted file mode 100644 index e6e572993..000000000 --- a/v3/src/physics/impact/UpdateVelocity.js +++ /dev/null @@ -1,73 +0,0 @@ -var Clamp = require('../../math/Clamp'); - -var UpdateVelocity = function (body, delta) -{ - var vel = body.vel.x; - var accel = body.accel.x; - var friction = body.friction.x; - var max = body.maxVel.x; - var frictionDelta; - - // X - if (accel) - { - body.vel.x = Clamp(vel + accel * delta, -max, max); - } - else if (friction) - { - frictionDelta = friction * delta; - - if (vel - frictionDelta > 0) - { - body.vel.x = vel - frictionDelta; - } - else if (vel + frictionDelta < 0) - { - body.vel.x = vel + frictionDelta; - } - else - { - body.vel.x = 0; - } - } - else - { - body.vel.x = Clamp(vel, -max, max); - } - - vel = body.vel.y; - accel = body.accel.y; - friction = body.friction.y; - max = body.maxVel.y; - - // Y - if (accel) - { - body.vel.y = Clamp(vel + accel * delta, -max, max); - } - else if (friction) - { - frictionDelta = friction * delta; - - if (vel - frictionDelta > 0) - { - body.vel.y = vel - frictionDelta; - } - else if (vel + frictionDelta < 0) - { - body.vel.y = vel + frictionDelta; - } - else - { - body.vel.y = 0; - } - } - else - { - body.vel.y = Clamp(vel, -max, max); - } - - return body; -}; - -module.exports = UpdateVelocity; diff --git a/v3/src/physics/impact/World.js b/v3/src/physics/impact/World.js index 30c5501ff..1c5ade198 100644 --- a/v3/src/physics/impact/World.js +++ b/v3/src/physics/impact/World.js @@ -52,13 +52,12 @@ var World = new Class({ // Update all bodies - this.bodies.iterate(function (body) { - + this.bodies.iterate(function (body) + { if (body.enabled) { body.update(delta); } - }); // Run collision against them all