-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interaction with fps from Reactive.jl #346
Comments
I found this notebook which can do what I want: This is the "nearly" working example. using Blink
using Interact
using Reactive
using GR
GR.inline()
lhs = slider(1:0.1:10) |> onchange
Λ = rand(Int8[-1,1], 10, 10)
timer = Observable(0.0)
t = @async while true
sleep(0.1)
timer[] += 0.1
end
function test_plot(t, Λ, args...)
for i ∈ eachindex(Λ)
Λ[i] = rand(Int8[-1,1])
end
heatmap(Λ .* t)
end
result = map(test_plot, lhs, Λ, timer)
widget = vbox(lhs, result)
window = Window()
body!(window, widget) However, after the code is run for the first time there is the async job which never ends. Would it be possible to stop it once the Blink window is closed? This is the error I get for the following code after I close the Blink window. Info: Connection is not open.
└ connection = Blink.AtomShell.WebIOBlinkComm(Window(1, Electron(Process(`/home/gluon/.julia/packages/Blink/AO8uN/deps/atom/electron /home/gluon/.julia/packages/Blink/AO8uN/src/AtomShell/main.js port 3528`, ProcessRunning), Sockets.TCPSocket(RawFD(0x00000023) active, 0 bytes waiting), Dict{String,Any}("callback"=>##1#2())), Page(1, WebSocket(server, CLOSED), Dict{String,Any}("webio"=>##26#27{WebIOBlinkComm}(WebIOBlinkComm(#= circular reference @-5 =#)),"callback"=>##1#2()), Distributed.Future(1, 1, 1, Some(true))), Task (done) @0x00007ff88ea7a710)) |
The latter (connection closed warning) is an issue with WebIO. If you'd be willing to open an issue there, I'd be much obliged. |
Hello, I am trying to do an animation of a simulation process and would like to have a time signal which updates the plot (beside other sliders). I am trying to reproduce examples from #36 but
timestamp
does not work anymore and I cannot figure out how to combine thefps
from Reactive.jl and make it a trigger for the Widget.Would be glad to see some hints.
Here is the code which does not work:
I need the Blink package because I am using julia from within VS code and want a separate window with the animation.
Thanks.
The text was updated successfully, but these errors were encountered: