<div dir="ltr">You have several options, but the simple one is to add a new rpc method on the server side that will move to the next "step", and then on the client side you can call that method at a given interval and asking for a render right after it.<div><br></div><div>## Server </div><div><br></div><div><div> @exportRpc("next.step")</div><div> def next(self):</div></div><div> # Do your stuff for animation</div><div> pass</div><div><br></div><div>## Client</div><div><br></div><div>setInterval( function() {</div><div> connection.session.call('next.step')</div><div> .then(function() {</div><div> viewport.render()</div><div> });<br></div><div>}, 1000)</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 2, 2016 at 2:37 AM, 沈庄明 <span dir="ltr"><<a href="mailto:zhuangming.shen@sphic.org.cn" target="_blank">zhuangming.shen@sphic.org.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi all,<br>
</p>
<p><br>
</p>
<p>I saw <span style="font-family:sans-serif;font-size:12.666666984558105px;line-height:19.049999237060547px;background-color:rgb(255,255,255)">
Bryan Conrad</span> provided us a practical example on VTK animation (<a href="https://itk.org/Wiki/VTK/Examples/Python/Animation" target="_blank">https://itk.org/Wiki/VTK/Examples/Python/Animation</a>). Now, I'd like to refer this example to animate objects (e.g. sphere or cone) under VTK-Web framework (e.g. vtk_web_cone.py). As far as
I know, "TimerEvent" is used as a timer to trigger an event repeatedly, and this timer is bound to renderWindowInteractor by AddObserver. However, in vtk_web_cone.py, it seems that web server is waiting after the renderWindow is set as an active object. How
can I start the timer? How to integrate the example into vtk_web_cone.py? <span style="font-size:12pt">Any suggestions are welcomed. Thanks in advance.</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">Regards,</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">Zhuangming Shen</span></p>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>