lavavu-osmesa 1.8.80__cp311-cp311-manylinux_2_28_x86_64.whl → 1.8.81__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.
lavavu/LavaVuPython.py CHANGED
@@ -481,6 +481,7 @@ class LavaVu(object):
481
481
  web = _swig_new_instance_method(_LavaVuPython.LavaVu_web)
482
482
  video = _swig_new_instance_method(_LavaVuPython.LavaVu_video)
483
483
  encodeVideo = _swig_new_instance_method(_LavaVuPython.LavaVu_encodeVideo)
484
+ pauseVideo = _swig_new_instance_method(_LavaVuPython.LavaVu_pauseVideo)
484
485
  defaultModel = _swig_new_instance_method(_LavaVuPython.LavaVu_defaultModel)
485
486
  addColourMap = _swig_new_instance_method(_LavaVuPython.LavaVu_addColourMap)
486
487
  updateColourMap = _swig_new_instance_method(_LavaVuPython.LavaVu_updateColourMap)
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.80/LavaVu-amalgamated.min.js"></script>
30
+ <script async src="https://cdn.jsdelivr.net/gh/lavavu/lavavu.github.io@1.8.81/LavaVu-amalgamated.min.js"></script>
31
31
  <!--script src="dat.gui.min.js"></script>
32
32
  <script src="OK-min.js"></script>
33
33
 
lavavu/lavavu.py CHANGED
@@ -172,7 +172,7 @@ def is_documented_by(original):
172
172
  return target
173
173
  return wrapper
174
174
 
175
- def _brightness_contrast_saturation(target, brightness=0.5, contrast=0.5, saturation=0.5):
175
+ def _brightness_contrast_saturation(target, brightness=None, contrast=None, saturation=None, normalise=True):
176
176
  """
177
177
  Set brightness, contrast and saturation in the range [0,1]
178
178
  Zero is minimum level
@@ -192,10 +192,10 @@ def _brightness_contrast_saturation(target, brightness=0.5, contrast=0.5, satura
192
192
  0 is greyscale, 0.5 is normal and 1.0 is maximum over-saturation
193
193
  """
194
194
  #Brightness in shader is [-1,1] where 0 is default
195
- target["brightness"] = brightness * 2.0 - 1.0
195
+ target["brightness"] = None if brightness is None else brightness * 2.0 - 1.0
196
196
  #Contrast and saturation range from [0,2] where 1 is default
197
- target["contrast"] = contrast * 2.0
198
- target["saturation"] = saturation * 2.0
197
+ target["contrast"] = None if contrast is None else contrast * 2.0
198
+ target["saturation"] = None if saturation is None else saturation * 2.0
199
199
 
200
200
  def grid2d(corners=((0.,1.), (1.,0.)), dims=[2,2]):
201
201
  """
@@ -1629,7 +1629,7 @@ class Object(dict):
1629
1629
  self.parent.export_mesh(filepath, [self], rgba)
1630
1630
 
1631
1631
  @is_documented_by(_brightness_contrast_saturation)
1632
- def brightness_contrast_saturation(self, brightness=0, contrast=0, saturation=0):
1632
+ def brightness_contrast_saturation(self, brightness=None, contrast=None, saturation=None):
1633
1633
  return _brightness_contrast_saturation(self)
1634
1634
 
1635
1635
  #Wrapper dict+list of objects
@@ -4742,7 +4742,7 @@ class Viewer(dict):
4742
4742
  convert.export_any(filepath, objects)
4743
4743
 
4744
4744
  @is_documented_by(_brightness_contrast_saturation)
4745
- def brightness_contrast_saturation(self, brightness=0, contrast=0, saturation=0):
4745
+ def brightness_contrast_saturation(self, brightness=None, contrast=None, saturation=None):
4746
4746
  return _brightness_contrast_saturation(self, brightness, contrast, saturation)
4747
4747
 
4748
4748
  def set_properties(self, objects=None, **kwargs):
@@ -5232,7 +5232,7 @@ class DrawData(object):
5232
5232
  renderlist = [geomnames[value] for value in geomtypes if value == self.data.type]
5233
5233
  return ' '.join(['DrawData("' + r + '")' for r in renderlist]) + ' ==> ' + str(self.available)
5234
5234
 
5235
- def player(filename, width=None, height=None, params="", nocache=True):
5235
+ def player(filename, width=None, height=None, params=""):
5236
5236
  """
5237
5237
  Shows a video inline within an ipython notebook.
5238
5238
  If IPython is not running, just returns
