Skip to content

Latest commit

 

History

History

web

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Build for the web

In order to build the three-d examples for the web, you can follow these steps. All commands should run in this web/ directory.

  1. Make sure you have both Rust and npm (which should include npx) installed.

  2. Run

$ npm install
  1. Run (The following command builds the triangle example. Replace the path to the example to build other examples. You can find an overview of all examples in examples/README.md.)
$ npx wasm-pack build "../examples/triangle" --target web --out-name web --out-dir ../../web/pkg
  1. Run
$ npm run serve
  1. Open http://localhost:8080 in a browser