netgfx / Phaser-typewriter

A phaser helper for the typewriter effect
MIT License
38 stars 8 forks source link

Truncation #5

Open WVI opened 8 years ago

WVI commented 8 years ago

Sometimes the last word of a message is truncated if that word would have just barely fit within the edge of the message box. If "You ate the chocolate bar" is just wide enough so that "bar" would end the current line, it becomes "You ate the chocolate", without "bar" even being moved to the next line.

netgfx commented 8 years ago

if the text is added without the typewriter does the "bar" fit? Because all typewriter does is to make the text invisible (alpha = 0) and then make it appear one by one. So it is not handling the truncation or the change of line, this is all bitmap text properties when making the text. Also does that happen on a custom font?

WVI commented 8 years ago

I tried the same thing on bitmaptext object with maxwidth set to what it was being set to with the typewriter, and you're right, it just disappears. Maybe it's a phaser bug. This is a custom font, also.

netgfx commented 8 years ago

I will ask around on the Phaser slack about this. If there is something that I can do I will fix it.

netgfx commented 6 years ago

Does this still occur on the latest Phaser CE version?