vuer 0.0.23__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.
- vuer/schemas/__pycache__/scene_components.cpython-38.pyc +0 -0
- vuer/schemas/scene_components.py +30 -28
- {vuer-0.0.23.dist-info → vuer-0.0.24.dist-info}/METADATA +1 -1
- {vuer-0.0.23.dist-info → vuer-0.0.24.dist-info}/RECORD +8 -8
- {vuer-0.0.23.dist-info → vuer-0.0.24.dist-info}/LICENSE +0 -0
- {vuer-0.0.23.dist-info → vuer-0.0.24.dist-info}/WHEEL +0 -0
- {vuer-0.0.23.dist-info → vuer-0.0.24.dist-info}/entry_points.txt +0 -0
- {vuer-0.0.23.dist-info → vuer-0.0.24.dist-info}/top_level.txt +0 -0
|
Binary file
|
vuer/schemas/scene_components.py
CHANGED
|
@@ -9,14 +9,14 @@ class Scene(BlockElement):
|
|
|
9
9
|
tag = "Scene"
|
|
10
10
|
|
|
11
11
|
def __init__(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
125
|
+
if self.colors is not None:
|
|
126
|
+
if self.colors.shape[-1] == 4:
|
|
127
|
+
self.colors = self.colors[:, :3]
|
|
126
128
|
|
|
127
|
-
|
|
128
|
-
self.colors
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
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"),
|
|
@@ -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=
|
|
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=
|
|
32
|
-
vuer-0.0.
|
|
33
|
-
vuer-0.0.
|
|
34
|
-
vuer-0.0.
|
|
35
|
-
vuer-0.0.
|
|
36
|
-
vuer-0.0.
|
|
37
|
-
vuer-0.0.
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|