Im trying to make a simple scroll path using this plugin “http://joelb.me/scrollpath/” and all I want to do is make a simple line, without rotations, arcs etc only I cant seem to understand how this works, nor find a tutorial on the plugin!?
I want a path like…
__________________
______________|
I’ve written the following with no luck…
Can anyvbody see what im doing wrong?
.moveTo(400, 50, {name: "one"})
.lineTo(400, 50, {name: "two"})
.lineTo(400, 50, {name: "three"})
.lineTo(400, 50, {name: "four"})
.lineTo(400, 50, {name: "five"})
.lineTo(400, 50, {name: "six"})
You seem to use the
lineTothinking arguments are relative values (i.e. ‘move to400;50‘), but those are absolute, so your example moves to400;50and stays there.Try something like this:
Additionally, when you init the plugin, pass
drawPath: trueas option, so you’ll see how the path is implemented:you can find (some) documentation here: https://github.com/JoelBesada/scrollpath