phaser3-docs icon indicating copy to clipboard operation
phaser3-docs copied to clipboard

[TS defs] startFollow and PathConfig

Open digitsensitive opened this issue 5 years ago • 0 comments

Hello!

When creating a PathFollower and calling the function startFollow() you can currently pass a config (number or PathConfig) and the startAt(number).

Looking at this example you should also be able to use parameters from TweenData(https://github.com/photonstorm/phaser/blob/v3.16.2/src/tweens/tween/TweenData.js)

Example: https://labs.phaser.io/edit.html?src=src/paths/followers/yoyo%20follower.js

Currently this is not possible with this TS def:

startFollow(config?: number | PathConfig, startAt?: number): Phaser.GameObjects.PathFollower;

Any ideas how to fix this? Add Phaser.Tweens.TweenData to startFollow? I can do a PR later.

digitsensitive avatar May 01 '19 07:05 digitsensitive