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

Arrow shape (WIP) #49

Closed
wants to merge 1 commit into from
Closed

Conversation

juliapaci
Copy link
Contributor

@juliapaci juliapaci commented May 29, 2024

fixes: voxell-tech/bevy_vello_graphics#1 (not sure whether i should migrate over to this new repo yet).

WIP: Again waiting for linebender/kurbo#331 for different ArrowHead shapes. And also wait until linebender/kurbo#350 gets merged. if it doesn't get merged then e can create triangles building on top of other primitives and curves.

For now though there some design decisions to be made, namely how should the arrow connect to another shape? maybe there should be a private Shape/DVec2 field like parent or something which VelloArrow inherits a position, rotation, colour, etc. from?

WIP
@nixon-voxell
Copy link
Member

fixes: voxell-tech/bevy_vello_graphics#1 (not sure whether i should migrate over to this new repo yet).

Hey yes, you can migrate this over to the new repo.

WIP: Again waiting for linebender/kurbo#331 for different ArrowHead shapes. And also wait until linebender/kurbo#350 gets merged. if it doesn't get merged then e can create triangles building on top of other primitives and curves.

I feel like we could get away for this one without linebender/kurbo#331 if we are only using BezPath here (I might be wrong). (Though, definitely would be better if we can switch to using Circle/Line/Triangle shape in the future. BezPath example

For now though there some design decisions to be made, namely how should the arrow connect to another shape? maybe there should be a private Shape/DVec2 field like parent or something which VelloArrow inherits a position, rotation, colour, etc. from?

I was thinking it could simply be a component of the entity. Then when rendering we check for this component and perform the required computation to determine where to place the arrow head.

@nixon-voxell
Copy link
Member

@aymey There is also an alternative where we don't need to implement VelloVector for ArrowHead at all. We can resolve it in a bevy system when drawing the vello scene.

@juliapaci
Copy link
Contributor Author

migrated to: voxell-tech/bevy_vello_graphics#3

not sure if git or github has a way to transfer pr's automatically so ill just do it manually i guess.

@juliapaci juliapaci closed this May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Arrow/Ray shape
2 participants