Welcome!

You are just one step away from creating awesome games!

Sign up with Google

You need a Google account to use Defold

- Select manual -

Stencil

A GUI box node with "Clipping mode" set to "STENCIL". This makes it mask its child node (which is called "bunny").

stencil

stencil.gui_script

function init(self)
    local bunny = gui.get_node("bunny")
    gui.animate(bunny, "position.x", 150, gui.EASING_INOUTSINE, 3, 0, null, gui.PLAYBACK_LOOP_PINGPONG)
end