Closed jeyemwey closed 10 months ago
Awesome, thank you! Jest works for me, I know @xenova has experience with it as well.
For the limit method, what do you think about the following for more future extensibility?
scene.limit(shape: BoundingShape)
Then we can define a BoundingShape.ts
class and an inherited Box.ts
class. Or something along those lines. There could be a helper limitBox
method in scene if you want to keep the workflow the same.
For the limit method, what do you think about the following for more future extensibility?
scene.limit(shape: BoundingShape)
I like the idea but the "is point in bounding shape" function seems to get extremely complicated quickly, especially if you implement it yourself.
There could be a helper limitBox method in scene if you want to keep the workflow the same.
We could make use of method overloading (as you did in Vector3/add) or rename the function right now to prevent a breaking change later.
Actually for now I think it's fine to just name it limitBox
and push as is :)
Actually for now I think it's fine to just name it
limitBox
and push as is :)
Updated the PR with new commit c132eb3 according to your proposal.
There seem to be some issues with typecasting in the test, probably becasue of an upstream change? Could @dylanebert maybe take a look into that? Just push into this branch if you want to.
I checked it out and got it working with recent changes :) (at least limitBox
)
Since Scene
has changed a ton, I had to remove the test for now, but kept the actions
This PR will add
jest
as a test framework. It also adds aScene.limit
method that removes the number of visible splats based on their position.It currently cuts out a Cuboid with the given bounding coordinates, i.e., for the bonsai scene, you can do:
scene.limit(-2, 2, -2, 2, -2, 2)
:The function is currently non-destructive, you can run the function again with a larger bounding box and the cut-out splats reappear.
Also, as always with splats, the function will only check for the positions, and edges will inevitably end up fuzzy.