@@ -175,7 +175,8 @@ def __init__(self, drawobj, my_wrdobj):
175175 self .program = gloo .Program (drawobj .vert , drawobj .frag )
176176 self .program .bind (gloo .VertexBuffer (self .vertices ))
177177
178- self .view = translate ((0 , 0 , - 201 ))
178+ self .view = np .dot (translate ((0 , - 100 , - 201 )),
179+ rotate (30 ,(1 ,0 ,0 )))
179180 self .model = np .eye (4 , dtype = np .float32 )
180181
181182 gloo .set_viewport (0 , 0 , self .physical_size [0 ], self .physical_size [1 ])
@@ -187,8 +188,10 @@ def __init__(self, drawobj, my_wrdobj):
187188 self .program ['u_model' ] = self .model
188189 self .program ['u_view' ] = self .view
189190
190- self .theta = 0
191- self .phi = 0
191+ self .theta = - 90
192+ self .phi = 45
193+
194+ self .time_count = 0
192195
193196 gloo .set_clear_color ('white' )
194197 gloo .set_state ('opaque' )
@@ -200,10 +203,10 @@ def __init__(self, drawobj, my_wrdobj):
200203
201204 # ---------------------------------
202205 def on_timer (self , event ):
203- self .theta += .5
204- self .phi += .5
205- self .model = np .dot (rotate (self .theta , (0 , 0 , 1 )),
206- rotate (self .phi , (0 , 1 , 1 )))
206+ self .theta += .0
207+ self .phi += 1
208+ self .model = np .dot (rotate (self .theta , (1 , 0 , 0 )),
209+ rotate (self .phi , (0 , 1 , 0 )))
207210 self .program ['u_model' ] = self .model
208211 self .update ()
209212
@@ -267,5 +270,5 @@ def on_draw(self, event):
267270 #Drawing stuff
268271
269272 idd = IDDraw ()
270- canvas = Canvas (idd , a .cont . objectlist [ 0 ] )
273+ canvas = Canvas (idd , a .cont )
271274 app .run ()
0 commit comments