ENTRY | DOWNLOAD | MANUAL | ONGOING | |
rotBy()Rotates an element by x, y, z around the corresponding axis relative to the element's current rotation. Optionally this method also takes a Tween or Thrust object. Tweens and Thrusts are carried out over the duration of multiple frames. Tweens stop at a predefined end value after a predefined time. Thrusts are carried out until canceled. >> The class reference elaborates on Tweens and Thrusts.
<camera>.rotBy(x, y, z)
<sprite>.rotBy(x, y, z) <tag>.rotBy(x, y, z) <tag>.rotBy(z)
<camera>.rotBy(tweenobj)
<sprite>.rotBy(tweenobj) <tag>.rotBy(tweenobj)
<camera>.rotBy(thrustobj)
<sprite>.rotBy(thrustobj) <tag>.rotBy(thrustobj)
Relevant examples: tag.py , sprite.py , tag_all.py , sprite_all.py , ALL In ContextImmediatedef onSetup(self): self.camera.rotBy(10.0, 0.0, 0.0) s = ASpriteClass(self, 'sprite1') s.rotBy(0.0, 90.0, 0.0) t = ATagClass(self, 'tag1') t.rotBy(180) Tweensfrom slut.element import Tween def onSetup(self): self.camera.rotBy(Tween(0.0, 0.0, -90.0, 2.0)) from slut.element import Tween s = ASpriteClass(self, 'sprite1') s.rotBy(Tween(90.5, 0.0, 0.0, 2.0)) from slut.element import SineTween t = ATagClass(self, 'tag1') t.rotBy(SineTween(0.0, 0.0, 45.0, 2.0)) Thrustsfrom slut.element import Thrust def onSetup(self): self.camera.rotBy(Thrust(0.0, 0.0, 20.0)) from slut.element import Thrust s = ASpriteClass(self, 'sprite1') s.rotBy(Thrust(30.0, 0.0, 0.0)) from slut.element import FadeinThrust t = ATagClass(self, 'tag1') t.rotBy(FadeinThrust(30.5, 0.0, 0.0)) |
|
Initiated by Stephan Hechenberger Thanks to CADRE's 103 |