Why Angular with BabylonJs project doesn’t initialize Havok Physics?
Can anybody try git project and does anybody know if I should configure angular and how to allow loading wasm
Can you try git pull and see this problem
Why angular project is unable to load havok wasm file when I/We try to initialize havok physics?
Do we have to configure any angular specific configuration? Which? How? Can anybody help me solve this problem?
Where should be a problem (seen in stack overflow)? In which specific package or is this angular specific configuration?
Under root directory there is webpack.config.js. And I don’t know if I should and how to fix configure it.
Or is bug in havok package source/build code.
This is a known issue with angular and the way they use webpack:
It has been there since 2021. I do hope they will decide to eventually fix it or provide a proper solution. What you CAN do is this - use locateFile when initializing the plugin:
My git project worked as I wrote, But today I have another problem before this problem.
Error: node_modules/@babylonjs/core/Engines/engine.d.ts:1272:36 - error TS2552: Cannot find name ‘wgslLanguageFeatures’. Did you mean ‘WGSLLanguageFeatures’?
Is there anybody which did create template project with angular with babylon latest stable versions with havok and ammo physics?
I would like to play with babylonjs and new physics (havok and ammo).
But I spent too much time months and energy to configure this. I am done with babylonjs.
I don’t get it why BabylonJs doesn’t have official template projects for ract and angular. And why they don’t support those popular framework and templates as official start point project on gitlab.
There are many people have seme problems over and over again. When is new version of bayblon physics and other packages. There is new problems over and over again and again.
So people don’t want to use BabylonJs framwrok because of this. This is my opinion.
demo2.component.ts:71 ERROR Error: Uncaught (in promise): TypeError: this._physicsEngine.removeImpostor is not a function
TypeError: this._physicsEngine.removeImpostor is not a function
at PhysicsImpostor._init (physicsImpostor.js:367:29)
at new PhysicsImpostor (physicsImpostor.js:349:22)
at demo2.component.ts:139:30
at Generator.next ()
at asyncGeneratorStep (asyncToGenerator.js:3:1)
at _next (asyncToGenerator.js:22:1)
at _ZoneDelegate.invoke (zone.js:368:26)
at Object.onInvoke (core.mjs:11018:33)
at _ZoneDelegate.invoke (zone.js:367:52)
at Zone.run (zone.js:129:43)
at resolvePromise (zone.js:1193:31)
at zone.js:1100:17
at zone.js:1116:33
at asyncGeneratorStep (asyncToGenerator.js:6:1)
at _throw (asyncToGenerator.js:25:1)
at _ZoneDelegate.invoke (zone.js:368:26)
at Object.onInvoke (core.mjs:11018:33)
at _ZoneDelegate.invoke (zone.js:367:52)
at Zone.run (zone.js:129:43)
at zone.js:1257:36
error in code when I want to put impostor on sphere
error in this code:
sphere.physicsImpostor = new BABYLON.PhysicsImpostor(sphere, BABYLON.PhysicsImpostor.SphereImpostor, { mass: 1.0, friction: 1.0, restitution: 1.5});
Seems to be some issue with the declaration generated. I will look into that. Editing the file will work for the time being (as this is only a d.ts). Will write here
We are an open source framework and we accept community contributions
If someone doesn’t want to use babylon because babylon doesn’t offer a template for angular, I am very sorry. But I doubt this is the case. On the other hand - we are a 3D framework, aimed at canvas-accelerated graphics. How to integrate a canvas in a web application is very much framework dependent. Are we expected to deliver an example for each and every framework? Svelte? Vue? React? Angular? Maybe angular 1.X as well, because of a different paradigm? We work with web standards. And you as a developer need to know how the framework of your choice is working.
As I wrote - if you want to contribute, be my guest.
Error: node_modules/@babylonjs/core/Engines/engine.d.ts:1272:36 - error TS2552: Cannot find name ‘wgslLanguageFeatures’. Did you mean ‘WGSLLanguageFeatures’?
OK this hello world works OK with Havok physics engine. Thank you for your help. Hint about override location of wasm for initialization and “npm update”. And that physics api is different with
Ok this are documentation urls:
Thank you @RaananW for your hints. I updatee my git project (Ian Sheehan / angular-babylonjs-havok · GitLab). now it should works fine. If anybody wourld like to try it or play around angular and babylonjs and havok physics.