@wrld/canvas-geometry-editor
v0.1.30
Published
> A HTML canvas for drawing and editing 2D geometry.
Downloads
15
Readme
wrld-canvas-geometry-editor
A HTML canvas for drawing and editing 2D geometry.
Install
npm install --save @wrld/canvas-geometry-editor
Usage
import { ReactCanvas, ReactGrid } from "@wrld/canvas-geometry-editor";
export const Example = () => {
return (
<ReactCanvas
width={"800px"}
height={"600px"}
zoomBehaviour={"mouse"}
ctrlZoomBehaviour={"center"}
mouse={{
"0": "pan",
"1": "disabled",
"2": "rotate"
}}
>
<ReactGrid/>
</ReactCanvas>
);
}
Running the Examples
From the root
npm install
npm run build
cd example
npm install
npm start
License
BSD © wrld3d
See LICENSE.md for details.