Skip to content

Commit

Permalink
Build
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofugaro committed Jun 22, 2021
1 parent 9f21029 commit 086eaf1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
11 changes: 10 additions & 1 deletion dist/cannon-es.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7301,6 +7301,8 @@ class RaycastVehicle {
/** The constraints. */

/** Optional pre-step callback. */

/** Number of wheels on the ground. */
constructor(options) {
this.chassisBody = void 0;
this.wheelInfos = void 0;
Expand All @@ -7312,6 +7314,7 @@ class RaycastVehicle {
this.constraints = void 0;
this.preStepCallback = void 0;
this.currentVehicleSpeedKmHour = void 0;
this.numWheelsOnGround = void 0;
this.chassisBody = options.chassisBody;
this.wheelInfos = [];
this.sliding = false;
Expand All @@ -7324,6 +7327,7 @@ class RaycastVehicle {
this.preStepCallback = () => {};

this.currentVehicleSpeedKmHour = 0;
this.numWheelsOnGround = 0;
}
/**
* Add a wheel. For information about the options, see `WheelInfo`.
Expand Down Expand Up @@ -7643,10 +7647,15 @@ class RaycastVehicle {
const chassisBody = this.chassisBody;
const forwardWS = updateFriction_forwardWS;
const axle = updateFriction_axle;
this.numWheelsOnGround = 0;

for (let i = 0; i < numWheels; i++) {
const wheel = wheelInfos[i];
wheel.raycastResult.body;
const groundObject = wheel.raycastResult.body;

if (groundObject) {
this.numWheelsOnGround++;
}

wheel.sideImpulse = 0;
wheel.forwardImpulse = 0;
Expand Down
1 change: 1 addition & 0 deletions dist/cannon-es.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,7 @@ declare module "objects/RaycastVehicle" {
constraints: Constraint[];
preStepCallback: () => void;
currentVehicleSpeedKmHour: number;
numWheelsOnGround: number;
constructor(options: {
chassisBody: Body;
indexRightAxis?: number;
Expand Down
11 changes: 10 additions & 1 deletion dist/cannon-es.js
Original file line number Diff line number Diff line change
Expand Up @@ -7297,6 +7297,8 @@ class RaycastVehicle {
/** The constraints. */

/** Optional pre-step callback. */

/** Number of wheels on the ground. */
constructor(options) {
this.chassisBody = void 0;
this.wheelInfos = void 0;
Expand All @@ -7308,6 +7310,7 @@ class RaycastVehicle {
this.constraints = void 0;
this.preStepCallback = void 0;
this.currentVehicleSpeedKmHour = void 0;
this.numWheelsOnGround = void 0;
this.chassisBody = options.chassisBody;
this.wheelInfos = [];
this.sliding = false;
Expand All @@ -7320,6 +7323,7 @@ class RaycastVehicle {
this.preStepCallback = () => {};

this.currentVehicleSpeedKmHour = 0;
this.numWheelsOnGround = 0;
}
/**
* Add a wheel. For information about the options, see `WheelInfo`.
Expand Down Expand Up @@ -7639,10 +7643,15 @@ class RaycastVehicle {
const chassisBody = this.chassisBody;
const forwardWS = updateFriction_forwardWS;
const axle = updateFriction_axle;
this.numWheelsOnGround = 0;

for (let i = 0; i < numWheels; i++) {
const wheel = wheelInfos[i];
wheel.raycastResult.body;
const groundObject = wheel.raycastResult.body;

if (groundObject) {
this.numWheelsOnGround++;
}

wheel.sideImpulse = 0;
wheel.forwardImpulse = 0;
Expand Down

0 comments on commit 086eaf1

Please sign in to comment.