Skip to content

bigtimebuddy/pixi-webworker-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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