Skip to content

Layout

Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.

enum Layout { "wrap", "stretch", "fit" }

Text is contained within a rectangular area called the “bounding box” inside its parent group. It extends from -1 to +1 in Y and -lineScale to +lineScale in X. The lineScale attribute is a parameter and function of the text node.

There are three values for the layout parameter: stretch, fit, and wrap.

MemberDescription
wrapThe text is displayed with word-wrapping. The lines parameter determines how many lines of text should be accommodated in the bounding box and thus the size of the text relative to its parent group.
stretchThe text is deformed so it fills the entire of the bounding box. This will likely give the text a distorted appearance.
fitThe text is scaled such that it takes up the maximum space possible in the bounding box without stretching. Where the text sits in the non-limiting dimension can be controlled with the vAlign and hAlign properties.