lavavu-osmesa 1.8.83__cp312-cp312-manylinux_2_28_x86_64.whl → 1.9.9__cp312-cp312-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.
- lavavu/_LavaVuPython.cpython-312-x86_64-linux-gnu.so +0 -0
- lavavu/control.py +32 -7
- lavavu/dict.json +11 -0
- lavavu/html/control.js +1 -1
- lavavu/html/menu.js +9 -4
- lavavu/html/webview.html +1 -1
- lavavu/lavavu.py +483 -141
- lavavu/osmesa/LavaVuPython.py +561 -0
- lavavu/osmesa/_LavaVuPython.cpython-312-x86_64-linux-gnu.so +0 -0
- lavavu/osmesa/__init__.py +0 -0
- lavavu/shaders/default.frag +0 -6
- lavavu/shaders/default.vert +4 -4
- lavavu/shaders/fontShader.frag +0 -5
- lavavu/shaders/lineShader.frag +0 -4
- lavavu/shaders/lineShader.vert +0 -2
- lavavu/shaders/pointShader.frag +0 -5
- lavavu/shaders/pointShader.vert +0 -4
- lavavu/shaders/triShader.frag +0 -17
- lavavu/shaders/triShader.vert +4 -10
- lavavu/shaders/volumeShader.frag +0 -63
- lavavu/tracers.py +193 -110
- {lavavu_osmesa-1.8.83.dist-info → lavavu_osmesa-1.9.9.dist-info}/METADATA +22 -17
- lavavu_osmesa-1.9.9.dist-info/RECORD +65 -0
- {lavavu_osmesa-1.8.83.dist-info → lavavu_osmesa-1.9.9.dist-info}/WHEEL +1 -1
- lavavu_osmesa.libs/{libLLVM-17-daa109ce.so → libLLVM-17-51492e70.so} +0 -0
- lavavu_osmesa.libs/{libOSMesa-25f49adf.so.8.0.0 → libOSMesa-f6a8f160.so.8.0.0} +0 -0
- lavavu_osmesa.libs/{libglapi-d9260dde.so.0.0.0 → libglapi-520b284c.so.0.0.0} +0 -0
- lavavu_osmesa.libs/{libselinux-64a010fa.so.1 → libselinux-d0805dcb.so.1} +0 -0
- lavavu_osmesa-1.8.83.dist-info/RECORD +0 -72
- lavavu_osmesa.libs/libavcodec-c07e82e9.so.61.24.100 +0 -0
- lavavu_osmesa.libs/libavformat-2c4b075e.so.61.9.100 +0 -0
- lavavu_osmesa.libs/libavutil-1e63d46c.so.59.46.100 +0 -0
- lavavu_osmesa.libs/libbz2-e34b29ae.so.1.0.6 +0 -0
- lavavu_osmesa.libs/libjbig-2504a0c3.so.2.1 +0 -0
- lavavu_osmesa.libs/libjpeg-da649728.so.62.2.0 +0 -0
- lavavu_osmesa.libs/libswresample-0ba304d7.so.5.4.100 +0 -0
- lavavu_osmesa.libs/libswscale-4ff68837.so.8.9.101 +0 -0
- lavavu_osmesa.libs/libtiff-97fb0e7a.so.5.3.0 +0 -0
- lavavu_osmesa.libs/libx264-6f5370e2.so.164 +0 -0
- {lavavu_osmesa-1.8.83.dist-info → lavavu_osmesa-1.9.9.dist-info}/entry_points.txt +0 -0
- {lavavu_osmesa-1.8.83.dist-info → lavavu_osmesa-1.9.9.dist-info/licenses}/LICENSE.md +0 -0
- {lavavu_osmesa-1.8.83.dist-info → lavavu_osmesa-1.9.9.dist-info}/top_level.txt +0 -0
Binary file
|
lavavu/control.py
CHANGED
@@ -481,8 +481,20 @@ class Window(_Container):
|
|
481
481
|
self.align = align
|
482
482
|
self.wrapper = wrapper
|
483
483
|
self.fullscreen = fullscreen
|
484
|
-
if resolution is
|
485
|
-
|
484
|
+
if resolution is None:
|
485
|
+
#Default to largest of 640x480 or output res / 2
|
486
|
+
resolution = [0,0]
|
487
|
+
resolution[0] = max(viewer.output_resolution[0]//2, 640)
|
488
|
+
resolution[1] = int(resolution[0] * viewer.output_resolution[1]/viewer.output_resolution[0])
|
489
|
+
elif isinstance(resolution, int):
|
490
|
+
#Passed interger - interpert as width
|
491
|
+
resolution = [resolution,0]
|
492
|
+
|
493
|
+
if resolution[1] == 0:
|
494
|
+
#Width only, set height based on output aspect ratio
|
495
|
+
resolution[1] = int(resolution[0] * viewer.output_resolution[1]/viewer.output_resolution[0])
|
496
|
+
|
497
|
+
viewer.output_resolution = resolution
|
486
498
|
|
487
499
|
def html(self):
|
488
500
|
#print(self.viewer["resolution"], self.viewer.output_resolution)
|
@@ -1677,13 +1689,26 @@ class _ControlFactory(object):
|
|
1677
1689
|
"""
|
1678
1690
|
if not is_notebook():
|
1679
1691
|
return
|
1680
|
-
|
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 = []
|
1681
1708
|
for idx,obj in enumerate(windows):
|
1682
1709
|
if obj == self._target():
|
1683
|
-
|
1684
|
-
|
1685
|
-
#display(Javascript('_wi["{0}"].redisplay();'.format(viewerid)))
|
1686
|
-
display(HTML('<script>_wi["{0}"].redisplay();</script>'.format(viewerid)))
|
1710
|
+
ids.append(winids[idx])
|
1711
|
+
return ids
|
1687
1712
|
|
1688
1713
|
def update(self):
|
1689
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
|
-
|
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.
|
163
|
-
if (viewer.cgui.cmenu) viewer.cgui.
|
164
|
-
if (viewer.cgui.pomenu) viewer.cgui.
|
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.
|
30
|
+
<script async src="https://cdn.jsdelivr.net/gh/lavavu/lavavu.github.io@1.9.9/LavaVu-amalgamated.min.js"></script>
|
31
31
|
<!--script src="dat.gui.min.js"></script>
|
32
32
|
<script src="OK-min.js"></script>
|
33
33
|
|