@@ -97,7 +97,8 @@ class Ring(Geometry):
97
97
Optional thetaStart and thetaLength by default gives a full ring (2pi angle)
98
98
"""
99
99
100
- def __init__ (self , innerRadius , outerRadius , thetaStart = 0 , thetaLength = np .pi * 2 ):
100
+ def __init__ (self , innerRadius , outerRadius , thetaStart = 0 ,
101
+ thetaLength = np .pi * 2 ):
101
102
super (Ring , self ).__init__ ()
102
103
self .innerRadius = innerRadius
103
104
self .outerRadius = outerRadius
@@ -138,36 +139,6 @@ def lower(self, object_data):
138
139
u"thetaLength" : self .thetaLength
139
140
}
140
141
141
-
142
- # class Text(Geometry):
143
-
144
- # def __init__(self, text, font='helvetiker', size=100, height=50,
145
- # curveSegments=12, bevelEnabled=False, bevelThickness=10,
146
- # bevelSize=8, bevelSegments=3):
147
- # super(Text, self).__init__()
148
- # self.text = text
149
- # self.font = font
150
- # self.size = size
151
- # self.curveSegments = curveSegments
152
- # self.bevelEnabled = bevelEnabled
153
- # self.bevelThickness = bevelThickness
154
- # self.bevelSize = bevelSize
155
- # self.bevelSegments = bevelSegments
156
-
157
- # def lower(self, object_data):
158
- # {
159
- # u"uuid": self.uuid,
160
- # u"type": u"_textgeometry",
161
- # u"text": self.text,
162
- # u"font": self.font,
163
- # u"size": self.size,
164
- # u"height": self.height,
165
- # u"curveSegments": self.curveSegments
166
- # }
167
-
168
-
169
-
170
-
171
142
class Plane (Geometry ):
172
143
173
144
def __init__ (self , width = 1 , height = 1 , widthSegments = 1 , heightSegments = 1 ):
@@ -217,11 +188,10 @@ def lower(self, object_data):
217
188
}
218
189
219
190
220
-
221
191
class MeshMaterial (Material ):
222
192
223
193
def __init__ (self , color = 0xffffff , reflectivity = 0.5 , map = None ,
224
- transparent = False , ** kwargs ):
194
+ transparent = False , ** kwargs ):
225
195
super (MeshMaterial , self ).__init__ ()
226
196
self .color = color
227
197
self .reflectivity = reflectivity
@@ -285,20 +255,18 @@ def __init__(self):
285
255
def lower (self , object_data ):
286
256
return {
287
257
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
258
u"url" : ""
291
259
}
292
260
293
261
294
262
class TextTexture (Texture ):
295
263
296
- def __init__ (self , text , font_size = 96 , font_face = 'sans-serif' ,
297
- width = 200 , height = 100 , position = [10 , 10 ]):
264
+ def __init__ (self , text , font_size = 96 , font_face = 'sans-serif' ,
265
+ width = 200 , height = 100 , position = [10 , 10 ]):
298
266
super (TextTexture , self ).__init__ ()
299
267
self .text = text
300
- # font_size will be passed to the JS side as is; however if the text
301
- # width exceeds canvas width, font_size will be reduced.
268
+ # font_size will be passed to the JS side as is; however if the
269
+ # text width exceeds canvas width, font_size will be reduced.
302
270
self .font_size = font_size
303
271
self .font_face = font_face
304
272
self .width = width
0 commit comments