Commit graph

11135 commits

Author SHA1 Message Date
Richard Davey
7e5ace5026
Merge pull request #5984 from optimumsuave/bugfix-closepath-polygon-canvas-renderer
Bugfix: PolygonCanvasRenderer: check for closePath when rendering Polygon with Phaser.CANVAS
2022-02-03 16:07:39 +00:00
Richard Davey
23193131f8
Merge pull request #5968 from vforsh/point-to-container-fix
Fix `pointToContainer` issue with `output` parameter
2022-02-03 16:03:21 +00:00
Richard Davey
0100586e52 Fixed jsdocs for #5958 2022-02-03 16:02:08 +00:00
Richard Davey
d193a82376
Merge pull request #5958 from rexrainbow/mesh-tint
Add setTint() method in Mesh GameObject
2022-02-03 15:58:23 +00:00
Richard Davey
e3ff03ff75
Merge pull request #5956 from samme/fix/physics-separate-intersects
Revert "Skip intersects check by argument"
2022-02-03 15:57:03 +00:00
Richard Davey
f406dd25d3
Merge pull request #5957 from samme/docs/TileSpriteConfig-frame
Docs: correct type for TileSpriteConfig.frame
2022-02-03 15:55:41 +00:00
Richard Davey
13fc2ca4c4
Merge pull request #5965 from PhaserEditor2D/patch-2
Tag as optional the `anims.chain()` argument.
2022-02-03 15:54:38 +00:00
Richard Davey
fb90923fb2
Merge pull request #5966 from PhaserEditor2D/patch-3
Tag as optional the `Sprite.chain(key)` argument.
2022-02-03 15:54:23 +00:00
Richard Davey
eee004485f
Merge pull request #5980 from ksritharan/master
Fix to SafeRange to allow more valid ranges
2022-02-03 15:38:38 +00:00
Adam Templeton
1ead3ecd7d tween reset fix 2022-01-28 12:18:22 -06:00
Connor Nielsen
5823cd70df fix formatting in PolygonCanvasRenderer 2022-01-26 14:26:02 -08:00
Connor Nielsen
9119b776c8 check for closePath in PolygonCanvasRenderer 2022-01-26 14:06:33 -08:00
Andy Mikulski
6108414b75
WebGLSnapshot: Support custom rendering contexts 2022-01-26 15:02:59 -07:00
ksritharan
11c8216cb6
Fix to SafeRange to allow more valid ranges
The expression startIndex + endIndex > len is not needed.
The fix will allow the following ranges to be valid:
- n to Array.length, n = {1, 2, ..., Array.length-1}
- n to m, n = {1, 2, ..., Array.length - 1}, m = {n+1, ..., Array.length}
2022-01-24 13:17:24 -05:00
Vladislav Forsh
7a636379f5 Fix pointToContainer issue with output parameter
provided `output` parameter was ignored when the container didn't have a parent container (was attached directly to the scene)

