Add a python way to schedule purely js animations
See original GitHub issueAdd a python construct that scripts running animations that are purely done in javascript. This way static examples can be built that have animations.
maybe something like this
N = 80
x = np.linspace(0, 4*np.pi, N)
y = np.sin(x)
y2 = np.tan(x)
y3 = np.cos(x)
y_possibilities = [y,y2,y3]
l = line(x,y, color="#0000FF", tools="pan,zoom,resize")
animate(animate.select(y_posibilities), delay="3s", line)
that is a very very rough syntax. But something like that should produce a bokeh object that every 3 seconds switches out the y data range to one of the other possibilities.
Issue Analytics
- State:
- Created 10 years ago
- Reactions:2
- Comments:10 (5 by maintainers)
Top Results From Across the Web
How to Create Animations in Python?
Plot X and Y using plot() function. Add pause() function with suitable time interval; Run the program and you'll see the animation.
Read more >receive data from a python program to animate an object ...
There are basically 2 ways to do it. Pooling - To put it simply it comes down to browser asking server "Do you...
Read more >A First Look at PyScript: Python in the Web Browser
You'll leverage browser APIs and JavaScript libraries to build rich, ... in the browser and allows users to add Python logic in a...
Read more >Animation - freeCodeCamp.org
How to Add Interactive Animations and Page Transitions to a Next.js Web App with Framer Motion · Colby Fayock 2 years ago. How...
Read more >How to build a game with HTML, CSS, and JavaScript
In the script.js file, create a function called jump() that adds the "animate" class ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any chance I could help support this? Has there been any progress on this feature? I am currently doing something hackish with
panel
/hvplot
to animate some basic transitions, but would love to have this inbokeh
out of the box. I will request an invite to the dev slack when I am home later if that is a more appropriate place to discuss.After a chat with Bryan, we have come to some resolution about how to handle events and model updates while the plot is animating. Namely, we should add some kind of deep “event system disable” that flags that the entire plot is “transitioning”, so while the JS-side model may be updating with values, it does not trigger callbacks or other “data model” changes until the final state is reached. Any new data events coming in are queued up. User interactions (mouse, kbd, etc.) are ignored while transitioning.