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

[TS defs] Missing ParseFromAtlas in definitions

Open SBCGames opened this issue 7 years ago • 3 comments

I noticed, that method ParseFromAtlas (from file ParseFromAtlas.js) is missing in Typescript defs.

In source it is marked as private, but it is not used internally anywhere. It is used in this example here: https://labs.phaser.io/edit.html?src=src/game%20objects/bitmaptext/static/bitmaptext-atlas.js

SBCGames avatar Jun 27 '18 19:06 SBCGames

Hello @SBCGames. Same issue for me, ParseFromAtlas is missing in defs.

ERROR in /***/bootScene.ts
./***/bootScene.ts
[tsl] ERROR in /***/bootScene.ts(58,35)
      TS2339: Property 'ParseFromAtlas' does not exist on type 'typeof BitmapText'.

digitsensitive avatar Jul 08 '18 18:07 digitsensitive

@digitsensitive Currently, this is my workaround:

Phaser.GameObjects.BitmapText["ParseFromAtlas"](this, "Font", "Atlas", "__BASE", "FontXML");

SBCGames avatar Jul 08 '18 18:07 SBCGames

@SBCGames Cool, thank you for this quick and helpful answer.

digitsensitive avatar Jul 08 '18 18:07 digitsensitive