bigtimebuddy / pixi-webworker-example

Home Page:https://mattkarl.com/pixi-webworker-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pixi-webworker-example

Simple example how to implement @pixi/webworker using PixiJS 7+ using HTMLCanvasElement's transferControlToOffscreen.

View demo

Advantages

  • Render in another thread is fast and doesn't block the main thread
  • Ideal for running React or another virtual DOM-based frameworks

Disadvantages

  • Only browsers that support OffscreenCanvas
  • No interactivity (mouse, pointer or touch events)

Getting Started

Install dependencies and start. This will open in a browser.

npm install
npm start

About

https://mattkarl.com/pixi-webworker-example


Languages

Language:TypeScript 61.7%Language:HTML 28.2%Language:CSS 10.2%