The src/main.js you run on your computer
The same file works on this page and in your Vite project. On your computer the import finds three.js in node_modules.
Install Node.js, open a terminal, create a Vite project called lumen-3d, add three.js 0.186.1, start the dev server and see your cube in the browser. Every command has its real output, and every common failure has a fix.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 4 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Create the lumen-3d project, pin three.js 0.186.1, replace main.js with the example and get the turning cube on your screen. Write down the exact address your dev server printed.
Your friend's terminal says npm error Missing script: "dev". Give two possible causes and how to check each.
Explain it without notes
Why do we need a dev server at all? Why not open index.html directly?
What is the difference between npm install three@0.186.1 and npm install --save-exact three@0.186.1?
Console
Nothing logged yet.Expected console output
three.js 186 is working