@@ -5247,49 +5247,37 @@ def player(filename, width=None, height=None, params="", nocache=True):
5247
5247
  Fixed height of player window, otherwise will use video resolution
5248
5248
  params : str
5249
5249
  Any other parameters to add to the <video> tag, eg: "autoplay"
5250
- nocache : bool
5251
- Add a timestamp to the filename url to prevent caching
5252
5250
  """
5253
5251
 
5254
5252
  if is_notebook():
5255
- from IPython.display import display,HTML
5256
- #try:
5257
- # #Newer IPython versions have a Video display function
5258
- # from IPython.display import Video
5259
- # display(Video(filename))
5260
- #except (ImportError) as e:
5253
+ from IPython.display import display,HTML,Video
5261
5254
  extra_params = params
5262
5255
  if width and height:
5263
5256
  extra_params += ' width=' + str(width) + ' height=' + str(height)
5264
- html = """
5265
- <video controls loop {params}>
5266
- <source src="{fn1}">
5267
- <source src="{fn2}">
5268
- <source src="http://localhost:{port}/{fn1}">
5269
- Sorry, your browser doesn't support embedded videos,
5270
- </video><br>
5271
- """
5272
- #Jupyterlab adds it's own timestamp but notebook doesn't
5273
- #don't know a way to detect jupyterlab, so provide source url with and without
5274
- #Browser should load the first working url
5275
-
5276
- #Get path relative to cwd
5277
- #(this works in notebook/lab but not voila)
5278
- #import pathlib
5279
- #path = pathlib.Path(filename)
5280
- #filename = str(path.relative_to(os.getcwd()))
5281
-
5282
- global server_ports
5257
+
5258
+ def get_fn(filename):
5259
+ import os
5260
+ nbpath = os.getenv('JPY_SESSION_NAME')
5261
+ if nbpath is not None:
5262
+ import os.path
5263
+ relpath = os.path.relpath(os.getcwd(), start=nbpath)
5264
+ return relpath + '/' + filename
5265
+ return filename
5266
+
5283
5267
  import uuid
5284
5268
  uid = uuid.uuid1()
5285
- #Append a UUID based on host ID and current time
5286
- filename_ts = filename
5287
- if nocache:
5288
- filename_ts += "?" + str(uid)
5289
- html = HTML(html.format(params=extra_params, fn1=filename_ts, fn2=filename, port=server_ports[-1] if len(server_ports) else 8080))
5290
- display(html)
5269
+ filename_rel = get_fn(filename)
5270
+
5271
+ display(Video(filename, width=width, height=height))
5272
+ #display(HTML(f"""
5273
+ #<video controls loop {extra_params}>
5274
+ # <source src="{filename_rel}">
5275
+ #Sorry, your browser doesn't support embedded videos
5276
+ #</video><br>
5277
+ #"""))
5278
+
5291
5279
  #Add download link
5292
- display(HTML('<a href="{fn}">Download Video</a>'.format(fn=filename)))
5280
+ display(HTML('<a href="{fn}" download>Download Video</a>'.format(fn=filename)))
5293
5281
 
5294
5282
  #Class for managing video animation recording
5295
5283
  class Video(object):
@@ -5360,6 +5348,15 @@ class Video(object):
5360
5348
  for f in glob.glob(self.filename + "/frame_*.jpg"):
5361
5349
  os.remove(f)
5362
5350
 
5351
+ def pause(self):
5352
+ """
5353
+ Pause/resume recording, no rendered frames will be added to the video while paused
5354
+ """
5355
+ if self.encoder:
5356
+ self.encoder.render = not self.encoder.render
5357
+ else:
5358
+ self.viewer.app.pauseVideo()
5359
+
5363
5360
  def stop(self):
