Closed Jeremboo closed 6 years ago
I added another parameter: dashratio
.
With this parameter, you can manage the ratio between the dash and the space. This is only useful when the dasharray is set.
Near to 0
-> the dash is longer than the space.
Near to 1
-> the space is longer than the dash.
By default, it is set to 0.5
.
I would love to have this feature be a part of this library. Can we get this reviewed and merged?
Thank you for contributing to the development of this!
I made some examples on codepen during the codevember period:
dasharray
and dashoffset
permit to have good animation approach.
@spite @Jared-Sprague Could we merge this in?
@Jeremboo @danyim I don't have write access to this repo. I would recommend tweeting at thespite
I sent a private message yesterday :) Thank a lot !
Sorry it took such a long time to review and merge. Great work! Thanks!
Hi,
I have implemented two new parameters for the
MeshLineMaterial
to animate the mesh lines like we can do with the SVG strokes (see: SVG line animation works)dasharray
: a float which defines the length and space between dashes. (0 by default to have no dash)dashOffset
: a float to determine the location of the dash. Ideal to animate the stroke when it is incremented.I also added in the main demo (
demo/js/main.js
) GUI parametersdashArray
andanimateDashOffset
to manipulate and test them.Finally, I updated the
README.md
to define the new parameters and remove theSupport for dashArray
of the TODO list.