Commit graph

3295 commits

Author SHA1 Message Date
Richard Davey
1f8276ac76 Updated copyright year, company and author 2024-02-19 17:12:24 +00:00
Robert Kowalski
7a6845f6bf Use GetFastValue so all children are added to the container via GameObjectCreator Fix #6743 2024-02-19 12:09:07 -05:00
Richard Davey
a9012b19b4 The BitmapText.setFont method will now set the texture, size and alignment even if the same font key has been given as is already in use. Fix #6740 2024-02-19 14:41:59 +00:00
Robert Kowalski
51dfa7866e Adds metadata event to Video Game Objects and a starting texture Fix #6475 2024-02-09 22:36:52 -05:00
Ben Richards
9ab82970c7 Fix inappropriate default type of Shader._deferSetShader. 2024-02-09 18:40:37 +13:00
Ben Richards
4353a1e175 Improve safety around context loss.
Clarify notes on drawing dynamic textures during context loss.
Allow `Shader` to initialize and operate during context loss.
Improve resize handling on context loss and recovery.
2024-02-08 18:53:10 +13:00
Robert Kowalski
798082c6c6 Mesh based Game Objects can use an input configuration Fixes #6510 2024-02-06 23:44:02 -05: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
Richard Davey
56f4c89938
Merge pull request #6725 from phaserjs/webgl-wrappers
Merge WebGL Context Loss work
2024-02-02 12:36:57 +00:00
Ben Richards
6f36e8201d Fix Shader recovery from WebGL context loss. 2024-02-02 17:43:53 +13:00
Ben Richards
1ad6a64a81 Ensure that Shader render target is correctly updated. 2024-02-02 16:52:50 +13:00
Richard Davey
d6d812fc86 Update Polygon docs re: getBounds. Fix #5441 2024-02-01 16:42:55 +00:00
Ben Richards
587b6e7bcd Merge branch 'master' into webgl-wrappers 2024-02-01 11:00:08 +13:00
Richard Davey
f268ba3f6d Removed debug code 2024-01-31 16:51:54 +00:00
Richard Davey
25787bde36 * The Layer.removeAll, remove and add methods have been removed. These methods are all still available via the List class that Layer inherits, but the destroyChild parameters are no longer available. 2024-01-31 16:51:54 +00:00
Richard Davey
00c5d02e4e Testing Layer remove fix 2024-01-31 15:35:18 +00:00
Ben Richards
9b8bb39e7c Fix texture uniform setting in Shader.
This call was crashing with the more explicit location wrappers,
as the location hadn't actually been created yet.
The call isn't necessary, as uniforms are set before rendering.
2024-01-31 11:55:31 +13:00
Ben Richards
b9deef7e61 Destroy location wrappers when they're unused. 2024-01-31 11:53:50 +13:00
Ben Richards
e920b1a961 Create and use wrappers for WebGLUniformLocation and WebGLAttribLocation. 2024-01-30 22:13:51 +13:00
Robert Kowalski
be5223936a Update CHANGELOG-v3.80.md 2024-01-29 23:33:19 -05:00
Robert Kowalski
6c55aba8d9
Merge pull request #6714 from dhashvir/master
fix nineslice hit areas
2024-01-29 20:04:33 -05:00
Ben Richards
2382f7c1eb Create and use WebGLProgramWrapper.
This handles shader programs.
Also tweak the documentation in WebGLBufferWrapper and
WebGLFramebufferWrapper to better reflect purpose.
2024-01-29 17:35:57 +13:00
Ben Richards
377221de35 Create and use WebGLBufferWrapper.
This mostly handles VertexBuffers, but there's an IndexBuffer which
is not internally used that uses the same wrapper.
2024-01-29 16:40:18 +13:00
Ben Richards
842d666ebf Use and document WebGLFramebufferWrapper.
Also tweak WebGLTextureWrapper to have more standard destroyers
in itself and WebGLRenderer.
2024-01-29 14:53:23 +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
Robert Kowalski
1bfdcfe922 TileSprite textures are now stored in the TextureManager 2024-01-24 19:54:46 -05:00
Robert Kowalski
6ea40f8b32 Text textures are now stored in the TextureManager 2024-01-24 17:25:42 -05:00
Dhashvir Lalla
835d77cb85 fix nineslice hit areas 2024-01-15 05:16:56 +11:00
Richard Davey
9febc6b44a Update version number 2024-01-12 18:03:09 +00:00
Richard Davey
e91551b4c5
Merge pull request #6686 from samme/fix/container-destroy-child
Fix removing destroyed Container children
2024-01-12 17:57:57 +00:00
samme
5cd5cadf79 Fix removing destroyed Container child 2023-12-03 16:14:46 -08:00
Alvaro Estrada
0b22354afd Update NineSlice.js
Fixed the horiztonal typo
2023-11-10 13:43:50 -06:00
Richard Davey
47d393ac29 Update NineSlice.js 2023-11-10 16:44:16 +00:00
Richard Davey
131f73005b eslint fix 2023-11-10 15:04:06 +00:00
Richard Davey
0b32610e56 Updated version to 3.70 2023-11-10 15:04:01 +00:00
Richard Davey
1b93e66cb1 Updates to support the new scale9 Frame data
* You can now create a `NineSlice` Game Object without specifying a width or height for it. If you do this, it will use the size of the texture frame instead.
* The `NineSlice` Game Object will now check to see if its associated Frame has any scale9 data set, and if so this is now used automatically to populate all of the border values.
* The `NineSlice.setSlices` method has a new optional boolean parameter `skipScale9` which will allow you to set the border values of the Nine Slice directly, even if its Frame has associated scale9 data
2023-11-09 18:26:37 +00:00
Richard Davey
e8bb5f700e Fixed errors from #6626 2023-11-08 15:47:56 +00:00
Richard Davey
cc7b6c4a08
Merge pull request #6626 from rexrainbow/layer-remove-removeall
[Layer] Update remove, removeAll, add methods
2023-11-08 15:45:50 +00:00
Richard Davey
a6e9e4a4aa
Merge pull request #6624 from PresentCreativeLLC/EdgeZoneConstructorCorrection
Constructor parameters correction
2023-11-08 15:40:38 +00:00
Richard Davey
c7785b0f12
Merge pull request #6610 from PresentCreativeLLC/EmitterOpRandomMinMaxConfigFix
EmitterOpRandomMinMaxConfig type correction
2023-11-08 15:40:09 +00:00
Richard Davey
ea98751d05
Merge pull request #6609 from PresentCreativeLLC/ParticleDataTypesUpdate
Created ParticleData description
2023-11-08 15:39:09 +00:00
Richard Davey
28a605def3
Merge pull request #6608 from PresentCreativeLLC/ParticleEmitterTypesUpdate
Added the use of Vector2Like
2023-11-08 15:38:31 +00:00
Richard Davey
e552becd33
Merge pull request #6620 from PresentCreativeLLC/EmitZoneDataCorrection
Type clarification for emit zone data
2023-11-08 15:37:16 +00:00
Richard Davey
392be38db3
Merge pull request #6619 from PresentCreativeLLC/EmitterOpOnEmitCallbackUpdate
EmitterOpOnEmitCallback update
2023-11-08 15:36:48 +00:00
Richard Davey
36472d491d
Merge pull request #6625 from PresentCreativeLLC/DeathZoneObjDescription
Updated the description of DeathZoneObj
2023-11-08 15:36:21 +00:00
Richard Davey
21338577b8
Merge pull request #6628 from PresentCreativeLLC/AddZonesFix
AddEmitZone and AddDeathZone parity
2023-11-08 15:34:12 +00:00
Richard Davey
23372fa6cb
Merge pull request #6636 from PresentCreativeLLC/EmitterColorOpDescriptionCorrection
Added to the description that EmitterColorOp is an extension
2023-11-08 15:31:50 +00:00
Richard Davey
065d3f4635
Merge pull request #6637 from PresentCreativeLLC/EmitterOpRandomStartEndConfigRemoval
Removed interface EmitterOpRandomStartEndConfig
2023-11-08 15:31:28 +00:00
Richard Davey
a8a894e9dc
Merge pull request #6639 from PresentCreativeLLC/EmitterOpPropertyValueTypeAddition
Added missing reference to EmitterOpOnUpdateType
2023-11-08 15:30:55 +00:00
Richard Davey
2d1c24cc3a
Merge pull request #6641 from rexrainbow/gameobject-tint-getter
Add getter of tint property
2023-11-08 15:29:29 +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
94c810fd39 Remove false param to setQuad 2023-11-07 18:53:51 +00:00
Richard Davey
89ceaa288a Remove roundPixels 2023-11-07 18:52:30 +00:00
Richard Davey
34f282397c The TransformMatrix.setQuad method signature has changed slightly. The roundPixels parameter is now optional and defaults to false. Previously, you always had to set it. 2023-11-07 18:50:42 +00:00
Richard Davey
d799c06031 Update TransformMatrix.js
* `TransformMatrix.setToContext` will now use `setTransform(this)` as 'this' is an equivalent object that this method can natively take.
* `TransformMatrix.setQuad` no longer uses an anonymous function for `roundPixels`, which will help with performance.
2023-11-07 18:27:47 +00:00
Richard Davey
4564216c54 Set the context from the CanvasTexture 2023-11-07 18:25:36 +00:00
Richard Davey
91b145915c Don't use the anonymous function, just a boolean check 2023-11-06 18:54:11 +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
4ef3c58caa Updated jsdocs 2023-10-13 13:09:28 +01:00
Richard Davey
181a022348 Merge branch 'master' of https://github.com/photonstorm/phaser 2023-10-10 20:22:31 +01:00
Richard Davey
b958123dad Fixed typedefs 2023-10-10 20:22:28 +01:00
Richard Davey
6360d76515 Removed use of roundPixels for now 2023-10-10 18:49:59 +01:00
Rex
aae03412fb Add getter of tint property 2023-10-01 22:37:09 +08:00
Alvaro Estrada
7b9a3f2318 Added missing reference to EmitterOpOnUpdateType
* Added missing possible type description of the propertyValue and defaultValue
2023-09-28 08:42:35 -06:00
Richard Davey
a79ae92d44 Calling the Line.setLineWidth method on the Line Shape Game Object would result in a line with double the thickness it should have had in WebGL. In Canvas it was the correct width. Both renderers now match. Fix #6604 2023-09-27 18:53:36 +01:00
Richard Davey
455420c4a0
Merge pull request #6627 from rexrainbow/plane-origin
Add read-only originX, originY properties
2023-09-27 18:06:20 +01:00
Richard Davey
ba7f2ff22e
Merge pull request #6635 from PresentCreativeLLC/ParticleDocumentationTypoFix
Fixed a typo, changed 'Interal' for 'Internal'
2023-09-27 17:57:10 +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
Alvaro Estrada
73a1d96b48 Correction
Made a correction, my previous assumption was that the particleData stored a copy of the configuration data, but after further review of the code only the min and max values are ever used. Any further extensions of the code will need to have these properties.
2023-09-25 13:57:03 -06:00
Alvaro Estrada
1ce053c7a7 Removed interface EmitterOpRandomStartEndConfig
The interface EmitterOpRandomStartEndConfig, even though it is another path to configure a random emit value, it does not fully describe that all the options for the EmitterOpEaseConfig are available to use. Instead it is better to add to the description of the EmitterOpEaseConfig that there is a random start value option available.
2023-09-24 23:51:44 -06:00
Alvaro Estrada
9b4d41d1bf Fixed a typo, changed 'Interal' for 'Internal' 2023-09-24 22:49:42 -06:00
Alvaro Estrada
1888025575 Added to the description that EmitterColorOp is an extension of the EmitterOp class. 2023-09-24 22:48:21 -06:00
Rex
1704e2ca5a Add read-only originX, originY properties 2023-09-21 11:10:49 +08:00
Rex
8f061e1039 Update remove, removeAll, add methods 2023-09-21 00:40:53 +08:00
Alvaro Estrada
787c534ff1 Update ParticleEmitter.js
Made AddEmitZone and AddDeathZone work more similar.
* AddDeathZone returns an output array
* AddEmitZone checks for the validity of the source needed methods
2023-09-20 10:27:36 -06:00
Alvaro Estrada
5c09d6e34d Updated the description of DeathZoneObj
Switched the references of Circle, Ellipse, Polygon, and Triangle for only one reference to the DeathZoneSource
2023-09-19 12:15:34 -06:00
Alvaro Estrada
45b6292a0c Constructor parameters correction
Defining stepRate as an optional parameter
2023-09-18 09:58:58 -06:00
Alvaro Estrada
62949f1d38 addEmitZone return correction
Changed the type of return
2023-09-14 13:01:37 -06:00
Alvaro Estrada
62eb820ba0 Type clarification for emit zone data
I have updated the definition of EmitZoneObject to exclusively represent EdgeZone or RandomZone objects, excluding their configurations. Previously, the emitZones property was either an array of RandomZones or an array of EdgeZones, not an Array that could hold either. With this change, emitZones is now represented as an array of EmitZoneObjects.
EmitZoneData takes over the role previously held by EmitZoneObject.
2023-09-14 12:35:31 -06:00
Alvaro Estrada
6aa625b3cc Description correction 2023-09-13 12:34:13 -06:00
Alvaro Estrada
5df5258c68 EmitterOpOnEmitCallback update
Changed the parameters to be optional since not all the onEmit calls actually pass parameters to the function, so there should be a warning about that
2023-09-13 12:31:29 -06:00
Alvaro Estrada
9d33475c5d Changed the obligatory definition for an optional definition 2023-09-07 20:53:17 -06:00
Alvaro Estrada
7ff66e81bb Fixed int type
Added int as possible undefined
2023-09-07 18:43:26 -06:00
Alvaro Estrada
953b316526 EmitterOpRandomMinMaxConfig type correction
Added the description of the "int" boolean property that was missing
2023-09-07 18:18:52 -06:00
Alvaro Estrada
0ed6d4030d Created ParticleData description
Gave a description for the ParticleData type
2023-09-07 18:12:52 -06:00
Alvaro Estrada
2d32b53c1a Added the use of Vector2Like
Changed the types of follow and followOffset to use the interface Vector2Like, this enable more objects to be used and not only gameobjects and better describe followOffset
2023-09-07 18:11:02 -06:00
Richard Davey
de48d84699 Updated jsdocs 2023-09-07 17:21:32 +01:00
Richard Davey
232916e3fa Fixed use of modified Wrap function 2023-09-07 16:42:41 +01:00
Richard Davey
533ed6e47d The ParticleEmitterWebGLRenderer has been refactored so that the particle.frame is used as the source of the glTexture used in the batch and also if a new texture unit is required. This fixes issues where a Particle Emitter would fail to use the correct frame from a multi-atlas texture. Fix #6515 2023-09-07 16:14:06 +01:00
Richard Davey
540fe9ec9a
Merge pull request #6578 from rexrainbow/mesh-setinteractive-improve
Uses current faces to do hit-testing
2023-09-07 14:08:28 +01:00
Richard Davey
6cbcfefe7b Clarified jsdocs 2023-09-07 13:28:52 +01:00
Richard Davey
b57369347f
Merge pull request #6576 from PresentCreativeLLC/EmitParticle-Type-Fix
Update return type of emitParticle
2023-09-07 13:26:44 +01:00
Richard Davey
0cec5012b4
Merge pull request #6575 from PresentCreativeLLC/ParticleEmitterConfig-Type-Fix
Update ParticleEmitterConfig.js
2023-09-07 13:26:05 +01:00
Richard Davey
8622e611f7
Merge pull request #6595 from PresentCreativeLLC/ParticleEmitterFrameConfigFix
Update ParticleEmitterFrameConfig.js
2023-09-07 13:23:40 +01:00
Richard Davey
6d22019f26 Update ParticleEmitterAnimConfig.js 2023-09-07 13:21:51 +01:00