[Paraview-developers] paraview/web 4 pipeline

Sebastien Jourdain sebastien.jourdain at kitware.com
Mon Nov 11 11:03:28 EST 2013


You need to create a new protocol on the server side to register some new
RPC that can then be called on the client by doing.

session.call('vtk:methodName', arg1, arg2, ...).then(function(response) {
});

For the server side you can look at the file src/Web/Python/protocol.py and
then their usage inside src/Web/Application/XXX/server/pv_web_*.py

Seb


On Mon, Nov 11, 2013 at 8:57 AM, kyr <akyrieleis at gmail.com> wrote:

> Hi,
>
> I am using paraviewweb (nightly build 2.3.6) with the
> JettySessionManager-Server.
>
> In Javascript an object used to be created e.g. by
>
> var cone = paraview.Cone();
>
> How to do that now ??
>
> I start a new Paraview/Web instance using
>
>                 vtkWeb.start(config,
>                       function (conn) {
>                           setupConnection(conn);
>                       },
>                       function (err) {
>                         //console.log("Connection failed.");
>                           var conn = {
>                             sessionURL: "ws://" + location.hostname + ":" +
> location.port + "/ws"
>                             };
>                       setupConnection(conn);
>                       }
>                    );
>
> function setupConnection(connection) {
>                     if(location.protocol == "http:") {
>                         connection.sessionURL =
> connection.sessionURL.replace("wss:","ws:");
>                     }
>
>                     // connect to the ParaView/Web instance, so we can
> start
>                     // visualizing.
>                     vtkWeb.connect(connection,
>                     function(conn) {
>                         pv.connection = conn;
>                         pv.viewport =
> vtkWeb.createViewport({session:conn.session});
>                         pv.viewport.bind("#viewport");
>                     },
>                     function(code,reason){
>                         pv.connection = null;
>                         console.log(reason);
>                         cleanup();
>                     }
>                                    );
> }
>
>
>
> Many thanks
>
> k.
>
>
>
> --
> View this message in context:
> http://the-unofficial-paraview-developers-forum.34153.x6.nabble.com/paraview-web-4-pipeline-tp2618.html
> Sent from the The Unofficial ParaView Developers Forum mailing list
> archive at Nabble.com.
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20131111/063d78c2/attachment.htm>


More information about the Paraview-developers mailing list