文件最后提交记录最后更新时间
4 个月前
4 个月前
6 个月前
10 个月前
9 个月前
26 天前
9 个月前
8 个月前
4 个月前
11 个月前
README

Real-time Collaborative Cursors

Example project demonstrating real-time cursor tracking and collaborative canvas.

Getting Started

git clone https://github.com/rivet-dev/rivet.git
cd rivet/examples/cursors
npm install
npm run dev

Features

  • Real-time cursor tracking: Broadcast cursor positions to all connected users instantly
  • Event-driven architecture: Use actor events to push updates to WebSocket clients
  • Persistent canvas state: Text labels automatically saved in actor state across sessions
  • Multiple rooms: Each room is a separate actor instance with isolated state

Implementation

This example demonstrates real-time collaboration using WebSockets and Rivet Actors:

  • Actor Definition (src/backend/registry.ts): Implements the canvasRoom actor for tracking cursor positions and managing collaborative canvas state

Resources

Read more about WebSockets, state, and events.

License

MIT