Resizing text with the zoom level

Skip to first unread message


May 31, 2021, 1:29:19 AM5/31/21
to Paper.js
Hello forum,
I am trying to do the resizing of the text on the basis of zoom level.
When I was doing it into the 3D using three.js, I came across the three.js functionality called mesh.OnBeforeRender() which automatically gets called before rendering the Mesh, and this in this method I used to scale down/up mesh according to the zoom level.
Is there any similar functionality present in paper.js ?

Thanks !!

Aug 30, 2021, 7:49:08 AM8/30/21
to Paper.js

I don't think that there is suck a built-in feature in Paper.js.
The only thing related that I'm aware of is the item.strokeScaling property which allow you to control whether the stroke width should be factor of the zoon or not.
The only solution that I can think of would be to hook into the event that triggers the zoom change and update the text scale with it.

Reply all
Reply to author
0 new messages