You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want to implement a lasso selection feature similar to what the example has, so I've spent some time studying it but I'm finding the code a bit hard to read due to a lot of things that I have to keep track of in my head.
I would like to be clear that I greatly respect the work you have put in this project and these examples, and this request is entirely in good faith. That said, if I'm overstepping the line, feel free to close this issue, no hard feelings.
Describe the solution you'd like
I could see improvements in the clarity of the example if certain operations were extracted into functions with JSDoc's explaining their function. This would also mitigate a large number of global variables that are only used in specific parts of functionality — scoping them would help the reader to only focus on what's important.
So, my proposal is:
group related areas of code in functions with descriptive names (serves as a sort of BVH for code reading :p)
add JSDoc docstrings with explanations of functions and argument types
move the global variables that are only used in particular functions into these functions
add links to this and this to the code — helpful context to understand the high-level algorithm
I would be willing to make a PR with these changes to the "selection" example, since I've spent some time with it, and I feel like I understand what's going on there.
Describe alternatives you've considered
creating and uploading a separate example that organizes the code the way I see fit — it probably wouldn't have the same audience, and as such, would have less positive impact
The text was updated successfully, but these errors were encountered:
Hello! And thanks for the offer - if you'd like help organize some of the code in the selection example that would be great. I don't always have the time or availability to make some of these examples as clear as I'd like so any help is appreciated.
I'm imagining a class for keep tracking of the lasso shape and generating the geometry for it (ie a manager you push the latest mouse points on to) and another helper class for performing the query and returns the requisite information that takes the information about the lasso shape. I'm open to any other suggestions, as well.
Is your feature request related to a problem? Please describe.
I want to implement a lasso selection feature similar to what the example has, so I've spent some time studying it but I'm finding the code a bit hard to read due to a lot of things that I have to keep track of in my head.
I would like to be clear that I greatly respect the work you have put in this project and these examples, and this request is entirely in good faith. That said, if I'm overstepping the line, feel free to close this issue, no hard feelings.
Describe the solution you'd like
I could see improvements in the clarity of the example if certain operations were extracted into functions with JSDoc's explaining their function. This would also mitigate a large number of global variables that are only used in specific parts of functionality — scoping them would help the reader to only focus on what's important.
So, my proposal is:
I would be willing to make a PR with these changes to the "selection" example, since I've spent some time with it, and I feel like I understand what's going on there.
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: