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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQAumujy5kXaOKurr6zgTP2krHrFVXi2kj8seRYrlvq2GssUjReh5MiVpQbLFQNy9HsmcasqpBNVsXytWTw0ZDjA=

Scene schema

This page lists every type that makes up a stored drawing: its scenes, layouts, models, elements and styles. Use it to look up a field’s name and type when you read or write a drawing’s records.

A ? after a field name marks it optional, and a linked type opens that type. A type that extends another lists only the fields that differ. The page is generated from the schemas in @dxos/scene, whose source also holds the same types as one JSON Schema document, ontology.schema.json.

The root of a drawing as it is read or printed whole.

Scenes, layouts and models together. The first scene is the root.

Field Type
scenes (Scene.SceneRecord2D or Scene.SceneRecord3D)[]
layouts (Scene.LayoutRecord2D or Scene.LayoutRecord3D)[]
models (Scene.ModelRecord2D or Scene.ModelRecord3D)[]

A scene views one layout through a camera.

A 2D scene as plain data.

Field Type
id string
dim 2d
name? string
theme? string
layout string
camera Scene.Camera2D

A 3D scene as plain data. Extends Scene.SceneRecord2D.

Field Type
dim 3d
camera Scene.Camera3D

A 2D scene as an ECHO object. ECHO type org.dxos.type.scene.scene2d, version 0.1.0. As Scene.SceneRecord2D, without dim.

Field Type
key string
layout ref to Scene.Layout2D

A 3D scene as an ECHO object. ECHO type org.dxos.type.scene.scene3d, version 0.1.0. As Scene.SceneRecord3D, without dim.

Field Type
key string
layout ref to Scene.Layout3D

Where a 2D scene looks and how far in.

Field Type
center { x: number, y: number }
zoom number

An orbit camera. Angles are in degrees.

Field Type
target Scene.Vec3
yaw number
pitch number
distance number
fov number
projection perspective orthographic

A layout positions elements in one coordinate space.

A 2D layout as plain data.

Field Type
id string
dim 2d
name? string
model? string
elements map of Scene.ElementRecord2D
styles? map of Style2D
layers? map of Layer
kind? Scene.LayoutKind
anonymous? boolean
arrange? Scene.Arrangement
props? map of any
grid? Scene.GridPitch
lattice? Scene.Lattice
constraints? Scene.Constraint[]

A 3D layout as plain data. As Scene.LayoutRecord2D, without grid, lattice, constraints.

Field Type
dim 3d
elements map of Scene.ElementRecord3D
styles? map of Style3D

A 2D layout as an ECHO object. ECHO type org.dxos.type.scene.layout2d, version 0.2.0. As Scene.LayoutRecord2D, without dim.

Field Type
key string
model? ref to any object

A 3D layout as an ECHO object. ECHO type org.dxos.type.scene.layout3d, version 0.2.0. As Scene.LayoutRecord3D, without dim.

Field Type
key string
model? ref to any object

A grid pitch in scene px.

Type: number, at least 1.

Lattice mode’s grid: shapes span whole cells and links run in the gutters.

Field Type
width number
height number
gutterX number
gutterY number

Constrained mode’s relation of one element to another.

Field Type
subject string
relation Scene.Placement
object string

How a layout places the elements that have no position yet.

Field Type
kind string
params? map of any

A layer that elements paint on, bottom first.

Field Type
id string
name string
z string
hidden? boolean

A model holds the reusable objects that elements place, and the named styles.

A 2D model as plain data.

Field Type
id string
dim 2d
name? string
objects map of Scene.Object2D
styles? map of NamedStyle2D
catalogs? string[]

A 3D model as plain data. Extends Scene.ModelRecord2D.

Field Type
dim 3d
objects map of Scene.Object3D
styles? map of NamedStyle3D

A 2D model as an ECHO object. ECHO type org.dxos.type.scene.model2d, version 0.2.0. As Scene.ModelRecord2D, without dim.

