gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gfx/demo fisheye.py


From: Benja Fallenstein
Subject: [Gzz-commits] gzz/gfx/demo fisheye.py
Date: Thu, 12 Sep 2002 12:37:00 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Benja Fallenstein <address@hidden>      02/09/12 12:37:00

Modified files:
        gfx/demo       : fisheye.py 

Log message:
        keystrokes

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/fisheye.py.diff?tr1=1.9&tr2=1.10&r1=text&r2=text

Patches:
Index: gzz/gfx/demo/fisheye.py
diff -c gzz/gfx/demo/fisheye.py:1.9 gzz/gfx/demo/fisheye.py:1.10
*** gzz/gfx/demo/fisheye.py:1.9 Thu Sep 12 12:31:43 2002
--- gzz/gfx/demo/fisheye.py     Thu Sep 12 12:37:00 2002
***************
*** 32,38 ****
      print "TEXID: ",texid
  
      ppass.setSetupcode("""
!       PushAttrib ENABLE_BIT TEXTURE_BIT        
        ActiveTexture TEXTURE1
        Disable TEXTURE_2D
        ActiveTexture TEXTURE0
--- 32,38 ----
      print "TEXID: ",texid
  
      ppass.setSetupcode("""
!       PushAttrib ENABLE_BIT TEXTURE_BIT
        ActiveTexture TEXTURE1
        Disable TEXTURE_2D
        ActiveTexture TEXTURE0
***************
*** 61,69 ****
                                0,.5,0,.2,
                                0,0,1,0,
                                0,0,0,1])
-     
  
!     
  
  def getfisheyepaper(seed):
      pap = ThePaperMill().getPaper(seed)
--- 61,69 ----
                                0,.5,0,.2,
                                0,0,1,0,
                                0,0,0,1])
  
! 
! 
  
  def getfisheyepaper(seed):
      pap = ThePaperMill().getPaper(seed)
***************
*** 82,87 ****
--- 82,88 ----
  ba = 0
  bl = 0
  bm = 2
+ px, py = 600, 450
  
  rng = java.util.Random()
  
***************
*** 107,117 ****
          self.fpq = getfisheyepaper(self.seed);
  
      def key(self, k):
!         global bx, by, bs, ba, bl, bm
!         if k == "Up": by -= 100
!         elif k == "Down": by += 100
!         elif k == "Left": bx -= 100
!         elif k == "Right": bx += 100
          elif k == "+": bs += .05; print "bs ", bs
          elif k == "-": bs -= .05; print "bs ", bs
          elif k == "a": ba += .2; print "ba ", ba
--- 108,122 ----
          self.fpq = getfisheyepaper(self.seed);
  
      def key(self, k):
!         global bx, by, bs, ba, bl, bm, px, py
!         if k == "Up": py += 100
!         elif k == "Down": py -= 100
!         elif k == "Left": px += 100
!         elif k == "Right": px -= 100
!         elif k == "Ctrl-Up": by -= 100
!         elif k == "Ctrl-Down": by += 100
!         elif k == "Ctrl-Left": bx -= 100
!         elif k == "Ctrl-Right": bx += 100
          elif k == "+": bs += .05; print "bs ", bs
          elif k == "-": bs -= .05; print "bs ", bs
          elif k == "a": ba += .2; print "ba ", ba
***************
*** 133,139 ****
      def scene(self, vs):
        putnoc(vs, background(self.bgcolor))
  
!       cs1 = vs.coords.affineCoordsys(0, "1", 10, 600, 450, 400, 0, 0, 400)
  
        cs2 = vs.coords.affineCoordsys(0, "2", 10 - bm, bx, by, 
                                         400 * bs * math.exp(+bl) * 
math.cos(ba),
--- 138,144 ----
      def scene(self, vs):
        putnoc(vs, background(self.bgcolor))
  
!       cs1 = vs.coords.affineCoordsys(0, "1", 10, px, py, 400, 0, 0, 400)
  
        cs2 = vs.coords.affineCoordsys(0, "2", 10 - bm, bx, by, 
                                         400 * bs * math.exp(+bl) * 
math.cos(ba),




reply via email to

[Prev in Thread] Current Thread [Next in Thread]