Quantcast
Channel: Bugs Latest Topics
Viewing all articles
Browse latest Browse all 760

Babylon.js 2.5 - Issue with type definition file.

$
0
0

Looks like OimoJSPlugin class incorrectly implements IPhysicsEnginePlugin interface.

So with Babylon.js 2.5 when I try to enable physics with Oimo.js plugin like this:

scene.enablePhysics(new BABYLON.Vector3(0, -9, 0), new BABYLON.OimoJSPlugin());

I get the following TypeScript compilation error:

TS2345: Argument of type 'OimoJSPlugin' is not assignable to parameter of type 'IPhysicsEnginePlugin'.
  Types of property 'updateDistanceJoint' are incompatible.
    Type '(joint: IMotorEnabledJoint, maxDistance: number, minDistance?: number) => void' is not assignable to type '(joint: DistanceJoint, maxDistance: number, minDistance?: number) => any'.
      Types of parameters 'joint' and 'joint' are incompatible.
        Type 'DistanceJoint' is not assignable to type 'IMotorEnabledJoint'.
          Property 'setMotor' is missing in type 'DistanceJoint'.

I'm using babylon.d.ts type definition file from babylonjs npm package.


Viewing all articles
Browse latest Browse all 760

Trending Articles