Field Type
key string
objects map of Scene.StoredObject2D
catalogs? ref to StyleCatalog[]

A 3D model as an ECHO object. ECHO type org.dxos.type.scene.model3d, version 0.2.0. As Scene.ModelRecord3D, without dim.

Field Type
key string
objects map of Scene.StoredObject3D
catalogs? ref to StyleCatalog[]

A reusable 2D object, with no position.

Field Type
id string
kind string
style? string
props? map of any
lockAspect? boolean
size? { width: number, height: number }
overrides? Style2D
parts? string

A reusable 3D object, with no position.

Field Type
id string
kind string
style? string
props? map of any
lockAspect? boolean
scale? Scene.Vec3
overrides? Style3D
parts? string

A 2D object as a Model2D stores it. Extends Scene.Object2D.

Field Type
parts? ref to any object

A 3D object as a Model3D stores it. Extends Scene.Object3D.

Field Type
parts? ref to any object

An element is one stored record of a layout, in either dimension.

The fields every element has, in either dimension.

Field Type
id string
object? string
kind? string
z? string
layer? string
hidden? boolean
locked? boolean
label? string
style? string
source? ElementEndpoint
target? ElementEndpoint
pinned? boolean
constrain? PartLayout
composite? string
dsl? Scene.DslIdentity
data? map of any
props? map of any

A 2D element. Extends Scene.BaseElement.

Field Type
center? { x: number, y: number }
size? { width: number, height: number }
rotation? number
scale? { x: number, y: number }
fit? InstanceFit
overrides? Style2D
ports? Port[]
portsPerSide? number
exposed? boolean
bind? string
optional? boolean
grow? string
follows? string
partOverrides? map of map of unknown
parent? string
extent? { width?: number, height?: number }
path? line ortho curve spline smart
points? Point[]
tail? arrow circle diamond diamond-filled crowsfoot triangle
head? arrow circle diamond diamond-filled crowsfoot triangle
connector? DiagramConnector

A 3D element. Extends Scene.BaseElement.

Field Type
center? Scene.Vec3
scale? Scene.Vec3
rotation? Scene.Vec3
fit? InstanceFit
overrides? Style3D

A 2D element as a layout stores it: the element, and its kind’s own fields beside it.

Field Type
id string
object? string
kind? string
z? string
layer? string
hidden? boolean
locked? boolean
label? string
style? string
source? ElementEndpoint
target? ElementEndpoint
pinned? boolean
constrain? PartLayout
composite? string
dsl? Scene.DslIdentity
data? map of any
props? map of any
center? { x: number, y: number }
size? { width: number, height: number }
rotation? number
scale? { x: number, y: number }
fit? InstanceFit
overrides? Style2D
ports? Port[]
portsPerSide? number
exposed? boolean
bind? string
optional? boolean
grow? string
follows? string
partOverrides? map of map of unknown
parent? string
extent? { width?: number, height?: number }
path? line ortho curve spline smart
points? Point[]
tail? arrow circle diamond diamond-filled crowsfoot triangle
head? arrow circle diamond diamond-filled crowsfoot triangle
connector? DiagramConnector

A 3D element as a layout stores it.

Field Type
id string
object? string
kind? string
z? string
layer? string
hidden? boolean
locked? boolean
label? string
style? string
source? ElementEndpoint
target? ElementEndpoint
pinned? boolean
constrain? PartLayout
composite? string
dsl? Scene.DslIdentity
data? map of any
props? map of any
center? Scene.Vec3
scale? Scene.Vec3
rotation? Scene.Vec3
fit? InstanceFit
overrides? Style3D

A link’s end as an element stores it.

Field Type
node? string
port? string
point? Point

The DSL statement that made an element.

Field Type
object string
element string
part? string
ref? string
index? string
portal? string

How a part of a composite follows its frame on each axis.

Field Type
x? PartConstraint
y? PartConstraint

