This page is out of date

You've reached a page on the Ren'Py wiki. Due to massive spam, the wiki hasn't been updated in over 5 years, and much of the information here is very out of date. We've kept it because some of it is of historic interest, but all the information relevant to modern versions of Ren'Py has been moved elsewhere.

Some places to look are:

Please do not create new links to this page.


Transform

A transform applies rotation, zooming, and alpha-blending to its child, in that order. These operations, along with positioning of the transformed object, are controlled by fields on the Transform object. Transform objects can be composed with minimal overhead.

Parameters. A transform takes these parameters:

child is the child of the Transform. This can be left None, in which case the Transform will act as a Position and Motion function.

function is a callback function that is called before the Transform is rendered, with the Transform object, the shown timebase, and the animation timebase. It can set any of the fields described below, to cause the Transform to alter how it is displayed. It is expected to return a floating-point number giving the amount of time before the Transform should be re-rendered, in seconds. If 0 is returned, the Transform will be re-rendered on the next frame.

Fields. The ATL transform properties are available as fields on a Transform object.

Additional fields are:

Methods. A transform has the following method:

The update method should be called on a transform after one or more fields have been changed outside of the callback function of that Transform.

Sets the child of this Transform to d.

init python:
    def move_rotate_zoom(d, st, at):
         d.xpos = st / 5.0
         d.zoom = 1.0 + st / 5.0
         d.alpha = max(0.0, 1.0 - st / 5.0)

         return 0

show logo base at Transform(function=move_rotate_zoom)

See Also

Category:New in 6.9.0