Help getting set-up with VSCode and THREE.js

i suggest you use bundlers like most people do and you have three running in seconds. parcel or any other. as a quick fix i would suggest codesandbox. it has a download button which has the project files needed (uses parcel i believe). looks like this: https://codesandbox.io/s/reurope-threejs-basic-kiow9

you are messing with dead-end specs that will never see the light of day (module script tags) or at best are unfinished and impractical (spec esm imports). you would never see any of this stuff in a professional setting.

1 Like

I am open to any form of making this work as long as I can disconnect from the internet for extended periods of time. I need to be self sufficient.

If I download this from codesandbox would I then be able to use those files and build/practice THREE.js without internet?

yes. thatā€™s what all bundlers do. once you do ā€œnpm installā€ all your dependencies are local.

Iā€™ll be honest I donā€™t know enough about bundlers/github/dependencies etc to get this done. I went into git bash and did the npm install and I now have a folder called node_modules. I have no clue what it does or what to do with these files.

On codesandbox I couldnā€™t find anything labeled download so I didnā€™t know what to do there.

Sorry for taking so much time I just really want this working.

EDIT during the install I had a bunch of warning about dependencies being outdated. I ran npm update but it didnā€™t look like anything happended.

node_modules keeps your dependencies locally. the download button is on the upper left, the array pointing down (export to zip).

I just finally got something working. I used this boilerplate that this guy had posted on my stackoverflow questions also posted above by @mugen87.

It took me a bit to figure how it works but Iā€™ve managed to get a couple of my project to finally load in a browser. I also disconnected internet and it still worked so thatā€™s what needed. I greatly appreciate everyoneā€™s help in this.

1 Like