Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setVectorLines(...) documentation missing loop parameter #134

Open
MrSpiffyClean opened this issue Jun 19, 2021 · 2 comments
Open

setVectorLines(...) documentation missing loop parameter #134

MrSpiffyClean opened this issue Jun 19, 2021 · 2 comments

Comments

@MrSpiffyClean
Copy link

Was trying out something with setVectorLines, namely to generate some squares on demand. Went and looked at the data of a square made by the Draw Tool. I noticed the "loop" data member and tried to input it on the table that you feed setVectorLines with, and it worked.

The information is missing from the docs at https://api.tabletopsimulator.com/object/#setvectorlines , so, just pointing this out.

As a side note, lines have a "square" data member, that I wasn't able to change through setVectorLines. Although it shows in the data, TTS seems to ignore it (even when setting it directly on the savefile).

@flibdev
Copy link

flibdev commented Jun 27, 2021

It's been an annoyingly undocumented feature for a while, presumably it's an unsupported feature that TTS uses for its inbuilt drawing tools but isn't polished enough for the rest of us. Doesn't stop me using them though.

loop determines whether the vector lines should loop from the last vertex to the first
square determines whether the vector lines should have rounded corners and ends

Setting loop = true implicitly sets square = true for some reason, breaks the corner rounding calcs perhaps

@MrSpiffyClean
Copy link
Author

I agree with your reasoning, just wanted to point out, in case it was something that was meant to be documented, but just slipped through the cracks. Weirdly though, square = true never seems to be correctly reported (just checked this by drawing a square and print(JSON.encode_pretty(Global.getVectorLines())) ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants