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

Chamfer options still working? Work once time only? #1059

Closed
YoNeXia opened this issue Nov 3, 2021 · 1 comment
Closed

Chamfer options still working? Work once time only? #1059

YoNeXia opened this issue Nov 3, 2021 · 1 comment

Comments

@YoNeXia
Copy link

YoNeXia commented Nov 3, 2021

Hello,

I want to use the chamfer function to round the corners of the rectangles.
I have several problems when I try to use it.

My code :

Object initialization

Create Rectangle function

Rectangles creation

Issues:

  • Cannot find the console option chamfer when displaying my base object. plinkos_data_2.options are no displayed the chamfer from my basic object in console. And the rectangles created with plinkos_data_2.options have chamfer = null. (But in second part, chamfer is applied... WUT)
    Console logger

  • The option applied to the first element created with the previous options, but only to the first.
    Render in canvas

I’m trying to understand how the chamfer option works, but can't reach it, and I can’t find any help in the documentation.

Thank you.
YoNeXia.

@liabru
Copy link
Owner

liabru commented Dec 20, 2021

That's right chamfer is only a special one-time pre-processing option of Matter.Bodies rather than a body property.

This isn't well documented so sorry about that - it's one of the oldest parts of the project that I'd love to move to a plugin or example when I get chance.

You can use Vertices.chamfer if you want to apply this in a custom way, but you will probably want to keep a copy of the original input.

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

No branches or pull requests

2 participants