0.0.4 • Published 1 year ago

writeboard v0.0.4

Weekly downloads
-
License
Apache License 2....
Repository
-
Last release
1 year ago

writeboard

介绍 Instruction

可扩展的书写用白板,不依赖任何第三方库。

Extensible whiteboard for writing with minimal reliance on third-party libraries.

DEMO:https://gimholg.gitee.io/writeboard

安装教程 Installation

npm install --save writeboard

使用说明 Usage

import { WhiteBoard } from 'writeboard'

const whiteBoardWidth = 500;
const whiteBoardHeight = 500;

/**
 * @type {HTMLCanvasElement}
 */
const onscreenCanvas = document.getElementById("on-screen-canvas");
onscreenCanvas.width = whiteBoardWidth;
onscreenCanvas.height = whiteBoardHeight;

/**
 * @type {HTMLCanvasElement}
 */
const offscreenCanvas = document.createElement('canvas');
offscreenCanvas.width = onscreenCanvas.width;
offscreenCanvas.height = onscreenCanvas.height;

const factory = FactoryMgr.createFactory(FactoryEnum.Default);
const whiteboard = factory.newWhiteBoard({
  onscreen: onscreenCanvas,
  offscreenCanvas: offscreenCanvas
});

参与贡献 Participate

  1. fork.
  2. new branch: feat/xxx, fix/xxx
  3. commit & push
  4. pull Request
0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago