lavavu 1.8.74__cp39-cp39-macosx_11_0_arm64.whl → 1.8.75__cp39-cp39-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
@@ -220,6 +220,13 @@ def _connectcode(target):
220
220
  else:
221
221
  return ""
222
222
 
223
+ def _emscriptencode(menu=False, lighttheme=True):
224
+ """
225
+ Returns WebGL base code for an interactive visualisation window
226
+ """
227
+ jslibs = [[], ['emscripten.js', 'LavaVu.js']]
228
+ return _webglcode('', ['emscripten.css'], jslibs, menu=menu, lighttheme=lighttheme)
229
+
223
230
  def _getcss(files=["styles.css"]):
224
231
  #Load stylesheets to inline tag
225
232
  return _filestohtml(files, tag="style")
lavavu/html/drawbox.js CHANGED
@@ -190,6 +190,14 @@ function canvasBoxMouseMove(event, mouse) {
190
190
 
191
191
  mouse.element.viewer.draw();
192
192
 
193
+ //Instant updates
194
+ if (mouse.element.viewer.alwaysdraw) {
195
+ if (mouse.element.viewer.rotating)
196
+ mouse.element.viewer.command('' + mouse.element.viewer.getRotationString());
197
+ else
198
+ mouse.element.viewer.command('' + mouse.element.viewer.getTranslationString());
199
+ }
200
+
193
201
  return false;
194
202
  }
195
203
 
