Getting started template doesn't work

Hello,

I’m new in BJS, I want to test a simple script so I start this tuto
https://www.gamefromscratch.com/post/2016/11/15/BabylonJS-Tutorial-Series-Getting-Started.aspx
I use WAMP to create my server when I lunch localhost/MyFile/Index.html, it doesn’t show me the scene showing in the tutoriel YouTube

any idea ? :face_with_monocle::face_with_monocle:
Thanks

Hey and welcome!
do you have any message on the console?

This template has been superceded (links to babylon are incorrect). The best place to find how to get started is First Steps - Babylon.js Documentation

No, I just copied the HTML file from the template to a new html file in my www folder, it doesn’t work and I solve it like @JohnK said the URL giving in the template has been superceded.
thank u for ur reply

Thanks it works, now if I want to use BJS library offline, can I replace the url in by files cloned from github

thank u :grinning::grinning::grinning::grinning:

Yes or from the CDN How to get Babylon.js - Babylon.js Documentation.

I copied https://cdn.babylonjs.com/babylon.max.js content to JS file with my index.html file in the same folder and I call it from my index.html file <script src=“localhost:8080\babylonTest\babylon.js” …, it doesn’t work :thinking::thinking::thinking::thinking:

If you copied babylon.max.js then in index.html you need to use babylon.max.js not babylon.js (unless you re-named it). You should also use relative URL, presuming index.html and babylonTest are in the same folder and babylon.max.js is in babylonTest then use

<script src = "babylonTest/babylon.max.js"></script>

and check the direction of your slashes

Also if you need methods only in version 4.00 the you need to copy contents from https://preview.babylonjs.com/babylon.max.js as until sometime today (when 4.00 is released) cdn will still be version 3.3

See Babylon.js/readme.md at master · BabylonJS/Babylon.js · GitHub

yes I renamed a JS file as babylon and I past the content of CDN url inside it and I use

<script src = "babylonTest/babylon.js"></script>

in the index.html and it still dosn’t work, when I replace the src with url it works but when I change it to file directory it dosn’t work

Check errors and warnings in console.

it works the problem was in my 8080 port, now I can run it :grinning::grinning::grinning:
last question if I use the CDN url, I can use all the functionalities of BJS without any problem ?

thank u @JohnK

Yes :+1::smile::sparkler:

1 Like