Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 5.39.0 Has IPhysicsEnginePLugin Errors #13378

Closed
MackeyK24 opened this issue Dec 25, 2022 · 1 comment · Fixed by #13393
Closed

Release 5.39.0 Has IPhysicsEnginePLugin Errors #13378

MackeyK24 opened this issue Dec 25, 2022 · 1 comment · Fixed by #13393
Assignees

Comments

@MackeyK24
Copy link
Contributor

The 5.39.0 Release introduces new bugs in the Babylon.d.ts

When type to build my lib against the new declaration file using TSC 4.6.2. It gets plenty errors now. It did not get those error before.

[17:25:24] Using gulpfile ~/Documents/Babylon/BabylonToolkit-Share/Manager/gulpfile.js
[17:25:24] Starting 'default'...
[17:25:24] Starting 'compile'...
types/babylon.d.ts(80474,9): error TS2416: Property 'executeStep' in type 'AmmoJSPlugin' is not assignable to the same property in base type 'IPhysicsEnginePlugin'.
  Type '(delta: number, impostors: PhysicsImpostor[]) => void' is not assignable to type '{ (delta: number, impostors: PhysicsImpostor[]): void; (delta: number): void; }'.
types/babylon.d.ts(80497,9): error TS2416: Property 'applyImpulse' in type 'AmmoJSPlugin' is not assignable to the same property in base type 'IPhysicsEnginePlugin'.
  Type '(impostor: PhysicsImpostor, force: Vector3, contactPoint: Vector3) => void' is not assignable to type '{ (impostor: PhysicsImpostor, force: Vector3, contactPoint: Vector3): void; (body: PhysicsBody, location: Vector3, impulse: Vector3): void; }'.
    Types of parameters 'impostor' and 'body' are incompatible.
      Type 'PhysicsBody' is missing the following properties from type 'PhysicsImpostor': object, type, _options, _physicsEngine, and 66 more.
types/babylon.d.ts(80577,9): error TS2416: Property 'setLinearVelocity' in type 'AmmoJSPlugin' is not assignable to the same property in base type 'IPhysicsEnginePlugin'.
  Type '(impostor: PhysicsImpostor, velocity: Vector3) => void' is not assignable to type '{ (impostor: PhysicsImpostor, velocity: Vector3): void; (body: PhysicsBody, linVel: Vector3): void; }'.
    Types of parameters 'impostor' and 'body' are incompatible.
      Type 'PhysicsBody' is not assignable to type 'PhysicsImpostor'.
types/babylon.d.ts(80583,9): error TS2416: Property 'setAngularVelocity' in type 'AmmoJSPlugin' is not assignable to the same property in base type 'IPhysicsEnginePlugin'.
  Type '(impostor: PhysicsImpostor, velocity: Vector3) => void' is not assignable to type '{ (impostor: PhysicsImpostor, velocity: Vector3): void; (body: PhysicsBody, angVel: Vector3): void; }'.
    Types of parameters 'impostor' and 'body' are incompatible.
      Type 'PhysicsBody' is not assignable to type 'PhysicsImpostor'.
types/babylon.d.ts(80786,9): error TS2416: Property 'executeStep' in type 'CannonJSPlugin' is not assignable to the same property in base type 'IPhysicsEnginePlugin'.
  Type '(delta: number, impostors: PhysicsImpostor[]) => void' is not assignable to type '{ (delta: number, impostors: PhysicsImpostor[]): void; (delta: number): void; }'.
types/babylon.d.ts(80788,9): error TS2416: Property 'applyImpulse' in type 'CannonJSPlugin' is not assignable to the same property in base type 'IPhysicsEnginePlugin'.
  Type '(impostor: PhysicsImpostor, force: Vector3, contactPoint: Vector3) => void' is not assignable to type '{ (impostor: PhysicsImpostor, force: Vector3, contactPoint: Vector3): void; (body: PhysicsBody, location: Vector3, impulse: Vector3): void; }'.
    Types of parameters 'impostor' and 'body' are incompatible.
      Type 'PhysicsBody' is not assignable to type 'PhysicsImpostor'.
