Skip to content

Latest commit

 

History

History
10 lines (10 loc) · 700 Bytes

startup-guide.md

File metadata and controls

10 lines (10 loc) · 700 Bytes
  1. npm init -y
  2. Add "private": true, param to package.json and rename "name" param
  3. npm install webpack webpack-cli --save-dev for webpack
  4. npm install --save three for threejs
  5. npm install webpack-dev-server --save-dev for live reloading
  6. Write js code in src/index.js
  • To include threejs modules, use its path relative to its place in the three-js-repo (i.e., import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';)
  1. Write html code in dist/index.html
  2. npx webpack serve to build or npx webpack serve --no-client-overlay --live-reload to serve on localhost with no error msg overlay and live reloading
  3. Upload contents of dist/ to web server