Skip to content
Shapemetry

@huukhanhnguyen/types / objects/text

objects/text

Text

Text = { normal: Vector; point: Point; text: string; xAxis: Vector; }

A string placed and ORIENTED in space.

normal + xAxis make it self-determining in 3D: the plane it is written on and the reading direction inside that plane.

Font, height and alignment live on the named TextStyle.

normal

normal: Vector

point

point: Point

text

text: string

xAxis

xAxis: Vector


TextData

TextData = { texts: TextEntity[]; }

Object-tier text datablock.

texts

texts: TextEntity[]


TextEntity

TextEntity = Text & { attributes?: Record<string, unknown>; style: string; }

One string in a TextData bag. style names a textStyles record (font, height, width factor, oblique) — the text itself carries none of that.


TextInstance

TextInstance = BaseInstance & { material?: string; }


TextObject

TextObject = BaseObject & { data: TextData; instances: TextInstance[]; type: "text"; }

An object whose data is texts and nothing else.

A drawn string is not a dimension (no measured value) and not a leader (no pointer).

Last updated: 📖 1 min readEdit on GitHub