Help Needed with 404 Error in Babylon.js Project with Webpack Dev Server

I made some hacks to make it working, but:

  1. you don’t resize your canvas so it was always 300x150 (or something like that). Adding these two lines will fix it, but not permanently:
    image

  2. you never set this.world.player here so this.scene.render() never get called.

You don’t need the lines 94-96 as well.
Remove all the lines marked by red.

And add this one:
image

Your scene will start to render.

  1. Make the meshes bigger by scaling them and resolve the promise if all is ok.
    image

  2. this function permanently crashes because this._mesh is not set and you try to access it’s properties in this function. So just a hack to make it running, add this:

image

  1. the initial positions z value is at zero and the ground too. The ships zero is somewhere in their middle so they are cut so modify the z values, again just to make them visible:
    image

  2. this observer was crashing because this.player is not set. Again a quick hack to make it show something on the screen:

image

That’s all!

Good luck and happy coding!

2 Likes