lavavu 1.8.83__cp312-cp312-macosx_11_0_arm64.whl → 1.8.84__cp312-cp312-macosx_11_0_arm64.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.
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 not None:
485
- viewer.output_resolution = resolution
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)
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.83/LavaVu-amalgamated.min.js"></script>
30
+ <script async src="https://cdn.jsdelivr.net/gh/lavavu/lavavu.github.io@1.8.84/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
@@ -4357,8 +4357,10 @@ class Viewer(dict):
4357
4357
 
4358
4358
  Parameters
4359
4359
  ----------
4360
- resolution : tuple(int,int)
4361
- Frame size in pixels: width, height. Defaults to the viewer default output resolution, usually (640,480)
4360
+ resolution : int, tuple(int,int)
4361
+ Frame size in pixels: width, height.
4362
+ Defaults to half the viewer default output resolution with a minimum width of 640 pixels
4363
+ If a single integer is passed, will use as the width while maintaining output aspect ratio
4362
4364
  menu : boolean
4363
4365
  Adds a menu to the top right allowing control of vis parameters, defaults to on
4364
4366
  """
@@ -4426,7 +4428,6 @@ class Viewer(dict):
4426
4428
  #Return
4427
4429
  return vdat
4428
4430
 
4429
-
4430
4431
  def getview(self):
4431
4432
  """
4432
4433
  Get current view settings
@@ -5271,7 +5272,7 @@ def player(filename, params="controls autoplay loop", **kwargs):
5271
5272
  uid = uuid.uuid1()
5272
5273
 
5273
5274
  #Embed player
5274
- display(Video(url=filename, html_attributes=f"id='{vid}' " + params, **kwargs))
5275
+ display(Video(url=os.path.relpath(filename), html_attributes=f"id='{vid}' " + params, **kwargs))
5275
5276
 
5276
5277
  #Add download link
5277
5278
  display(HTML(f'<a id="link_{vid}" href="{filename}" download>Download Video</a>'))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lavavu
3
- Version: 1.8.83
3
+ Version: 1.8.84
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.83)
224
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lavavu/LavaVu/1.8.84)
225
225
 
226
226
  A scientific visualisation tool with a python interface for fast and flexible visual analysis.
227
227
 
@@ -1,13 +1,13 @@
1
- lavavu/lavavu.py,sha256=wBjlfDY-MTolGCigPS1bG3Z0ZEJMQjI5A8I2PtkRQS8,208226
1
+ lavavu/lavavu.py,sha256=B_n4pude411uaNukrugiM3JUdKgWvhW3q6UxfFCoFxs,208383
2
2
  lavavu/vutils.py,sha256=6Vm_xl1bp9mWlfk7jgLDwbRw-tdE_oxin77YkLel3_4,5437
3
3
  lavavu/dict.json,sha256=lsZEHc7Bb6_lt7tkSBQMgkq7AEn_2hnhWzzdokmvIY8,52729
4
4
  lavavu/server.py,sha256=L-_yPCbNfwYxJCPjDQtr_lxPnDp4oMNVFyxXhBERYrQ,12468
5
5
  lavavu/points.py,sha256=jRRtA6CrcA46Y2jUJmkxnIiVoMC5a14xEd_ojhmjhz4,5871
6
- lavavu/_LavaVuPython.cpython-312-darwin.so,sha256=7gvO0eReEetrphyEESm0TMJqa0lCA1MLNTsaPP42P9k,3842496
6
+ lavavu/_LavaVuPython.cpython-312-darwin.so,sha256=GEeBdStmDNPSXVV3w1tD137jooLGZ8ssgMyt0gggkfc,3842496
7
7
  lavavu/LavaVuPython.py,sha256=ixhceiAr0gGGfCe3d2cY0IIgS4hbgoYJGa_RfgAmmrU,33207
8
8
  lavavu/tracers.py,sha256=0dB6v9Jg5G-IeZxiVFvbPoTycGvyAQBtgyEAZUmq4XU,4257
9
9
  lavavu/convert.py,sha256=tbYRjLE2l1hI4d6tsW41Lia1JXmrWSc0-JAYCiMrjys,35516
10
- lavavu/control.py,sha256=eNocZPc-2Dz-nSty_KRz_9RzLvbU0clJGuAV3qnzxbU,65841
10
+ lavavu/control.py,sha256=C5fLZeeNazRODDlWyWhKINry86uW7jAu3x_MvmrKeO8,66434
11
11
  lavavu/__init__.py,sha256=JroZQiUbuVN7ifixk2zNDGlyLGaM8bqfRbw4D_F9qIQ,191
