react-hooks-use-offscreen-drawing-canvas
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

Use Offscreen Drawing Canvas

This module is based on my simmilar module react-hooks-use-drawing-canvas that runs the drawing code on the main thread. When running potentially complex drawings however, the main thread will block while drawing calculation is being done.

To overcome this, we can make use of the OffscreenCanvas interface, and run the drawing method in a web-worker thread that will never block the main thread. Even while it is calculating!

Installation

yarn add react-hooks-use-offscreen-drawing-canvas

Readme

Keywords

none

Package Sidebar

Install

npm i react-hooks-use-offscreen-drawing-canvas

Weekly Downloads

1

Version

0.1.3

License

MIT

Unpacked Size

8.85 kB

Total Files

7

Last publish

Collaborators

  • shlappas