Source Academy Modules
    Preparing search index...

    Function create_tween_config

    • Create tween config object, can be used to configure tween settings.

      For more details about tween config object, see: https://photonstorm.github.io/phaser3-docs/Phaser.Types.Tweens.html#.TweenBuilderConfig

      Parameters

      • target_prop: string = 'x'

        target to tween, e.g. x, y, alpha

      • target_value: string | number = 0

        the property value to tween to

      • delay: number = 0

        time in ms/frames before tween will start

      • duration: number = 1000

        duration of tween in ms/frames, exclude yoyos or repeats

      • ease: string | Function = 'Power0'

        ease function to use, e.g. 'Power0', 'Power1', 'Power2'

      • on_complete: Function = nullFn

        function to execute when tween completes

      • yoyo: boolean = false

        if set to true, once tween complete, reverses the values incrementally to get back to the starting tween values

      • loop: number = 0

        number of times the tween should loop, or -1 to loop indefinitely

      • loop_delay: number = 0

        The time the tween will pause before starting either a yoyo or returning to the start for a repeat

      • on_loop: Function = nullFn

        function to execute each time the tween loops

      Returns ObjectConfig

      tween config