12
12
  lavavu/amalgamate.py,sha256=Xloq1IZ4VUvYiROzQtwKcQIWC65c7EZrdiGVhZdolL8,586
13
13
  lavavu/aserver.py,sha256=SfFvLeDTcx1XtS8fY_HIrDmh3q9HicCBRSAriY5yyOE,12003
@@ -27,7 +27,7 @@ lavavu/html/dat.gui.min.js,sha256=S4_QjoXe4IOpU0f0Sj5jEQLTWPoX9uRl1ohB91jyhuw,56
27
27
  lavavu/html/OK-min.js,sha256=-4Gc1-dWfxP_w6r9ZOHa8u-X2BlGUoSQbX68lwCxQ3E,39115
28
28
  lavavu/html/emscripten.css,sha256=wkaIJhXaxuMchinQX9Z8c12cJomyvFQMeIZ62WGQEPQ,1813
29
29
  lavavu/html/drawbox.js,sha256=SJxFSmWd7QVFI5__66hFkKzLKeqg1JPcx-gJuqdMkXw,34590
30
- lavavu/html/webview.html,sha256=_kNxQCpgMOijm1yV66Wua3_Tu6txvaUVyCllKIaITds,1522
30
+ lavavu/html/webview.html,sha256=FtI5i_Fw4DPfDfJyY6OnphZmyAmqFW1Mc14I6ouG9nM,1522
31
31
  lavavu/html/emscripten-template.js,sha256=h63mzl3Lv7aQT1wMOiOucPOvHTJjpKkzsL-SFVYaZlA,6135
32
32
  lavavu/html/draw.js,sha256=57LlHlYRh0IvWVwzGDnF6PaCxYLzokpokLNCuZlG1ds,84108
33
33
  lavavu/html/dat-gui-light-theme.css,sha256=uPhvJs-1IAsdxudItyOw8lZy8Hrih0zmFM1u-xRwZ-M,1142
@@ -45,9 +45,9 @@ lavavu/shaders/fontShader.vert,sha256=yCBmRugaPUeUQUdIh62-AK_5KELiJqVS2M82iyIqPw
45
45
  lavavu/shaders/pointShader.frag,sha256=T1PA9Z6FiE66rS2sAmmFIbYM2VqEkLBycxV-sx3nACY,3384
46
46
  lavavu/shaders/volumeShader.vert,sha256=uGdQjGqi7V5kE6V7nxymfugtU4cbf6u570xBy13RgmY,78
47
47
  lavavu/shaders/default.frag,sha256=xCkYz8QriRlnAr-NtenZSIWI_liSxv9jz3Lp5immK9k,258
48
- lavavu-1.8.83.dist-info/LICENSE.md,sha256=EhfNgC6BYh5gDEaq4tcrN3S0wbO4CtJO46botJnCF8c,8603
49
- lavavu-1.8.83.dist-info/RECORD,,
50
- lavavu-1.8.83.dist-info/WHEEL,sha256=S0Hwrf9eIBnYrjT_RLlC_ol1IXh3ugiD6Pk0jUjVaHY,109
51
- lavavu-1.8.83.dist-info/entry_points.txt,sha256=LC2qXR6EMe45Cb7zGAF99R9HFrAECP6Qkp_YuG6HZB0,44
52
- lavavu-1.8.83.dist-info/top_level.txt,sha256=JptS0k1nlBumjLs_0hITr3_XUJhxqvKBXD2jGho3E3A,7
53
- lavavu-1.8.83.dist-info/METADATA,sha256=3zHhUXvq0MCYyYDQt4scqr37Q_z2kysMPgCFcMQ3tLc,18237
48
+ lavavu-1.8.84.dist-info/LICENSE.md,sha256=EhfNgC6BYh5gDEaq4tcrN3S0wbO4CtJO46botJnCF8c,8603
49
+ lavavu-1.8.84.dist-info/RECORD,,
50
+ lavavu-1.8.84.dist-info/WHEEL,sha256=S0Hwrf9eIBnYrjT_RLlC_ol1IXh3ugiD6Pk0jUjVaHY,109
51
+ lavavu-1.8.84.dist-info/entry_points.txt,sha256=LC2qXR6EMe45Cb7zGAF99R9HFrAECP6Qkp_YuG6HZB0,44
52
+ lavavu-1.8.84.dist-info/top_level.txt,sha256=JptS0k1nlBumjLs_0hITr3_XUJhxqvKBXD2jGho3E3A,7
53
+ lavavu-1.8.84.dist-info/METADATA,sha256=MFufiRsa4bX84GlDYNKdHy3uH7jsoAK4xCJu-jUjkHE,18237