@mocanvas/editor · interface
interface InstancePresenceWhat one other person is doing right now: where their cursor is, what they have selected, which page they are on.
Presence records live in the presence scope: they are shared with
collaborators but never written to a .tldr file and never enter history.
Properties · 15
brush: {camera: {Where their viewport is, or null for a collaborator that has no camera —
an agent acting on the board. Distinct from a camera parked at the origin.
chatMessage: stringcolor: stringCSS colour used for their cursor, name chip and selection outlines.
currentPageId: PageIdcursor: {Where their pointer is, or null for a collaborator that has no pointer at
all — an agent acting on the board, or a viewer whose pointer has left the
canvas. A cursor parked at the origin is not the same thing as no cursor.
followingUserId: UserId | nullreadonly id: InstancePresenceIdlastActivityTimestamp: numberDate.now() on the sender when the record was produced.
meta: JsonObjectscribbles: Scribble[]selectedShapeIds: ShapeId[]readonly typeName: "instance_presence"userId: UserIdStable id of the person (survives reconnects; one person may have many
tabs). A branded UserId, not a bare string: a presence record
carries a *user* id and a *presence record* id side by side, and the two
were far too easy to swap. Mint one with createUserId.
userName: stringmocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.