CascadeStudio icon indicating copy to clipboard operation
CascadeStudio copied to clipboard

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

Open DanTup opened this issue 3 years ago • 1 comments

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.

DanTup avatar Jan 15 '22 18:01 DanTup

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.

raydeleu avatar Sep 19 '23 21:09 raydeleu