vuer 0.0.24__py3-none-any.whl → 0.0.25__py3-none-any.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.

Potentially problematic release.


This version of vuer might be problematic. Click here for more details.

vuer/__init__.py CHANGED
@@ -1 +1,13 @@
1
- from vuer.server import Vuer, VuerSession
1
+ # Conditional import for the pyScript.
2
+ try:
3
+ from vuer.server import Vuer, VuerSession
4
+ except ImportError:
5
+ print("""
6
+ By default, vuer does not include the aiohttp and aiohttp-cors packages
7
+ to enable installation in PyScript environments. For most usecase, you
8
+ should install with the [all] option to include all dependencies.
9
+
10
+ pip install 'vuer[all]'
11
+
12
+ Use `'` if using zsh since `[` is a special character.
13
+ """)
Binary file
Binary file
vuer/base.py CHANGED
@@ -1,11 +1,12 @@
1
1
  import asyncio
2
2
  import traceback
3
+ import aiohttp_cors
4
+
3
5
  from collections.abc import Coroutine
4
6
  from concurrent.futures import CancelledError
5
7
  from functools import partial
6
8
  from pathlib import Path
7
9
 
8
- import aiohttp_cors
9
10
  from aiohttp import web
10
11
  from params_proto import Proto
11
12
 
@@ -25,8 +26,8 @@ async def websocket_handler(request, handler, **ws_kwargs):
25
26
  except ConnectionResetError:
26
27
  print("Connection reset")
27
28
 
28
- except CancelledError as exp:
29
- print(f"WebSocket Canceled")
29
+ except CancelledError:
30
+ print("WebSocket Canceled")
30
31
 
31
32
  except Exception as exp:
32
33
  print(f"Error:\n{exp}\n{traceback.print_exc()}")
@@ -51,7 +52,7 @@ class Server:
51
52
  cors = Proto(help="Enable CORS", default="*")
52
53
  port = Proto(env="PORT", default=8012)
53
54
 
54
- WEBSOCKET_MAX_SIZE = 2**28
55
+ WEBSOCKET_MAX_SIZE = 2 ** 28
55
56
 
56
57
  def __post_init__(self):
57
58
  self.app = web.Application()
@@ -67,10 +68,10 @@ class Server:
67
68
  self.cors_context = aiohttp_cors.setup(self.app, defaults=cors_config)
68
69
 
69
70
  def _route(
70
- self,
71
- path: str,
72
- handler: callable,
73
- method: str = "GET",
71
+ self,
72
+ path: str,
73
+ handler: callable,
74
+ method: str = "GET",
74
75
  ):
75
76
  route = self.app.router.add_resource(path).add_route(method, handler)
76
77
  self.cors_context.add(route)
@@ -16,6 +16,10 @@ class Scene(BlockElement):
16
16
  bgChildren=None,
17
17
  # default to y-up to be consistent with three.js. Blender uses z-up though.
18
18
  up=[0, 1, 0],
19
+ # background=None,
20
+ # bgLight=None,
21
+ # bgDark=None,
22
+ # grid=True,
19
23
  **kwargs,
20
24
  ):
21
25
  super().__init__(*children, up=up, **kwargs)
@@ -272,16 +276,22 @@ class Fog(SceneElement):
272
276
  Fog is a scene element that adds fog to the scene. This
273
277
  can be used to approximate depth.
274
278
 
275
- Arguments:
276
- args: color, near, far
279
+ Args:
280
+ color: The color of the fog.
281
+ near: The distance to the near plane.
282
+ far: The distance to the far plane.
277
283
 
278
284
  Example Usage:
279
- Fog(args=[0xcccccc, 10, 15])
280
285
 
286
+ Fog(color="green", near=3, far=7)
281
287
  """
282
288
 
283
289
  tag = "fog"
284
290
 
291
+ def __init__(self, *, children=None, color=None, near=None, far=None, **kwargs):
292
+ assert children is None, "Fog does not support children."
293
+ super().__init__(attach="fog", key="fog", color=color, near=near, far=far, **kwargs)
294
+
285
295
 
286
296
  class Wireframe(SceneElement):
287
297
  tag = "Wireframe"
@@ -1,39 +1,46 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vuer
3
- Version: 0.0.24
3
+ Version: 0.0.25
4
4
  Home-page: https://github.com/geyang/vuer
5
5
  Author: Ge Yang<ge.ike.yang@gmail.com>
6
6
  Author-email: ge.ike.yang@gmail.com
7
7
  License: MIT
8
8
  Classifier: Development Status :: 3 - Alpha
9
9
  Classifier: Programming Language :: Python
10
- Requires-Python: >=3.8.6
10
+ Requires-Python: >=3.7
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
- Requires-Dist: aiohttp
14
- Requires-Dist: aiohttp-cors
15
13
  Requires-Dist: killport
16
14
  Requires-Dist: params-proto >=2.11.16
17
15
  Requires-Dist: pillow
18
- Requires-Dist: tqdm
19
16
  Requires-Dist: msgpack
20
17
  Requires-Dist: numpy
21
- Requires-Dist: termcolor
22
- Requires-Dist: trimesh
23
18
  Requires-Dist: websockets
19
+ Provides-Extra: all
20
+ Requires-Dist: aiohttp ; extra == 'all'
21
+ Requires-Dist: aiohttp-cors ; extra == 'all'
24
22
  Provides-Extra: dev
23
+ Requires-Dist: aiohttp ; extra == 'dev'
24
+ Requires-Dist: aiohttp-cors ; extra == 'dev'
25
25
  Requires-Dist: black ==22.3.0 ; extra == 'dev'
26
26
  Requires-Dist: pylint ==2.13.4 ; extra == 'dev'
27
27
  Requires-Dist: pytest ==7.1.2 ; extra == 'dev'
28
-
29
- <h2>Vuer: Modern High-Performance Visualization for AI & Robotics in VR
28
+ Requires-Dist: sphinx ==7.1.2 ; extra == 'dev'
29
+ Requires-Dist: furo ; extra == 'dev'
30
+ Requires-Dist: sphinx-copybutton ; extra == 'dev'
31
+ Requires-Dist: myst-parser ; extra == 'dev'
32
+ Requires-Dist: termcolor ; extra == 'dev'
33
+ Requires-Dist: trimesh ; extra == 'dev'
34
+ Requires-Dist: tqdm ; extra == 'dev'
35
+
36
+ <h2>Vuer: Modern High-Performance Visualization for AI & Robotics in VR
30
37
  <br/>
31
38
  <img src="https://api.netlify.com/api/v1/badges/2df7f3ba-1a26-4047-b76a-d7401f907bb5/deploy-status" alt="Production">
32
39
  <a href="https://pypi.org/project/vuer/">
33
- <img src="https://img.shields.io/pypi/v/vuer.svg" alt="pypi">
40
+ <img src="https://img.shields.io/pypi/v/vuer.svg" alt="pypi">
34
41
  </a>
35
42
  <a href="https://docs.vuer.ai">
36
- <img src="https://readthedocs.org/projects/vuer-py/badge/?version=latest">
43
+ <img src="https://readthedocs.org/projects/vuer-py/badge/?version=latest">
37
44
  </a>
38
45
  </h2>
39
46
  <p>
@@ -43,9 +50,10 @@ visit &ensp;<a href="https://docs.vuer.ai">https://docs.vuer.ai</a>&ensp; for do
43
50
  </p>
44
51
 
45
52
  Vuer is a light-weight visualization toolkit for interacting with dynamic 3D and robotics data. It is
46
- VR and AR ready, and can be run on mobile devices.
53
+ VR and AR ready, and can be run on mobile devices.
47
54
 
48
55
  Our features include:
56
+
49
57
  - light-weight and performant
50
58
  - VR and AR ready
51
59
  - Hackable and extensible
@@ -53,14 +61,14 @@ Our features include:
53
61
 
54
62
  ## Installation
55
63
 
56
-
57
64
  You can install `vuer` with `pip`:
58
65
 
59
66
  ```shell
60
- pip install vuer
67
+ pip install -U 'vuer[all]'
61
68
  ```
62
69
 
63
- Here is an example that loads a URDF file and displays it in the browser. For a more comprehensive list of examples, please refer to the [examples](https://docs.vuer.ai/en/latest/examples.html) page.
70
+ Here is an example that loads a URDF file and displays it in the browser. For a more comprehensive list of examples, please refer to
71
+ the [examples](https://docs.vuer.ai/en/latest/examples.html) page.
64
72
 
65
73
  ```python
66
74
  from vuer import Vuer, VuerSession
@@ -91,9 +99,10 @@ the [API documentation on Components](https://docs.vuer.ai/en/latest/api.html).
91
99
 
92
100
  For a comprehensive list of data types, please refer to the [API documentation on Data Types](https://docs.vuer.ai/en/latest/api.html).
93
101
 
94
- Now, to run the examples, first download the example datasets.
102
+ Now, to run the examples, first download the example datasets.
95
103
 
96
- Each subdirectory in the `assets` directory contains a `Makefile`. Run the `make` command in each subdirectory to download the datasets. For example:
104
+ Each subdirectory in the `assets` directory contains a `Makefile`. Run the `make` command in each subdirectory to download the datasets. For
105
+ example:
97
106
 
98
107
  ```bash
99
108
  cd assets/static_3d
@@ -110,11 +119,12 @@ python 01_trimesh.py
110
119
  ## Contributing to Documentation and Features
111
120
 
112
121
  Documentation is a crucial part of the `vuer` ecosystem. To contribute to documentation and usage examples, simply:
122
+
113
123
  ```bash
114
- cd docs
115
- pip install -r requirements.txt
124
+ pip install -e '.[dev]'
125
+ make docs
116
126
  ```
117
-
127
+ This should fire up an http server at the port `8888`, and you can view the documentation at `http://localhost:8888`.
118
128
 
119
129
  ## About Us
120
130
 
@@ -1,16 +1,16 @@
1
- vuer/__init__.py,sha256=HMgKfbQAW77ukrMOnE2oKNOYbSNEkBwElpkWxLofvP8,41
2
- vuer/base.py,sha256=R-PtD39ouihiEGmSfJL26chlU0XkFJP-JmBNYzDdEvM,3068
1
+ vuer/__init__.py,sha256=cP-Ua-bx3mq-3hsnFHAbiGwTnm25hm4wcXp1KhMKCJg,455
2
+ vuer/base.py,sha256=T6zLf21Taknzc8766Af54_iCu1UNdU1cSJDcuDVcqiY,3079
3
3
  vuer/events.py,sha256=8AAzkfbm5jHkeMh17Z57n8YTxF4mheWC3Qbya4XkQSc,7291
4
4
  vuer/schemas.py,sha256=aZOocE02gO43SLLfeYSxxac0x38TmyTcfs_iFh5hsJ4,18152
5
5
  vuer/serdes.py,sha256=gD2iA9Yypu1QjocneOT3Nc0y6q_mdHn9zW1ko5j3I7c,2600
6
6
  vuer/server.py,sha256=prJVBaNdWEfz2aIdUDZHY70i34zuQLO63P3F6hSenCk,20889
7
7
  vuer/types.py,sha256=N2KLa0fl6z8Jm6cJwZoD8Vqrins_AayG5BCGk1p3Eek,1279
8
- vuer/__pycache__/__init__.cpython-38.pyc,sha256=rS-9zzAjFEXnObk5q3E5Rex_uvoJ-Ccfz7Hs9DGNVgs,188
8
+ vuer/__pycache__/__init__.cpython-38.pyc,sha256=AGYwJRSMg5cOJ06a6e5KJl20TiGnZjvVjdqlwLMmjLc,188
9
9
  vuer/__pycache__/base.cpython-38.pyc,sha256=Z5EFlRX9RqZsQUszvqPtAhLv_5QG5wlUXW7JbFd_XDc,3824
10
10
  vuer/__pycache__/events.cpython-38.pyc,sha256=zx3bXeJixqOyCFe2nA7qpq6jiCJ49kRaXO-xONGUyeQ,9616
11
11
  vuer/__pycache__/schemas.cpython-38.pyc,sha256=hvY9Aak8zE-zKcWiwuNe6DghOw9qH_zSe_FtkBOAPPk,23234
12
12
  vuer/__pycache__/serdes.cpython-38.pyc,sha256=KMxTjPEWuSGn2bqBAl5OLIDSCSoqfPDGfk3fvNnRDYA,2253
13
- vuer/__pycache__/server.cpython-38.pyc,sha256=efkA35akgB8qZzk-BWgiqrIJigp0AjvLQ6yC-mLX0aA,19641
13
+ vuer/__pycache__/server.cpython-38.pyc,sha256=9VZF8i5IfMkHXR0GrigX1-fJqukfG4TOYkQT6MdnNNA,19641
14
14
  vuer/__pycache__/types.cpython-38.pyc,sha256=IhlXtkT-XWM0V1420FDuoqIYnpvRvekYVkGqEK7fAV8,1819
15
15
  vuer/addons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  vuer/addons/nerf_vuer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -24,14 +24,14 @@ vuer/addons/nerfuer/render_nodes.py,sha256=EJK5N3xne5n7abTaAoLPX7SRqQ_tEen9zNypv
24
24
  vuer/schemas/__init__.py,sha256=ZI6UyeLZXqJbHmp6LiE3Q3mHvt1zeV-SJmmcqq-wBZE,94
25
25
  vuer/schemas/drei_components.py,sha256=U9svEOnNprhZaobLagaFnqEtZxo5hiriSqjDnvQutoA,6989
26
26
  vuer/schemas/html_components.py,sha256=NCqmSPic-ExPrXqNPXbKjtTXMB8sGBywIpE6cXpiy08,5926
27
- vuer/schemas/scene_components.py,sha256=YeOrbKOScHRLVJ3tZrryLNvj3J1rzQ2vFwF-mCVJf74,16088
27
+ vuer/schemas/scene_components.py,sha256=3u8q2AwgpkkAVifsNXXagmHIvJvWqDwlHCS-QbOwZRM,16540
28
28
  vuer/schemas/__pycache__/__init__.cpython-38.pyc,sha256=NRnVrpIDBKne93xOUY1-WpavCG7vwYiqU3VDTEEwuUE,221
29
29
  vuer/schemas/__pycache__/drei_components.cpython-38.pyc,sha256=g_ufcKxf-XKfZLdUV-HqKnjIrgxGWFv51aHLWQgH-ws,7712
30
30
  vuer/schemas/__pycache__/html_components.cpython-38.pyc,sha256=q0DMFwNkYbnaH1A8w3BowMiQAlmGpFWOOKsjLVE6CIk,8215
31
- vuer/schemas/__pycache__/scene_components.cpython-38.pyc,sha256=pwFsH7aobrCB-4BSuiLgYxZAa1F_-cw5-6CYr22luAs,19227
32
- vuer-0.0.24.dist-info/LICENSE,sha256=MGF-inVBUaGe2mEjqT0g6XsHIXwoNXgNHqD7Z1MzR0k,1063
33
- vuer-0.0.24.dist-info/METADATA,sha256=ud1jfTYVAproqyNFk17mFDIMv9q4ZbWOnGgAHd3130w,4277
34
- vuer-0.0.24.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
35
- vuer-0.0.24.dist-info/entry_points.txt,sha256=J_NM6fbpipmD9oP7cdxd1UyBR8mVEQVx0xjlE_56yss,41
36
- vuer-0.0.24.dist-info/top_level.txt,sha256=ermmVkwvGFAK4gfSgDIwOmKpxwpqNt-oo7gVQQUSHok,5
37
- vuer-0.0.24.dist-info/RECORD,,
31
+ vuer/schemas/__pycache__/scene_components.cpython-38.pyc,sha256=2jBvnUfJeoy24SMQdYvHzxXL-BwY0cXBCt9LDMk-Nw8,19670
32
+ vuer-0.0.25.dist-info/LICENSE,sha256=MGF-inVBUaGe2mEjqT0g6XsHIXwoNXgNHqD7Z1MzR0k,1063
33
+ vuer-0.0.25.dist-info/METADATA,sha256=bhipMPQyCeX2VbazZyVsFWh_GAG_PsAqQSv88ut2rAo,4754
34
+ vuer-0.0.25.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
35
+ vuer-0.0.25.dist-info/entry_points.txt,sha256=J_NM6fbpipmD9oP7cdxd1UyBR8mVEQVx0xjlE_56yss,41
36
+ vuer-0.0.25.dist-info/top_level.txt,sha256=ermmVkwvGFAK4gfSgDIwOmKpxwpqNt-oo7gVQQUSHok,5
37
+ vuer-0.0.25.dist-info/RECORD,,
File without changes
File without changes