@@ -221,7 +221,7 @@ def lower(self, object_data):
221
221
class MeshMaterial (Material ):
222
222
223
223
def __init__ (self , color = 0xffffff , reflectivity = 0.5 , map = None ,
224
- transparent = False , ** kwargs ):
224
+ transparent = False , ** kwargs ):
225
225
super (MeshMaterial , self ).__init__ ()
226
226
self .color = color
227
227
self .reflectivity = reflectivity
@@ -279,20 +279,22 @@ def lower(self, object_data):
279
279
280
280
class CanvasImage (Image ):
281
281
282
- def __init__ (self , alpha ):
282
+ def __init__ (self ):
283
283
super (CanvasImage , self ).__init__ ()
284
284
285
285
def lower (self , object_data ):
286
286
return {
287
287
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" : ""
288
291
}
289
292
290
293
291
294
class TextTexture (Texture ):
292
295
293
296
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 ]):
296
298
super (TextTexture , self ).__init__ ()
297
299
self .text = text
298
300
# 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',
302
304
self .width = width
303
305
self .height = height
304
306
self .position = position
305
- self .image = CanvasImage (alpha )
307
+ self .image = CanvasImage ()
306
308
307
309
def lower (self , object_data ):
308
310
return {
0 commit comments