(cherry picked from commit 0d97dcc1f844f528f2361bfd800dec4885c5edc1)
2022-01-06 13:07:16 +03:00
Phaser Editor 2D
61ef57a399
Tag as optional the Sprite.chain(key) argument.
The `chain()` method accepts no argument to reset the chain of animations.
2022-01-02 17:05:30 -05:00
Phaser Editor 2D
e0ec267efc
Tag as optional the anims.chain() argument.
The `chain()` method accepts no argument to reset the chain of animations.
2022-01-02 16:59:59 -05:00
Rex
38e0323b01 Add setTint() method 2021-12-24 11:47:09 +08:00
samme
f81a047029 Docs: correct type for TileSpriteConfig.frame
Fixes #5955
2021-12-23 13:35:04 -08:00
samme
3ab43f56f6 Revert "Skip intersects check by argument"
This reverts commit d80e4f5824.
2021-12-23 10:55:23 -08:00
David Schontzler
daa5e662e7 destroy game objects during shutdown safely #5520 2021-12-21 19:55:35 -08:00
Richard Davey
08bc828493 Removed duplicate docs line 2021-12-21 18:01:59 +00:00
Richard Davey
d51fa15cdf Made docs include mention of post fx. #5942 2021-12-21 17:41:52 +00:00
Richard Davey
063e8c78ef Including a render object within the Game Config will no longer erase any top-level config render settings. The render object will now take priority over the game config, but both will be used. Close #5935 2021-12-21 17:16:22 +00:00
Richard Davey
dcbfd7677e The GetValue function has a new optional parameter altSource which allows you to provide an alternative object to source the value from. 2021-12-21 17:16:22 +00:00
J.C
214cdf6c1c on iOS 10, the webkitAudioContext does not have a parameter, it will cause error if you pass one. 2021-12-21 17:26:29 +08:00
J.C
7da6f4d747 in canvas mode, don't draw stuff with no size, it will throws error, and actually unnecessary. 2021-12-21 17:18:35 +08:00
J.C
271ce6932a polyfill for audio.dataset if it's missing on some browser. 2021-12-21 17:17:32 +08:00
J.C
57dee7c461 1, add missing polyfill for IE9,10
2, IE9, 10, function alias causes error and all audio can't work properly
2021-12-21 17:09:55 +08:00
Andy Mikulski
607bbe4ccd
TimeStep: Continue to use setTimeout after waking 2021-12-19 11:11:48 -07:00
Richard Davey
38fa339196 Merge branch 'master' of https://github.com/photonstorm/phaser 2021-12-15 22:26:20 +00:00
Richard Davey
ba132ab25c Fixed JSDocs 2021-12-15 22:26:04 +00:00
Richard Davey
8a38f04ef2 You can now create Aseprite anims directly on a Sprite 2021-12-14 17:46:10 +00:00
Richard Davey
476ed38e33 Removed deprecated functions 2021-12-07 17:30:56 +00:00
Richard Davey
6b7a000975 Fix eslint 2021-12-07 17:30:56 +00:00
Richard Davey
c7ee6ff44d
Merge pull request #5937 from EmilSV/fix/move_scene_below
fix sceneManager moveBelow and moveAbove
2021-12-07 16:18:28 +00:00
Emil Schnedler Vad
92694ac5ee fix sceneManager moveBelow and moveAbove
made the code account for that sceneA index decrement if SceneB is below it
2021-12-05 16:57:51 +01:00
samme
e9e72a3ea5 Remove GetBounds component from PointLight 2021-12-04 11:55:19 -08:00
samme
82d7861930 Fix the pause and sleep status checks 2021-12-01 14:38:15 -08:00
Richard Davey
31cbacbe20 Can only sleep a running scene 2021-12-01 21:24:03 +00:00
Richard Davey
e56391d8ed
Merge pull request #5918 from rexrainbow/shape-gameobject-mask
Allow Shape game object to be a mask
2021-12-01 18:36:04 +00:00
Richard Davey
982ab23aba Update InputPlugin.js 2021-12-01 18:30:02 +00:00
Richard Davey
11ae9f1b35 Make use of the disable method to avoid duplication of code 2021-12-01 18:10:04 +00:00
Richard Davey
a9538c0145 Updated function to use internal vars and fixed jsdoc. Also don't return if input false, as object may still be in arrays anyway #5839 2021-12-01 17:59:46 +00:00
Richard Davey
385800ec2f
Merge pull request #5839 from natureofcode/fix/issue-5828
Fix #5828, improve GameObject#disableInteractive() and InputPlugin#disable()
2021-12-01 17:46:34 +00:00
Richard Davey
322a6131f8 Added clarifications to the documentation re: out handling. Close #5796 2021-12-01 17:41:46 +00:00
Richard Davey
7188040d7d The GameObject.willRender method will now factor in the parent displayList, if it has one, to the end result. This fixes issues like that where an invisible Layer will still process input events. Fix #5883 2021-12-01 17:24:12 +00:00
Richard Davey
e1718f9fbe The InputPlugin.sortGameObjects will now assign a value of 0 to any game object not in the render list, but still viable for input, such as an invisible object with alwaysEnabled set to true. This fixes an issue where non-render list objects would be skipped. Fix #5507 2021-12-01 17:03:01 +00:00
Richard Davey
91f72f7700 The InputManager.onTouchMove method will now check if the changed touch is over the canvas, or not, via the DOM elementFromPoint function. This means if the touch leaves the canvas, it will now trigger the GAME_OUT and GAME_OVER events, where-as before this would only happen for a Mouse. If the touch isn't over the canvas, no Pointer touch move happens, just like with the mouse. Fix #5592 2021-12-01 16:36:06 +00:00
Richard Davey
d36c8177b5 Update InputManager.js 2021-12-01 13:15:27 +00:00
Richard Davey
c0d2d1d35e Removed over and out events as no browser supports them. Tidied up the rest. Added isTop property. 2021-11-30 22:38:26 +00:00
Richard Davey
1273145a6b When the Pointer moves out of the canvas and is released it would trigger Uncaught TypeError: Cannot read properties of undefined (reading 'renderList') if multiple children existed in the pointer-out array. Fix #5867 2021-11-30 20:29:16 +00:00
Richard Davey
0e364321e6 Update BitmapMask-frag.js 2021-11-23 18:24:14 +00:00
Richard Davey
6c459eb3d5 Update Multi-frag.js 2021-11-23 18:19:05 +00:00
Richard Davey
8699e97f94 The BitmapMask shader has been recoded so it now works correctly if you mask a Game Object that has alpha set on it, or in its texture. Previously it would alpha the Game Object against black 2021-11-23 18:18:47 +00:00
Richard Davey
1af06910e2 Moved unlock handling to base, tidying up the common code 2021-11-22 23:54:12 +00:00
Richard Davey
a51267419d Use cache reference, more concise error 2021-11-22 23:53:56 +00:00
Richard Davey
5456267b2a Added pendingUnlock, tidied up the events, added unlock method 2021-11-22 23:53:44 +00:00
Richard Davey
3f237d6e1e Tidying up this class. Better name, lock handling and onload 2021-11-22 23:53:20 +00:00
Richard Davey
2b6afda684 New unlock handler 2021-11-22 18:35:43 +00:00
Richard Davey
9705ea5b70 Debugging audio 2021-11-22 18:35:36 +00:00
Richard Davey
6c6084a4c5 Debugging logs 2021-11-22 16:59:30 +00:00
Richard Davey
5b39d22368 Mesh addVertices and addVerticesFromObj will now throw warnings if invalid verts are given. Fix #5922 2021-11-22 16:59:30 +00:00
Richard Davey
ec4e8ccff7
Merge pull request #5927 from samme/feature/createLayer-warning
Improve the "Invalid Tilemap Layer" warning
2021-11-22 16:49:09 +00:00
Richard Davey
06afcf7903
Merge pull request #5928 from samme/docs/ArcadePhysicsCallback
Docs: namespace ArcadePhysicsCallback type
2021-11-22 16:48:41 +00:00
samme
2ebbb970a5 Shorten the 'Valid tilelayer' warning 2021-11-22 08:47:56 -08:00
samme
6dc89a4596 Docs: namespace ArcadePhysicsCallback 2021-11-21 20:23:31 -08:00
Emil Schnedler Vad
98ea9e681e fixes a bug in Phaser.Loader.LoaderPlugin#texture 2021-11-15 16:43:42 +01:00
Richard Davey
e65b77a2f7 Only emit unlocked if actually unlocking 2021-11-09 18:38:37 +00:00
Richard Davey
93c182f8f9 Renamed method to decodeAudioQueue 2021-11-09 00:05:30 +00:00
Richard Davey
b538f77b26 Added decodeOnDemand boolean 2021-11-08 22:17:34 +00:00
Richard Davey
ef711f1444 Drop the iife 2021-11-08 21:55:08 +00:00
Richard Davey
b4a7dab08b Drop the iife 2021-11-08 21:51:33 +00:00
Richard Davey
c37da11d36 pma is essential - to hell with Firefox! 2021-11-08 21:51:08 +00:00
Richard Davey
2efa08d3db Testing pma off 2021-11-08 18:49:48 +00:00
Richard Davey
3e45e6af38 Update WebAudioSoundManager.js 2021-11-08 18:26:06 +00:00
Richard Davey
46b9db5aca Added jsdocs, removed debug calls, added decoding flag 2021-11-08 18:01:50 +00:00
Richard Davey
86b26eff8d Added jsdocs, removed debug tests, fixed pending playback 2021-11-08 18:01:23 +00:00
Richard Davey
aaed099c0a Create WebAudioDecodeEntry.js 2021-11-08 18:01:03 +00:00
Richard Davey
78c141c84e Removed unlock handler from main loop 2021-11-08 18:00:54 +00:00
Richard Davey
1bf6ec2712 Removed un-used code 2021-11-08 17:58:53 +00:00
Richard Davey
077db60818
Merge pull request #5921 from teng-z/master
fix: The window touchcancel event is not removed
2021-11-08 16:09:13 +00:00
Richard Davey
18b9643d8f Return all sound types. Fix #5578 2021-11-08 16:04:11 +00:00
Richard Davey
1deb04bcee Documented all of the NoAudio properties and methods #5578 2021-11-08 15:51:56 +00:00
404
3a3f479196 fix: The window touchcancel event is not removed 2021-11-08 16:13:59 +08:00
Rex
784c2bd1ae Allow Shape game object to be a mask 2021-11-05 10:57:17 +08:00
Richard Davey
a2956176dd New unlocking and decode queue code 2021-11-05 00:27:26 +00:00
Richard Davey
4f1f5ede9c Postponed all audio buffer creation until context is ready 2021-11-05 00:27:13 +00:00
Richard Davey
63fd3b92cd Expose new DECODED_KEY event 2021-11-05 00:26:57 +00:00
Richard Davey
b57e5f0dfa Only add to the cache if we've got data! 2021-11-05 00:26:44 +00:00
Richard Davey
313d2e8936 Create DECODED_KEY_EVENT.js 2021-11-05 00:26:30 +00:00
Richard Davey
4d6c67c22e Working through removing audio decoding from the loader 2021-11-04 17:54:43 +00:00
Richard Davey
c3b897d338
Merge pull request #5890 from natureofcode/fix/quadratic-bezier-curve#type
Fix missing `QuadraticBezier` curves in `Path.fromJSON()` results
2021-11-04 16:44:14 +00:00
Richard Davey
7e14e2feaa Update Path.js 2021-11-04 16:41:42 +00:00
Richard Davey
bf0b3b1601 Correct version number 2021-11-04 16:39:36 +00:00
Richard Davey
9400f9e410
Merge pull request #5854 from natureofcode/feature/path#get-curve-at
Add new `Path#getCurveAt()` method
2021-11-04 16:39:30 +00:00
Richard Davey
70253a95b7
Merge pull request #5858 from GregDevProjects/issue-5684
Add static Lerp method on Vector2
2021-11-04 16:25:53 +00:00
Richard Davey
067e6fd4f0 Scene.pause will now check to see if the Scene is in either a RUNNING or CREATING state and throw a warning if not. You cannot pause non-running Scenes. 2021-11-04 14:55:24 +00:00
Richard Davey
b8468c8bc2 Added getStatus method 2021-11-04 14:55:16 +00:00
Richard Davey
b8339c16e6 Compressed Texture files can now be loaded from a file configuration object or a file pack 2021-11-03 22:07:34 +00:00
Richard Davey
18e044ef02 Removed all of the pendingDestroy calls, as this is now handled by the Loader Plugin. 2021-11-03 21:20:06 +00:00
natureofcode
e43f54fdd5 Add new Path#getCurveAt() method 2021-11-04 00:40:40 +05:00
Richard Davey
1a07b840b9 Added state property, pendingDestroy and destroy methods 2021-11-03 18:51:25 +00:00
Richard Davey
9eeccf3690 The Loader calls pendingDestroy automatically 2021-11-03 18:51:10 +00:00
Richard Davey
d3e9dc59e5 Removed file destroy 2021-11-03 18:50:56 +00:00
Richard Davey
a794e9c4c5 Added pendingDestroy guard 2021-11-03 18:50:45 +00:00
Richard Davey
dc73546048 Updated the docs about the data parameter 2021-11-03 18:50:28 +00:00
Richard Davey
a00f88a786 Added new PENDING_DESTROY const 2021-11-03 18:50:14 +00:00
Richard Davey
68a1a4b300 Added links to atlas software 2021-11-03 17:01:46 +00:00
Richard Davey
07f0bd4184 The JSON Hash and Array Texture Parsers will now throw a console.warn if the JSON is invalid and contains identically named frames. 2021-11-03 13:49:24 +00:00
Richard Davey
68550dbddb Update Key.js 2021-11-02 22:54:17 +00:00
Richard Davey
fc1234e55b Added createProgram, setBoolean and the new src properties 2021-11-02 18:05:18 +00:00
Richard Davey
565dfc801a WebGLPipeline.setBoolean is a new method that allows you to set a boolean uniform on a shader. 2021-11-02 18:00:25 +00:00
Richard Davey
95d7dc71b2 Update SpriteFXPipeline.js 2021-11-02 17:05:23 +00:00
Richard Davey
4b63bd2500 Update Pipeline.js 2021-11-02 17:05:16 +00:00
Richard Davey
950ba75bfc Updated jsdocs 2021-11-02 14:02:46 +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
Richard Davey
3e1d77ad8f The KeyboardPlugin.removeKey method has a new optional parameter removeCapture. This will remove any keyboard capture events for the given Key. Fix #5693 2021-11-01 18:13:51 +00:00
Richard Davey
8ec99f9224 Use cached reg ex 2021-11-01 17:34:13 +00:00
Richard Davey
176a95336e The Video config will now detect for x-m4v playback support for video formats and store it in the Video.m4v property. This is used automatically by the VideoFile file loader. Fix #5719 2021-11-01 17:33:44 +00:00
Richard Davey
314ff439c9
Merge pull request #5889 from samme/fix/path-follower-end
Fix PathFollower end point when given `to`
2021-11-01 17:07:54 +00:00
natureofcode
d180218ae6 Fix type field of QuadraticBezier curve class
It fixes missing `QuadraticBezier` curves in `Path.fromJSON()` results
2021-10-31 01:19:56 +05:00
samme
ebb27e8ae4 Fix PathFollower end point when given to 2021-10-30 11:13:50 -07:00
Richard Davey
f7d81c4bd1 The default Tween._pausedState has changed from INIT to PENDING_ADD. This fixes a bug where if you called Tween.play immediately after creating it, it would force the tween to freeze. Fix #5454 2021-10-29 18:49:49 +01:00
Richard Davey
5e2c00e69f Calling Tween.reset when a tween was in a state of PENDING_REMOVE would cause it to fail to restart. It now restarts fully. Fix #4793 2021-10-29 18:26:13 +01:00
Richard Davey
5a1be5d07d TweenManager.reset is a new method that will take a tween, remove it from all internal arrays, then seek it back to its start and set it as being active. 2021-10-29 18:25:14 +01:00
Richard Davey
66939d0621 Clarify scene data in docs. Fix #5001 2021-10-29 17:53:57 +01:00
Richard Davey
8c6f5ec109 The ScriptFile Loader File Type has a new optional parameter: type. This is a string that controls the type attribute of the <script> tag that is generated by the Loader. By default it is 'script', but you can change it to 'module' or any other valid type. 2021-10-29 15:47:41 +01:00
Richard Davey
3c429088e4 Use the new isRay parameter 2021-10-28 15:01:51 +01:00
Richard Davey
7b976d6d8e The Geom.Intersects.GetLineToPolygon method has a new optional parameter isRay. If true it will treat the line parameter as a ray, if false, as a line segment (the default). 2021-10-28 15:01:51 +01:00
Richard Davey
d587b8f5a7 The Geom.Intersects.GetLineToPoints method has a new optional parameter isRay. If true it will treat the line parameter as a ray, if false, as a line segment (the default). 2021-10-28 15:01:51 +01:00
Richard Davey
50b02e9cdf The Geom.Intersects.GetLineToLine method has a new optional parameter isRay. If true it will treat the first line parameter as a ray, if false, as a line segment (the default). 2021-10-28 15:01:51 +01:00
Richard Davey
20d4391c29 Calling ParticleEmitter.setScale would set the scaleY property to null, causing calls to setScaleY to throw a runtime error. scaleY is now a required property across both the Particle and Emitter classes and all of the conditional checks for it have been removed 2021-10-28 15:01:51 +01:00
Richard Davey
c94719e0b8 Added alt swap frame 2021-10-28 01:19:52 +01:00
Richard Davey
be06610957 Preparing for beta 4 2021-10-27 18:09:56 +01:00
Richard Davey
03345ea60c Update WebGLPipeline.js 2021-10-27 17:21:59 +01:00
Richard Davey
9980c35c3e Update SpriteFXPipeline.js 2021-10-27 17:21:55 +01:00
Richard Davey
6aa75d8e5d Now works with multi-atlases and normal maps 2021-10-27 17:15:55 +01:00
Richard Davey
dbeefcc405 Update CompressedTextureFileConfig.js 2021-10-27 17:06:38 +01:00
Richard Davey
b3f34a0471 Update Text.js 2021-10-27 15:46:20 +01:00
Richard Davey
8a941dce98 Added optional shape config 2021-10-27 13:19:40 +01:00
Richard Davey
c391ad6c87 Check if still input enabled 2021-10-26 18:24:06 +01:00
Richard Davey
0fcd785ceb Calling TimerEvent.reset in the Timer callback would cause the timer to be added to the Clock's pending removal and insertion lists together, throwing an error. It will now not add to pending removal if the timer was reset. Fix #5887 2021-10-26 18:23:46 +01:00
Richard Davey
50669c7bdf Updated jsdocs. Fix #5880 2021-10-26 14:31:15 +01:00
Richard Davey
29ada646e0 Updated docs 2021-10-26 00:04:37 +01:00
Richard Davey
17c76c831c The Multi Tint fragment shader now uses the new getSampler function approach from Phaser 4 2021-10-26 00:00:35 +01:00
Richard Davey
4d18ad6ff8 Removed GenerateSrc, removed need for forloop declaration 2021-10-26 00:00:20 +01:00
Richard Davey
27833cafc7 Fixed else block 2021-10-25 21:15:53 +01:00
Richard Davey
39a06f241b The SceneManager.bootScene method will now always call LoaderPlugin.start, even if there are no files in the queue. This means that the Loader will always dispatch its START and COMPLETE events, even if the queue is empty because the files are already cached. You can now rely on the START and COMPLETE events to be fired, regardless, using them safely in your preload scene. Fix #5877 2021-10-25 18:48:38 +01:00
Richard Davey
43ed170cd7 ScaleManager.getParentBounds will now also check to see if the canvas bounds have changed x or y position, and if so return true, causing the Scale Manager to refresh all of its internal cached values. This fixes an issue where the canvas may have changed position on the page, but not its width or height, so a refresh wasn't triggered. Fix #5884 2021-10-25 18:25:24 +01:00