mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-27 09:50:52 -05:00
removed pair.confirmedActive
This commit is contained in:
parent
e4526a5138
commit
72bc203c27
2 changed files with 1 additions and 7 deletions
|
@ -32,7 +32,6 @@ var Contact = require('./Contact');
|
||||||
contactCount: 0,
|
contactCount: 0,
|
||||||
separation: 0,
|
separation: 0,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
confirmedActive: true,
|
|
||||||
isSensor: bodyA.isSensor || bodyB.isSensor,
|
isSensor: bodyA.isSensor || bodyB.isSensor,
|
||||||
timeCreated: timestamp,
|
timeCreated: timestamp,
|
||||||
timeUpdated: timestamp,
|
timeUpdated: timestamp,
|
||||||
|
|
|
@ -52,10 +52,6 @@ var Common = require('../core/Common');
|
||||||
pair,
|
pair,
|
||||||
i;
|
i;
|
||||||
|
|
||||||
for (i = 0; i < pairsListLength; i++) {
|
|
||||||
pairsList[i].confirmedActive = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < collisionsLength; i++) {
|
for (i = 0; i < collisionsLength; i++) {
|
||||||
collision = collisions[i];
|
collision = collisions[i];
|
||||||
pair = collision.pair;
|
pair = collision.pair;
|
||||||
|
@ -72,7 +68,6 @@ var Common = require('../core/Common');
|
||||||
|
|
||||||
// update the pair
|
// update the pair
|
||||||
Pair.update(pair, collision, timestamp);
|
Pair.update(pair, collision, timestamp);
|
||||||
pair.confirmedActive = true;
|
|
||||||
} else {
|
} else {
|
||||||
// pair did not exist, create a new pair
|
// pair did not exist, create a new pair
|
||||||
pair = Pair.create(collision, timestamp);
|
pair = Pair.create(collision, timestamp);
|
||||||
|
@ -91,7 +86,7 @@ var Common = require('../core/Common');
|
||||||
for (i = 0; i < pairsListLength; i++) {
|
for (i = 0; i < pairsListLength; i++) {
|
||||||
pair = pairsList[i];
|
pair = pairsList[i];
|
||||||
|
|
||||||
if (!pair.confirmedActive) {
|
if (pair.timeUpdated < timestamp) {
|
||||||
Pair.setActive(pair, false, timestamp);
|
Pair.setActive(pair, false, timestamp);
|
||||||
collisionEnd[collisionEndIndex++] = pair;
|
collisionEnd[collisionEndIndex++] = pair;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue