vuer 0.0.22b0__py3-none-any.whl → 0.0.24__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.

Binary file
@@ -9,14 +9,14 @@ class Scene(BlockElement):
9
9
  tag = "Scene"
10
10
 
11
11
  def __init__(
12
- self,
13
- *children,
14
- rawChildren=None,
15
- htmlChildren=None,
16
- bgChildren=None,
17
- # default to y-up to be consistent with three.js. Blender uses z-up though.
18
- up=[0, 1, 0],
19
- **kwargs,
12
+ self,
13
+ *children,
14
+ rawChildren=None,
15
+ htmlChildren=None,
16
+ bgChildren=None,
17
+ # default to y-up to be consistent with three.js. Blender uses z-up though.
18
+ up=[0, 1, 0],
19
+ **kwargs,
20
20
  ):
21
21
  super().__init__(*children, up=up, **kwargs)
22
22
  self.rawChildren = rawChildren or []
@@ -114,6 +114,7 @@ class TriMesh(SceneElement):
114
114
  # note: Uint16 is too few. Quickly overflows
115
115
  faces: NDArray[np.uint32] = None
116
116
  colors: NDArray[np.uint8] = None
117
+ uv: NDArray[np.float16] = None
117
118
 
118
119
  def __post_init__(self, **kwargs):
119
120
  self.vertices = self.vertices.astype(np.float16).flatten().tobytes()
@@ -121,18 +122,19 @@ class TriMesh(SceneElement):
121
122
  # uinit16 is too few at 65536. Have to use uint32.
122
123
  self.faces = self.faces.astype(np.uint32).flatten().tobytes()
123
124
 
124
- if self.colors is None:
125
- return
125
+ if self.colors is not None:
126
+ if self.colors.shape[-1] == 4:
127
+ self.colors = self.colors[:, :3]
126
128
 
127
- if self.colors.shape[-1] == 4:
128
- self.colors = self.colors[:, :3]
129
+ # send only integers: https://stackoverflow.com/questions/34669537
130
+ if self.colors.dtype != np.uint8:
131
+ self.colors *= 255
132
+ self.colors = self.colors.astype(np.uint8)
129
133
 
130
- # send only integers: https://stackoverflow.com/questions/34669537
131
- if self.colors.dtype != np.uint8:
132
- self.colors *= 255
133
- self.colors = self.colors.astype(np.uint8)
134
+ self.colors = self.colors.flatten().tobytes()
134
135
 
135
- self.colors = self.colors.flatten().tobytes()
136
+ if self.uv is not None:
137
+ self.uv = self.uv.astype(np.float16).flatten().tobytes()
136
138
 
137
139
 
138
140
  class PointCloud(SceneElement):
@@ -508,17 +510,17 @@ class DefaultScene(Scene):
508
510
  """
509
511
 
510
512
  def __init__(
511
- self,
512
- *children: SceneElement,
513
- rawChildren: List[SceneElement] = None,
514
- htmlChildren: List[Element] = None,
515
- bgChildren: List[SceneElement] = [],
516
- show_helper=True,
517
- startStep=0,
518
- endStep=None,
519
- # default to z-up
520
- up=[0, 0, 1],
521
- **kwargs,
513
+ self,
514
+ *children: SceneElement,
515
+ rawChildren: List[SceneElement] = None,
516
+ htmlChildren: List[Element] = None,
517
+ bgChildren: List[SceneElement] = [],
518
+ show_helper=True,
519
+ startStep=0,
520
+ endStep=None,
521
+ # default to z-up
522
+ up=[0, 0, 1],
523
+ **kwargs,
522
524
  ):
523
525
  rawChildren = [
524
526
  AmbientLight(intensity=1.0, key="default_ambient_light"),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vuer
3
- Version: 0.0.22b0
3
+ Version: 0.0.24
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
@@ -10,7 +10,7 @@ vuer/__pycache__/base.cpython-38.pyc,sha256=Z5EFlRX9RqZsQUszvqPtAhLv_5QG5wlUXW7J
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=kandOv5qgW_K76KuyZoJT9XqRWtBFOpnEL1-k3w4lqg,19629
13
+ vuer/__pycache__/server.cpython-38.pyc,sha256=efkA35akgB8qZzk-BWgiqrIJigp0AjvLQ6yC-mLX0aA,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=R91MBkxCqVGe_ciG0B3UGE4_q3GHauZ1QXIbGMvHMGE,15863
27
+ vuer/schemas/scene_components.py,sha256=YeOrbKOScHRLVJ3tZrryLNvj3J1rzQ2vFwF-mCVJf74,16088
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=8v2PNB2aUVr-5C8AwBEQ8zpp2744P4KY26398XmaM1o,19161
32
- vuer-0.0.22b0.dist-info/LICENSE,sha256=MGF-inVBUaGe2mEjqT0g6XsHIXwoNXgNHqD7Z1MzR0k,1063
33
- vuer-0.0.22b0.dist-info/METADATA,sha256=mOy29v3_CwrbJiH6YYMjWz8PIRJFbhEstQs5l4bUwOo,4279
34
- vuer-0.0.22b0.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
35
- vuer-0.0.22b0.dist-info/entry_points.txt,sha256=J_NM6fbpipmD9oP7cdxd1UyBR8mVEQVx0xjlE_56yss,41
36
- vuer-0.0.22b0.dist-info/top_level.txt,sha256=ermmVkwvGFAK4gfSgDIwOmKpxwpqNt-oo7gVQQUSHok,5
37
- vuer-0.0.22b0.dist-info/RECORD,,
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,,
File without changes