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

StraightEdge brush #174

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

msfeldstein
Copy link
Contributor

Add a brush that lets you draw very straight lines (perfectly straight in fact). It might be cool in the future to have some snapping to make perfectly orthogonal shapes.

@fernandojsg
Copy link
Member

lineWidth is not usable on windows, but just on mac as it doesn't matter the value you set, on windows it will always be 1.
I could try to abstract the line code from the line.js brush, so you could use that line to paint an actual geometry line using a mesh instead of just a THREE.line so it could have the correct linewidth

@msfeldstein
Copy link
Contributor Author

I was considering using @spite's MeshLine class for this, but it does look like windows did implement it in the latest webvr chromium. What's your opinion on bringing in a powerful class like meshline vs just pulling out the line-maker code we have in line.js?
capture

@msfeldstein
Copy link
Contributor Author

and yeah i think even the lineWidth implementation they have now is not very useful, that's as big as it goes.

@fernandojsg
Copy link
Member

The MeshLine is a screenspace implementation so it's not suitable for VR, in fact I started using that for the early version of a-painter but then I needed to switch to a full geometry version like the one we have now.
I'm going to create a new let's say "GeometryLine" and you could use it in a similar way as MeshLine but it will generate actual geometry. I'll let you know when it's finished and you could try to update your PR

@msfeldstein
Copy link
Contributor Author

cool sounds good.

@msfeldstein
Copy link
Contributor Author

Oh the other reason i wanted to use line was so that it was a uniform width no matter what angle you look at it from. I've been meaning to look into some Cylinder extrusion or something so we can have brushes that dont disappear from certain angles.

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.

2 participants