Intro

In the following sections, you may see some properties or methods marked with @ignore. This means that they are not part of the public API and you should ignore them.

Usage

import {CadData, CadLine, CadViewer} from "@lucilor/cad-viewer";

const line = new CadLine();
line.start.set(0, 0);
line.end.set(100, 100);
const data = new CadData();
data.entities.add(line);

const viewer = new CadViewer(data, {width: innerWidth, height: innerHeight});
viewer.appendTo(document.body);
await viewer.render();
viewer.center();

You can also create a CadData like this:

const json = new CadData().export();
const data = new CadData(json);

Note

Classes

CadViewer

Cad Viewer

CadData

Cad Data

CadEntities

Cad Entities

ColoredObject

Colored Object