A 3D vector.

Field Type
x number
y number
z number

A node is the typed form of a 2D element that is not a link, one schema per kind.

The fields every node kind shares.

Field Type Notes
kind string
id string
z string
locked? boolean
center Point
size Size
rotation? number -360 to 360
ports? Port[]
portsPerSide? number
layer? string
style? string
overrides? Style2D
exposed? boolean
bind? string
optional? boolean
hidden? boolean
grow? string
follows? string
composite? string
partOverrides? map of map of unknown
parent? string
extent? { width?: number, height?: number }
constrain? PartLayout

A node whose kind is not known here: a box with a label. Extends NodeBase.

Field Type
label? string

A rectangle. Extends NodeBase.

Field Type
kind rect
label? string
padding? Padding

An ellipse inscribed in the frame. Extends NodeBase.

Field Type
kind ellipse
label? string
padding? Padding

A cloud filling the frame. Extends NodeBase.

Field Type
kind cloud
label? string
padding? Padding
params? CloudParams

A cloud’s own settings.

Field Type Notes
bumps? integer 3 to 24

A regular polygon. Extends NodeBase.

Field Type
kind polygon
label? string
padding? Padding
params? PolygonParams

A polygon’s own settings.

Field Type Notes
sides? integer 3 to 24
fit? frame circle

A shape that a named recipe draws from the frame and parameters. Extends NodeBase.

Field Type
kind shape
label? string
padding? Padding
recipe string
params? map of number

A line through points, in the 0 to 1 space of its frame. Extends NodeBase.

Field Type
kind polyline
label? string
padding? Padding
points Point[]
bends? PolylineBend[]
params? PolylineParams

A polyline’s own settings.

Field Type
closed? boolean
smooth? boolean

A segment of a polyline that runs as a curve.

Field Type
segment number
control Point
second? Point

A border drawn round the nodes that name it as their parent. Extends NodeBase.

Field Type Notes
kind hull
label? string
padding? Padding
shape? perimeter box
inset? integer At least 0
points? Point[]
group? string

Free text. Extends NodeBase.

Field Type
kind note
padding? Padding
label string

A window onto a child view. Extends NodeBase.

Field Type
kind view
label? string
scene string
link? ViewLink
frame? Bounds

How a view node shows what it links to.

Field Type
contents? boolean

A composite object placed in a scene. Extends NodeBase.

Field Type
kind instance
composite string
fit? InstanceFit
frame? Bounds
hull? perimeter box
hullInset? number

A vector shape from SVG path data. Extends NodeBase.

Field Type
kind path
d string
viewBox Bounds

A node whose content a generator computes. Extends NodeBase.

Field Type
kind generator
generator string
params? map of unknown
seed? number

A shape of a laid-out diagram. Extends NodeBase.

Field Type
kind diagram
label? string
element DiagramShape
heading? DiagramHeading

Where a diagram shape’s heading sits.

Field Type
id string
x number
y number
w? number
color? Color
weight? Weight

The diagram shapes a diagram node can hold.

One of Shape.Box, Shape.Circle, Shape.Text, Shape.Portal.

Any node kind this package defines.

One of RectNode, EllipseNode, CloudNode, PolygonNode, ShapeNode, PolylineNode, HullNode, NoteNode, ViewNode, InstanceNode, PathNode, GeneratorNode, DiagramNode.

An attachment point on a node, as a fraction of its frame.

Field Type
id string
x number
y number
side? Side
accepts? PortDirection

Space between a shape’s frame and its text.

Field Type
x? number
y? number

A link is the typed form of a 2D element that joins two ends.

A link between two ends.

Field Type
kind link
id string
z string
locked? boolean
source Endpoint
target Endpoint
path? line ortho curve spline smart
points? Point[]
tail? arrow circle diamond diamond-filled crowsfoot triangle
head? arrow circle diamond diamond-filled crowsfoot triangle
label? string
layer? string
style? string
overrides? LineStyle
connector? DiagramConnector
constrain? PartLayout

