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

Automatic intersection component #697

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Algorush
Copy link
Collaborator

@Algorush Algorush commented Jul 11, 2024

added a component to determine the size of the parameters required for the intersection component.
Its parameters specify selectors of street elements at the intersection:

northStreet: selector,
southStreet: selector, ...

Example of work:
testEl.setAttribute('auto-intersection', 'southStreet: #left_street; westStreet: #perpendicular_street')

All that remains is to arrange the streets to the appropriate places.
By the way, I found that when adding a Streetmix street from the input prompt, it created with id='http_path', such a selector will not work as it is has wrong format

@Algorush Algorush marked this pull request as draft July 16, 2024 20:19
@Algorush
Copy link
Collaborator Author

Algorush commented Jul 16, 2024

I need to fix some issues

@Algorush
Copy link
Collaborator Author

Algorush commented Jul 17, 2024

Example of how it works now.
Initial scene with 3 streets:
image
Add empty a-entity#test element and this line:
test.setAttribute('auto-intersection', "northStreet: #north_street; westStreet: #perpendicular_street; southStreet: #south_street")
Streets take their places automatically, but they must be rotated correctly first. Here is result:
image

@Algorush
Copy link
Collaborator Author

But save/load doesn't work yet. I'm getting maximum call stack error, I don't remember why it could be, need to debug

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

Successfully merging this pull request may close these issues.

1 participant