Richard Davey
b267c607d2
Measure and Snap block freq read
2022-12-18 17:22:26 +00:00
Richard Davey
f571fc68aa
Fix #6296
2022-11-30 13:48:22 +00:00
Richard Davey
8b38fd3641
Reduce warning
2022-11-29 15:24:10 +00:00
Richard Davey
8b8b8fa352
Merge pull request #6281 from Ariorh1337/master
...
fix advancedWordWrap concatenate when wrapping
2022-11-29 15:23:21 +00:00
Richard Davey
03b1ed62d1
When using RTL (right-to-left) Text
Game Objects, the Text would vanish on iOS15+ if you changed the text or font style. The context RTL properties are now restored when the text is updated, fixing this issue. Fix #6121
2022-11-22 22:58:48 +00:00
Richard Davey
e608c2caf1
The CONTEXT_RESTORED
Game Event has been removed and the WebGL Renderer no longer listens for the contextrestored
DOM event, or has a contextRestoredHandler
method. This never actually worked properly, in any version of Phaser 3 - although the WebGLRenderer would be restored, none of the shaders, pipelines or textures were correctly re-created. If a context is now lost, Phaser will display an error in the console and all rendering will halt. It will no longer try to re-create the context, leading to masses of WebGL errors in the console. Instead, it will die gracefully and require a page reload.
2022-11-17 18:04:51 +00:00
Dmitry Omelchenko
4f30e0b5b9
fix advancedWordWrap concatenate when wrapping
2022-11-12 17:30:27 +02:00
Richard Davey
4a5f6adfe4
Enable for debugging
2022-10-28 18:22:57 +01:00
Richard Davey
10fe5db0a6
Fixed jsdocs
...
Fix #6195
2022-09-21 21:10:52 +01:00
Richard Davey
e3afb1d159
GameObjects.Text.appendText
is a new method that will append the given text, or array of text, to the end of the content already stored in the Text object.
2022-08-18 18:44:40 +01:00
Richard Davey
e4c520aa9e
Update TextStyle.js
2022-06-22 14:22:52 +01:00
Richard Davey
8ad90cc949
When passing a TextStyle
configuration object to the Text Game Objects setStyle
method, it would ignore any metrics
data it may contain and reset it back to the defaults. It will now respect the metrics
config and use it, if present. Fix #6149
2022-06-21 17:04:38 +01:00
Richard Davey
a4d8e87095
Fixed lint errors
2022-05-10 17:06:53 +01:00
T.J. L
ff4ef2872b
Don't overwrite the return values from require()
2022-04-02 01:49:19 -07:00
Richard Davey
59fbcc5ca3
Updated copyright year
2022-02-28 14:29:51 +00:00
Richard Davey
aea45bb06d
Text
with RTL enabled wouldn't factor in the left / right padding correctly, causing the text to be cut off. It will now account for padding in the line width calculations. Fix #5830
2021-11-01 18:44:10 +00:00
Richard Davey
b3f34a0471
Update Text.js
2021-10-27 15:46:20 +01:00
Richard Davey
9d7a575a4f
Added FX component
2021-10-16 15:23:19 +01:00
Richard Davey
7a705d757c
The Text
Game Object would call the pre and post batch functions twice by mistake, potentially applying a post fx twice to it.
2021-10-16 15:08:39 +01:00
Richard Davey
2f8d6a023d
Updated version number
2021-09-20 11:41:47 +01:00
Rex
a6c75a36c8
Turn off context restore event when game object is destroyed
2021-06-12 12:44:23 +08:00
valadaptive
4640874643
Fix check for new text measurement results
...
actualBoundingBoxDescent is *not* defined on the TextMetrics object
returned from measureText--it's defined on its prototype. This oversight
was causing the slow path to be taken in all browsers.
2021-04-14 22:44:10 -04:00
valadaptive
4cd7706390
Only call getImageData once in MeasureText
2021-04-14 22:38:58 -04:00
Richard Davey
1c8662dc1f
Call addToRenderList
2021-01-07 14:52:08 +00:00
Richard Davey
00d8b6a009
Invoke camera.addToRenderList
method
2021-01-07 12:31:31 +00:00
Richard Davey
0ee1338765
Better post pipeline call (less code)
2020-11-26 09:51:40 +00:00
Richard Davey
d2e2e86ef1
Updated accessor
2020-11-23 16:22:11 +00:00
Richard Davey
ec5da6930c
Added post pipeline support to all Game Objects
2020-11-23 16:17:13 +00:00
Richard Davey
02c34cd64e
Replace integer with number
2020-11-23 10:22:13 +00:00
Richard Davey
401487d4b1
Merge pull request #5367 from rexrainbow/bugfix-text.basicWordWrap
...
Don't add white space when measure last word of a line
2020-11-20 11:37:21 +00:00
Richard Davey
d670edd708
No need to reference via game
2020-10-27 13:55:27 +00:00
Rex
34635c582e
Don't add white space when measure last word
2020-10-20 14:52:20 +08:00
Richard Davey
61c0e1c499
Moved Text out of 'static' folder, as it doesn't need to be in there
2020-10-13 11:04:46 +01:00
Richard Davey
6a966e3f3b
Removed interpolationPercentage
parameter from all render methods, as it has never been used.
2020-09-14 15:33:58 +01:00
Richard Davey
4ade25fc79
No longer read private values for tint
...
The `Multi Pipeline`, `Bitmap Text`, `Render Texture`, `Text`, `TileSprite` and `Camera` now all read the tint values from the public properties instead of the private `_tintTL` etc ones. They also now set the `tintEffect` value directly from the `tintFill` property, removing another conditional check.
2020-09-14 11:05:09 +01:00
Richard Davey
d6f5aabb7e
The TextStyle.resolution
property is no longer read from the Game Config. You can still set it via the Text Style config to a value other than 1, but it will default to this now.
2020-09-12 11:55:06 +01:00
Richard Davey
5d4fe0a466
Fixed a few linting errors
2020-09-12 10:34:57 +01:00
Richard Davey
36cf9c456a
Merge pull request #5270 from rexrainbow/text-measureText
...
Get ascent and descent from context.measureText method
2020-09-12 10:30:19 +01:00
Richard Davey
d198818d80
Game Objects now call the new Pipeline Manager methods directly
2020-09-09 13:05:18 +01:00
Rex
a9e6604eb2
Support IE
...
IE and Firefox for Android do not have actualBoundingBoxAscent and actualBoundingBoxDescent properties.
Use origin solution to get ascent and descent.
2020-09-07 21:36:27 +08:00
Richard Davey
d2cc809fdb
Exported functions to namespace
2020-09-01 18:56:01 +01:00
Richard Davey
302a49863b
Improved jsdocs
2020-09-01 18:38:44 +01:00
Richard Davey
5b96ade1c7
Types.GameObjects.Text.GetTextSizeObject
2020-09-01 18:38:35 +01:00
Rex
29e317db39
Get ascent and descent from context.measureText method
...
Get ascent and descent from context.measureText method instead of scanning image data.
2020-08-21 10:42:24 +08:00
Richard Davey
ed33253fb1
Merge pull request #5235 from mk360/text-padding
...
[types] allow Text#setPadding to receive an object
2020-08-20 10:04:35 +01:00
mk360
748e699d43
update setPadding jsdoc
2020-08-10 08:21:26 +03:00
Bulat Khasanov
8e1b5e757d
Allow to pass font in TextStyle
2020-08-09 23:34:31 +03:00
Patrick Sletvold
edf0c17703
Use TextPadding type in Text game object
2020-08-01 13:35:02 +02:00
Patrick Sletvold
87e8eba213
Correctly type style in TextFactory
2020-08-01 13:34:37 +02:00
Patrick Sletvold
a525e43dcf
Add TextConfig type for TextCreator
2020-08-01 13:34:07 +02:00