GithubHelp home page GithubHelp logo

paths don't always meet about walkway HOT 17 CLOSED

corysimmons avatar corysimmons commented on June 11, 2024
paths don't always meet

from walkway.

Comments (17)

corysimmons avatar corysimmons commented on June 11, 2024

This is made worse (or sometimes better) by messing with stroke-miterlimit

from walkway.

chutsu avatar chutsu commented on June 11, 2024

Could you post the SVG please?

from walkway.

corysimmons avatar corysimmons commented on June 11, 2024
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     width="300px" height="300px" viewBox="0 0 300 300" enable-background="new 0 0 300 300" xml:space="preserve">
<path fill="none" stroke="#000000" stroke-miterlimit="10" d="M56.1,132.6c0,0-8.1-78.7,57.9-78.2s88.3-23.9,67.5,36.5
    s-10.7,67.2-56.9,59S72.8,165.1,56.1,132.6z"/>
<path fill="none" stroke="#000000" stroke-miterlimit="10" d="M95.1,171.7c0,0-26.3-86.8,54.9-82.7s96.9-41.1,81.2,4.1
    s22.8,80.2-35.5,87.3S111.4,201.7,95.1,171.7z"/>
</svg>

from walkway.

corysimmons avatar corysimmons commented on June 11, 2024

It seems like Metronome fixes this with Math.floor:

...
Math.floor(length * (1 - progress));
...

from walkway.

corysimmons avatar corysimmons commented on June 11, 2024

Ah, seems like Walkway does this too.

Not sure why but Metronome works and Walkway doesn't in this instance.

from walkway.

corysimmons avatar corysimmons commented on June 11, 2024

from walkway.

chutsu avatar chutsu commented on June 11, 2024

For some reason the Metronome version isn't animating for me. . . (firefox), I can animate it on Chrome.

Connor (author) is with me at the moment and he doesn't have his laptop, will be home in a couple of hours. Thanks for posting the examples, it's a big help +1

from walkway.

peterkos avatar peterkos commented on June 11, 2024

In Walkway, for me at least (in Safari 8), the closeness of the meeting of the paths depends on the duration of the animation.
For instance, this is the result of a 500ms delay:
screenshot 2014-11-04 10 32 01
and this is the result of a 2000ms delay:
screenshot 2014-11-04 10 32 16

from walkway.

corysimmons avatar corysimmons commented on June 11, 2024

So weird. Definitely unexpected behavior.

from walkway.

ConnorAtherton avatar ConnorAtherton commented on June 11, 2024

@corysimmons I agree, this is a bug, thanks for creating this issue. @peterkos Thanks for the extra info.

from walkway.

ConnorAtherton avatar ConnorAtherton commented on June 11, 2024

@corysimmons Can you post the Walkway constructor code you used please?

var svg = new Walkway({
  selector: '#tester',
  duration: 1000
});

svg.draw(function() {
  console.log('test finished');
});

This works for me running on latest Chrome and Firefox and I modified your SVG attributes as a check. Can you try with this and let me know if it's still not working for you when you have time?

<svg version="1.1" id="tester" xmlns:svg="http://www.w3.org/2000/svg" x="0px" y="0px" width="300px" height="300px" viewBox="0 0 300 300" enable-background="new 0 0 300 300" xml:space="preserve">
  <path fill="none" stroke="#000000" stroke-miterlimit="10" d="M56.1,132.6c0,0-8.1-78.7,57.9-78.2s88.3-23.9,67.5,36.5s-10.7,67.2-56.9,59S72.8,165.1,56.1,132.6z"/>
  <path fill="none" stroke="#000000" stroke-miterlimit="10" d="M95.1,171.7c0,0-26.3-86.8,54.9-82.7s96.9-41.1,81.2,4.1s22.8,80.2-35.5,87.3S111.4,201.7,95.1,171.7z"/>
</svg>

screen shot 2014-11-04 at 8 52 18 am

from walkway.

corysimmons avatar corysimmons commented on June 11, 2024

@ConnorAtherton http://codepen.io/corysimmons/pen/jykvp

from walkway.

peterkos avatar peterkos commented on June 11, 2024

It's the easing: linear that's causing it... works fine without.

from walkway.

ConnorAtherton avatar ConnorAtherton commented on June 11, 2024

@corysimmons @peterkos Just want to thank you again for taking the time to describe this bug. Should be fixed now.

from walkway.

corysimmons avatar corysimmons commented on June 11, 2024

👍 Awesome

FYI I'm covering Walkway in a TutsPlus Course scheduled to release soon. =)

from walkway.

ConnorAtherton avatar ConnorAtherton commented on June 11, 2024

Wow, could you ping me once it's released? I'd love to take a look at it :)

from walkway.

corysimmons avatar corysimmons commented on June 11, 2024

Sure

from walkway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.