15
15
from ipywidgets import Widget , DOMWidget , widget_serialization , Color
16
16
from traitlets import (Unicode , Int , CInt , Instance , Enum , List , Dict , Float ,
17
17
CFloat , Bool )
18
+ from ._package import npm_pkg_name
18
19
from math import pi , sqrt
19
20
20
21
def vector3 (trait_type = CFloat , default = None , ** kwargs ):
@@ -29,8 +30,8 @@ def vector2(trait_type=CFloat, default=None, **kwargs):
29
30
30
31
31
32
class Texture (Widget ):
32
- _view_module = Unicode ('jupyter-threejs' ).tag (sync = True )
33
- _model_module = Unicode ('jupyter-threejs' ).tag (sync = True )
33
+ _view_module = Unicode (npm_pkg_name ).tag (sync = True )
34
+ _model_module = Unicode (npm_pkg_name ).tag (sync = True )
34
35
_view_name = Unicode ('TextureView' ).tag (sync = True )
35
36
_model_name = Unicode ('TextureModel' ).tag (sync = True )
36
37
@@ -92,8 +93,8 @@ class Object3d(Widget):
92
93
"""
93
94
If matrix is not None, it overrides the position, rotation, scale, and up variables.
94
95
"""
95
- _view_module = Unicode ('jupyter-threejs' ).tag (sync = True )
96
- _model_module = Unicode ('jupyter-threejs' ).tag (sync = True )
96
+ _view_module = Unicode (npm_pkg_name ).tag (sync = True )
97
+ _model_module = Unicode (npm_pkg_name ).tag (sync = True )
97
98
_view_name = Unicode ('Object3dView' ).tag (sync = True )
98
99
_model_name = Unicode ('Object3dModel' ).tag (sync = True )
99
100
@@ -205,8 +206,8 @@ class ScaledObject(Object3d):
205
206
206
207
207
208
class Controls (Widget ):
208
- _view_module = Unicode ('jupyter-threejs' ).tag (sync = True )
209
- _model_module = Unicode ('jupyter-threejs' ).tag (sync = True )
209
+ _view_module = Unicode (npm_pkg_name ).tag (sync = True )
210
+ _model_module = Unicode (npm_pkg_name ).tag (sync = True )
210
211
_view_name = Unicode ('ControlsView' ).tag (sync = True )
211
212
_model_name = Unicode ('ControlsModel' ).tag (sync = True )
212
213
@@ -257,8 +258,8 @@ class Picker(Controls):
257
258
258
259
259
260
class Geometry (Widget ):
260
- _view_module = Unicode ('jupyter-threejs' ).tag (sync = True )
261
- _model_module = Unicode ('jupyter-threejs' ).tag (sync = True )
261
+ _view_module = Unicode (npm_pkg_name ).tag (sync = True )
262
+ _model_module = Unicode (npm_pkg_name ).tag (sync = True )
262
263
_view_name = Unicode ('GeometryView' ).tag (sync = True )
263
264
_model_name = Unicode ('GeometryModel' ).tag (sync = True )
264
265
@@ -452,8 +453,8 @@ class ParametricGeometry(Geometry):
452
453
453
454
454
455
class Material (Widget ):
455
- _view_module = Unicode ('jupyter-threejs' ).tag (sync = True )
456
- _model_module = Unicode ('jupyter-threejs' ).tag (sync = True )
456
+ _view_module = Unicode (npm_pkg_name ).tag (sync = True )
457
+ _model_module = Unicode (npm_pkg_name ).tag (sync = True )
457
458
_view_name = Unicode ('MaterialView' ).tag (sync = True )
458
459
_model_name = Unicode ('MaterialModel' ).tag (sync = True )
459
460
@@ -742,8 +743,8 @@ class Scene(Object3d):
742
743
743
744
744
745
class Effect (Widget ):
745
- _view_module = Unicode ('jupyter-threejs' ).tag (sync = True )
746
- _model_module = Unicode ('jupyter-threejs' ).tag (sync = True )
746
+ _view_module = Unicode (npm_pkg_name ).tag (sync = True )
747
+ _model_module = Unicode (npm_pkg_name ).tag (sync = True )
747
748
748
749
749
750
class AnaglyphEffect (Effect ):
@@ -752,8 +753,8 @@ class AnaglyphEffect(Effect):
752
753
753
754
754
755
class Renderer (DOMWidget ):
755
- _view_module = Unicode ('jupyter-threejs' ).tag (sync = True )
756
- _model_module = Unicode ('jupyter-threejs' ).tag (sync = True )
756
+ _view_module = Unicode (npm_pkg_name ).tag (sync = True )
757
+ _model_module = Unicode (npm_pkg_name ).tag (sync = True )
757
758
_view_name = Unicode ('RendererView' ).tag (sync = True )
758
759
_model_name = Unicode ('RendererModel' ).tag (sync = True )
759
760
0 commit comments