Skip to content

Comments

Automatic intersection component#697

Draft
Algorush wants to merge 9 commits intomainfrom
automatic-intersection-component
Draft

Automatic intersection component#697
Algorush wants to merge 9 commits intomainfrom
automatic-intersection-component

Conversation

@Algorush
Copy link
Contributor

@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
Contributor Author

Algorush commented Jul 16, 2024

I need to fix some issues

@Algorush
Copy link
Contributor 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
Contributor 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