ENTRY | DOWNLOAD | MANUAL | ONGOING | |
thrust_all.py"""Most build-in thrusts. by stephan) """ from slut import * class Atlantis(World): def onSetup(self): self.name = "Thrusts" Polygon(self, 'poly1').enableMouseEvents() class Polygon(Sprite): def onDraw(self): cuboid(0, 0, 0, 1, 1, 1) def onMouseButtonDown(self, event): if glo.ia.CONTROL: if glo.ia.SHIFT: self.moveBy(ExpThrust(0.01, 0.01, 0.01)) else: self.moveBy(TanhThrust(1.0, 1.0, 1.0)) self.rotBy(Thrust(20.0, 0.0, 0.0)) else: if glo.ia.SHIFT: self.moveBy(FadeinThrust(0.01, 0.01, 0.01)) self.scaleBy(ExpThrust(0.01, 0.01, 0.01)) else: self.moveBy(FadeoutThrust(0.01, 0.01, 0.01)) self.rotBy(ExpThrust(0.01, 0.01, 0.01)) atlantis = Atlantis() atlantis.run() |
|
Initiated by Stephan Hechenberger Thanks to CADRE's 103 |