Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brecert/doodlepad
good doodles
https://github.com/brecert/doodlepad
canvas javascript
Last synced: 3 days ago
JSON representation
good doodles
- Host: GitHub
- URL: https://github.com/brecert/doodlepad
- Owner: brecert
- Created: 2020-03-23T19:37:46.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-19T21:05:57.000Z (over 3 years ago)
- Last Synced: 2024-10-15T00:39:38.701Z (3 months ago)
- Topics: canvas, javascript
- Language: JavaScript
- Homepage: http://bree.dev/doodlepad/
- Size: 156 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# DoodlePad
> good doodle padA simple doodle pad to use with canvas contexes
## Demo
[demo](https://brecert.github.io/doodlepad/)## Notes
Make sure the canvas container has this css applied to it
```
touch-action: none;
```to prevent strokes from being mis-inputed and cancelled
## Example
```js
import { PaintingContext } from 'https://unpkg.com/doodlepad'const canvas = document.createElement('canvas')
canvas.width = window.innerWidth
canvas.height = window.innerHeightconst ctx = canvas.getContext('2d')
const paint = new PaintingContext(ctx)paint.strokeSize = 5
paint.strokeSmoothing = 0.5document.body.appendChild(canvas)
```