lavavu 1.9.7__cp313-cp313-macosx_10_13_x86_64.whl → 1.9.8__cp313-cp313-macosx_10_13_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.
Binary file
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/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.9.7/LavaVu-amalgamated.min.js"></script>
30
+ <script async src="https://cdn.jsdelivr.net/gh/lavavu/lavavu.github.io@1.9.8/LavaVu-amalgamated.min.js"></script>
31
31
  <!--script src="dat.gui.min.js"></script>
32
32
  <script src="OK-min.js"></script>
33
33
 
@@ -8,7 +8,6 @@ uniform mat4 uMVMatrix;
8
8
  uniform mat4 uPMatrix;
9
9
  uniform mat4 uNMatrix;
10
10
 
11
- uniform vec4 uColour;
12
11
  uniform vec4 uLightPos;
13
12
 
14
13
  out vec4 vColour;
@@ -26,11 +25,10 @@ void main(void)
26
25
 
27
26
  vNormal = normalize(mat3(uNMatrix) * aVertexNormal);
28
27
 
29
- if (uColour.a > 0.0)
30
- vColour = uColour;
31
- else
32
- vColour = aVertexColour;
33
-
28
+ //This shader only applies attribute colour
29
+ //uColour is set for other/custom shaders
30
+ //Note uOpacity is "alpha" prop, "oapcity" is passed via attrib
31
+ vColour = aVertexColour;
34
32
  vTexCoord = aVertexTexCoord;
35
33
  vFlatColour = vColour;
36
34
  vVertex = aVertexPosition;
lavavu/tracers.py CHANGED
@@ -24,7 +24,7 @@ def random_particles(count, lowerbound=[0,0,0], upperbound=[1,1,1], dims=3):
24
24
  return numpy.stack(p).T
25
25
 
26
26
  class Tracers():
27
- def __init__(self, grid, count=1000, lowerbound=None, upperbound=None, limit=None, age=4, respawn_chance=0.2, speed_multiply=1.0, height=0.0, viewer=None):
27
+ def __init__(self, grid, count=1000, lowerbound=None, upperbound=None, limit=None, age=4, respawn_chance=0.2, speed_multiply=1.0, height=0.0, label='', viewer=None):
28
28
  """
29
29
  Seed random particles into a vector field and trace their positions
30
30
 
@@ -52,6 +52,8 @@ class Tracers():
52
52
  Speed multiplier, scaling factor for the velocity taken from the vector values
53
53
  height : float
54
54
  A fixed height value, all positions will be given this height as their Z component
55
+ label : str
56
+ Name label prefix for the visualisation objects when plotting
55
57
  viewer : lavavu.Viewer
56
58
  Viewer object for plotting functions
57
59
  """
@@ -100,6 +102,7 @@ class Tracers():
100
102
  self.speed_multiply = speed_multiply
101
103
  self.height = height
102
104
 
105
+ self.label = label
103
106
  self.lv = viewer
104
107
  self.points = None
105
108
  self.arrows = None
@@ -157,8 +160,8 @@ class Tracers():
157
160
  self.speed[r] = 0.0
158
161
 
159
162
  if self.lv:
160
- positions = self.positions
161
- if self.dims == 2 and self.height != 0:
163
+ positions = self.get_positions()
164
+ if positions.shape[1] == 2 and self.height != 0:
162
165
  #Convert to 3d and set z coord to height
163
166
  shape = list(positions.shape)
164
167
  shape[-1] = 3
@@ -180,15 +183,25 @@ class Tracers():
180
183
  if len(self.tracers["colourmap"]):
181
184
  self.tracers.values(self.speed)
182
185
 
186
+ def get_positions(self):
187
+ """
188
+ This funcion can be overridden if positions need to be transformed
189
+ in any way before plotting, eg: plotting on spherical earth model
190
+ """
191
+ return self.positions
192
+
193
+ def prefix(self):
194
+ return self.label + '_' if len(self.label) else ''
195
+
183
196
  def plot_points(self, **kwargs):
184
197
  if self.lv is not None and self.points is None:
185
- self.points = self.lv.points('tracer_points', **kwargs)
198
+ self.points = self.lv.points(self.prefix() + 'tracer_points', **kwargs)
186
199
 
187
200
  def plot_arrows(self, **kwargs):
188
201
  if self.lv is not None and self.arrows is None:
189
- self.arrows = self.lv.vectors('tracer_arrows', **kwargs)
202
+ self.arrows = self.lv.vectors(self.prefix() + 'tracer_arrows', **kwargs)
190
203
 
191
204
  def plot_tracers(self, **kwargs):
192
205
  if self.lv is not None and self.tracers is None:
