Code Monkey home page Code Monkey logo

segment's People

Contributors

lmgonzalves avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

segment's Issues

How can i add more paths?

I have more than one path which i want to animate with TimelineLite plugin.
How can i add more paths in the following:
var s = document.getElementById("s"), // shield = document.getElementById('shield'), segment = new Segment(s);

d3-ease has new API?

I found the example use d3-ease as below:

ease.ease('elastic-out', 1, 0.3)

but according its documentation on github, the API seems different than your demo, something like:

d3.easeElasticOut(t, 1.00, 0.2)

since I'm not a d3 user, I really don't know which way I should follow. I use npm to install the latest version (I believe it is v1.0.0) and follow your demo, but it doesn't work. Later I change the syntax like:

import ease from 'd3-ease'

// somewhere

ease.easeElasticOut(1, 0.3)

it works...but it doesn't have any elastic-ish effect, very confusing.

Would you mind to explain a little more about how to use d3-ease with segment-js?

'hasOwnProperty' of undefined

`$('.service-section').each(function() {
var el = $(this);
var topDistance = $(this).offset().top - $(window).height() + 200;
if ( (topDistance) < scrollTop ) {
var myPath = document.getElementById("glob"),
segment = new Segment(myPath);

        segment.draw("25%", "75% - 10", 1);
    }
});`

this code showing me an error 'hasOwnProperty' of undefined

Usage through NPM?

I would love to use this project in a small project of mine, currently built with webpack.

Using this project via NPM would require some changes, since the "main" entry point (dist/segment.js) isn't exporting any value. Would you consider either:

  • changing dist/segment.js to export the class (and then using something like webpack or browserify to build the demo website)
  • generating a new file (ex: dist/segment.node.js) by appending module.exports = Segment; at the end of segment.js, and changing the "main" entry point to this?

A new, trending way of distributing packages is to write ES6 code and add a "esnext:main" entry point in the package.json. This could be considered as well.

Also, for simplicity and visibility, it would be great to publish segment to the NPM registry.

Dashed path possible?

We are exactly looking for this kind of solution The only i couldnt find is the possibility to make the path, dashed. Is this possible?

Thanks

Dennis

adding tags for the repo

Hello,

Adding tags for repo could specify points in history and mark release points.
It's helpful for user to know the version and status of repository, and would enable wider distribution of the library, for example it could be hosted by cdnjs (website)

Would you please consider on using tags?
Thanks for your great work!

Add Stop animation in object

I'm using segment to make a countdown, and if I skip the item before the animation end it still counting. If I come back to the item and try to start from zero the plugin ignores because the animationTimer still running.

I put the stop function visible to the object and use it to reset the counter... works perfectly :)

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.