Expand description
Leptos-free wire types spoken between a page and its render worker,
compiled under either the leptos or the offscreen feature. Pixel
quantities are physical surface pixels (CSS pixels times the device pixel
ratio), origin at the canvas top-left.
ToWorker and FromWorker are the control plane the host owns:
init, resize, input, picking, and status. Application traffic rides a
separate envelope field as the message pair a WorkerProtocol impl
declares, with optional binary Attachments transferred alongside.
Structs§
- Selected
Entity - The selected entity as reported to the page: display data only. The worker keeps the live selection and hands it to the custom message handler; nothing here resolves back into an entity.
- Value
Protocol - The untyped protocol: JSON values both ways. What
run_offscreenand the defaultuse_enginespeak, so a small app never declares message enums.
Enums§
Constants§
- APP_KEY
- Envelope field carrying a serialized application message: the
WorkerProtocol::Incomingtype page to worker, theWorkerProtocol::Outgoingtype worker to page. - ATTACHMENTS_
KEY - Envelope field carrying named binary payloads as a
{ name: Uint8Array }object whose buffers ride the transfer list. - CANVAS_
KEY - Envelope field carrying the transferred
OffscreenCanvas(onInitonly). - MESSAGE_
KEY - Envelope field carrying the serialized control message in every
postMessage.
Traits§
- Worker
Protocol - The application message pair a page and its worker speak over the
APP_KEYenvelope field, from the worker’s point of view:Incomingarrives from the page,Outgoingreturns to it. The control plane (init, resize, input, picking, status) is not part of the protocol; the host owns it. Both types serialize and deserialize because each crosses the wire in one direction and is decoded on the other side.
Type Aliases§
- Attachments
- Named binary payloads accompanying an application message: dropped asset bytes, a glTF with its resources, a saved file.