Ben Richards
5ac59c1890
Fix headless renderer compatibility.
2024-02-09 18:57:13 +13:00
Ben Richards
2e8a8f8081
Add default normal map texture __NORMAL.
...
Remove `LightPipeline.defaultNormalMap`, as this universal texture is
now available to use.
2024-02-09 15:51:53 +13:00
Ben Richards
b591c3674a
Document usage of WebGLTextureWrapper
in place of WebGLTexture
.
2024-01-29 11:47:39 +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
Ben Richards
a8dff1f990
Add Uint8Array texture creation methods.
2024-01-29 11:30:54 +13:00
Richard Davey
8cae5a33e7
Update TextureManager.js
2024-01-12 17:56:30 +00:00
Steven Adams
6a28ccbee1
Added correct parameters for create
2023-11-14 08:38:05 -05:00
Richard Davey
a7d7a7d526
The Game instance will now boot the new SYSTEM_READY
event, which indicates that the internal Scene System has been created by the Scene Manager and is ready for use. The Texture Manager now listens for this event in order to create the stamp
Image. This fixes an issue where the stamp would throw a run-time error if the game didn't feature a preload
function. Fix #6616
2023-11-09 13:42:00 +00:00
Richard Davey
e5b04be760
Reset stamp texture
2023-10-12 15:22:26 +01:00
Richard Davey
61fa744473
Fixed the methods addAtlasJSONArray
, addAtlasJSONHash
, addAtlasXML
and addUnityAtlas
. Fix #6565
2023-08-28 16:21:17 +01:00
Charlie Schwabacher
bb2a156586
avoid TypeError in addSpriteSheet method of TextureManager
2023-05-09 17:10:52 -07:00
Richard Davey
a1e77e9e6b
You can now correctly loading a Sprite Sheet with a Normal Map. The TextureManager.addSpriteSheet
method has been updated to take an optional dataSource
parameter and the SpriteSheetFile.addToCache
method has been rewritten to handle normal maps as well.
2023-04-12 06:49:54 +01: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
468bf7821d
Updated copyright year
2023-01-02 17:36:27 +00:00
Richard Davey
b318cd734f
Removed use of UUID from RenderTexture and fixed saveTexture method.
2022-10-09 16:01:06 +01:00
Richard Davey
5aa1584360
TextureManager.silentWarnings
is a new boolean property that, when set, will prevent the Texture Manager from emiting any warnings or errors to the console in the case of missing texture keys or invalid texture access. The default is to display these warnings, this flag toggles that.
2022-10-06 22:04:21 +01:00
Richard Davey
c2869d2eb6
Scale 1
2022-10-03 23:15:40 +01:00
Richard Davey
064a1e0f4f
Added resetStamp
2022-09-28 22:43:20 +01:00
Richard Davey
a60660a474
Create on READY
2022-09-28 20:57:42 +01:00
Richard Davey
e3503ef8b4
All of the following Texture Manager methods will now allow you to pass in a Phaser Texture as the source
parameter: addSpriteSheet
, addAtlas
, addAtlasJSONArray
, addAtlasJSONHash
, addAtlasXML
and addAtlasUnity
. This allows you to add sprite sheet or atlas data to existing textures, or textures that came from external sources, such as SVG files, canvas elements or Dynamic Textures.
2022-09-28 20:34:34 +01:00
Richard Davey
676f0db838
Added Stamp
2022-09-28 19:53:49 +01:00
Richard Davey
0e57db40d4
Improved docs
2022-09-28 19:09:35 +01:00
Richard Davey
d64878736f
Testing out the new DynamicTexture
2022-09-27 23:39:23 +01:00
Richard Davey
e15f2414d6
Update TextureManager.js
2022-09-26 23:18:12 +01:00
Richard Davey
1283ca8198
The TextureManager.get
methof can now accept a Frame
instance as its parameter, which will return the frames parent Texture.
2022-09-26 17:18:04 +01:00
Richard Davey
25ab9f329d
TextureManager.parseFrame
is a new method that will return a Texture Frame instance from the given argument, which can be a string, array, object or Texture instance.
2022-09-26 15:28:41 +01:00
Richard Davey
618891bcda
The TextureManager.addSpriteSheet
method will now allow you to pass in a Phaser Texture as the 2nd parameter. This allows you to add sprite sheet data to textures that came from external sources, such as SVG files or canvas elements.
2022-09-15 22:30:59 +01:00
Richard Davey
bc7e5f9c79
Merge pull request #6196 from samme/feature/texture-add-remove-key-events
...
Add texture add/remove key events
2022-08-24 21:20:13 +01:00
samme
7824876bd7
Add texture add/remove key events
...
- Phaser.Textures.Events.ADD_KEY
- Phaser.Textures.Events.REMOVE_KEY
2022-08-24 10:13:58 -07:00
samme
01735b5a5c
Exclude __WHITE in getTextureKeys()
2022-08-23 10:38:51 -07:00
Richard Davey
0258714887
Update TextureManager.js
2022-08-19 16:44:55 +01:00
Richard Davey
7c4eff9251
The CanvasFeatures
tests and the TextureManager _tempContext
now specify the { willReadFrequently: true }
hint to inform the browser the canvas is to be read from, not composited.
2022-08-18 18:01:28 +01:00
Richard Davey
59fbcc5ca3
Updated copyright year
2022-02-28 14:29:51 +00:00
Richard Davey
a4308cfa3a
Skips Canvas drawImage calls if invalid frame sizes given. Fix #5951
2022-02-03 16:44:24 +00:00
Richard Davey
e4bbc4dec7
TextureManager#addCompressedTexture
is a new method that will add a compressed texture, and optionally atlas data into the Texture Manager and return a Texture
object than any Sprite can use.
2021-10-06 18:43:20 +01:00
Sebastian Fast
df9f367b95
#5689 moved _pending to beginning of function
2021-05-13 10:52:06 +02:00
Richard Davey
abf90070ba
Update TextureManager.js
2020-11-26 11:24:32 +00:00
Richard Davey
417f7684c3
More integer to number changes
2020-11-23 10:32:00 +00:00
Richard Davey
02c34cd64e
Replace integer with number
2020-11-23 10:22:13 +00:00
Hexus
ef022cd3df
Implemented reading WebGL texture dimensions automatically when adding them to the TextureManager
2020-11-18 00:49:19 +00:00
Richard Davey
c8a99f00f2
Improved JSDocs
2020-10-03 10:15:19 +01:00
Richard Davey
e368c479a0
The TextureManager
now generates a new texture with the key __WHITE
durings its boot process. This is a pure white 4x4 texture used by the Graphics pipelines.
2020-09-14 14:54:58 +01:00
Richard Davey
3183f1e7de
Finished JSDocs
2020-02-04 17:16:19 +00:00
Richard Davey
8f52fe59bb
Completed JSDocs
2020-02-04 14:56:28 +00:00
Richard Davey
ff65e69cd1
Changed copyright date to 2020
2020-01-15 12:07:09 +00:00
J.C
8d259cd6c2
add missing parameters for addGLTexture
method for TS def
2019-10-23 17:45:48 +08:00
Richard Davey
69346bb1d3
TextureManager.get
can now accept either a string-based key, or a Texture instance, as its parameter.
2019-10-09 10:49:47 +01:00
Richard Davey
7d2b34f8ed
Warn if invalid texture source
2019-07-15 15:42:25 +01:00
Richard Davey
4f87c7d441
Updated docs and frame source checks
2019-07-08 15:24:12 +01:00
Richard Davey
1e9ef314c9
Added addGLTexture
method to save WebGL Textures directly into the Texture Manager.
2019-06-21 16:10:26 +01:00