A dxf viewer for the browser using three.js.
npm install three-dxf
npm install three-dxf
`
For now we recommend cloning the repo, and starting with our sample. See Run Samples below.
!Example of the viewer
#### Usage
`javascript
// See index.js in the sample for more details
var parser = new window.DxfParser();
var dxf = parser.parseSync(fileReader.result);
cadCanvas = new ThreeDxf.Viewer(dxf, document.getElementById('cad-view'), 400, 400);
`
#### Run Samples
`
first, compile three-dxf
> npm install
> npm run build
then install the sample's dependencies
> cd sample
> npm install
go back to the root and run http-server to run the sample
> cd ..
> npm install -g http-server@0.9.0
> http-server .
use
http-server -c-1 . to prevent caching
``