A link’s end: on a node, or free at a point.

One of PortEndpoint, PointEndpoint.

A link end on a node.

Field Type
node string
port? string

A free link end at a point.

Field Type
point Point

A link drawn as a diagram connector.

Field Type
relation? Shape.Relation
head? Shape.ArrowHead
tail? Shape.ArrowTail
stroke? Stroke
color? Color
route? Point[]
caption? DiagramCaption

Where a diagram connector’s caption sits.

Field Type
x number
y number
w? number
color? Color
weight? Weight

A style is the look an element takes, by name or as its own overrides.

A link’s style.

Field Type
color? string
stroke? Stroke
fontSize? number

A 2D look: what a node draws with. Extends LineStyle.

Field Type Notes
opacity? number 0 to 1
fill? Fill
corners? Corners
weight? Weight
guide? boolean
font? Font
textColor? string
align? Align
valign? VerticalAlign

A 3D look: a material over a colour.

Field Type
color? string
fill? Fill
stroke? Stroke
corners? Corners
opacity? number
metalness? number
roughness? number
emissive? number

A model’s named 2D style. Extends Style2D.

Field Type
name? string

A model’s named 3D style. Extends Style3D.

Field Type
name? string

A named look that nodes and links take their style from.

Field Type
id string
name string
style? Style2D

A reusable set of styles, as an ECHO object. ECHO type org.dxos.type.scene.styleCatalog, version 0.2.0.

Field Type
key string
name string
dim 2d 3d
styles map of CatalogStyle
id string

One style of a catalog: the 2D and 3D fields in one struct.

Field Type Notes
color? string
fill? Fill
stroke? Stroke
corners? Corners
opacity? number 0 to 1
metalness? number
roughness? number
emissive? number
weight? Weight
guide? boolean
font? Font
fontSize? number
textColor? string
align? Align
valign? VerticalAlign

A theme fills the slots a style names: its colours and its typefaces.

The colours and typefaces a theme defines, by name.

Field Type
colors? map of Color
fonts? map of string

A typeface slot of the theme: body, mono, or one the theme defines.

Type: string.

The geometry and the style values that every part of a drawing states in the same words.

