Contract

The types between Boson and the application that hosts it.

Types only, no runtime code: the whole interface between Boson and the application that hosts it.

Data

Type Kind What it is
BufferDescriptor interface
BufferResolver interface
ScenePatchOp type
SceneBridgeErrorKind type
SceneBridgeError interface

Geometry

Type Kind What it is
Vec3 interface
Quat interface

Text

Type Kind What it is
FontFace interface
FontRegistration interface
TextErrorKind type
TextError interface
TextStyleRun interface
TextAlign type
TextDirection type
TextContent interface
TextRect interface
TextLine interface
TextLayoutInfo interface
TextAffinity type
TextCaret interface
TextOffset interface
FontFaceInfo interface
FontInfo interface
GetTextLayoutParams interface
GlyphBudget interface

Viewport

Type Kind What it is
DisplayMode type
ViewportCommand type

Control surface

Type Kind What it is
JsonValue type
ControlParams type
ControlErrorCode type
ControlResult type
CapabilityDescriptor interface One verb in describe().
PrecisionClass type How exact a verb's output is.
ExecutionInfo interface
ControlSurface interface

Failure

Type Kind What it is
FatalReasonKind type internal-error: the wasm module trapped; the engine is unusable.
FatalReason interface Plain object, not an Error subclass, so it crosses worker/wasm boundaries.

Edit intents

Type Kind What it is
ElementSet interface
TargetRef interface
CreatedRef interface
Transform type
Frame interface
CreateContent interface
PortRef interface
EditOp type
IntentSource interface
CancelReason type
EditIntent type
IntentOutcome type

3D camera

Type Kind What it is
CameraProjection type
CameraState interface
CanonicalView type
CameraEasing type

3D scene

Type Kind What it is
BoundingBox interface
GeometryIdentity interface Persistent identity of a handle's elements.
GeometryHandle interface
GeometrySamples interface
GeometryLines interface
ScenePatchEntry interface
ScenePatch interface

3D properties

Type Kind What it is
PropertyResolver interface Supplied by the host.

3D render

Type Kind What it is
QualityLevel type quality_set_level: low = no MSAA, medium = 4× MSAA, high = 4× MSAA.
RenderQuality interface get_render_quality result.
ShadowState interface Shadows from a world-fixed sun, drawn in rendered and material-preview above quality low.
ShadowCatcherState interface The invisible ground plane under the scene that shows shadows (and AO while AO is on).
ShadowCatcherResult interface render_set_shadow_catcher result.
AoState interface render_set_ao state: AO darkens ambient and image-based light only.
ProgressiveState interface render_set_progressive state.
MaterialDefinition interface material_set params and get_materials entries: the glTF metallic-roughness subset.
TextureFormat type Pixel formats of {@link TextureData}.
TextureData interface Pixel data of one texture.
TextureBinding interface Only UV set 0 exists in the vertex pool.
BrushShape type A footprint shape of the built-in brush atlas.
BrushJitter interface Per-mark jitter bounds, from the mark's seed.
BrushLayer interface One layer of a brush style.
BrushStyle interface brush_style_set params and get_brush_styles entries.
PainterlyGround type What a painted surface shows between its marks.
RenderSetPainterlyParams interface render_set_painterly params; omitted values are kept.
PainterlyState interface render_set_painterly result and RenderQuality.painterly.
ThemeColor type sRGB-encoded, opaque, each in [0, 1]: what CSS writes.
ThemePreset type classic is the original look; light and dark follow the Rufous design system.
ThemeColors interface
RenderSetThemeParams interface render_set_theme params; omitted slots are kept, null restores the preset's.
ThemeState interface render_set_theme result and get_theme.

2D scene

Type Kind What it is
Affine2d type
Vec2d type
Rgba type
ColorStop2d interface
Paint2d type
Stroke2d interface
SizeRule2d type
Constraint2d type
ShapeBase2d interface
PaintedShape2d interface
GroupShape2d interface
RectShape2d interface
EllipseShape2d interface
LineEnd2d interface
LineShape2d interface
PathData2d interface
PathShape2d interface
TextRun2d interface
TextShape2d interface
Shape2d type
ScenePatchEntry2d interface
ScenePatch2d interface