5364
5361
  """
5365
5362
  Stop recording, final frames will be written and file closed, ready to play.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lavavu-osmesa
3
- Version: 1.8.80
3
+ Version: 1.8.81
4
4
  Summary: Python interface to LavaVu OpenGL 3D scientific visualisation utilities
5
5
  Author-email: Owen Kaluza <owen@kaluza.id.au>
6
6
  License: ### Licensing
@@ -221,7 +221,7 @@ Requires-Dist: jupyter-server-proxy
221
221
  [![Build Status](https://github.com/lavavu/LavaVu/workflows/Test/badge.svg)](https://github.com/lavavu/LavaVu/actions?query=workflow:Test)
222
222
  [![Deploy Status](https://github.com/lavavu/LavaVu/workflows/Deploy/badge.svg?branch=1.7.3)](https://github.com/lavavu/LavaVu/actions?query=workflow:Deploy)
223
223
  [![DOI](https://zenodo.org/badge/45163055.svg)](https://zenodo.org/badge/latestdoi/45163055)
224
- [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lavavu/LavaVu/1.8.80)
224
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lavavu/LavaVu/1.8.81)
225
225
 
226
226
  A scientific visualisation tool with a python interface for fast and flexible visual analysis.
227
227
 
@@ -1,25 +1,31 @@
1
+ lavavu_osmesa-1.8.81.dist-info/top_level.txt,sha256=JptS0k1nlBumjLs_0hITr3_XUJhxqvKBXD2jGho3E3A,7
2
+ lavavu_osmesa-1.8.81.dist-info/RECORD,,
3
+ lavavu_osmesa-1.8.81.dist-info/entry_points.txt,sha256=LC2qXR6EMe45Cb7zGAF99R9HFrAECP6Qkp_YuG6HZB0,44
4
+ lavavu_osmesa-1.8.81.dist-info/LICENSE.md,sha256=EhfNgC6BYh5gDEaq4tcrN3S0wbO4CtJO46botJnCF8c,8603
5
+ lavavu_osmesa-1.8.81.dist-info/METADATA,sha256=0AGMy35QtwKh_TQgybtGdDQ1xlwXRbZs2CoWk3jwQ0U,18244
6
+ lavavu_osmesa-1.8.81.dist-info/WHEEL,sha256=fSCMmwXhNzURRJrBh-Ze1hn48brKvWrIglFubPSWmlU,113
1
7
  lavavu_osmesa.libs/libglapi-d9260dde.so.0.0.0,sha256=lk2-KJ-TfqKogN82K9yu6G_StS6MtPDFNP7dN1CZSjo,247921
2
8
  lavavu_osmesa.libs/libdrm-b0291a67.so.2.4.0,sha256=K48ZAlNAuvSdX7i2toETxCm6886w4E17JmP2c8RM2-0,96417
9
+ lavavu_osmesa.libs/libavformat-2c4b075e.so.61.9.100,sha256=FscWR6X-KZVOGGZHqilkHwwOUdlxYtPztWaIfmLP5Yc,2702745
10
+ lavavu_osmesa.libs/libswscale-4ff68837.so.8.9.101,sha256=QluomWhZTk8Fa6lREeOBDJ8N5ztrfAk07Du3TF4cWUM,648705
3
11
  lavavu_osmesa.libs/libtiff-97fb0e7a.so.5.3.0,sha256=ReUrhN0yHYGg-Fws0_oHS7soNRaqYFAMCqpS5FXXbMU,517801
4
- lavavu_osmesa.libs/libx264-3daadd71.so.164,sha256=1AiHi-PoYrS70fP_NvC9HYuEKWhqPr5wVP81HJCB32E,2431745
5
- lavavu_osmesa.libs/libswresample-5281a095.so.5.4.100,sha256=FCwCF-UT7a0MXZ6tj0K5edvk661ZJckVdu93l7mZfnY,128265
12
+ lavavu_osmesa.libs/libx264-6f5370e2.so.164,sha256=eB4ZQMvXUl_lla5tVyk8Xg8MVldtlDovZOpc8g0WhlE,2435841
6
13
  lavavu_osmesa.libs/libzstd-76b78bac.so.1.4.4,sha256=F2-A6yQ3AA2N0vHZe-81OfEUOcwgjjWiOnYAxk2Kflc,686073
14
+ lavavu_osmesa.libs/libavutil-1e63d46c.so.59.46.100,sha256=khP7ezU-qUnsHWF-UAqWkyVrR4S6Aq3Gyod4UlvNMV8,1009281
7
15
  lavavu_osmesa.libs/libjpeg-da649728.so.62.2.0,sha256=IoO1YzjSjixVQSs5SiWK95E-RREenSFc2B97tb-x_5E,437961
8
16
  lavavu_osmesa.libs/libtinfo-3a2cb85b.so.6.1,sha256=6Co83bxdB4J-rBU5l0p_7HpGlU46RG2EDnf-LpF5kBY,194041
9
17
  lavavu_osmesa.libs/libpcre2-8-516f4c9d.so.0.7.1,sha256=IcbljW_oKuAVlrAwKz8qtRZxfi1sQH_iKxPSoNpzsmU,547745
10
- lavavu_osmesa.libs/libavformat-110b7b98.so.61.9.100,sha256=yswy-iJ55yHUy0hnrIzJP4NO5ggKdB8hmWPTwIOKpYE,2690465
11
18
  lavavu_osmesa.libs/libOSMesa-25f49adf.so.8.0.0,sha256=_WFDCZkS9KhK_WNSRQUG-CcR4NgKRfGtGaSkw--0EKw,12995657
12
- lavavu_osmesa.libs/libavcodec-22608acb.so.61.22.100,sha256=U1ZRhRsDOEHEyqW5ai80bsCIaJGf5GSlzNy0NgvltaQ,14755761
13
19
  lavavu_osmesa.libs/libbz2-e34b29ae.so.1.0.6,sha256=t0Rx5MGhoqFd8hOzCgew5TwGvZFpy_XTk-dae2FXAEs,79145
14
20
  lavavu_osmesa.libs/libLLVM-17-daa109ce.so,sha256=0F8UnMl03hrXBMto2ewBZRdnfzIbg6qvo-qVBIWY7H8,120778961
15
21
  lavavu_osmesa.libs/libjbig-2504a0c3.so.2.1,sha256=VejIx8sDX3xfCuJkrk9HEyWBYjZbUiTyIRuoPqT-ibE,54265
22
+ lavavu_osmesa.libs/libswresample-0ba304d7.so.5.4.100,sha256=i6FYI2DuKjgjVxmbqNm2mXewyRNM-a6WSzgGJwFKuZc,128265
16
23
  lavavu_osmesa.libs/libselinux-64a010fa.so.1,sha256=dNJwuKqYp8fwkmrQ9hom3hVQ-lYUkNxxHb4vmrk8zmE,195097
17
24
  lavavu_osmesa.libs/libffi-3a37023a.so.6.0.2,sha256=Q1Rq1XplFBXNFHvg92SNmTgQ0T6E9wmcqZcgOZ7DgLE,42489
18
- lavavu_osmesa.libs/libswscale-a39dc465.so.8.6.100,sha256=V6Ag0Fpy80Nke0Q2VniQ4mi6ppAORgXEAEiraF8W-1I,636305
19
- lavavu_osmesa.libs/libavutil-6f297d47.so.59.44.100,sha256=djxnbtoji8xDmjOPbxG2ByGfkEm8g7nqgWdoKe4BzyY,1009281
25
+ lavavu_osmesa.libs/libavcodec-c07e82e9.so.61.24.100,sha256=xMKCq1bFKmc36ShXE1AXmXVVJbxHjQiZo1O-nmDPwvs,15042481
20
26
  lavavu/server.py,sha256=L-_yPCbNfwYxJCPjDQtr_lxPnDp4oMNVFyxXhBERYrQ,12468
21
- lavavu/LavaVuPython.py,sha256=ZdBJROEPysd_N_Od88PEO8Y1fjCOd05_vP6YBnJymN0,33131
22
- lavavu/_LavaVuPython.cpython-311-x86_64-linux-gnu.so,sha256=I7ZvJGmkGUngyE6w26rDATcmTDrKKYOP0ZYrMJ1lzEg,76846145
27
+ lavavu/LavaVuPython.py,sha256=ixhceiAr0gGGfCe3d2cY0IIgS4hbgoYJGa_RfgAmmrU,33207
28
+ lavavu/_LavaVuPython.cpython-311-x86_64-linux-gnu.so,sha256=mnu_iXyvFpoKvoGYMt8rD4D8DnE6eiDPXDSbgNllua4,76854345
23
29
  lavavu/amalgamate.py,sha256=Xloq1IZ4VUvYiROzQtwKcQIWC65c7EZrdiGVhZdolL8,586
24
30
  lavavu/__init__.py,sha256=JroZQiUbuVN7ifixk2zNDGlyLGaM8bqfRbw4D_F9qIQ,191
25
31
  lavavu/vutils.py,sha256=6Vm_xl1bp9mWlfk7jgLDwbRw-tdE_oxin77YkLel3_4,5437
@@ -27,7 +33,7 @@ lavavu/aserver.py,sha256=SfFvLeDTcx1XtS8fY_HIrDmh3q9HicCBRSAriY5yyOE,12003
27
33
  lavavu/points.py,sha256=jRRtA6CrcA46Y2jUJmkxnIiVoMC5a14xEd_ojhmjhz4,5871
28
34
  lavavu/tracers.py,sha256=0dB6v9Jg5G-IeZxiVFvbPoTycGvyAQBtgyEAZUmq4XU,4257
29
35
  lavavu/dict.json,sha256=lsZEHc7Bb6_lt7tkSBQMgkq7AEn_2hnhWzzdokmvIY8,52729
30
- lavavu/lavavu.py,sha256=MJyUnl8MzVPDLRe5LoX_TRWRKFJC_OU7Du3k0REZvU4,207579
36
+ lavavu/lavavu.py,sha256=BvswUID0WxpWuxV29qHfRj5AAeHkmm-QvuhfYnxqhZc,207324
31
37
  lavavu/__main__.py,sha256=EbDetijCjyoiNxmExqnDGoRVs996tSVave5DML9zuMY,235
32
38
  lavavu/font.bin,sha256=fvi5zkvmq6gh9v3jXedBVuxNJWKmHtbjECzv6eT9wb4,225360
33
39
  lavavu/control.py,sha256=eNocZPc-2Dz-nSty_KRz_9RzLvbU0clJGuAV3qnzxbU,65841
@@ -51,7 +57,7 @@ lavavu/html/server.js,sha256=b5eNlWWbiEk90n3WARJ1Mh7lmfHM0pOtZfrrmM-wfyc,7099
51
57
  lavavu/html/baseviewer.js,sha256=u3UhC1At6rMBKmcQ7d2DXTRxQ20wsQkc4lqA-7sL7i4,9567
52
58
  lavavu/html/stats.min.js,sha256=iiwrLW4SUBhrzWrfW2VZP_9mowHX-Ks1EKORFv4EHdE,1965
53
59
  lavavu/html/LavaVu-amalgamated.css,sha256=iE2xrxFcwmY0AcASrXxNa_RpvFEbS_YO4H5OILbPteE,8640
54
- lavavu/html/webview.html,sha256=zif0TjI2RtOeuLl5yaQCPy5SeWJGkgJOa_amsMVq3Z0,1522
60
+ lavavu/html/webview.html,sha256=XMXO4b4vKNYXBp5Duzur80g86yT-9tTkbEJtMp1emrY,1522
55
61
  lavavu/shaders/default.frag,sha256=xCkYz8QriRlnAr-NtenZSIWI_liSxv9jz3Lp5immK9k,258
56
62
  lavavu/shaders/lineShader.frag,sha256=aCmOWC20fHinR32p6LZPdCZP6abn-K1V2slbJ_5NoVA,945
57
63
  lavavu/shaders/volumeShader.vert,sha256=uGdQjGqi7V5kE6V7nxymfugtU4cbf6u570xBy13RgmY,78
@@ -64,9 +70,3 @@ lavavu/shaders/fontShader.frag,sha256=DXAzO7kS36TBzYMJW0XqFiQQTTc4jFedGiUkLjelYK
64
70
  lavavu/shaders/triShader.vert,sha256=pJXftq7IiqiGe7NTMmuBUMDs4OZc9TD8lNJ4q-8B57Q,1120
65
71
  lavavu/shaders/lineShader.vert,sha256=6kJQcfu3eqaj910_KdaklVRvYxNbeu0ZbpDEOxRVde0,522
66
72
  lavavu/shaders/pointShader.frag,sha256=T1PA9Z6FiE66rS2sAmmFIbYM2VqEkLBycxV-sx3nACY,3384
67
- lavavu_osmesa-1.8.80.dist-info/top_level.txt,sha256=JptS0k1nlBumjLs_0hITr3_XUJhxqvKBXD2jGho3E3A,7
68
- lavavu_osmesa-1.8.80.dist-info/RECORD,,
69
- lavavu_osmesa-1.8.80.dist-info/entry_points.txt,sha256=LC2qXR6EMe45Cb7zGAF99R9HFrAECP6Qkp_YuG6HZB0,44
70
- lavavu_osmesa-1.8.80.dist-info/LICENSE.md,sha256=EhfNgC6BYh5gDEaq4tcrN3S0wbO4CtJO46botJnCF8c,8603
71
- lavavu_osmesa-1.8.80.dist-info/METADATA,sha256=-xcSiM2QkPrfXALEOg2Rp9ENBDVQNdJbuCSBpLAgBq8,18244
72
- lavavu_osmesa-1.8.80.dist-info/WHEEL,sha256=vz788m04cNQaZGNDINYJvKXFD73M1SKNc2ZIjMUStlk,113
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.2.0)
2
+ Generator: setuptools (75.3.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp311-cp311-manylinux_2_28_x86_64
5
5
 
Binary file