A colour: a theme name (blue, accent), a name at a tone (blue/2), or a CSS literal (#1e90ff).

Type: string.

A point.

Field Type
x number
y number

A size.

Field Type
width number
height number

A rectangle by its top-left corner and size.

Field Type
x number
y number
width number
height number

A diagram shape is a primitive of the diagram DSL, stored inside a diagram node.

The id and style fields every diagram shape shares.

Field Type Notes
id string Stable element id, unique within the object (e.g. “left-eye”)
color? Color Stroke/text color
fill? Fill Interior fill of closed shapes
stroke? Stroke Line or outline
weight? Weight Stroke weight / text size
align? Align Where the shape’s text sits across it
valign? VerticalAlign Where the shape’s text sits down it
fontSize? number Text size in scene units

A closed shape in a bounding box. Extends ShapeBase.

Field Type Notes
kind Shape.BoxKind
x number Left edge (object-local units)
y number Top edge (object-local units)
w number
h number
rotation? number Clockwise rotation in degrees
text? string Centered label
corners? Corners Rects only
component? string A contributed element kind’s name
data? map of any A contributed kind’s own fields
cols? number or string Column tracks
rows? number or string Row tracks
gap? number Space between two cells
padding? number Space inside the grid’s frame
autoCols? number or string Size of each implicit column track
autoRows? number or string Size of each implicit row track
justifyContent? Shape.Place Where the columns sit across the frame
alignContent? Shape.Place Where the rows sit down the frame
layout? Shape.Layout How the box places its children
packSeed? number A packing’s seed
packMin? number Smallest packed child
packMax? number Largest packed child
parent? string The grid that places this box
width? number Width the box keeps inside its grid cell
height? number Height the box keeps inside its grid cell

A circle. Extends ShapeBase.

Field Type Notes
kind circle
cx number Center x (object-local units)
cy number Center y (object-local units)
r number
text? string

A straight segment or a polyline. Extends ShapeBase.

Field Type Notes
kind line
points Point[] Two or more points (object-local units)
closed? boolean Close the path back to the first point
guide? boolean A guide (lifeline, divider, outline) rather than a connector

A smooth curve through points. Extends ShapeBase.

Field Type Notes
kind curve
points Point[] Control points the curve passes through

A circular arc. Angles are in degrees. Extends ShapeBase.

Field Type
kind arc
cx number
cy number
r number
startAngle number
endAngle number

Free-standing text. Extends ShapeBase.

Field Type Notes
kind text
x number
y number
w? number Wrap width
text string

A connector between two elements or points. Extends ShapeBase.

Field Type Notes
kind arrow
from? string Source element ref, optionally #port
to? string Target element ref, optionally #port
start? Point Explicit start (used when from is omitted)
end? Point Explicit end (used when to is omitted)
text? string Label at the arrow midpoint
head? Shape.ArrowHead Marker at the target end (default arrow)
tail? Shape.ArrowTail Marker at the source end (default none)
route? Point[] The connector’s route, ends included
path? Shape.Path How the connector runs between its ends (default smart)
relation? Shape.Relation What the connector means

A window onto another drawing. Extends ShapeBase.

Field Type Notes
kind portal
x number Left edge (object-local units)
y number Top edge (object-local units)
w number
h number
ref string The drawing shown inside the box
text? string Title shown on the frame

Any diagram shape.

One of Shape.Box, Shape.Circle, Shape.Polyline, Shape.Curve, Shape.Arc, Shape.Text, Shape.Arrow, Shape.Portal.

Each enum is a set of literal values.

Name Values
Scene.LayoutKind view composite
Scene.Placement right-of left-of above below aligned
PartConstraint min max stretch center scale
InstanceFit fit fill none
Scene.Dimension 2d 3d
PortDirection in out any
LinkPath line ortho curve spline smart
Marker arrow circle diamond diamond-filled crowsfoot triangle
StyleHue neutral red orange amber green teal sky blue violet
NodeTone 0 1 2 3
TextTone 1 2 3
Side top right bottom left
Stroke none solid dashed dotted sketchy
Fill none solid tint pattern glass
Corners all top bottom none
Weight s m l xl
Align left center right
VerticalAlign top middle bottom
Shape.BoxKind rect ellipse diamond triangle grid
Shape.Layout tracks pack
Shape.Place start center end
Shape.Path smart ortho line curve
Shape.ArrowHead arrow triangle crowsfoot none
Shape.ArrowTail none circle arrow
Shape.Relation association dependency inheritance implementation composition aggregation one-to-many many-to-many

These element kinds have no schema in @dxos/scene. An element of one carries the base fields, and the package named draws it and defines any fields of its own.

Kind Dimension Package
link 2D and 3D @dxos/react-ui-canvas
label 2D and 3D @dxos/react-ui-canvas
group 2D and 3D @dxos/react-ui-canvas
card 2D @dxos/react-ui-canvas
icon 2D @dxos/react-ui-canvas
solid 2D and 3D @dxos/react-ui-canvas
image 2D @dxos/plugin-canvas
graph 2D @dxos/plugin-canvas
cube 3D @dxos/react-ui-canvas
sphere 3D @dxos/react-ui-canvas
cylinder 3D @dxos/react-ui-canvas
cone 3D @dxos/react-ui-canvas
pyramid 3D @dxos/react-ui-canvas
mesh 3D @dxos/react-ui-canvas
score 3D @dxos/react-ui-canvas
edge 3D @dxos/react-ui-canvas
face 3D @dxos/react-ui-canvas