Can Children on path be broken apart? #607
-
Hello when using children on path for example the text on arc demo. Can the path information of individual characters be accessed? I've tried my best to break them apart or access internal arrays but haven't had any luck. I'm specifically looking for location and bounding box |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yes, you can get characters of a Text model by their index. I've added this to the end of the function: This gets the first character by const m = makerjs.measure.modelExtents(this.models.topText.models[0]);
const bbox = new makerjs.models.Rectangle(m);
this.models.bbox = bbox; |
Beta Was this translation helpful? Give feedback.
Yes, you can get characters of a Text model by their index. I've added this to the end of the function:
This gets the first character by
[0]
, gets its bounding box, then creates a rectangle of it: