Skip to content

Instantly share code, notes, and snippets.

@d33tah
Created August 30, 2010 21:27
Show Gist options
  • Save d33tah/558083 to your computer and use it in GitHub Desktop.
Save d33tah/558083 to your computer and use it in GitHub Desktop.
def drawProfiles(self,task):
r=14
i = 0
n = len(self.my_friends)
for i in range(n):
x=math.sin(i*(360/n))*r
y=math.cos(i*(360/n))*r
profile_obj = loadObject(pos=Point2(x,y))
profile_obj.node().setIntoCollideMask(BitMask32.bit(1))
profile_obj.node().setTag('number', str(i))
profile = self.my_friends[i]
url = profile.get_details().avatar_thumb_url
photo_to_tex(self.nk,profile_obj,url)
self.images[i] = profile_obj
self.profiles[i] = self.my_friends[i]
i+=1
yield task.cont
return task.done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment