Skip to main content

Crate oxframe_preview

Crate oxframe_preview 

Source
Expand description

Preview protocol for oxframe.

Session implements the editor protocol (oxframe-protocol) on top of any PreviewEngine and is independent of the transport:

  • natively, server exposes it over a WebSocket on 127.0.0.1 (frames are JPEG-encoded and cached);
  • in the browser, the same session runs inside wasm and frames go to a canvas as raw RGBA.

Modules§

server
Native preview server: WebSocket on 127.0.0.1, protocol JSON for commands/events, binary frames (16-byte header + JPEG).

Structs§

Session
Transport-independent preview state machine: feed it Commands, send its Outputs to the UI.

Enums§

MetaEdit
An edit of a scene’s meta.json requested by the editor.
Output
A message for the UI: JSON event or binary frame.

Traits§

PreviewEngine
What the preview needs from an engine. Implemented by oxframe::Engine.

Functions§

rgba_encoder
Raw RGBA “encoding” (in-process transports, tests).

Type Aliases§

Encoder
Encodes a rendered frame for the wire.