Jump to content

Tweening a Container


jake.caron
 Share

Recommended Posts

  • 3 weeks later...

You'll have to be more specific when you stay "tween".  Any position or transform property of a container affects the children of the container.  If you wanted to do something else, then you'd just getAll the children of a container and iterate through them.

Link to comment
Share on other sites

  • 2 months later...

Have a look at the official Phaser 3 examples: http://labs.phaser.io, for example the Twirl example (http://labs.phaser.io/edit.html?src=src\game objects\container\twirl 6.js)

this.tweens.add({
        targets: containers,
        angle: { value: 360, duration: 6000 },
        scaleX: { value: 0.1, duration: 3000, yoyo: true, ease: 'Quad.easeInOut' },
        scaleY: { value: 0.1, duration: 3000, yoyo: true, ease: 'Cubic.easeInOut' },
        repeat: -1,
        delay: function (i, total, target) {
            return i * 64;
        }
    });

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...