193
- self.tracers = self.lv.tracers('tracers', dims=self.count, limit=self.limit, **kwargs)
206
+ self.tracers = self.lv.tracers(self.prefix() + 'tracers', dims=self.count, limit=self.limit, **kwargs)
194
207
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lavavu
3
- Version: 1.9.7
3
+ Version: 1.9.8
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
@@ -224,7 +224,7 @@ Dynamic: license-file
224
224
  [![Build Status](https://github.com/lavavu/LavaVu/workflows/Test/badge.svg)](https://github.com/lavavu/LavaVu/actions?query=workflow:Test)
225
225
  [![Deploy Status](https://github.com/lavavu/LavaVu/workflows/Deploy/badge.svg?branch=1.7.3)](https://github.com/lavavu/LavaVu/actions?query=workflow:Deploy)
226
226
  [![DOI](https://zenodo.org/badge/45163055.svg)](https://zenodo.org/badge/latestdoi/45163055)
227
- [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.7)
227
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.8)
228
228
 
229
229
  A scientific visualisation tool with a python interface for fast and flexible visual analysis.
230
230
 
@@ -1,15 +1,21 @@
1
+ lavavu-1.9.8.dist-info/RECORD,,
2
+ lavavu-1.9.8.dist-info/WHEEL,sha256=0rn5ODYhsjI3KEHrk9RXNWLZT7Rowo6wA0Jh2iAIJLk,138
3
+ lavavu-1.9.8.dist-info/entry_points.txt,sha256=LC2qXR6EMe45Cb7zGAF99R9HFrAECP6Qkp_YuG6HZB0,44
4
+ lavavu-1.9.8.dist-info/top_level.txt,sha256=JptS0k1nlBumjLs_0hITr3_XUJhxqvKBXD2jGho3E3A,7
5
+ lavavu-1.9.8.dist-info/METADATA,sha256=Bt4QlWtORr3Qydbw-2b9fbksdAAVzpjrtokM6hOaGBk,17877
6
+ lavavu-1.9.8.dist-info/licenses/LICENSE.md,sha256=EhfNgC6BYh5gDEaq4tcrN3S0wbO4CtJO46botJnCF8c,8603
1
7
  lavavu/lavavu.py,sha256=v7tXwp6gQzu1F05hHyALng8FXznv4rVwdCJ3sO65O8o,221223
2
8
  lavavu/vutils.py,sha256=6Vm_xl1bp9mWlfk7jgLDwbRw-tdE_oxin77YkLel3_4,5437
3
- lavavu/dict.json,sha256=lsZEHc7Bb6_lt7tkSBQMgkq7AEn_2hnhWzzdokmvIY8,52729
9
+ lavavu/dict.json,sha256=EcJsoHsiHDDmM8FGuBRF6eOG2nMr-Pda3sxE6v6KB80,52952
4
10
  lavavu/server.py,sha256=L-_yPCbNfwYxJCPjDQtr_lxPnDp4oMNVFyxXhBERYrQ,12468
5
11
  lavavu/points.py,sha256=jRRtA6CrcA46Y2jUJmkxnIiVoMC5a14xEd_ojhmjhz4,5871
6
12
  lavavu/LavaVuPython.py,sha256=ixhceiAr0gGGfCe3d2cY0IIgS4hbgoYJGa_RfgAmmrU,33207
7
- lavavu/tracers.py,sha256=-NwdBAj5vYWmLt4NE0gWl36SQShQhICR7vBE4rzNOFI,8488
13
+ lavavu/tracers.py,sha256=e10H8evUH7V-XUSkHjfoakaA4SfeuQ8-gWzfa86RGzQ,8997
8
14
  lavavu/convert.py,sha256=tbYRjLE2l1hI4d6tsW41Lia1JXmrWSc0-JAYCiMrjys,35516
9
15
  lavavu/control.py,sha256=s32rtLPXXYtxpeXd6-iHdupmaMTJ3KhK6Vq-CLjf9OQ,66755
10
16
  lavavu/__init__.py,sha256=JroZQiUbuVN7ifixk2zNDGlyLGaM8bqfRbw4D_F9qIQ,191
11
17
  lavavu/amalgamate.py,sha256=Xloq1IZ4VUvYiROzQtwKcQIWC65c7EZrdiGVhZdolL8,586
12
- lavavu/_LavaVuPython.cpython-313-darwin.so,sha256=j1lPuAlgnAy78jyhHfuU-hksFxCk1agDGG2i2kKEi5I,4125544
18
+ lavavu/_LavaVuPython.cpython-313-darwin.so,sha256=0UMd-eg3cdH0NYZt4B9-Lomp5JuwQhVUdh_pffE1clk,4125776
13
19
  lavavu/aserver.py,sha256=SfFvLeDTcx1XtS8fY_HIrDmh3q9HicCBRSAriY5yyOE,12003
14
20
  lavavu/font.bin,sha256=fvi5zkvmq6gh9v3jXedBVuxNJWKmHtbjECzv6eT9wb4,225360
15
21
  lavavu/__main__.py,sha256=EbDetijCjyoiNxmExqnDGoRVs996tSVave5DML9zuMY,235
@@ -27,7 +33,7 @@ lavavu/html/dat.gui.min.js,sha256=S4_QjoXe4IOpU0f0Sj5jEQLTWPoX9uRl1ohB91jyhuw,56
27
33
  lavavu/html/OK-min.js,sha256=-4Gc1-dWfxP_w6r9ZOHa8u-X2BlGUoSQbX68lwCxQ3E,39115
28
34
  lavavu/html/emscripten.css,sha256=wkaIJhXaxuMchinQX9Z8c12cJomyvFQMeIZ62WGQEPQ,1813
29
35
  lavavu/html/drawbox.js,sha256=SJxFSmWd7QVFI5__66hFkKzLKeqg1JPcx-gJuqdMkXw,34590
30
- lavavu/html/webview.html,sha256=Tjv9TWx1k6ovHY8xxaG_NGwHwuiDC0Hz5Npm39afHAU,1521
36
+ lavavu/html/webview.html,sha256=f67d1NMRiSRYYjbSEtwpzzouzfK42EamrqEfoBPrh7k,1521
31
37
  lavavu/html/emscripten-template.js,sha256=h63mzl3Lv7aQT1wMOiOucPOvHTJjpKkzsL-SFVYaZlA,6135
32
38
  lavavu/html/draw.js,sha256=57LlHlYRh0IvWVwzGDnF6PaCxYLzokpokLNCuZlG1ds,84108
33
39
  lavavu/html/dat-gui-light-theme.css,sha256=uPhvJs-1IAsdxudItyOw8lZy8Hrih0zmFM1u-xRwZ-M,1142
@@ -41,15 +47,9 @@ lavavu/shaders/lineShader.frag,sha256=2PQBMcb149jVKnsBhTvU1vf94x91O0kAdOBTSs8OpG
41
47
  lavavu/shaders/fontShader.frag,sha256=clgomy2lu-1u7w0GwFd0BNU_L3-SkYt8zv03N5ciJug,351
42
48
  lavavu/shaders/triShader.frag,sha256=SkPatq2s7Osa5o7U3lg-7We8ldY0oHZHCLuQjRY4Vgk,4601
43
49
  lavavu/shaders/default.vert,sha256=3xKybexF39UGsESMLQQcqHlE1MgLCDEXUMLz4sr5blQ,352
44
- lavavu/shaders/triShader.vert,sha256=H7rTS-WO5QiT9uP1ClhufQM8minSWknJ9UvKAEVnzRU,1078
50
+ lavavu/shaders/triShader.vert,sha256=U_G_74Jybaw20-PI-NDgaLDDfxGhURHMxdvNYXEkBjc,1156
45
51
  lavavu/shaders/lineShader.vert,sha256=5HDJMphXW438yMc0I2NtBdnvF6uXrOUac9hjk3S7mfk,501
46
52
  lavavu/shaders/fontShader.vert,sha256=yCBmRugaPUeUQUdIh62-AK_5KELiJqVS2M82iyIqPwo,290
47
53
  lavavu/shaders/pointShader.frag,sha256=3zREBdsimlL9fAXBPjhzomGaFUWmlG_QYkhwMTVURHQ,3291
48
54
  lavavu/shaders/volumeShader.vert,sha256=uGdQjGqi7V5kE6V7nxymfugtU4cbf6u570xBy13RgmY,78
49
55
  lavavu/shaders/default.frag,sha256=5XLYVfLwzN0sFT3aMYGmxbyquA_cmndp55YCOuy1t4E,180
50
- lavavu-1.9.7.dist-info/RECORD,,
51
- lavavu-1.9.7.dist-info/WHEEL,sha256=EadyDhtF7yHU6-5K1AY6ZePu1U4S5zNvoAlzxLmtPq4,138
52
- lavavu-1.9.7.dist-info/entry_points.txt,sha256=LC2qXR6EMe45Cb7zGAF99R9HFrAECP6Qkp_YuG6HZB0,44
53
- lavavu-1.9.7.dist-info/top_level.txt,sha256=JptS0k1nlBumjLs_0hITr3_XUJhxqvKBXD2jGho3E3A,7
54
- lavavu-1.9.7.dist-info/METADATA,sha256=pDV89WKg6njzJArxsKbduk1rcj2NHSb75oV1lUtNx30,17877
55
- lavavu-1.9.7.dist-info/licenses/LICENSE.md,sha256=EhfNgC6BYh5gDEaq4tcrN3S0wbO4CtJO46botJnCF8c,8603
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.4.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp313-cp313-macosx_10_13_x86_64
5
5
  Generator: delocate 0.13.0