File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,11 @@ module RxEnvironmentsPlottingExt
2
2
3
3
using RxEnvironments, GLMakie, Rocket
4
4
5
- function RxEnvironments. animate_state (subject:: AbstractEntity )
6
- @info " Animating state of $(subject) "
7
- fig = Figure ()
5
+ function RxEnvironments. animate_state (subject:: AbstractEntity ; verbose= true )
6
+ if verbose
7
+ @info " Animating state of $(subject) "
8
+ end
9
+ fig = Figure ()
8
10
screen = display (fig)
9
11
actor = PlottingActor (subject, fig, screen)
10
12
subscription = subscribe! (subject, actor)
@@ -18,12 +20,12 @@ struct PlottingActor <: Rocket.Actor{Any}
18
20
screen
19
21
end
20
22
21
- function Rocket. on_next! (actor:: PlottingActor , observation)
23
+ function Rocket. on_next! (actor:: PlottingActor , observation)
22
24
empty! (actor. fig)
23
25
subject = RxEnvironments. decorated (actor. entity)
24
26
ax = Axis (actor. fig[1 , 1 ])
25
27
RxEnvironments. plot_state (ax, subject)
26
- end
28
+ end
27
29
28
30
function Rocket. on_complete! (actor:: PlottingActor )
29
31
GLMakie. destroy! (actor. screen)
You can’t perform that action at this time.
0 commit comments