types/babylon.d.ts(80808,9): error TS2416: Property 'setLinearVelocity' in type 'CannonJSPlugin' is not assignable to the same property in base type 'IPhysicsEnginePlugin'.
  Type '(impostor: PhysicsImpostor, velocity: Vector3) => void' is not assignable to type '{ (impostor: PhysicsImpostor, velocity: Vector3): void; (body: PhysicsBody, linVel: Vector3): void; }'.
    Types of parameters 'impostor' and 'body' are incompatible.
      Type 'PhysicsBody' is not assignable to type 'PhysicsImpostor'.
types/babylon.d.ts(80809,9): error TS2416: Property 'setAngularVelocity' in type 'CannonJSPlugin' is not assignable to the same property in base type 'IPhysicsEnginePlugin'.
  Type '(impostor: PhysicsImpostor, velocity: Vector3) => void' is not assignable to type '{ (impostor: PhysicsImpostor, velocity: Vector3): void; (body: PhysicsBody, angVel: Vector3): void; }'.
    Types of parameters 'impostor' and 'body' are incompatible.
      Type 'PhysicsBody' is not assignable to type 'PhysicsImpostor'.
types/babylon.d.ts(80865,9): error TS2416: Property 'executeStep' in type 'OimoJSPlugin' is not assignable to the same property in base type 'IPhysicsEnginePlugin'.
  Type '(delta: number, impostors: PhysicsImpostor[]) => void' is not assignable to type '{ (delta: number, impostors: PhysicsImpostor[]): void; (delta: number): void; }'.
types/babylon.d.ts(80866,9): error TS2416: Property 'applyImpulse' in type 'OimoJSPlugin' is not assignable to the same property in base type 'IPhysicsEnginePlugin'.
  Type '(impostor: PhysicsImpostor, force: Vector3, contactPoint: Vector3) => void' is not assignable to type '{ (impostor: PhysicsImpostor, force: Vector3, contactPoint: Vector3): void; (body: PhysicsBody, location: Vector3, impulse: Vector3): void; }'.
    Types of parameters 'impostor' and 'body' are incompatible.
      Type 'PhysicsBody' is not assignable to type 'PhysicsImpostor'.
types/babylon.d.ts(80876,9): error TS2416: Property 'setLinearVelocity' in type 'OimoJSPlugin' is not assignable to the same property in base type 'IPhysicsEnginePlugin'.
  Type '(impostor: PhysicsImpostor, velocity: Vector3) => void' is not assignable to type '{ (impostor: PhysicsImpostor, velocity: Vector3): void; (body: PhysicsBody, linVel: Vector3): void; }'.
    Types of parameters 'impostor' and 'body' are incompatible.
      Type 'PhysicsBody' is not assignable to type 'PhysicsImpostor'.
types/babylon.d.ts(80877,9): error TS2416: Property 'setAngularVelocity' in type 'OimoJSPlugin' is not assignable to the same property in base type 'IPhysicsEnginePlugin'.
  Type '(impostor: PhysicsImpostor, velocity: Vector3) => void' is not assignable to type '{ (impostor: PhysicsImpostor, velocity: Vector3): void; (body: PhysicsBody, angVel: Vector3): void; }'.
    Types of parameters 'impostor' and 'body' are incompatible.
      Type 'PhysicsBody' is not assignable to type 'PhysicsImpostor'.
TypeScript: 12 semantic errors
TypeScript: emit succeeded (with errors)
[17:25:38] Finished 'compile' after 14 s
[17:25:38] Starting '<anonymous>'...
[17:25:41] Finished '<anonymous>' after 2.77 s
[17:25:41] Finished 'default' after 17 s
@RaananW
Copy link
Member

RaananW commented Dec 31, 2022

looking into it, thanks a lot for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants