Skip to content

Draw directional arrows on lines and circles#73

Open
eric-wieser wants to merge 7 commits intoenkimute:masterfrom
eric-wieser:add-direction-arrows
Open

Draw directional arrows on lines and circles#73
eric-wieser wants to merge 7 commits intoenkimute:masterfrom
eric-wieser:add-direction-arrows

Conversation

@eric-wieser
Copy link
Copy Markdown
Contributor

This is quite slow, so probably needs some more thought

It also seems to trigger a rendering bug (pixellation) in chrome:

image

@enkimute
Copy link
Copy Markdown
Owner

This is potentially a tiny bit more performant, as now marker defs are only created for each distinct color.

@eric-wieser
Copy link
Copy Markdown
Contributor Author

eric-wieser commented Jan 31, 2020

I think the performance hit comes from switching from circle to path objects. Perhaps I should just create separate paths for the arrows, rather than trying to make use of the marker-mid stuff which isn't great for large circles / lines anyway

@hugohadfield
Copy link
Copy Markdown
Contributor

awesome, hoping this makes it through to the conformal 3D visualiser, would in general make it a lot easier to keep track of the orientation of GA blades

@eric-wieser
Copy link
Copy Markdown
Contributor Author

This is potentially a tiny bit more performant, as now marker defs are only created for each distinct color.

This also fixes a bug where in a changing document, the marker colors become stuck at the first color emitted.

@eric-wieser eric-wieser force-pushed the add-direction-arrows branch from 75fbf22 to 00eae87 Compare April 1, 2020 16:34
@eric-wieser
Copy link
Copy Markdown
Contributor Author

Think I worked around the rendering bug, but hard to say. Here's some more screenshots:

image

image

@eric-wieser eric-wieser marked this pull request as ready for review April 1, 2020 16:40
@kungfooman
Copy link
Copy Markdown
Contributor

Thank you for this great work! I am just playing around with it, figured that tp = new Element() is initialized but never used.

Can this be integrated or is there some blocking issue? When performance is the only problem, why not make it an option? Slow/fast, for debugging.

@eric-wieser
Copy link
Copy Markdown
Contributor Author

Unfortunately this probably needs to be rebuilt from scratch - the long and dense lines of ganja.js make git useless at trying to merge in the changes.

At any rate, I think @enkimute said they had their own variant of this in the works.

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.

4 participants