@wrld/canvas-geometry-editor
TypeScript icon, indicating that this package has built-in type declarations

0.1.30 • Public • Published

wrld-canvas-geometry-editor

A HTML canvas for drawing and editing 2D geometry.

NPM

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @wrld/canvas-geometry-editor

Weekly Downloads

4

Version

0.1.30

License

See license in LICENSE.md

Unpacked Size

1.29 MB

Total Files

50

Last publish

Collaborators

  • wrld