Basic 2D cad editing functionality fully in a web browser with high performance. Uses rust web assembly for underlying data manipulation and web-gpu for visualisation.
Currently supports:
- Can select multiple objects
- Can rotate, flip, scale and offset blocks
- Can make edits on model level or on block level
Could be extended to support 3D visualisation or to accept dxf files. An example dxf in json form is given.
Click select and then block to enable to select tool to select blocks. The arrow keys can be used to move around. Selecting pan (the default command) will panning by clicking on the mouse.
Once an object is selected it can be roated by selecting the square at the top of the bounding box, dragging and dropping the box moves the object around and dragging the edges of the box changes the scale.
- Needs the rust compiler to build wasm - https://www.rust-lang.org/tools/install
- Needs npm - https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
Run
npm install
cargo install wasm-pack
npm run build-rust
npm run server-release
The browser must support web-gpu else an error pop-up will be displayed. All chromium browsers should support web-gpu https://en.wikipedia.org/wiki/WebGPU#:~:text=Both%20Google%20Chrome%20and%20Firefox,of%20both%20WebGPU%20and%20WGSL. and in each case it should use native hardware for rendering.
Use npm run server-debug to run the server on local host with un-mininified javascript.

