@@ -221,7 +221,7 @@ def lower(self, object_data):
221221class MeshMaterial (Material ):
222222
223223 def __init__ (self , color = 0xffffff , reflectivity = 0.5 , map = None ,
224- transparent = False , ** kwargs ):
224+ transparent = False , ** kwargs ):
225225 super (MeshMaterial , self ).__init__ ()
226226 self .color = color
227227 self .reflectivity = reflectivity
@@ -279,20 +279,22 @@ def lower(self, object_data):
279279
280280class CanvasImage (Image ):
281281
282- def __init__ (self , alpha ):
282+ def __init__ (self ):
283283 super (CanvasImage , self ).__init__ ()
284284
285285 def lower (self , object_data ):
286286 return {
287287 u"uuid" : self .uuid ,
288+ # hacky, needs a nominal "url" filed to get rid of JS side warning,
289+ # so putting an empty one here
290+ u"url" : ""
288291 }
289292
290293
291294class TextTexture (Texture ):
292295
293296 def __init__ (self , text , font_size = 96 , font_face = 'sans-serif' ,
294- width = 200 , height = 100 ,
295- position = [10 , 10 ],alpha = True ):
297+ width = 200 , height = 100 , position = [10 , 10 ]):
296298 super (TextTexture , self ).__init__ ()
297299 self .text = text
298300 # font_size will be passed to the JS side as is; however if the text
@@ -302,7 +304,7 @@ def __init__(self, text, font_size = 96, font_face='sans-serif',
302304 self .width = width
303305 self .height = height
304306 self .position = position
305- self .image = CanvasImage (alpha )
307+ self .image = CanvasImage ()
306308
307309 def lower (self , object_data ):
308310 return {
0 commit comments