GithubHelp home page GithubHelp logo

ola's People

Contributors

franciscop 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

ola's Issues

Dynamic values

Hi,
When using Ola, it's not possible to change the values array length or object properties. It makes it a little hard to work with user inputs.
IMO, Ola should check if a value exists before updating it.

Reproduction

const values = Ola([10, 10]);
values.set([20, 20]); // Ok
values.set([30, 30, 30]); // Fail

When should i clear the interval?

The demo use setInterval to update another value, any prop of Ola instance can let me know the update is over?
Such as a Boolean __done__ prop:

const data = new Ola({x: 0});
data.set({x: 10});

let target;
let intervalId;
intervalId = setInterval(() => {
  target = data
  if (data.__done__) {
    clearInterval(intervalId)
  }
}, 10)

Derivatives

Really nice library.

Would it be possible to expose speed & also acceleration, even if read-only?

Custom time

Since Ola actually uses maths, it currently only uses the existing time.
A user might like to predict or look ahead for future positions (& speeds).

For example if I had a boid/particle swarm and wanted to debug/visualise a future trajectory, I'd draw a line or points.

Another usecase might be multiplayer games, where servers & clients may need to predict future values.

Are there other usecases?

Does Ola need to change to support usecases like that in some way?

This is just a rough idea. I'm not sure there is a strong case for it, doesn't seem like a big deal to add it either, apart from API complexity and documentation.

graphs?

are your line graphs custom canvas implementations or done with a library? they're nice :)

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.