A material key, text, size, letterSpacing, align, renderLayer,
renderOrder, and the four drawable boolean flags — and no geometry key, for
Sprite's reason: a Text derives its glyph quads from the four fields above
and owns them, so that payload rebuilds the geometry exactly.
The font is not in the document, for the reason a Label's is not
(module header): a GlyphAtlas is a loaded resource, and §79 references
resources rather than inlining them. It arrives through
SceneNodeTypeOptions.atlas — the option that already exists for
labels, reused rather than duplicated, so an application that draws both
passes one atlas and gets both back.
Why a missing atlas is refused rather than defaulted
A Label restored without an atlas measures 0 × 0, which is what a label
with no atlas is. A Text has no such state: its constructor requires a
font, because there is no layout without one and no honest empty face to
substitute. So a document naming a text node loaded with no atlas option
throws, in the same voice and with the same fix-naming shape resolveResource
uses for an unresolvable material key. Inventing a
built-in face here would be worse than either: it would reload someone's
scene in a font they never chose and never asked about.
Separated from the other pairs, and what that buys
A pair of its own for registerShapeSerializers's reason: registering
it is what pulls Text — and with it @fourjs/text's layoutText — into a
bundle, and an application whose scenes carry no text should not pay for the
layout engine to save one. registerSceneNodeTypes calls it, so an
application that wants everything still makes one call.
Matched by exact class identity, like every other pair here.
The §79 node-type pair for §49/§56's
Text(R-28, 2026-08-13).What a text document carries
A
materialkey,text,size,letterSpacing,align,renderLayer,renderOrder, and the four drawable boolean flags — and no geometry key, forSprite's reason: aTextderives its glyph quads from the four fields above and owns them, so that payload rebuilds the geometry exactly.The font is not in the document, for the reason a
Label's is not (module header): aGlyphAtlasis a loaded resource, and §79 references resources rather than inlining them. It arrives through SceneNodeTypeOptions.atlas — the option that already exists for labels, reused rather than duplicated, so an application that draws both passes one atlas and gets both back.Why a missing atlas is refused rather than defaulted
A
Labelrestored without an atlas measures0 × 0, which is what a label with no atlas is. ATexthas no such state: its constructor requires a font, because there is no layout without one and no honest empty face to substitute. So a document naming a text node loaded with noatlasoption throws, in the same voice and with the same fix-naming shaperesolveResourceuses for an unresolvable material key. Inventing a built-in face here would be worse than either: it would reload someone's scene in a font they never chose and never asked about.Separated from the other pairs, and what that buys
A pair of its own for registerShapeSerializers's reason: registering it is what pulls
Text— and with it@fourjs/text'slayoutText— into a bundle, and an application whose scenes carry no text should not pay for the layout engine to save one. registerSceneNodeTypes calls it, so an application that wants everything still makes one call.Matched by exact class identity, like every other pair here.