lavavu-osmesa 1.8.84__cp311-cp311-manylinux_2_28_x86_64.whl → 1.9.10__cp311-cp311-manylinux_2_28_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. lavavu/LavaVuPython.py +5 -3
  2. lavavu/_LavaVuPython.cpython-311-x86_64-linux-gnu.so +0 -0
  3. lavavu/control.py +18 -5
  4. lavavu/dict.json +11 -0
  5. lavavu/html/control.js +1 -1
  6. lavavu/html/menu.js +9 -4
  7. lavavu/html/webview.html +1 -1
  8. lavavu/lavavu.py +534 -140
  9. lavavu/osmesa/_LavaVuPython.cpython-311-x86_64-linux-gnu.so +0 -0
  10. lavavu/osmesa/__init__.py +0 -0
  11. lavavu/shaders/default.frag +0 -6
  12. lavavu/shaders/default.vert +4 -4
  13. lavavu/shaders/fontShader.frag +0 -5
  14. lavavu/shaders/lineShader.frag +0 -4
  15. lavavu/shaders/lineShader.vert +0 -2
  16. lavavu/shaders/pointShader.frag +0 -5
  17. lavavu/shaders/pointShader.vert +0 -4
  18. lavavu/shaders/triShader.frag +0 -17
  19. lavavu/shaders/triShader.vert +4 -10
  20. lavavu/shaders/volumeShader.frag +0 -63
  21. lavavu/tracers.py +188 -110
  22. {lavavu_osmesa-1.8.84.dist-info → lavavu_osmesa-1.9.10.dist-info}/METADATA +23 -17
  23. lavavu_osmesa-1.9.10.dist-info/RECORD +64 -0
  24. {lavavu_osmesa-1.8.84.dist-info → lavavu_osmesa-1.9.10.dist-info}/WHEEL +1 -1
  25. lavavu_osmesa.libs/{libOSMesa-25f49adf.so.8.0.0 → libOSMesa-f6a8f160.so.8.0.0} +0 -0
  26. lavavu_osmesa.libs/{libglapi-d9260dde.so.0.0.0 → libglapi-520b284c.so.0.0.0} +0 -0
  27. lavavu_osmesa.libs/{libselinux-64a010fa.so.1 → libselinux-d0805dcb.so.1} +0 -0
  28. lavavu_osmesa-1.8.84.dist-info/RECORD +0 -72
  29. lavavu_osmesa.libs/libavcodec-e9f4b4d9.so.61.24.100 +0 -0
  30. lavavu_osmesa.libs/libavformat-dd2ce9c7.so.61.9.100 +0 -0
  31. lavavu_osmesa.libs/libavutil-54907a11.so.59.46.100 +0 -0
  32. lavavu_osmesa.libs/libbz2-e34b29ae.so.1.0.6 +0 -0
  33. lavavu_osmesa.libs/libjbig-2504a0c3.so.2.1 +0 -0
  34. lavavu_osmesa.libs/libjpeg-da649728.so.62.2.0 +0 -0
  35. lavavu_osmesa.libs/libswresample-3aad7a38.so.5.4.100 +0 -0
  36. lavavu_osmesa.libs/libswscale-4ff68837.so.8.9.101 +0 -0
  37. lavavu_osmesa.libs/libtiff-5faff81f.so.5.3.0 +0 -0
  38. lavavu_osmesa.libs/libx264-6f5370e2.so.164 +0 -0
  39. {lavavu_osmesa-1.8.84.dist-info → lavavu_osmesa-1.9.10.dist-info}/entry_points.txt +0 -0
  40. {lavavu_osmesa-1.8.84.dist-info → lavavu_osmesa-1.9.10.dist-info/licenses}/LICENSE.md +0 -0
  41. {lavavu_osmesa-1.8.84.dist-info → lavavu_osmesa-1.9.10.dist-info}/top_level.txt +0 -0
lavavu/LavaVuPython.py CHANGED
@@ -5,12 +5,14 @@
5
5
  # the SWIG interface file instead.
6
6
 
7
7
  from sys import version_info as _swig_python_version_info
8
- # Import the low-level C/C++ module
9
- if __package__ or "." in __name__:
10
- from . import _LavaVuPython
8
+
9
+ import os
10
+ if 'osmesa' in os.environ.get('LV_CONTEXT', ''):
11
+ from osmesa import _LavaVuPython
11
12
  else:
12
13
  import _LavaVuPython
13
14
 
15
+
14
16
  try:
15
17
  import builtins as __builtin__
16
18
  except ImportError:
