Display:waveScale{}

Type      [gd]

method of Display class

Overview

wave scale sinusoidally

Return value

self (display object itself)

See also    [bl

Display, display:waveScaleX(), display.waveScaleY()


Syntax


display_obj:waveScale {


    peakScale=n1, -- peak scale (default: 1.2)

    period=ms, -- period of the sin function (default :1000)

    loops = n2, -- number of repeatition (default: INF)

    onEnd = function, -- function when called all the iterations are ended


}


    All the elements have default values, this method can be called without

any argument.


Note that


    dobj:waveScaleX()

    dobj:waveScaleY()


methods are also defined and use the same parameter table of waveScale() method while

waveScaleX() method changes the x-axis scale only, and

waveScaleY() varies the y-axis scale only.


Examples



local sun = Image('sun.png')

sun:waveScale()


local sun = Image('sun.png')

sun:waveScale{peakScale=1.1, period=2000}


local sun = Image('sun.png')

sun:waveScaleX{loops=3, onEnd=function() print('ended') end}


댓글 없음:

댓글 쓰기