Luca Fagioli
0cf92cba50
Update TextStyle.js
2024-09-02 11:06:01 +02:00
Roman Chaley
cdefe1f68c
Apply stroke letter by letter if there is custom letter spacing
2024-08-04 16:11:37 +02:00
Zeke Chan
5d74999620
Fixed "undefined" style bug causing crashes
2024-07-19 11:06:23 +08:00
Richard Davey
5038c26051
The TextStyle.setStyle
method will no longer mutate the given style
object if it includes a numeric fontSize
value. Fix #6863
2024-07-15 17:44:39 +01:00
Richard Davey
b14c580282
typo
2024-07-15 17:26:16 +01:00
Albert Montagut Casero
b90fc23236
Fix jsdoc in setWordWrapWidth from Text and TextStyle
2024-05-07 10:36:46 +02:00
Richard Davey
c445303ffb
Revert define changes as they don't work
2024-02-21 13:23:52 +00:00
Richard Davey
7aaa976a4e
Updated webpack config DefinePlugin use and corresponding defs to allow those crazy souls who import source directly on node to have a better life #6644
2024-02-21 12:57:48 +00:00
Richard Davey
1f8276ac76
Updated copyright year, company and author
2024-02-19 17:12:24 +00:00
Ben Richards
719e7a5e73
Remove unnecessary checks around Text WebGL texture.
2024-02-07 11:50:33 +13:00
Ben Richards
06d463e92e
Fix text initialization in WebGL.
...
As `frame.glTexture` is now a getter, this would error out in strict mode.
Repeated texture updates would also generate new wrappers.
2024-02-05 15:39:17 +13:00
Ben Richards
216b7564f6
Update systems to use WebGLTextureWrapper
and Uint8Array
textures.
...
This is mostly hooking up gl calls to look inside the wrapper.
A few other things have changed.
Spector metadata is set the new way.
`Frame` changed `glTexture` to a getter, simplifying bookkeeping.
`LightPipeline` and `Plane` use standard methods to create textures.
`WebGLRenderer` maintains a list of wrappers, and automatically
manages it through `createTexture2D` and `deleteTexture`. The update
methods `updateCanvasTexture` and `updateVideoTexture` have been
delegated to the wrapper.
2024-01-29 11:45:12 +13:00
Robert Kowalski
6ea40f8b32
Text textures are now stored in the TextureManager
2024-01-24 17:25:42 -05:00
Richard Davey
0b32610e56
Updated version to 3.70
2023-11-10 15:04:01 +00:00
Richard Davey
315e3b757f
Merge pull request #6653 from PresentCreativeLLC/TextColorGradient
...
Extended color and stroke definitions
2023-11-08 15:27:23 +00:00
Richard Davey
4564216c54
Set the context from the CanvasTexture
2023-11-07 18:25:36 +00:00
Alvaro Estrada
dedd6c3438
Added missing property definitions
...
* Added missing parenthesis in the previous additions
* Added the definitions missing in the Text class
2023-10-16 15:59:33 -06:00
Alvaro Estrada
625981e57a
Update TextStyle.js
...
Updated the setFill method to match the setColor method
2023-10-16 15:50:09 -06:00
Alvaro Estrada
ffad6f6d90
Extended color and stroke definitions
...
Declared that the color and stroke properties can also be CanvasGradient or CanvasPattern
2023-10-16 15:43:38 -06:00
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