Author: JonNeal Date: 2008-08-10 01:39:57 -0400 (Sun, 10 Aug 2008) New Revision: 1346
Modified: trunk/pysoy/examples/LandScape.py Log: No Ticket: * Added fps text to the soy.scenes.Landscape example Modified: trunk/pysoy/examples/LandScape.py =================================================================== --- trunk/pysoy/examples/LandScape.py 2008-08-09 21:20:02 UTC (rev 1345) +++ trunk/pysoy/examples/LandScape.py 2008-08-10 05:39:57 UTC (rev 1346) @@ -9,6 +9,7 @@ heightScene = soy.scenes.Landscape(heightTex,soy.materials.aventurine,height=32) #heightScene = soy.scenes.Scene();# with normal scene, everything is peachy ### Start PySoy Code (Excerpt from pysoy-primer.py) +fps = soy.textures.Print() # Initialize a window scr = soy.Screen() win = soy.Window(scr, "A ball and landscape") @@ -24,8 +25,8 @@ light = soy.bodies.Light(heightScene) camera = soy.bodies.Camera(heightScene) pro = soy.widgets.Projector(win, camera=camera) +can = soy.widgets.Canvas(win, texture=fps) - camera.position = (250, 10, 250.0) #50? light.position = (0.5, 1.0, 5.0) heightScene.gravity = (0,-1,0) @@ -62,3 +63,4 @@ #mainloop goes here while 1: sleep(0.1) + fps.text = '%sfps' % str(int(camera.fps)).zfill(4) _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn