tsgouros / ParaViewWeb-SimpleDemo

A bare-bones example for people who want to put together a ParaViewWeb application.
7 stars 1 forks source link

couple of comments ;-) #1

Open jourdain opened 6 years ago

jourdain commented 6 years ago

Instead of using npm start, you can serve the content of www by adding --content /path/to/www to the pvpython command line.

Moreover, since the content will be served from the paraview http server the endpoint/sessionURL can be automatically guessed so the config can be empty when given to the smart connect.

Inside your package.json, since you added kw-web-suite you don't need any build tools such as webpack as kw-web-suite aims to be similar to apt-get install build-essential for linux. So your devDependencies could only contains kw-web-suite.

You should replace

But for that you will have to:

nodeCodeNinja commented 6 years ago

@jourdain - What are the differences between RemoteRenderer and VtkRenderer Is is to use self.getApplication().InvokeEvent('UpdateEvent')

jourdain commented 6 years ago

The RemoteRenderer was the first implementation where the client request each image while the VtkRenderer expect a push from the server.

nodeCodeNinja commented 6 years ago

Great!

Apart from above, I had to add self.registerVtkWebProtocol(pv_protocols.ParaViewWebPublishImageDelivery(decode=False))

It works great with realtime push from backend without a page refresh to see updated image

Morasta commented 5 years ago

@nodeCodeNinja : do you have a complete example of the changes you made to make realtime pushes work?