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

Intersection() docs say keepObects can be a [boolean, boolean] but that doesn't appear to be the case #130

Open
DanTup opened this issue Jan 15, 2022 · 1 comment

Comments

@DanTup
Copy link

DanTup commented Jan 15, 2022

The text description here says keepObjects can be a [boolean, boolean], but the type signature says boolean?:

Screenshot 2022-01-15 at 18 27 00

Trying to pass a list fails:

Screenshot 2022-01-15 at 18 27 56

I'm not sure if the docs or implementation are wrong though.

@raydeleu
Copy link

If you look at the code, there is only the option to keep objects or not:

for (let i = 0; i < objectsToIntersect.length; i++) {
    if (!keepObjects) { sceneShapes = Remove(sceneShapes, objectsToIntersect[i]); }
  }

If keepObjects is not true, all objects used to intersect are removed from the scene. There is no option to keep some of the objects, it is all or nothing. So I guess it is a mistake in the documentation.

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