Skip to contents

R6 Class - Text Decoration Geometry

Author

Zhengjia Wang

Super class

AbstractGeom -> TextDecorGeom

Public fields

text

Label string rendered in the canvas

font_size

World-space height of the sprite in mm

color

CSS color string for the text (e.g. "#ffffff")

font_weight

CSS font-weight integer (e.g. 400 = normal, 700 = bold)

decor_id

Stable ID used to identify this decoration in the viewer. Defaults to the geometry name.

type

Geometry type string used by the JavaScript engine.

clickable

Logical; whether the geometry responds to mouse clicks in the viewer.

Methods

Inherited methods


TextDecorGeom$new()

Create a new text decoration geometry.

Usage

TextDecorGeom$new(
  text = "",
  position = c(0, 0, 0),
  name = NULL,
  decor_id = NULL,
  font_size = 5,
  color = "#ffffff",
  font_weight = 400,
  layer = 1,
  ...
)

Arguments

text

Character string to display.

position

Numeric vector of length 3: c(x, y, z) in world space.

name

Unique geometry name. If NULL a random ID is generated automatically.

decor_id

Stable decoration ID visible to the Shiny proxy. Defaults to name.

font_size

World-space height of the sprite in mm. Default 5.

color

CSS color string. Default "#ffffff".

font_weight

CSS font-weight integer. Default 400.

layer

Camera layer(s), 0-13 (0 = main camera only, 1 = all cameras). Default 1.

...

Additional arguments forwarded to AbstractGeom.


TextDecorGeom$to_list()

Serialize to a list for JSON export.

Usage

TextDecorGeom$to_list()


TextDecorGeom$clone()

The objects of this class are cloneable with this method.

Usage

TextDecorGeom$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.