@cyclonium/physics-2d 0.0.102 → 0.0.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,7 +17,7 @@ import { Transform2DComponent } from '@cyclonium/core/2d';
|
|
|
17
17
|
import { toRadians } from '@cyclonium/core/math/trigonometry';
|
|
18
18
|
import { ManagedEventEmitter } from '@cyclonium/event';
|
|
19
19
|
import { logger } from '@cyclonium/core/log';
|
|
20
|
-
import {
|
|
20
|
+
import { retainIf } from '@cyclonium/algorithm/retain-if';
|
|
21
21
|
var PropertyGroup;
|
|
22
22
|
(function (PropertyGroup) {
|
|
23
23
|
PropertyGroup["common"] = "Common";
|
|
@@ -286,7 +286,7 @@ let KinematicCharacterController2D = class KinematicCharacterController2D extend
|
|
|
286
286
|
break;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
|
|
289
|
+
retainIf(this._collisionRecords, (record) => record.state !== CollisionRecordState.end);
|
|
290
290
|
}
|
|
291
291
|
};
|
|
292
292
|
__decorate([
|
package/lib/physics-world-2d.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Scene } from 'cc';
|
|
2
2
|
import { logger } from '@cyclonium/core/log';
|
|
3
|
-
import {
|
|
3
|
+
import { retainIf } from '@cyclonium/algorithm/retain-if';
|
|
4
4
|
import { assert } from '@cyclonium/core/utils';
|
|
5
5
|
import { BodyColliderLink, BodyColliderLinkManager } from './body-collider-link.js';
|
|
6
6
|
import { CollisionMatrix } from './collision-matrix.js';
|
|
@@ -328,7 +328,7 @@ export class PhysicsWorld2D {
|
|
|
328
328
|
}
|
|
329
329
|
});
|
|
330
330
|
// todo: should notify the other side?
|
|
331
|
-
|
|
331
|
+
retainIf(this._collisionRecords, (record) => record.collider1.impl !== impl && record.collider2.impl !== impl);
|
|
332
332
|
this._worldImpl.removeCollider(impl, wakeUp);
|
|
333
333
|
}
|
|
334
334
|
_emitEvents() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyclonium/physics-2d",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.103",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/shrinktofit/cyclonium",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@cyclonium/algorithm": "0.0
|
|
28
|
-
"@cyclonium/debug-draw": "0.0.
|
|
29
|
-
"@cyclonium/event": "0.0.
|
|
27
|
+
"@cyclonium/algorithm": "1.0.0",
|
|
28
|
+
"@cyclonium/debug-draw": "0.0.103",
|
|
29
|
+
"@cyclonium/event": "0.0.103",
|
|
30
30
|
"@cyclonium/rapier2d": "0.0.102",
|
|
31
31
|
"@cyclonium/web-assembly": "0.0.102"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@cyclonium/core": "0.0.
|
|
34
|
+
"@cyclonium/core": "0.0.103"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/fs-extra": "^11.0.4",
|