Skip to content

How can I get the angle of the text created by model.Text()? #604

Open
@doox911-opensource

Description

@doox911-opensource
export function getTextModel(font, caption, font_size) {
  const model = new makerjs.models.Text(font, caption, font_size);

  model.layer = DrawLayerNames.Caption;

  const model_extents = makerjs.measure.modelExtents(model);

  return [model, model_extents];
}

const [caption, caption_extents] = getTextModel(font, `H: ${H}`, render_options.font_size);

  caption.origin = [
  // some origin
  ];

  makerjs.model.rotate(caption, /* some angle*/, caption.origin);

How can I find out how rotated the text is in another part of the program?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions