@@ -38,12 +38,15 @@ def vector2(trait_type=CFloat, default=None, **kwargs):
3838 default = [0 , 0 ]
3939 return List (trait_type , default_value = default , minlen = 2 , maxlen = 2 , ** kwargs )
4040
41+ PYTHREEJS_VERSION = '0.3.0-alpha.0'
4142
4243class Texture (Widget ):
4344 _view_module = Unicode (npm_pkg_name ).tag (sync = True )
4445 _model_module = Unicode (npm_pkg_name ).tag (sync = True )
4546 _view_name = Unicode ('TextureView' ).tag (sync = True )
4647 _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 )
4750
4851
4952class ImageTexture (Texture ):
@@ -104,6 +107,8 @@ class Object3d(Widget):
104107 _model_module = Unicode (npm_pkg_name ).tag (sync = True )
105108 _view_name = Unicode ('Object3dView' ).tag (sync = True )
106109 _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 )
107112
108113 position = vector3 (CFloat ).tag (sync = True )
109114 quaternion = List (CFloat ).tag (sync = True ) # [x,y,z,w]
@@ -217,6 +222,8 @@ class Controls(Widget):
217222 _model_module = Unicode (npm_pkg_name ).tag (sync = True )
218223 _view_name = Unicode ('ControlsView' ).tag (sync = True )
219224 _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 )
220227
221228 controlling = Instance (Object3d , allow_none = True ).tag (sync = True , ** widget_serialization )
222229
@@ -269,6 +276,8 @@ class Geometry(Widget):
269276 _model_module = Unicode (npm_pkg_name ).tag (sync = True )
270277 _view_name = Unicode ('GeometryView' ).tag (sync = True )
271278 _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 )
272281
273282
274283class PlainGeometry (Geometry ):
@@ -474,6 +483,8 @@ class Material(Widget):
474483 _model_module = Unicode (npm_pkg_name ).tag (sync = True )
475484 _view_name = Unicode ('MaterialView' ).tag (sync = True )
476485 _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 )
477488
478489 # id = TODO
479490 name = Unicode (sync = True )
@@ -753,6 +764,8 @@ class Scene(Object3d):
753764class Effect (Widget ):
754765 _view_module = Unicode (npm_pkg_name ).tag (sync = True )
755766 _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 )
756769
757770
758771class AnaglyphEffect (Effect ):
@@ -765,6 +778,8 @@ class Renderer(DOMWidget):
765778 _model_module = Unicode (npm_pkg_name ).tag (sync = True )
766779 _view_name = Unicode ('RendererView' ).tag (sync = True )
767780 _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 )
768783
769784 width = Unicode ('600' ).tag (sync = True ) # TODO: stop relying on deprecated DOMWidget attribute
770785 height = Unicode ('400' ).tag (sync = True )
0 commit comments