Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect typing for Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback #6784

Open
IKhonakhbeeva opened this issue Apr 8, 2024 · 0 comments

Comments

@IKhonakhbeeva
Copy link

IKhonakhbeeva commented Apr 8, 2024

Version

  • Phaser Version: 3.80.1
  • Operating system:
  • Browser:

Description

There is a typescript error when I am trying to create RandomZone for ParticlesEmitter.

Example Test Code

const emitRect = new Phaser.Geom.Rectangle()
new Phaser.GameObjects.Particles.Zones.RandomZone(emitRect)

Error:

Argument of type 'Rectangle' is not assignable to parameter of type 'RandomZoneSource'.
Types of property 'getRandomPoint' are incompatible.
Type '(point?: O | undefined) => O' is not assignable to type 'RandomZoneSourceCallback'.
Types of parameters 'point' and 'point' are incompatible.
Type 'Vector2Like' is missing the following properties from type 'Point': type, setTo

Additional Information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant