Skip to content

Smoothed remote cursors

Perfect-cursors (or similar easing) reduces jitter when rendering peers’ pointers—important for perceived quality in multiplayer whiteboards.

Pair with Liveblocks/Yjs presence channels.

Interactive demo

Use liveblocks Yjs and perfect-cursors implementing multiplayer cursors.

ts
import { createClient } from '@liveblocks/client';
import { getYjsProviderForRoom } from '@liveblocks/yjs';

const client = createClient({
    throttle: 16,
    publicApiKey: 'pk_dev...',
});
const { room, leave } = client.enterRoom('my-room-id', {
    initialPresence: { cursor: null },
});

const yProvider = getYjsProviderForRoom(room);
const yDoc = yProvider.getYDoc();

Released under the MIT License.