@series-inc/rundot-3d-engine 0.5.4 → 0.5.5
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.
- package/dist/{ComponentRegistry-BWU1RQyj.d.ts → ComponentRegistry-CFjhpg4L.d.ts} +2 -0
- package/dist/{chunk-BZMFO4LH.js → chunk-7BEYUHCC.js} +14 -11
- package/dist/{chunk-BZMFO4LH.js.map → chunk-7BEYUHCC.js.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/systems/index.d.ts +2 -2
- package/dist/systems/index.js +1 -1
- package/package.json +1 -1
|
@@ -256,6 +256,8 @@ declare class RigidBodyComponentThree extends Component {
|
|
|
256
256
|
private collider;
|
|
257
257
|
private options;
|
|
258
258
|
private bodyId;
|
|
259
|
+
private static _tempVec3;
|
|
260
|
+
private static _tempQuat;
|
|
259
261
|
private onTriggerEnterCallback;
|
|
260
262
|
private onTriggerExitCallback;
|
|
261
263
|
private isRegisteredWithPhysics;
|
|
@@ -4539,6 +4539,8 @@ var RigidBodyComponentThree = class _RigidBodyComponentThree extends Component {
|
|
|
4539
4539
|
collider = null;
|
|
4540
4540
|
options;
|
|
4541
4541
|
bodyId;
|
|
4542
|
+
static _tempVec3 = new THREE10.Vector3();
|
|
4543
|
+
static _tempQuat = new THREE10.Quaternion();
|
|
4542
4544
|
// Trigger event callbacks - use proper type for GameObject
|
|
4543
4545
|
onTriggerEnterCallback = null;
|
|
4544
4546
|
onTriggerExitCallback = null;
|
|
@@ -4659,7 +4661,7 @@ var RigidBodyComponentThree = class _RigidBodyComponentThree extends Component {
|
|
|
4659
4661
|
colliderDesc.setRestitution(this.options.restitution);
|
|
4660
4662
|
colliderDesc.setFriction(this.options.friction);
|
|
4661
4663
|
colliderDesc.setSensor(this.options.isSensor);
|
|
4662
|
-
const shouldEnableCollisionEvents = this.options.enableCollisionEvents ?? this.options.type !== "static" /* STATIC
|
|
4664
|
+
const shouldEnableCollisionEvents = this.options.enableCollisionEvents ?? (this.options.isSensor || this.options.type !== "static" /* STATIC */);
|
|
4663
4665
|
if (shouldEnableCollisionEvents) {
|
|
4664
4666
|
colliderDesc.setActiveEvents(ActiveEvents2.COLLISION_EVENTS);
|
|
4665
4667
|
if (this.options.type === "kinematic" /* KINEMATIC */) {
|
|
@@ -4734,8 +4736,9 @@ var RigidBodyComponentThree = class _RigidBodyComponentThree extends Component {
|
|
|
4734
4736
|
this.gameObject.position.copy(lerpPos);
|
|
4735
4737
|
this.gameObject.quaternion.copy(slerpQuat);
|
|
4736
4738
|
} else if (this.options.type === "kinematic" /* KINEMATIC */) {
|
|
4737
|
-
|
|
4738
|
-
const
|
|
4739
|
+
this.gameObject.updateMatrixWorld(false);
|
|
4740
|
+
const worldPos = this.gameObject.getWorldPosition(_RigidBodyComponentThree._tempVec3);
|
|
4741
|
+
const worldQuat = this.gameObject.getWorldQuaternion(_RigidBodyComponentThree._tempQuat);
|
|
4739
4742
|
let yOffset = 0;
|
|
4740
4743
|
if (this.options.centerOffset) {
|
|
4741
4744
|
yOffset = this.options.centerOffset.y;
|
|
@@ -4747,18 +4750,18 @@ var RigidBodyComponentThree = class _RigidBodyComponentThree extends Component {
|
|
|
4747
4750
|
}
|
|
4748
4751
|
this.rigidBody.setTranslation(
|
|
4749
4752
|
{
|
|
4750
|
-
x:
|
|
4751
|
-
y:
|
|
4752
|
-
z:
|
|
4753
|
+
x: worldPos.x,
|
|
4754
|
+
y: worldPos.y + yOffset,
|
|
4755
|
+
z: worldPos.z
|
|
4753
4756
|
},
|
|
4754
4757
|
true
|
|
4755
4758
|
);
|
|
4756
4759
|
this.rigidBody.setRotation(
|
|
4757
4760
|
{
|
|
4758
|
-
x:
|
|
4759
|
-
y:
|
|
4760
|
-
z:
|
|
4761
|
-
w:
|
|
4761
|
+
x: worldQuat.x,
|
|
4762
|
+
y: worldQuat.y,
|
|
4763
|
+
z: worldQuat.z,
|
|
4764
|
+
w: worldQuat.w
|
|
4762
4765
|
},
|
|
4763
4766
|
true
|
|
4764
4767
|
);
|
|
@@ -6026,4 +6029,4 @@ export {
|
|
|
6026
6029
|
PrefabLoader,
|
|
6027
6030
|
StowKitSystem
|
|
6028
6031
|
};
|
|
6029
|
-
//# sourceMappingURL=chunk-
|
|
6032
|
+
//# sourceMappingURL=chunk-7BEYUHCC.js.map
|