Commit graph

210 commits

Author SHA1 Message Date
Richard Davey
059ff984a2 JSDocs fix 2023-10-13 14:45:49 +01:00
Richard Davey
6cda06c6b2 The Text.dirty Game Object property has been removed. It wasn't used internally at all, so was just adding confusion and using space. 2023-09-27 16:58:25 +01:00
Emad
266ddb7545 fixed a typo in TextFactory.js 2023-09-03 22:34:28 +10:00
Richard Davey
b3e1b77686 Updated jsdocs 2023-07-21 16:54:51 +01:00
Richard Davey
0db2134c2e
Merge pull request #6505 from Ariorh1337/6504
6504: add letter spacing
2023-07-21 16:48:45 +01:00
Richard Davey
63234a2add Text.setRTL is a new method that allows you to set a Text Game Object as being rendered from right-to-left, instead of the default left to right (thanks @rexrainbow) 2023-07-21 16:03:43 +01:00
Rex
ba5eb16aeb Add setRTL method 2023-05-31 21:01:15 +08:00
Dmitry Omelchenko
b84ee33cc2 add letter spacing 2023-05-13 04:50:37 +03:00
Richard Davey
c8acb16fa7 Added { willReadFrequently } to every canvas context, no matter where it comes from 2023-03-09 17:30:04 +00:00
Richard Davey
d3c32cdc27 Removed fx property and added init flag 2023-02-17 01:09:57 +00:00
Richard Davey
cbf42feee1 Refactored so FX is a class sitting on a property, rather than a mixin. 2023-02-16 18:39:14 +00:00
Richard Davey
36e6bc8a05 Added PostPipeline component 2023-02-03 17:52:36 +00:00
Pavle Goloskokovic
54ad20122c added missing lineSpacing property to Phaser.Types.GameObjects.Text.TextStyle type 2023-01-20 21:27:08 +01:00
Pavle Goloskokovic
6fb0287b58 Phaser.Types.GameObjects.Text.TextStyle fontSize type fix 2023-01-20 21:14:31 +01:00
Richard Davey
468bf7821d Updated copyright year 2023-01-02 17:36:27 +00:00
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