lavavu 1.9.5__cp312-cp312-manylinux_2_28_x86_64.whl → 1.9.6__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/html/menu.js +9 -4
- lavavu/html/webview.html +1 -1
- lavavu/lavavu.py +48 -43
- lavavu/osmesa/_LavaVuPython.cpython-312-x86_64-linux-gnu.so +0 -0
- {lavavu-1.9.5.dist-info → lavavu-1.9.6.dist-info}/METADATA +2 -2
- {lavavu-1.9.5.dist-info → lavavu-1.9.6.dist-info}/RECORD +11 -11
- {lavavu-1.9.5.dist-info → lavavu-1.9.6.dist-info}/WHEEL +0 -0
- {lavavu-1.9.5.dist-info → lavavu-1.9.6.dist-info}/entry_points.txt +0 -0
- {lavavu-1.9.5.dist-info → lavavu-1.9.6.dist-info}/licenses/LICENSE.md +0 -0
- {lavavu-1.9.5.dist-info → lavavu-1.9.6.dist-info}/top_level.txt +0 -0
Binary file
|
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.9.
|
30
|
+
<script async src="https://cdn.jsdelivr.net/gh/lavavu/lavavu.github.io@1.9.6/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
@@ -4187,7 +4187,7 @@ class Viewer(dict):
|
|
4187
4187
|
from IPython.display import display,HTML,Javascript
|
4188
4188
|
display(Javascript(js + code))
|
4189
4189
|
|
4190
|
-
def video(self, filename="", resolution=(0,0), fps=30, quality=
|
4190
|
+
def video(self, filename="", resolution=(0,0), fps=30, quality=2, encoder="h264", embed=False, player=None, options={}, **kwargs):
|
4191
4191
|
"""
|
4192
4192
|
Record and show the generated video inline within an ipython notebook.
|
4193
4193
|
|
@@ -4214,6 +4214,9 @@ class Viewer(dict):
|
|
4214
4214
|
If omitted will use default settings, can fine tune settings in kwargs
|
4215
4215
|
encoder : str
|
4216
4216
|
Name of encoder to use, eg: "h264" (default), "mpeg"
|
4217
|
+
embed : bool
|
4218
|
+
Set to true to embed the video file rather than link to url
|
4219
|
+
Not recommended for large videos, default is False
|
4217
4220
|
player : dict
|
4218
4221
|
Args to pass to the player when the video is finished, eg:
|
4219
4222
|
{"width" : 800, "height", 400, "params": "controls autoplay"}
|
@@ -4228,12 +4231,11 @@ class Viewer(dict):
|
|
4228
4231
|
recorder : Video(object)
|
4229
4232
|
Context manager object that controls the video recording
|
4230
4233
|
"""
|
4231
|
-
return Video(self, filename, resolution, fps, quality, encoder, player, options, **kwargs)
|
4234
|
+
return Video(self, filename, resolution, fps, quality, encoder, embed, player, options, **kwargs)
|
4232
4235
|
|
4233
|
-
def video_steps(self, filename="", start=0, end=0, resolution=(0,0), fps=30, quality=2, encoder="h264", player=None, options={}, **kwargs):
|
4236
|
+
def video_steps(self, filename="", start=0, end=0, resolution=(0,0), fps=30, quality=2, encoder="h264", embed=False, player=None, options={}, **kwargs):
|
4237
|
+
my_func.__doc__
|
4234
4238
|
"""
|
4235
|
-
TODO: Fix to use pyAV
|
4236
|
-
|
4237
4239
|
Record a video of the model by looping through all time steps
|
4238
4240
|
|
4239
4241
|
Shows the generated video inline within an ipython notebook.
|
@@ -4245,21 +4247,12 @@ class Viewer(dict):
|
|
4245
4247
|
|
4246
4248
|
Parameters
|
4247
4249
|
----------
|
4248
|
-
filename : str
|
4249
|
-
Name of the file to save, if not provided a default will be used
|
4250
4250
|
start : int
|
4251
4251
|
First timestep to record, if not specified will use first available
|
4252
4252
|
end : int
|
4253
4253
|
Last timestep to record, if not specified will use last available
|
4254
|
-
|
4255
|
-
|
4256
|
-
fps : int
|
4257
|
-
Frames to output per second of video
|
4258
|
-
quality : int
|
4259
|
-
Encoding quality, 1=low, 2=medium(default), 3=high, higher quality reduces
|
4260
|
-
encoding artifacts at cost of larger file size
|
4261
|
-
**kwargs :
|
4262
|
-
Any additional keyword args will also be passed as options to the encoder
|
4254
|
+
|
4255
|
+
All other parameters same as video()
|
4263
4256
|
"""
|
4264
4257
|
|
4265
4258
|
try:
|
@@ -4267,7 +4260,7 @@ class Viewer(dict):
|
|
4267
4260
|
if end == 0: end = len(steps)
|
4268
4261
|
steps = steps[start:end]
|
4269
4262
|
from tqdm.notebook import tqdm
|
4270
|
-
with Video(self, filename, resolution, fps, quality, encoder, player, options, **kwargs):
|
4263
|
+
with Video(self, filename, resolution, fps, quality, encoder, embed, player, options, **kwargs):
|
4271
4264
|
for s in tqdm(steps, desc='Rendering loop'):
|
4272
4265
|
self.timestep(s)
|
4273
4266
|
self.render()
|
@@ -5415,37 +5408,44 @@ def player(filename, params="controls autoplay loop", **kwargs):
|
|
5415
5408
|
|
5416
5409
|
if is_notebook():
|
5417
5410
|
from IPython.display import display,HTML,Video,Javascript
|
5418
|
-
import uuid
|
5419
|
-
vid = 'video_' + str(uuid.uuid4())[:8]
|
5420
5411
|
|
5421
5412
|
# Fallback - replace url on gadi and similar jupyterhub installs with
|
5422
5413
|
# fixed working directory that doesn't match notebook dir
|
5423
5414
|
# check the video tag url and remove subpath on 404 error
|
5424
|
-
|
5425
|
-
|
5426
|
-
|
5427
|
-
|
5428
|
-
|
5429
|
-
|
5430
|
-
|
5431
|
-
|
5432
|
-
|
5433
|
-
|
5434
|
-
|
5415
|
+
onerror = """{
|
5416
|
+
let url = this.src;
|
5417
|
+
console.log('Error in video url: ' + url);
|
5418
|
+
var urlp = new window.URL(url);
|
5419
|
+
let toppath = '/files/home/';
|
5420
|
+
let startidx = urlp.pathname.indexOf(toppath);
|
5421
|
+
if (startidx < 0) {
|
5422
|
+
toppath = '/files/';
|
5423
|
+
startidx = urlp.pathname.indexOf(toppath);
|
5424
|
+
}
|
5425
|
+
if (startidx >= 0) {
|
5426
|
+
let filename = urlp.pathname.split('/').pop();
|
5427
|
+
let base = urlp.pathname.substring(0, startidx+toppath.length);
|
5428
|
+
urlp.pathname = base + filename;
|
5429
|
+
if (url != urlp.href) {
|
5430
|
+
console.log('Replaced video url: ' + urlp.href);
|
5431
|
+
this.src = urlp.href;
|
5435
5432
|
//Also fix download link
|
5436
|
-
document.getElementById('link_
|
5437
|
-
|
5438
|
-
|
5439
|
-
|
5440
|
-
}
|
5441
|
-
|
5442
|
-
|
5443
|
-
|
5444
|
-
|
5445
|
-
display(Video(url=filename, html_attributes=f'id="{vid}" onerror="video_error(this)"' + params, **kwargs))
|
5433
|
+
let link = document.getElementById('link_' + this.id);
|
5434
|
+
if (link) link.href = urlp.href;
|
5435
|
+
}
|
5436
|
+
}
|
5437
|
+
}"""
|
5438
|
+
|
5439
|
+
if "embed" in kwargs:
|
5440
|
+
#Not needed if embedding
|
5441
|
+
onerror = ""
|
5446
5442
|
|
5447
|
-
#
|
5448
|
-
|
5443
|
+
#Display player and download link
|
5444
|
+
import uuid
|
5445
|
+
vid = 'video_' + str(uuid.uuid4())[:8]
|
5446
|
+
filename = os.path.relpath(filename)
|
5447
|
+
display(Video(filename=filename, html_attributes=f'id="{vid}" onerror="{onerror}" ' + params, **kwargs),
|
5448
|
+
HTML(f'<a id="link_{vid}" href="{filename}" download>Download Video</a>'))
|
5449
5449
|
|
5450
5450
|
#Class for managing video animation recording
|
5451
5451
|
class Video(object):
|
@@ -5465,7 +5465,7 @@ class Video(object):
|
|
5465
5465
|
... lv.rotate('y', 10) # doctest: +SKIP
|
5466
5466
|
... lv.render() # doctest: +SKIP
|
5467
5467
|
"""
|
5468
|
-
def __init__(self, viewer, filename="output.mp4", resolution=(0,0), framerate=30, quality=2, encoder="h264", player=None, options={}, **kwargs):
|
5468
|
+
def __init__(self, viewer, filename="output.mp4", resolution=(0,0), framerate=30, quality=2, encoder="h264", embed=False, player=None, options={}, **kwargs):
|
5469
5469
|
"""
|
5470
5470
|
Record and show the generated video inline within an ipython notebook.
|
5471
5471
|
|
@@ -5492,6 +5492,9 @@ class Video(object):
|
|
5492
5492
|
Video resolution in pixels [x,y]
|
5493
5493
|
encoder : str
|
5494
5494
|
Name of encoder to use, eg: "h264" (default), "mpeg"
|
5495
|
+
embed : bool
|
5496
|
+
Set to true to embed the video file rather than link to url
|
5497
|
+
Not recommended for large videos, default is False
|
5495
5498
|
player : dict
|
5496
5499
|
Args to pass to the player when the video is finished, eg:
|
5497
5500
|
{"width" : 800, "height", 400, "params": "controls autoplay"}
|
@@ -5526,6 +5529,8 @@ class Video(object):
|
|
5526
5529
|
self.player = {"width": self.resolution[0]//2, "height": self.resolution[1]//2}
|
5527
5530
|
else:
|
5528
5531
|
self.player = {}
|
5532
|
+
if embed:
|
5533
|
+
self.player["embed"] = True
|
5529
5534
|
self.encoder = encoder
|
5530
5535
|
self.options = options
|
5531
5536
|
#Also include extra args
|
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: lavavu
|
3
|
-
Version: 1.9.
|
3
|
+
Version: 1.9.6
|
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
|
[](https://github.com/lavavu/LavaVu/actions?query=workflow:Test)
|
225
225
|
[](https://github.com/lavavu/LavaVu/actions?query=workflow:Deploy)
|
226
226
|
[](https://zenodo.org/badge/latestdoi/45163055)
|
227
|
-
[](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.
|
227
|
+
[](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.6)
|
228
228
|
|
229
229
|
A scientific visualisation tool with a python interface for fast and flexible visual analysis.
|
230
230
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
lavavu/LavaVuPython.py,sha256=ixhceiAr0gGGfCe3d2cY0IIgS4hbgoYJGa_RfgAmmrU,33207
|
2
|
-
lavavu/_LavaVuPython.cpython-312-x86_64-linux-gnu.so,sha256=
|
2
|
+
lavavu/_LavaVuPython.cpython-312-x86_64-linux-gnu.so,sha256=tQ-KfoWrn-cofmTUJckdxPtucxFAroj_29WyjOEqlOs,73627680
|
3
3
|
lavavu/__init__.py,sha256=JroZQiUbuVN7ifixk2zNDGlyLGaM8bqfRbw4D_F9qIQ,191
|
4
4
|
lavavu/__main__.py,sha256=EbDetijCjyoiNxmExqnDGoRVs996tSVave5DML9zuMY,235
|
5
5
|
lavavu/amalgamate.py,sha256=Xloq1IZ4VUvYiROzQtwKcQIWC65c7EZrdiGVhZdolL8,586
|
@@ -8,7 +8,7 @@ lavavu/control.py,sha256=s32rtLPXXYtxpeXd6-iHdupmaMTJ3KhK6Vq-CLjf9OQ,66755
|
|
8
8
|
lavavu/convert.py,sha256=tbYRjLE2l1hI4d6tsW41Lia1JXmrWSc0-JAYCiMrjys,35516
|
9
9
|
lavavu/dict.json,sha256=lsZEHc7Bb6_lt7tkSBQMgkq7AEn_2hnhWzzdokmvIY8,52729
|
10
10
|
lavavu/font.bin,sha256=fvi5zkvmq6gh9v3jXedBVuxNJWKmHtbjECzv6eT9wb4,225360
|
11
|
-
lavavu/lavavu.py,sha256=
|
11
|
+
lavavu/lavavu.py,sha256=I64ioPwTN1eyZcZEaF9RfdxncfLuihl-7VqqqJDFLCw,218528
|
12
12
|
lavavu/points.py,sha256=jRRtA6CrcA46Y2jUJmkxnIiVoMC5a14xEd_ojhmjhz4,5871
|
13
13
|
lavavu/server.py,sha256=L-_yPCbNfwYxJCPjDQtr_lxPnDp4oMNVFyxXhBERYrQ,12468
|
14
14
|
lavavu/tracers.py,sha256=-NwdBAj5vYWmLt4NE0gWl36SQShQhICR7vBE4rzNOFI,8488
|
@@ -27,14 +27,14 @@ lavavu/html/emscripten.css,sha256=wkaIJhXaxuMchinQX9Z8c12cJomyvFQMeIZ62WGQEPQ,18
|
|
27
27
|
lavavu/html/favicon.ico,sha256=OrIWwvxOSnOCuynrGRUyEIVQng0ZwA9Rrz89S9eiog0,1150
|
28
28
|
lavavu/html/gl-matrix-min.js,sha256=qfhP_dWP2bTSL1ibMX2IYw7KDXBW2IhgpfhvU9kKjhM,23143
|
29
29
|
lavavu/html/gui.css,sha256=PRDLsYwM6cgLC9zZsEAG0dnnSd-HYH6oSEfsdEBkuxk,582
|
30
|
-
lavavu/html/menu.js,sha256=
|
30
|
+
lavavu/html/menu.js,sha256=42h-BCnrmEpW4IdZRKC_FIXUVczJP0sm4ciZ2ccfs-k,21630
|
31
31
|
lavavu/html/server.js,sha256=b5eNlWWbiEk90n3WARJ1Mh7lmfHM0pOtZfrrmM-wfyc,7099
|
32
32
|
lavavu/html/stats.min.js,sha256=iiwrLW4SUBhrzWrfW2VZP_9mowHX-Ks1EKORFv4EHdE,1965
|
33
33
|
lavavu/html/styles.css,sha256=68pH0fWIc0mP1puFbsIg0ET9G1ujd40Aiqfx4phuzjs,2983
|
34
34
|
lavavu/html/webview-template.html,sha256=Mh9sOd6YEOiwJa_fPwyY4s9AdCuvsaHKLwVipVk_4Go,1530
|
35
|
-
lavavu/html/webview.html,sha256=
|
35
|
+
lavavu/html/webview.html,sha256=8eilGjX8y_I5OjCvTm-ZAQDNOSCaT1yvogKFqK4lCS0,1521
|
36
36
|
lavavu/osmesa/LavaVuPython.py,sha256=ixhceiAr0gGGfCe3d2cY0IIgS4hbgoYJGa_RfgAmmrU,33207
|
37
|
-
lavavu/osmesa/_LavaVuPython.cpython-312-x86_64-linux-gnu.so,sha256=
|
37
|
+
lavavu/osmesa/_LavaVuPython.cpython-312-x86_64-linux-gnu.so,sha256=7V-mYcnt8BJaoCdmkBz9U5I_2iAT9MGZziXPhAukIkw,73924497
|
38
38
|
lavavu/osmesa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
39
|
lavavu/shaders/default.frag,sha256=5XLYVfLwzN0sFT3aMYGmxbyquA_cmndp55YCOuy1t4E,180
|
40
40
|
lavavu/shaders/default.vert,sha256=3xKybexF39UGsESMLQQcqHlE1MgLCDEXUMLz4sr5blQ,352
|
@@ -57,9 +57,9 @@ lavavu.libs/libpcre2-8-516f4c9d.so.0.7.1,sha256=IcbljW_oKuAVlrAwKz8qtRZxfi1sQH_i
|
|
57
57
|
lavavu.libs/libselinux-d0805dcb.so.1,sha256=iYGaLO-LIy5-WEihMiXHpeJUXyq56DDqGU49JbpfTu4,195097
|
58
58
|
lavavu.libs/libtinfo-3a2cb85b.so.6.1,sha256=6Co83bxdB4J-rBU5l0p_7HpGlU46RG2EDnf-LpF5kBY,194041
|
59
59
|
lavavu.libs/libzstd-76b78bac.so.1.4.4,sha256=F2-A6yQ3AA2N0vHZe-81OfEUOcwgjjWiOnYAxk2Kflc,686073
|
60
|
-
lavavu-1.9.
|
61
|
-
lavavu-1.9.
|
62
|
-
lavavu-1.9.
|
63
|
-
lavavu-1.9.
|
64
|
-
lavavu-1.9.
|
65
|
-
lavavu-1.9.
|
60
|
+
lavavu-1.9.6.dist-info/METADATA,sha256=EHgjIlNax60denK4kKXeAJziT1zFhX8e-9OqQUVd9WE,17877
|
61
|
+
lavavu-1.9.6.dist-info/WHEEL,sha256=hINYM2auGRUEro-OmY-yLZtRBiJS1MSLOxe7fAYQxZw,113
|
62
|
+
lavavu-1.9.6.dist-info/entry_points.txt,sha256=LC2qXR6EMe45Cb7zGAF99R9HFrAECP6Qkp_YuG6HZB0,44
|
63
|
+
lavavu-1.9.6.dist-info/top_level.txt,sha256=JptS0k1nlBumjLs_0hITr3_XUJhxqvKBXD2jGho3E3A,7
|
64
|
+
lavavu-1.9.6.dist-info/RECORD,,
|
65
|
+
lavavu-1.9.6.dist-info/licenses/LICENSE.md,sha256=EhfNgC6BYh5gDEaq4tcrN3S0wbO4CtJO46botJnCF8c,8603
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|