-
Notifications
You must be signed in to change notification settings - Fork 0
WebGL. Overview
The WebGL backend allows you to render interactive visualizations in the browser. There are several web backends, sorted here by increasing difficulty of implementation.
In this backend, the Python server does the rendering, and streams PNG images to the browser via WebSockets. The browser just displays them. In return, the browser streams user actions to Python.
- Difficulty: low.
- Technologies: rendering to PNG with Python/OpenGL, WebSockets, Javascript.
In this backend, the Python server streams gloo commands to the browser via WebSockets. The browser interprets them with WebGL. In return, the browser streams user actions to Python.
- Difficulty: medium.
- Technologies: WebGL, GLOO, PNG data serialization, JSON, WebSockets, Javascript.
In this backend, Python compiles an interactive visualization to a JSON representation. This string contains the list of gloo objects, organized within visuals, themselves organized within a scene graph (including transformations). The data is contained in PNG images (that could be stored separately and not in the JSON file).
Then, a Javascript engine reads and interprets the JSON representation of the interactive visualization.
- Difficulty: high.
- Technologies: WebGL, vispy.gloo, vispy.visuals, vispy.transforms, vispy.scenegraph, PNG data serialization, JSON, WebSockets, Javascript.