/live-x

Playing with Web Worker+Socket & requestAnimationFrame

Primary LanguageTypeScript

live-x

This repo shows:

  • Use of comlink and web worker to offload Socket connection handling.
  • Use of requestAnimationFrame to manage setState (or batch update) within max FPS.

live-x

Getting Started

First, install the dependencies:

yarn install

Define .env.localhost

# .env.local
NEXT_PUBLIC_BOOK_WS_URL=wss://www.cryptofacilities.com/ws/v1

Run the development server:

yarn dev

Open http://localhost:3000 with your browser to see the result.

More

Please refer to docs/README.md