@@ -38,12 +38,15 @@ def vector2(trait_type=CFloat, default=None, **kwargs):
38
38
default = [0 , 0 ]
39
39
return List (trait_type , default_value = default , minlen = 2 , maxlen = 2 , ** kwargs )
40
40
41
+ PYTHREEJS_VERSION = '0.3.0-alpha.0'
41
42
42
43
class Texture (Widget ):
43
44
_view_module = Unicode (npm_pkg_name ).tag (sync = True )
44
45
_model_module = Unicode (npm_pkg_name ).tag (sync = True )
45
46
_view_name = Unicode ('TextureView' ).tag (sync = True )
46
47
_model_name = Unicode ('TextureModel' ).tag (sync = True )
48
+ _model_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
49
+ _view_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
47
50
48
51
49
52
class ImageTexture (Texture ):
@@ -104,6 +107,8 @@ class Object3d(Widget):
104
107
_model_module = Unicode (npm_pkg_name ).tag (sync = True )
105
108
_view_name = Unicode ('Object3dView' ).tag (sync = True )
106
109
_model_name = Unicode ('Object3dModel' ).tag (sync = True )
110
+ _model_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
111
+ _view_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
107
112
108
113
position = vector3 (CFloat ).tag (sync = True )
109
114
quaternion = List (CFloat ).tag (sync = True ) # [x,y,z,w]
@@ -217,6 +222,8 @@ class Controls(Widget):
217
222
_model_module = Unicode (npm_pkg_name ).tag (sync = True )
218
223
_view_name = Unicode ('ControlsView' ).tag (sync = True )
219
224
_model_name = Unicode ('ControlsModel' ).tag (sync = True )
225
+ _model_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
226
+ _view_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
220
227
221
228
controlling = Instance (Object3d , allow_none = True ).tag (sync = True , ** widget_serialization )
222
229
@@ -269,6 +276,8 @@ class Geometry(Widget):
269
276
_model_module = Unicode (npm_pkg_name ).tag (sync = True )
270
277
_view_name = Unicode ('GeometryView' ).tag (sync = True )
271
278
_model_name = Unicode ('GeometryModel' ).tag (sync = True )
279
+ _model_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
280
+ _view_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
272
281
273
282
274
283
class PlainGeometry (Geometry ):
@@ -474,6 +483,8 @@ class Material(Widget):
474
483
_model_module = Unicode (npm_pkg_name ).tag (sync = True )
475
484
_view_name = Unicode ('MaterialView' ).tag (sync = True )
476
485
_model_name = Unicode ('MaterialModel' ).tag (sync = True )
486
+ _model_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
487
+ _view_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
477
488
478
489
# id = TODO
479
490
name = Unicode (sync = True )
@@ -753,6 +764,8 @@ class Scene(Object3d):
753
764
class Effect (Widget ):
754
765
_view_module = Unicode (npm_pkg_name ).tag (sync = True )
755
766
_model_module = Unicode (npm_pkg_name ).tag (sync = True )
767
+ _model_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
768
+ _view_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
756
769
757
770
758
771
class AnaglyphEffect (Effect ):
@@ -765,6 +778,8 @@ class Renderer(DOMWidget):
765
778
_model_module = Unicode (npm_pkg_name ).tag (sync = True )
766
779
_view_name = Unicode ('RendererView' ).tag (sync = True )
767
780
_model_name = Unicode ('RendererModel' ).tag (sync = True )
781
+ _model_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
782
+ _view_module_version = Unicode (PYTHREEJS_VERSION ).tag (sync = True )
768
783
769
784
width = Unicode ('600' ).tag (sync = True ) # TODO: stop relying on deprecated DOMWidget attribute
770
785
height = Unicode ('400' ).tag (sync = True )
0 commit comments