@@ -422,6 +430,7 @@ function BoxViewer(canvas) {
422
430
 
423
431
  //Non-persistant settings
424
432
  this.mode = 'Rotate';
433
+ this.alwaysdraw = false;
425
434
  if (!this.gl) return;
426
435
 
427
436
  //Create the renderers
@@ -67,7 +67,7 @@ var Module = {
67
67
  },
68
68
  locateFile: function(path, prefix) {
69
69
  // Source from github by default
70
- if (path.endsWith("LavaVu.wasm") || path.endsWith("LavaVu.data")) return "https://cdn.jsdelivr.net/gh/lavavu/lavavu.github.io@LAVAVU_VERSION/" + path;
70
+ //if (path.endsWith("LavaVu.wasm") || path.endsWith("LavaVu.data")) return "https://cdn.jsdelivr.net/gh/lavavu/lavavu.github.io@LAVAVU_VERSION/" + path;
71
71
  // otherwise, use the default, the prefix (JS file's dir) + the path
72
72
  return prefix + path;
73
73
  },
lavavu/html/menu.js CHANGED
@@ -320,6 +320,7 @@ function createMenu(viewer, onchange, webglmode, global) {
320
320
  gui.add({"Export GLDB" : function() {window.commands.push('export');}}, 'Export GLDB');
321
321
  } else if (viewer.canvas) {
322
322
  //Server render
323
+ gui.add(viewer, "alwaysdraw");
323
324
  var url = viewer.canvas.imgtarget.baseurl;
324
325
  if (url)
325
326
  gui.add({"Popup Viewer" : function() {window.open(url, "LavaVu", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=1024,height=768");}}, 'Popup Viewer');
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.74/LavaVu-amalgamated.min.js"></script>
30
+ <script async src="https://cdn.jsdelivr.net/gh/lavavu/lavavu.github.io@1.8.75/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
@@ -3899,6 +3899,7 @@ class Viewer(dict):
3899
3899
  if not is_notebook():
3900
3900
  #Open the file in a new browser window
3901
3901
  import webbrowser
3902
+ #TODO: this url doesn't work
3902
3903
  webbrowser.open("/webview.html", new=1, autoraise=True)
3903
3904
  else:
3904
3905
  from IPython.display import display,HTML,IFrame
@@ -3916,6 +3917,26 @@ class Viewer(dict):
3916
3917
  </div>""".format(resolution[0], resolution[1], url)
3917
3918
  display(HTML(html))
3918
3919
 
3920
+ """
3921
+ #EXPERIMENTAL EMSCRIPTEN INLINE VERSION
3922
+ html = control._emscriptencode(menu)
3923
+ ID = str(len(self.webglviews))
3924
+ template = control.emscripten_inline
3925
+ #template = template.replace('---ID---', ID)
3926
+ #template = template.replace('---INIT---', 'initPage(\'{0}\', {1});'.format(ID, "true" if menu else "false"))
3927
+ #template = template.replace('---CONTENT---', control.hiddenhtml)
3928
+ #template = template.replace('---WIDTH---', str(resolution[0]))
3929
+ #template = template.replace('---HEIGHT---', str(resolution[1]))
3930
+ html = template.replace('---SCRIPTS---', html)
3931
+ self.webglviews.append(ID)
3932
+
3933
+ #Display inline in cell
3934
+ #from IPython.display import IFrame
3935
+ #display(IFrame(filename, width=resolution[0], height=resolution[1]))
3936
+ from IPython.display import display,HTML
3937
+ display(HTML(html))
3938
+ """
3939
+
3919
3940
  def webgl(self, filename=None, resolution=(640,480), browser=False, menu=True, **kwargs):
3920
3941
  """
3921
3942
  Create a WebGL page with a 3D interactive view of the active model
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lavavu
3
- Version: 1.8.74
3
+ Version: 1.8.75
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.74)
224
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lavavu/LavaVu/1.8.75)
225
225
 
226
226
  A scientific visualisation tool with a python interface for fast and flexible visual analysis.
227
227
 
@@ -1,4 +1,4 @@
1
- lavavu/lavavu.py,sha256=j710i05alXW92-C73OUb_SEZP19IoKB-NAz40Mf-ss8,201005
1
+ lavavu/lavavu.py,sha256=wTa9yyjDRdqdsmJbIEkj0vyrd0_ZElFbPg6_sjn8vd0,201960
2
2
  lavavu/vutils.py,sha256=L5TpyGlRHThhGChzaKhB70NQd75o3ctyKhSqZTsxceg,5624
3
3
  lavavu/dict.json,sha256=Zb1QnJOsx2DK3M1tRSXRUQ5PjEpOo3SMM3tTNHIKMPs,52722
4
4
  lavavu/server.py,sha256=L-_yPCbNfwYxJCPjDQtr_lxPnDp4oMNVFyxXhBERYrQ,12468
@@ -6,10 +6,10 @@ lavavu/points.py,sha256=jRRtA6CrcA46Y2jUJmkxnIiVoMC5a14xEd_ojhmjhz4,5871
6
6
  lavavu/LavaVuPython.py,sha256=Ki8G9XYHkyfqmxG6BohDWomvSn5eJwG9cHqGzEhZDDs,33131
7
7
  lavavu/tracers.py,sha256=0dB6v9Jg5G-IeZxiVFvbPoTycGvyAQBtgyEAZUmq4XU,4257
8
8
  lavavu/convert.py,sha256=JT73q32YMchuSIkoH_A0cTUVwfns8fWLGjyWp2A5i5M,35514
9
- lavavu/control.py,sha256=MWoYWBhqJbq_1GArE79SQAcZ1rINlvl0bx5nV5XTf8U,65568
9
+ lavavu/control.py,sha256=eNocZPc-2Dz-nSty_KRz_9RzLvbU0clJGuAV3qnzxbU,65841
10
10
  lavavu/__init__.py,sha256=JroZQiUbuVN7ifixk2zNDGlyLGaM8bqfRbw4D_F9qIQ,191
11
11
  lavavu/amalgamate.py,sha256=Xloq1IZ4VUvYiROzQtwKcQIWC65c7EZrdiGVhZdolL8,586
12
- lavavu/_LavaVuPython.cpython-39-darwin.so,sha256=LMFrDeC6txLrVYBoeGJL8mBXMEiUZi9gkibFEJMpeGs,3792416
12
+ lavavu/_LavaVuPython.cpython-39-darwin.so,sha256=l6F5AR0eSevzVtllb0_O_WwzqyVAkBDnpcaf3U12Nyc,3792416
13
13
  lavavu/aserver.py,sha256=SfFvLeDTcx1XtS8fY_HIrDmh3q9HicCBRSAriY5yyOE,12003
14
14
  lavavu/font.bin,sha256=fvi5zkvmq6gh9v3jXedBVuxNJWKmHtbjECzv6eT9wb4,225360
15
15
  lavavu/__main__.py,sha256=EbDetijCjyoiNxmExqnDGoRVs996tSVave5DML9zuMY,235
@@ -26,12 +26,12 @@ lavavu/html/server.js,sha256=b5eNlWWbiEk90n3WARJ1Mh7lmfHM0pOtZfrrmM-wfyc,7099
26
26
  lavavu/html/dat.gui.min.js,sha256=S4_QjoXe4IOpU0f0Sj5jEQLTWPoX9uRl1ohB91jyhuw,56992
27
27
  lavavu/html/OK-min.js,sha256=-4Gc1-dWfxP_w6r9ZOHa8u-X2BlGUoSQbX68lwCxQ3E,39115
28
28
  lavavu/html/emscripten.css,sha256=wkaIJhXaxuMchinQX9Z8c12cJomyvFQMeIZ62WGQEPQ,1813
29
- lavavu/html/drawbox.js,sha256=oaB6bokR4uA2mT9IDLZR7n6P-eDQ86auGbRQHWX423M,34280
30
- lavavu/html/webview.html,sha256=f0WSNwiUOTanA_FHqZixSuydfGYby2UD942nedv2_Vo,1522
31
- lavavu/html/emscripten-template.js,sha256=8OBEPzJYW00-b2d-BUQetFIivIO8PD_ktiCXd_GAEHQ,6133
29
+ lavavu/html/drawbox.js,sha256=SJxFSmWd7QVFI5__66hFkKzLKeqg1JPcx-gJuqdMkXw,34590
30
+ lavavu/html/webview.html,sha256=T3AQXMNZwPWpWfdrBe6hjUyZh98_ds15SBjZc1Y-KwY,1522
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
34
- lavavu/html/menu.js,sha256=Kep88q4kEPXUfoa4xEEOLWieFph8pFnp1UR92d7VRiA,21466
34
+ lavavu/html/menu.js,sha256=WCli3UYcQ7frjNq0aAXNALu33iNiN8lpTYwKZ7pUcn4,21501
35
35
  lavavu/html/baseviewer.js,sha256=u3UhC1At6rMBKmcQ7d2DXTRxQ20wsQkc4lqA-7sL7i4,9567
36
36
  lavavu/shaders/volumeShader.frag,sha256=CIFSfwI8xVZ0ALme2QPMcXWl5yB55WCGnfJZ1Led6TU,16120
37
37
  lavavu/shaders/pointShader.vert,sha256=rnEa8PfIK3kFtFg04Ataf10aWsjEkh1URY2ipV1xTMY,1235
@@ -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.74.dist-info/LICENSE.md,sha256=EhfNgC6BYh5gDEaq4tcrN3S0wbO4CtJO46botJnCF8c,8603
49
- lavavu-1.8.74.dist-info/RECORD,,
50
- lavavu-1.8.74.dist-info/WHEEL,sha256=wGb9ImUAQJUTBINSx_Z49LHYKjFqnKf-yeNRdifsLY4,107
51
- lavavu-1.8.74.dist-info/entry_points.txt,sha256=LC2qXR6EMe45Cb7zGAF99R9HFrAECP6Qkp_YuG6HZB0,44
52
- lavavu-1.8.74.dist-info/top_level.txt,sha256=JptS0k1nlBumjLs_0hITr3_XUJhxqvKBXD2jGho3E3A,7
53
- lavavu-1.8.74.dist-info/METADATA,sha256=KBDh8ndRnRNa9f90EFhmqkshLuJitRahywEwJdcwpzg,18238
48
+ lavavu-1.8.75.dist-info/LICENSE.md,sha256=EhfNgC6BYh5gDEaq4tcrN3S0wbO4CtJO46botJnCF8c,8603
49
+ lavavu-1.8.75.dist-info/RECORD,,
50
+ lavavu-1.8.75.dist-info/WHEEL,sha256=9pNdQPFvBqtyjygr-ufETb3aWCkPwzIHIZFTeqcm3gw,107
51
+ lavavu-1.8.75.dist-info/entry_points.txt,sha256=LC2qXR6EMe45Cb7zGAF99R9HFrAECP6Qkp_YuG6HZB0,44
52
+ lavavu-1.8.75.dist-info/top_level.txt,sha256=JptS0k1nlBumjLs_0hITr3_XUJhxqvKBXD2jGho3E3A,7
53
+ lavavu-1.8.75.dist-info/METADATA,sha256=vbAX7HwcXmqSTfS-IoCW0sXO_FadSG5zig8-kmH-Kfk,18238
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.1)
2
+ Generator: setuptools (70.3.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp39-cp39-macosx_11_0_arm64
5
5