DEV Community

Bogdan
Bogdan

Posted on

Why Angular with BabylonJs project doesn't initialize Havok Physics?

Main problem is (#picture_3)
Not allowed to load local resource: file:///C:/Users/Bogdan/Desktop/angular-babylonjs-havok/node_modules/@babylonjs/havok/lib/esm/HavokPhysics.wasm
Why HavokPhysics.wasm is not allowed to load with angular?

Is there any expert to help me find out what is a problem and what should I configure webpack.config.js or/and angular.json or/and tsconfig.json?
Is a problem inside @babylonjs/havok package (https://www.npmjs.com/package/@babylonjs/havok)?
Is a problem with angular configurations?
What should we to to solve this problem any suggestion any help?

(#picture_2)
If we uncomment blue region (Ammo Physics) as shown on (#picture2) and comment green region (Havok Physics).
Than we can see that Ammo physics is working ok with Angular_BabylonJS.

Source code of example. Init Angular Project with BabylonJS and Havok Physics
git URL: https://gitlab.com/ian.sheehan.si/angular-babylonjs-havok.git
Can you clone it and try it. To see the problem (see #picture3 - Stack Error)
Image description
Image description
Image description

Top comments (1)

Collapse
 
bogdan24 profile image
Bogdan