Closed bfountaine closed 5 years ago
Hi, I am traveling, I should back to office in a week. Sorry.
Hi, I am back, I will take a look at this issue.
Hi, the TypeScript compiler is emitting that error because the type defs of the BitmapText
class is missing the scale
property. What the compiler sees is a scale
of type PIXI.Point
, inherited from PIXI.DisplayObject
. We are going to change the Scene compiler to use the scale.set
(available in PIXI.Point
and Phaser.Point
point classes) method instead of scale.setTo
(only available in Phaser.Point
).
In the meantime, you can use this PIXI defs (pixi.comments.d.ts
) I attach here, to avoid the error. I declared the setTo
method in the PIXI.Point
.
Uncompress it and replace that file in your project.
Version
Enter the version of Phaser Editor you're using. You can find this information on the main menu Help > About. -->
Description
Added a bitmapText item to my design. Set the scale to 2, generated the following line of code:
_score.scale.setTo(2.0, 2.0);
which causes the compile error: Property 'setTo' does not exist on type 'Point'
Possible solution