Commit graph

33 commits

Author SHA1 Message Date
Richard Davey
5812b4b7a7 Fixed issue with Dynamic Textures and Render Textures not displaying until resized. Fix #6662 2023-11-03 19:02:52 +00:00
Richard Davey
b52221316b Update DynamicTexture.js
See. Never deploy on Friday the 13th.
2023-10-13 18:37:22 +01:00
Richard Davey
3333fa39e7 Fixed DynamicTexture memory leak on WebGL
* The `DynamicTexture` was leaking memory by leaving a WebGLTexture in memory when its `setSize` method was called. This happens automatically on instantiation, meaning that if you created DynamicTextures and then destroyed them frequently, memory would continue to increase (thanks David)
* `DynamicTexture.width` and `height` were missing from the class definition, even though they were set and used internally. They're now exposed as read-only properties.
* `DynamicTexture.setFromRenderTarget` is a new method that syncs the internal Frame and TextureSource GL textures with the Render Target GL textures.
2023-10-13 17:14:22 +01:00
Richard Davey
2d364f08c4 Clear stamp texture if current 2023-10-12 15:22:26 +01:00
Richard Davey
2ad71909f3 The DynamicTexture.fill method will now correctly draw the fill rectangle if the width and height are provided in WebGL, where-as before it would assume the y axis started from the bottom-left instead of top-left. Fix #6615 2023-09-27 18:44:39 +01:00
Richard Davey
c82a6bb466 DynamicTexture.preDestroy was never called, leading to an accumlation of framebuffers in memory. This method has now been renamed to destroy and cleans all references correctly. 2023-09-05 12:55:01 +01:00
Richard Davey
91d598bd4f Added getWebGLTexture method 2023-04-11 23:42:17 +01:00
Richard Davey
f895350f3e Fixed lint error. Also we can call batchGameObject directly #6456 2023-04-07 13:31:38 +01:00
Rex
9c439671cc Add skipBatch in config parameter of stamp method 2023-04-06 21:20:23 +08:00
Richard Davey
b8872b79d4 Sets forceClamp to false 2023-03-27 17:48:38 +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
4914e3ca36 DynamicTexture RenderTarget will autoResize. Fix #6411 2023-03-03 13:09:25 +00:00
Richard Davey
e699fef68b Typo 2023-02-01 18:27:32 +00:00
Richard Davey
8dccc85208 Updated docs 2023-01-11 17:35:17 +00:00
Richard Davey
468bf7821d Updated copyright year 2023-01-02 17:36:27 +00:00
Richard Davey
a39cebf7dc Removed old code 2022-12-09 18:19:53 +00:00
Richard Davey
890cf74e8d Move here until it goes into its own example 2022-12-05 22:58:30 +00:00
Richard Davey
064e8a3ec2 Fixed type issues 2022-11-10 16:05:20 +00:00
Richard Davey
e878cebd16 Force it to return Color object 2022-10-31 22:17:39 +00:00
Richard Davey
ead9de5c04 Drawing a frame via draw, drawFrame or batchDrawFrame and specifying a tint value would inverse the Red and Blue channels. These are now handled properly. Fix #5509 2022-10-10 17:44:00 +01:00
Richard Davey
a970e0bcfb Using DynamicTexture.fill in CANVAS mode only, after using the erase method, wouldn't reset the global composite operation correctly, resulting in fills. Fix #6124 2022-10-10 15:39:16 +01:00
Richard Davey
6f68e075ba Update DynamicTexture.js 2022-10-04 14:49:10 +01:00
Richard Davey
4db20ffa9e Allow a DynamicTexture to be used as a BitmapMask 2022-10-03 23:15:53 +01:00
Richard Davey
95cd4f294d Camera is for textures only 2022-10-03 18:50:09 +01:00
Richard Davey
dcb1c8a9dd Allowing custom resolution for mask shader 2022-09-29 23:35:06 +01:00
Richard Davey
9ba74e9f8c Added scale, blendMode and erase support 2022-09-29 18:51:27 +01:00
Richard Davey
f7196a07c2 Added stamp method docs and swap to using config object 2022-09-29 17:42:52 +01:00
Richard Davey
3528354a4b Added handy 'stamp' method 2022-09-28 22:43:29 +01:00
Richard Davey
0d951029b6 No need for 'this.frame' 2022-09-28 20:57:50 +01:00
Richard Davey
8bfe54287a Updated documentation 2022-09-28 19:53:59 +01:00
Richard Davey
f9ecb2461b Update DynamicTexture.js 2022-09-28 17:51:09 +01:00
Richard Davey
d64878736f Testing out the new DynamicTexture 2022-09-27 23:39:23 +01:00
Richard Davey
62f3315b1c Trying DynamicTexture (to replace RenderTexture) 2022-09-27 18:42:46 +01:00