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

Reliability problem regarding the sorting of wall collection elements #1

Open
WebAxol opened this issue Jan 10, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@WebAxol
Copy link
Owner

WebAxol commented Jan 10, 2023

The ray casting functions assume that wall collections are sorted by their positions in relation to an axis in ascending order; if new walls are created and added to the collection, there might be the need of re-sorting collections to ensure that the processing order of the algorithms is correct. However, collections are protected so there is no way to directly sort their elements; we might need to make some improvements to CASES.js so that we can sort collections.
Alternatively we could solve the problem by implementing an abstraction layer that solves the problem, such as storing walls in an array inside another object, that provides free access to them; then storing that object at a collection named 'Scene'. The drawback is that more complexity is added, which could affect maintainability and performance.

@WebAxol WebAxol added the enhancement New feature or request label Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant