JS Painter | Object Styles

Just Evan's icon

Just Evan

9月 07 2024 | 12:59 午後

Hello! I would like to understand how JS Painter works, maybe someone can give me some hints?

To begin with, I would just like to understand how I can round each corner [panel] individually, but I don’t really understand where to start.

It seems like a pretty simple task, but after looking at a few examples on the Internet, it seems like i need to write a ton of code to do it... Although I still think that's not the case.

TFL's icon

TFL

9月 07 2024 | 2:28 午後

Panels already have a 'rounded' attribute allowing you to round corners as much as you want.

But in case you want to do it to practice, here is the documentation page for js painter files.

Generally speaking you have to redraw the objects box from scratch using the MGraphics API (look in the doc for that as well).

I remember seeing a js painter file in the Max Discord allowing to round corners of every objects, if that's you're into.

Just Evan's icon

Just Evan

9月 07 2024 | 4:49 午後

TFL, I meant that I need to round only one corner, or round each corner differently.

Btw, Max Discord? what is it?

Thanks!

Wil's icon

Wil

9月 08 2024 | 1:05 午前

that answer would save a lot of time and mess - I would like to know as well

Max Patch
Copy patch and select New From Clipboard in Max.



Just Evan's icon

Just Evan

9月 08 2024 | 7:14 午前

Wil, the best way is to use bpatcher as a mask.

But I'm looking for a way to completely redraw objects.

Max Patch
Copy patch and select New From Clipboard in Max.

TFL's icon

TFL

9月 08 2024 | 7:49 午前

Basically learn how to draw what you want in a jsui with MGraphics (not Sketch), and in this simple case i think you'll be able to use the same file for your panel painter without (much ?) modification.

Here is the link to the Max discord server.

TFL's icon

TFL

9月 19 2024 | 5:16 午後

...or make better researches on the forum. You have your exact answer here from 2016.

And here is a slightly modified version that works out of the box.


semiroundedpanel.zip
zip