Richard Davey
53de60076c
Removed outdated polyfills
2024-11-14 17:20:43 +00:00
Richard Davey
dabc0b906b
Removed 'create' namespace and palettes
2024-11-14 17:14:10 +00:00
Richard Davey
72efe3a79c
Create phaser-no-physics.js
2024-11-14 17:13:43 +00:00
Richard Davey
09ecea74f3
Expose RenderNode defaults
2024-11-14 17:06:36 +00:00
Richard Davey
04694e369b
Removes Set and moved to using JS native Set. Updated functions accordingly.
2024-11-14 16:51:10 +00:00
Richard Davey
3a2ab5b101
v4.0.0 Beta 1
2024-11-14 16:34:01 +00:00
Richard Davey
e550202b28
v4.0.0 Alpha 1 merge
2024-11-14 11:40:26 +00:00
Richard Davey
f9d1b4d5cf
Optimized TweenData.update
to achieve the same result with my less repetition. Also fixes an issue where a Tween that used a custom ease
callback would glitch when the final value was set, as it would be set outside of the ease callback. It's now passed through it, no matter what. Fix #6939
2024-11-14 00:27:57 +00:00
Richard Davey
1749b38932
Added new FontFile file loader
2024-11-13 23:48:11 +00:00
Richard Davey
37a6dc6f9f
Merge pull request #6930 from samme/major/particle-anims-optional
...
Make particle animation state optional
2024-11-13 22:27:47 +00:00
Richard Davey
fd7a6ae780
Merge pull request #6938 from BenAfonso/master
...
Fix getScene, getScenes return types.
2024-11-13 22:26:06 +00:00
Richard Davey
4018be0bd3
Merge pull request #6941 from drakang4/master
...
Fix stream parameter type of video.loadMediaStream
2024-11-13 22:23:39 +00:00
Richard Davey
a6bffcdf26
Merge pull request #6920 from bagyoni/bitmaptext-idx
...
Fix calculation of idx in GetBitmapTextSize
2024-11-13 22:21:27 +00:00
Richard Davey
9e0af3afab
Merge branch 'master' of https://github.com/phaserjs/phaser
2024-11-13 22:20:32 +00:00
Richard Davey
c2cddcb5b0
Updating for v3.87
2024-11-13 22:20:24 +00:00
Heeryong Kang
0123081aa9
Fix stream parameter type of video.loadMediaStream
2024-11-13 12:08:22 +09:00
Ben Afonso
2295d4c5e5
Fix getScene, getScenes return types.
2024-11-04 12:56:55 +01:00
Jessime Kirk
0f6e37ebfd
loose -> lose typo in Container.js
2024-10-29 13:58:28 -07:00
samme
fbdfdb884c
Make particle animation state optional
2024-10-23 14:33:11 -07:00
Richard Davey
833802c6e5
Added LOG_VERSION
2024-10-14 12:49:25 +01:00
Richard Davey
eb7f17c387
Utils.String.RemoveAt
would incorrectly calculate the slice index if it was > 0. It will now remove the correctly specified character.
2024-10-14 12:49:15 +01:00
Attila Bágyoni
95254316b3
Fix calculation of idx in GetBitmapTextSize
2024-10-12 10:39:02 +02:00
Attila Bágyoni
21efdc57e7
Remove dead code in GetBitmapTextSize
2024-10-12 10:22:39 +02:00
Richard Davey
79de922e5d
The Canvas Renderer and WebGL Multi Pipeline now uses the new renderRoundPixels
boolean to determine if it can render a Sprite or a Texture with rounded position values, or not. This fixes an issue where black lines would appear between tightly grouped sprites or tiles at non-integer Camera zoom values. Fix #6907
2024-10-11 00:41:43 +01:00
Richard Davey
8e432aee8d
BaseCamera.renderRoundPixels
is a new read-only property that is set during the Camera preRender
method every frame. It is true if the Camera is set to render round pixels and the zoom values are integers, otherwise it is false. This is then fed into the MultiPipeline when rendering sprites and textures.
2024-10-11 00:08:00 +01:00
Richard Davey
10c342c5cb
Phaser.GameObjects.Container#tempTransformMatrix
has been removed. This was an internal private Transform Matrix. It has been replaced by a global single matrix that is used instead. This removes the need for every Container to have its own instance of this temporary matrix, reducing object allocation and memory overhead.
2024-10-10 19:00:58 +01:00
Richard Davey
e440887fb8
Updating for 3.86
2024-10-10 18:37:43 +01:00
Richard Davey
509de6ae51
RenderTarget.resize
will now check the autoResize
property before applying the change. Textures that have been locked to a fixed size, such as FX POT buffers, will no longer be resized to the full canvas dimensions, causing Out of Memory errors on some mobile devices. Fix #6914
2024-10-10 18:37:00 +01:00
Richard Davey
72e2857882
The EXPAND
Scale Mode would cause the error "Framebuffer status: Incomplete Attachment" under WebGL if the Phaser game loaded into an iframe or element with a size of 0 on either axis, such as when you load the game into a 0x0 iframe before expanding it. It now protects against divide by zero errors.
2024-10-10 16:54:46 +01:00
Richard Davey
c6caba7598
The RenderTarget.willResize
method will now check if the values given to it are actually numbers. If not it will return false.
2024-10-10 16:54:34 +01:00
Richard Davey
acc96c74a5
Format fix
2024-10-10 16:25:43 +01:00
Richard Davey
2d01f5d3ae
Merge pull request #6916 from rexrainbow/bug-text-measure-width
...
Fix rendering bug when using letterSpacing
2024-10-10 16:24:13 +01:00
Richard Davey
7988f4dc5d
jsdoc link fix
2024-10-08 17:46:51 +01:00
Richard Davey
7b2eb11366
jsdoc link fix
2024-10-08 16:49:00 +01:00
Richard Davey
40fafa4d4e
Invalid link fixed
2024-10-08 16:08:56 +01:00
Rex
cbca9ecf1f
Fix bug
2024-10-08 05:56:33 +08:00
Rex
03ce4cecad
Twist logic
2024-10-07 20:39:28 +08:00
Rex
0105a20afe
Fix bug
2024-10-07 13:29:15 +08:00
Richard Davey
c066ffef1b
The HexagonalTileToWorldXY
function incorrectly used this
instead of layer
causing it to error in hex tilemaps with x axis staggering. Fix #6913
2024-10-04 15:53:27 +01:00
Richard Davey
574760186d
The Array.MoveAbove
function didn't recalculate the baseIndex after the splice, meaning the item would end up in the wrong location.
2024-10-04 15:47:35 +01:00
Richard Davey
af31ca2b97
3.85.3 prep
2024-10-04 15:47:29 +01:00
Richard Davey
3a74008e30
TransformMatrix.setQuad
has been fixed so it no longer rounds the quad dimensions, only the x/y coordinates. This fixes a bug where it could give slightly different (+- 1px) sized textures based on how the dimensions were rounded when using roundPixels
on the camera. Fix #6874
2024-09-17 19:01:10 +01:00
Richard Davey
3057998965
TS defs issue fix #6904
2024-09-17 15:12:00 +01:00
Richard Davey
ad5b38b1cb
WebGLRenderer.setExtensions
is a new method that queries the GL context to get the list of supported extensions. Which it then sets into the class properties. This method is called internally as part of the init
and restore process.
...
When the WebGL context was restored it would incorrectly try to call `init.setupExtensions()` which didn't exist. It now calls the correct method, `WebGLRenderer.setExtensions`. Fix #6905
2024-09-17 15:08:20 +01:00
Richard Davey
e41b3be8ff
v3.85.2 version
2024-09-17 15:07:34 +01:00
Richard Davey
6d68565b51
v3.85.1
2024-09-05 18:44:25 +01:00
Richard Davey
556847750e
Updated Layer jsdocs, which resolves a TypeScript extends error.
2024-09-05 17:37:50 +01:00
Richard Davey
b12f3bbaa0
Renamed methods to avoid Container conflicts
2024-09-05 11:29:29 +01:00
Richard Davey
4c2f2ed899
Added getDisplayList method
2024-09-05 11:29:18 +01:00
Richard Davey
7bd23db219
Fixed incorrect version numbers
2024-09-05 09:50:39 +01:00
Richard Davey
3c29f694ed
Removed unused var
2024-09-05 09:46:55 +01:00
Richard Davey
57df739a68
Removed unused imports
2024-09-05 09:45:56 +01:00
Richard Davey
f5b4691166
Fixed illegal use of destructuring.
2024-09-05 09:44:54 +01:00
Richard Davey
dfe3ec3aba
Fixed lint errors and lines redeclaration
2024-09-05 09:39:51 +01:00
Richard Davey
45d2d6f939
Tidied up and renamed the new depth ordering functions
2024-09-05 09:37:37 +01:00
Richard Davey
dc714b10bd
lint fixes
2024-09-05 09:35:19 +01:00
Richard Davey
b8839e4e70
Merge pull request #6746 from lukas-dachtler/fix/matterJSTypes
...
fixed MatterJS type definitions
2024-09-03 14:44:05 +01:00
Richard Davey
a88351c643
Update version number
2024-09-03 14:38:19 +01:00
Richard Davey
25f20485a2
Merge pull request #6819 from moufmouf/fix-dom-zoom-origin
...
Fixing DomElement position when camera zoom != 1
2024-09-03 14:36:59 +01:00
Richard Davey
8091292439
Fix #6854 #6737 (PipelineConfig TS)
2024-09-03 14:35:02 +01:00
Zeke Chan
780def8cf9
Fix #6860 BitmapText not wrapping lines in some cases
2024-09-03 15:52:10 +08:00
Richard Davey
c308c430c3
The NineSlice
Game Object will now guard against an invalid texture by checking for the frame
and textureFrame
vars before trying to read values from them. Fix #6804
2024-09-02 22:40:41 +01:00
Richard Davey
fcd0f7180c
The Mesh
WebGLRenderer will now recalculate the vertexOffset
correctly if the batch flushes, fixing an issue where it would display missing triangles in a mesh after a batch flush. Fix #6814
2024-09-02 22:34:29 +01:00
Richard Davey
98ea091edc
Video.getFirstFrame
is a new method that can be used to load the first frame of the Video into its texture without starting playback. This is useful if you want to display the first frame of a video behind a 'Play' button, without calling the 'play' method. Fix #6695
2024-09-02 22:02:55 +01:00
Richard Davey
85d64d77a4
Removed incorrect docs. Fix #6760
2024-09-02 21:20:41 +01:00
Richard Davey
5cc02afbd4
Update Config.js
2024-09-02 18:58:30 +01:00
Richard Davey
ee426c9ae4
If you set a WebAudioSound
to loop and set SoundManager.pauseOnBlur = false
, then if you start the sound and tab away from Phaser, the sound wouldn't then loop on return to the game, if the loop _expired_ while the tab was out of focus. This was due to checking the audio source node target against the wrong internal property. Fix #6702
2024-09-02 18:27:10 +01:00
Richard Davey
513e8b5429
Update RenderConfig.js
2024-09-02 16:10:24 +01:00
Richard Davey
1e07586acc
Fixed method names
2024-09-02 16:07:34 +01:00
Richard Davey
6170a21938
Remove use of PipelineConfig
2024-09-02 16:05:50 +01:00
zekechan
57db2cbe03
Update ScaleManager.js
2024-09-02 22:31:01 +08:00
Richard Davey
04f54b888a
Fix getScene return type. Fix #6821
2024-09-02 14:26:00 +01:00
Richard Davey
9eaf661a45
Added prerenderclear event to canvas and webgl
2024-09-02 14:18:32 +01:00
Luca Fagioli
0cf92cba50
Update TextStyle.js
2024-09-02 11:06:01 +02:00
Zeke Chan
9f3afafb29
Fix #6885 leave fullscreen event fires twice
2024-09-02 13:58:15 +08:00
Richard Davey
c86b5b2528
Make Layer extend event emitter in the docs
2024-08-29 14:05:17 +01:00
Richard Davey
378838a011
All functions now call 'queueOp'.
...
Removed sound unlocking on load complete.
2024-08-25 22:35:39 +01:00
Richard Davey
53c491fb84
You can now pass a data argument to ScenePlugin.switch
2024-08-25 22:34:15 +01:00
Richard Davey
4003aa7f3e
Merge branch 'master' of https://github.com/phaserjs/phaser
2024-08-25 21:53:51 +01:00
Richard Davey
59ce761140
Calling Matter.World.pause
would stop the world updating, but the Runner timeLastTick
wasn't reset when resume
was called, causing all the bodies to advance. The time is now reset correctly. Fix #6892
2024-08-25 21:53:37 +01:00
Richard Davey
683ae16522
Merge pull request #6890 from ospira/process-callback-fix
...
Allow ProcessCallback To Work When Dealing With Arcade Bodies That Do Not Have GameObjects
2024-08-25 21:29:03 +01:00
Richard Davey
ec753ae195
Merge pull request #6895 from Andrek25/fix/typos
...
fix(typedefs): fixing some typo error
2024-08-25 21:26:46 +01:00
samme
7fd11d2e98
Docs: clarify moveAbove(), moveBelow()
2024-08-23 08:50:47 -07:00
Andres
8b24e73d3d
fix(typedefs): fixing some typo error
2024-08-22 21:49:51 -04:00
ospira
fbfe657698
Update ArcadePhysicsCallback.js
2024-08-13 12:40:37 -04:00
ospira
b99ac68c34
Update ArcadePhysicsCallback.js
2024-08-13 12:29:10 -04:00
ospira
e321be2130
Update World.js
2024-08-13 11:56:38 -04:00
Richard Davey
48f3769e55
Update ArcadeColliderType.js
2024-08-12 17:09:06 +01:00
Richard Davey
a77976bff2
* InputPlugin.forceDownState
is a new method that will force the given Game Object into the 'down' input state, regardless of what state it is currently in. This will emit the relevant events accordingly. * InputPlugin.forceUpState
is a new method that will force the given Game Object into the 'up' input state, regardless of what state it is currently in. This will emit the relevant events accordingly. * InputPlugin.forceOverState
is a new method that will force the given Game Object into the 'over' input state, regardless of what state it is currently in. This will emit the relevant events accordingly. * InputPlugin.forceOutState
is a new method that will force the given Game Object into the 'out' input state, regardless of what state it is currently in. This will emit the relevant events accordingly. * InputPlugin.forceState
is a new internal method that forces a Game Object into the given state.
2024-08-07 19:45:44 +01:00
Richard Davey
6102492c14
InputPlugin.setCursor
is a new method that will immediately set the CSS cursor to the given Interactive Objects cursor. Previously, this was hidden behind a private method in the Input Manager.
2024-08-07 19:14:54 +01:00
Richard Davey
a5d465cb19
Multiple updates. See description.
...
The `InputPlugin.isActive` method will now check if the InputPlugin has the InputManager reference set, and if that is also enabled, as well as checking its own enabled state and that of the Scene.
`InputPlugin.resetCursor` is a new method that will reset a custom CSS cursor from the main canvas, regardless of the interactive state of any Game Objects.
The `InputPlugin.disable` method has a new optional boolean parameter `resetCursor` which will reset the CSS custom cursor if true.
All of the core Input Plugin process methods have been rewritten. The methods that have changed are:
* `InputPlugin.processMoveEvents`
* `InputPlugin.processWheelEvent`
* `InputPlugin.processOverEvents`
* `InputPlugin.processOutEvents`
* `InputPlugin.processOverOutEvents`
* `InputPlugin.processUpEvents`
* `InputPlugin.processDownEvents`
And they all now do the following flow:
1) They will now iterate over the array of objects to be inspected. If the object doesn't have an input handler, or their handler has been disabled, they are skipped for event consideration.
2) If they have an input handler, the Game Object specific event is dispatched (i.e. `sprite.on('pointerdown')`)
3) The result of this call is checked. If the Event has been cancelled, or if the Input Plugin now returns `isActive() false` then it will break from the handler loop. This will only happen if the user explicitly tells the event to stop propogation, or if they disable either the Input Plugin, or the entire Input Manager, during the event handler. Previously, only the state of cancelled event was checked. Also previously, if the Game Objects own input handler was removed or disabled as a result of their event handler, it would break from the process loop. This no longer happens. It will carry on inspecting the remaining interactive objects in the loop, as long as the Input system itself wasn't disabled.
4) After this, the Game Object is checked to see if it is still input enabled. If it is, the Scene level events, like `this.input.on('gameobjectdown')` are emitted.
5) The results of this call are also checked. Again, if the Event has been cancelled, or if the Input Plugin now returns `isActive() false` then it will break from the handler loop, otherwise it carries on.
6) After the loop is complete it does one final check to see if the Event was cancelled, or if the Input Plugin is no longer active. If both of those pass, it emits the final event from the Input Plugin itself (i.e. `this.input.on('pointerdown')` from a Scene)
2024-08-07 19:00:05 +01:00
Richard Davey
2a05c49d9e
The InputManager.resetCursor
method has a new optional boolean forceReset
which will reset the state of the CSS canvas cursor, regardless if there is a given Interactive Object, or not.
2024-08-07 18:36:54 +01:00
Richard Davey
5b972ae38a
Added resetCursor boolean to disableInteractive and removeInteractive methods
2024-08-07 18:36:02 +01:00
Richard Davey
8abcd2a610
Clarify documentation. Fix #6839
2024-08-07 15:48:56 +01:00
Richard Davey
7fd6b6fdf8
LoaderPlugin.maxRetries
is a new property that holds the number of times to retry loading a single file before it fails.
2024-08-07 15:43:43 +01:00
Richard Davey
ca4e2da432
loader.maxRetries
is a new Game Config option to set the number of retries a file will attempt to load. The default is 2.
2024-08-07 15:43:25 +01:00
Richard Davey
4021fa50fa
FileConfig.maxRetries
is a new File Config option to set the number of retries a file will attempt to load. If not specified in the config, the value is read from the LoaderPlugin.maxRetries
property.
2024-08-07 15:43:11 +01:00
Richard Davey
0a7df76c3f
Loader.File.retryAttempts
is the internal property holding the counter for the number of times to retry loading this file before it fails. This value is decreased after each attempt. When it reaches zero, the file is considered as failed.
2024-08-07 15:42:57 +01:00
Richard Davey
13035a6718
If you had a sprite on the display list using the LightPipeline, followed by a Mesh using the LightPipeline, and you invalidated the mesh (i.e. by rotating it), it would cause a runtime error in the current batch. Fix #6822
2024-08-06 23:59:42 +01:00
Richard Davey
f434449dd8
The PreFXPipeline.batchQuad
method will now apply Math.round
to the target bounds center point. This prevents sub-pixel values during the copyTextSubImage2D
call, preventing sprites with pre-fx from appearing mis-aligned during camera pans. Fix #6879
2024-08-06 23:27:34 +01:00