change style of path - radius

32 views
Skip to first unread message

Alyona Rodina

unread,
Jan 5, 2022, 2:31:03 AMJan 5
to Paper.js
Good day, is it possible to change radius of path circle except scaling. Screen Shot 2022-01-05 at 2.25.24 AM.png

Alyona Rodina

unread,
Jan 5, 2022, 2:31:39 AMJan 5
to Paper.js
Thank you for your help!!!

Richard JE Cooke

unread,
Jan 5, 2022, 2:36:23 AMJan 5
to Paper.js

After creation, not sure, you could always look at the source code to see where radius is kept.
Otherwise, you could just make a new circle with a different radius with the first circle's properties and .remove() the first one.

Alyona Rodina

unread,
Jan 5, 2022, 2:49:11 AMJan 5
to Paper.js
Would be great to change after creation. 

Alyona Rodina

unread,
Jan 5, 2022, 2:50:19 AMJan 5
to Paper.js
I looked through everything in the image i posted above and could not find where it kept as if disapeared

Alyona Rodina

unread,
Jan 5, 2022, 2:56:59 AMJan 5
to Paper.js
Remove - will not work here as the position always changes with offset. But thank you so much for quick response !!!

Richard JE Cooke

unread,
Jan 5, 2022, 7:31:06 AMJan 5
to Paper.js
I'm not sure what you mean "position changes with offset".

But if you search for radius and circle here (https://cdnjs.cloudflare.com/ajax/libs/paper.js/0.12.15/paper-full.js) it looks like you could maybe try setRadius(), radius, or _radius. But you may have to get a reference to the underlying internal object.

Maybe easier to search through the code separated into folders here (e.g. path.js) - https://github.com/paperjs/paper.js/tree/develop/src/path

Alyona Rodina

unread,
Jan 5, 2022, 3:24:10 PMJan 5
to Paper.js
Thank you so much <3 . I just changed to Shape instead of Path and shape has radius  :D
Reply all
Reply to author
Forward
0 new messages