lavavu/control.py CHANGED
@@ -1689,13 +1689,26 @@ class _ControlFactory(object):
1689
1689
  """
1690
1690
  if not is_notebook():
1691
1691
  return
1692
- #Find matching viewer id, redisplay all that match
1692
+ from IPython.display import display,HTML,Javascript
1693
+ display(Javascript(self.redisplay_call()))
1694
+
1695
+ def redisplay_call(self):
1696
+ """Update the active viewer image if any
1697
+ Applies changes made in python to the viewer and forces a redisplay
1698
+ """
1699
+ #Find matching viewer id, redisplay first match
1700
+ ids = self.active_viewers()
1701
+ return ';'.join('_wi["{0}"].redisplay()'.format(i) for i in ids)
1702
+
1703
+ def active_viewers(self):
1704
+ """Return matching active viewer IDs
1705
+ """
1706
+ #Find matching viewer ids, all that match
1707
+ ids = []
1693
1708
  for idx,obj in enumerate(windows):
1694
1709
  if obj == self._target():
1695
- viewerid = winids[idx]
1696
- from IPython.display import display,HTML,Javascript
1697
- #display(Javascript('_wi["{0}"].redisplay();'.format(viewerid)))
1698
- display(HTML('<script>_wi["{0}"].redisplay();</script>'.format(viewerid)))
1710
+ ids.append(winids[idx])
1711
+ return ids
1699
1712
 
1700
1713
  def update(self):
1701
1714
  """Update the control values from current viewer data
lavavu/dict.json CHANGED
@@ -2147,6 +2147,17 @@
2147
2147
  false
2148
2148
  ]
2149
2149
  },
2150
+ "upscalelines": {
2151
+ "default": false,
2152
+ "target": "global",
2153
+ "type": "real",
2154
+ "desc": "Enable to scale lines with the viewport size.",
2155
+ "strict": true,
2156
+ "redraw": 0,
2157
+ "control": [
2158
+ true
2159
+ ]
2160
+ },
2150
2161
  "fps": {
2151
2162
  "default": false,
2152
2163
  "target": "global",
lavavu/html/control.js CHANGED
@@ -87,7 +87,7 @@ function WindowInteractor(id, uid, port) {
87
87
 
88
88
  //Several possible modes to try
89
89
  //Modern JupyterHub lab URL
90
- var regex = /\/lab\//;
90
+ var regex = /\/lab(\/|\?|$)/; //Match "/lab" at end of url or "/lab/" or "/lab?" anywhere
91
91
  var parsed = regex.exec(loc.href);
92
92
  if (parsed && parsed.length > 0) {
93
93
  connect(loc.href.substring(0,parsed.index) + "/proxy/" + port);
lavavu/html/menu.js CHANGED
@@ -123,7 +123,12 @@ function menu_addctrls(menu, obj, viewer, onchange) {
123
123
  //Check if it has been set on the target object
124
124
  if (prop in obj) {
125
125
  //console.log(prop + " ==> " + JSON.stringify(viewer.dict[prop]));
126
- menu_addctrl(menu, obj, viewer, prop, onchange);
126
+ try {
127
+ //Catch errors and continue gracefully
128
+ menu_addctrl(menu, obj, viewer, prop, onchange);
129
+ } catch(e) {
130
+ console.log("Error adding control to menu: " + e);
131
+ }
127
132
 
128
133
  } else {
129
134
  //Save list of properties without controls
@@ -159,9 +164,9 @@ function menu_addctrls(menu, obj, viewer, onchange) {
159
164
 
160
165
  function menu_addcmaps(menu, obj, viewer, onchange) {
161
166
  //Colourmap editing menu
162
- if (viewer.cgui.prmenu) viewer.cgui.removeFolder(viewer.cgui.prmenu);
163
- if (viewer.cgui.cmenu) viewer.cgui.removeFolder(viewer.cgui.cmenu);
164
- if (viewer.cgui.pomenu) viewer.cgui.removeFolder(viewer.cgui.pomenu);
167
+ if (viewer.cgui.prmenu) viewer.cgui.remove(viewer.cgui.prmenu);
168
+ if (viewer.cgui.cmenu) viewer.cgui.remove(viewer.cgui.cmenu);
169
+ if (viewer.cgui.pomenu) viewer.cgui.remove(viewer.cgui.pomenu);
165
170
  viewer.cgui.prmenu = viewer.cgui.addFolder("Properties");
166
171
  viewer.cgui.cmenu = viewer.cgui.addFolder("Colours");
167
172
  viewer.cgui.pomenu = viewer.cgui.addFolder("Positions");
lavavu/html/webview.html CHANGED
@@ -27,7 +27,7 @@
27
27
 
28
28
  <input id="fileinput" type="file" style="visibility:hidden" onchange="useFileInput(this)" />
29
29
 
30
- <script async src="https://cdn.jsdelivr.net/gh/lavavu/lavavu.github.io@1.8.84/LavaVu-amalgamated.min.js"></script>
30
+ <script async src="https://cdn.jsdelivr.net/gh/lavavu/lavavu.github.io@1.9.10/LavaVu-amalgamated.min.js"></script>
31
31
  <!--script src="dat.gui.min.js"></script>
32
32
  <script src="OK-min.js"></script>
33
33