PAIR-code / megaplot

Apache License 2.0
19 stars 5 forks source link

Implement Text rotation attributes #59

Open jimbojw opened 2 years ago

jimbojw commented 2 years ago

Depends on:

The TextView object should allow the API user to specify a rotation to the containing box.

Proposed example:

const text: Text = scene.createText();
text.enter((t: TextView) => {
  t.TextRotation = Math.PI / 2;  // Rotate box 90 degrees, vertical.
});

API proposal:

  /**
   * How the text box should be rotated around the anchor point.
   */
  {
    attributeName: 'TextRotation',
    isInterpolable: true,
  },