Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rockerboo/fabric-offscreen-canvas
WIP project to develop offscreen canvas capabilities for fabric.js
https://github.com/rockerboo/fabric-offscreen-canvas
canvas fabricjs offscreencanvas
Last synced: 18 days ago
JSON representation
WIP project to develop offscreen canvas capabilities for fabric.js
- Host: GitHub
- URL: https://github.com/rockerboo/fabric-offscreen-canvas
- Owner: rockerBOO
- License: wtfpl
- Created: 2021-08-22T03:51:17.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T16:13:58.000Z (almost 2 years ago)
- Last Synced: 2024-10-10T23:28:59.344Z (about 1 month ago)
- Topics: canvas, fabricjs, offscreencanvas
- Language: JavaScript
- Homepage:
- Size: 5.21 MB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Offscreen rendering with fabric.js
## Current State: Fixes needed
## [fabric.js](https://github.com/fabricjs/fabric.js) fixes required
- Detecting if in browser or node or worker
- Remove window/document references (not in workers)
- Send all events that could cause rendering to the worker.[Following this guide](https://threejs.org/manual/#en/offscreencanvas) to see how to abstract the code to be run on the worker.
## Install
Designed for yarn.
```
yarn
```## Usage
```
yarn dev
```Please fork if you want to help or just try on your own. Many fixes will be required in fabric.js to allow offscreen canvas.
I am looking at 70ms frames due to rendering and sampling image data (`getImageData`) so moving it off the main thread would allow the UI to be smooth even if its slow to render.
Eventually would like to abstract the renderer to be all message based. Then we can run other renderers that can possibly use web assembly, webgpu, vulkan empowered renderers.
Note: Browser support is limited for offscreen canvas. Chrome specifically supports it but many others don't at this time.