I typed the command “npm i @babylonjs/core@preview” in the DOS Command window. A copy process was startet. Not more. I looked for the babylon.js file on the bybylon homepage, but didn’t found it. Therefor I downloaded the whole package from source forge (over 500MB). I created a html-page but the browser shows me the error “engine is not defined”. I think I refer to the wrong babylon.js. Thats the html-page:
Hello and welcome!
Seems that you mix several different setups and they will not work in this way.
It is possible to use just usual <script> tag in HTML file - Getting Started - Chapter 1 - Setup Your First Web App | Babylon.js Documentation
The fastest way to get the working example - just open the Playground and press Download button (shown at the screenshot below).
Dir sirs,
thank you for your help.
I had a new problem with installing sound in my playground.
The console told me "babylon.js:16 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. " It seems that the chrome engine makes problems. Up to this problem I had stored my internet page on my local computer. Then I save the files on my internet server and well - the problem was solved. In the babylon tutorials I would advise the users, that if they have problems, they should try to access the html-page via the Internet. Greetings, Achim Rogalski
Yes, the browser often behaves strangely on local files, we encourage running a local webserver ( serve - npm (npmjs.com) is great) for testing purposes.