On Wed, May 15, 2013 at 9:50 AM, elliot <[email protected]
<mailto:[email protected]>> wrote:
This runs at 60
fps on my not so great laptop. Am I doing the best I can?
| def translate(self):
...
pts =
[(px+x+r*(xhelper*(cost-1)-sint*yhelper),py+y+r*(yhelper*(cost-1)+sint*xhelper))
for x,y,r,xhelper,yhelper in initiald]
#flatten and assign as tuple to batch vertices
self.vertlist.vertices = tuple(map(int,[val for subl in pts
for val in subl]))
Depending on how many vertices you're processing per call to this function,
you might benefit from using NumPy to do these transformations.
--
Greg
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.