Babylon.manager.js error

Hello,

I just started to learn Babylon JS + Unity exporter + JavaScript.

I looked at this and constructed a project.

Babylon.js ES6 support with Tree Shaking | Babylon.js Documentation

Unity is trying to use exported gltf.

“Require extension CVTOOLS_babylon_mesh is not available” error if babylon.manager.js is not included in import.

There is an error when I import Babylon.manager.js.

Uncaught TypeError: e.Observable is not a constructor
at main.js:9:19259
at main.js:9:21878
at 984 (main.js:9:21898)
at main.js:268730:35
at main.js:268732:12

I’m a beginner at javascript and babylonjs, so I don’t know how to get gltf on the screen.

I ask for your help.

The toolkit generates an engine.html

You should just use that in an iframe in your front end project.

If you dont want to use the exported web project in an iframe from your own project you can use the page as guide for the kind of libs you need to load.

At least these

babylon.js
babylon.gui.js
babylon.gltf2.js
babylon.material.js
babylon.manager.js

You can get A63 Scene Manager (babylon.manager.js)

1 Like

Thank you for your answer.

I added the following to my project index.html.

The error “Unable to load from ./public/map/Sample01.gltf: Require extension CVTOOLS_babylon_mesh is not available” still appears.
And there are only babylon.gltf.js, where can I find babylon.gltf2.js?

So I put it in index.js like this.

import “…/scripts/babylon.min.js”;
import “…/scripts/babylon.gui.js”;
import “…/scripts/babylon.gltf.js”;
import “…/scripts/babylon.manager.js”;
import “…/scripts/babylon.materials.js”;

error.

ERROR in ./scripts/babylon.gltf.js 1:82-102
Module not found: Error: Can’t resolve ‘babylonjs’ in ‘F:\Project\MyAwesomeApp\scripts’
@ ./src/index.js 17:0-36

ERROR in ./scripts/babylon.gui.js 1:82-102
Module not found: Error: Can’t resolve ‘babylonjs’ in ‘F:\Project\MyAwesomeApp\scripts’
@ ./src/index.js 16:0-35

ERROR in ./scripts/babylon.materials.js 1:82-102
Module not found: Error: Can’t resolve ‘babylonjs’ in ‘F:\Project\MyAwesomeApp\scripts’

I keep looking, but Babylon.js and javaScript are difficult at the beginning.
Help me.

Sorry those are my renamed filenames…

You could use toolkit to make a project… export the web project and all the files you will need plus the engine.html page to use as a guid will be in that export folder

Hello @tanatos99999 just checking in if you need any more help.