mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 15:41:37 +00:00
Update README.md
This commit is contained in:
parent
e428f9cc03
commit
4e89ac584b
1 changed files with 69 additions and 169 deletions
238
README.md
238
README.md
|
@ -27,13 +27,11 @@ Grab the source and join the fun!
|
||||||
|
|
||||||
<div align="center"><img src="https://phaser.io/images/github/news.jpg"></div>
|
<div align="center"><img src="https://phaser.io/images/github/news.jpg"></div>
|
||||||
|
|
||||||
> 27th April 2020
|
> 13th July 2020
|
||||||
|
|
||||||
This brand new release of Phaser 3 introduces hundreds of updates from the core team and wider community. We've also hit a massive milestone with it: 100% complete JSDoc coverage of the entire API! Every single property, function, class and method now has full documentation. We didn't stop at the public API, either, as docs cover all private, protected and internal properties too. No stone was left unturned.
|
I'm pleased to announce the immediate availability of Phaser 3.24. This release is primarily a maintenance release, with the focus mostly on bug fixes and updates. Even so, there are over 70 updates in this version alone. From improvements to the Arcade Physics system, to new Tween events and the ability to chain multiple animations, to some important fixes. If you're currently using 3.23 then we recommend this upgrade. As usual, I'd like to send my thanks to the Phaser community for their help in both reporting issues and submitting pull requests to fix them.
|
||||||
|
|
||||||
There are lots of new features in this release including the brand new Rope Game Object. This allows you to create Sprites with long strips of vertices that can be independently colored and manipulated, allowing for some lovely effects! You'll also find a new Camera Rotation Effect, updates for Arcade Physics, new Data Manager functions, Tiled import tweaks and lots, lots more. The new docs, combined with great community contributions also mean better TypeScript definitions, too.
|
So, please do spend some time digging through the [Change Log](#changelog). I assure you, it's worth while :)
|
||||||
|
|
||||||
So, as usual, please do spend some time digging through the [Change Log](#changelog). I assure you, it's worth while :)
|
|
||||||
|
|
||||||
I'd like to send a massive thank-you to everyone who supports [Phaser on Patreon](https://www.patreon.com/photonstorm) (and now even GitHub Sponsors, too!) Your continued backing keeps allowing me to work on Phaser full-time and this great new releases is the very real result of that. If you've ever considered becoming a backer, now is the perfect time!
|
I'd like to send a massive thank-you to everyone who supports [Phaser on Patreon](https://www.patreon.com/photonstorm) (and now even GitHub Sponsors, too!) Your continued backing keeps allowing me to work on Phaser full-time and this great new releases is the very real result of that. If you've ever considered becoming a backer, now is the perfect time!
|
||||||
|
|
||||||
|
@ -81,14 +79,6 @@ Extra special thanks to the following companies who's support makes Phaser possi
|
||||||
|
|
||||||
![Sponsors](https://phaser.io/images/github/sponsors-2020-06.png "Our Awesome Sponsors")
|
![Sponsors](https://phaser.io/images/github/sponsors-2020-06.png "Our Awesome Sponsors")
|
||||||
|
|
||||||
![Phaser Newsletter](https://phaser.io/images/github/div-newsletter.png "Phaser Newsletter")
|
|
||||||
|
|
||||||
<div align="center"><img src="https://phaser.io/images/github/phaser-world.png"></div>
|
|
||||||
|
|
||||||
We publish the [Phaser World](https://phaser.io/community/newsletter) newsletter. It's packed full of the latest Phaser games, tutorials, videos, meet-ups, talks, and more. The newsletter also contains our weekly Development Progress updates which let you know about the new features we're working on.
|
|
||||||
|
|
||||||
Over 140 previous editions can be found on our [Back Issues](https://phaser.io/community/backissues) page.
|
|
||||||
|
|
||||||
![Download Phaser](https://phaser.io/images/github/div-download.png "Download Phaser")
|
![Download Phaser](https://phaser.io/images/github/div-download.png "Download Phaser")
|
||||||
<a name="download"></a>
|
<a name="download"></a>
|
||||||
|
|
||||||
|
@ -113,13 +103,13 @@ npm install phaser
|
||||||
[Phaser is on jsDelivr](https://www.jsdelivr.com/projects/phaser) which is a "super-fast CDN for developers". Include the following in your html:
|
[Phaser is on jsDelivr](https://www.jsdelivr.com/projects/phaser) which is a "super-fast CDN for developers". Include the following in your html:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="//cdn.jsdelivr.net/npm/phaser@3.23.0/dist/phaser.js"></script>
|
<script src="//cdn.jsdelivr.net/npm/phaser@3.24.0/dist/phaser.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
or the minified version:
|
or the minified version:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="//cdn.jsdelivr.net/npm/phaser@3.23.0/dist/phaser.min.js"></script>
|
<script src="//cdn.jsdelivr.net/npm/phaser@3.24.0/dist/phaser.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
### API Documentation
|
### API Documentation
|
||||||
|
@ -169,54 +159,20 @@ Tutorials and guides on Phaser 3 development are being published every week.
|
||||||
* The [Complete Phaser 3 Game Development course](https://academy.zenva.com/product/html5-game-phaser-mini-degree/?a=13) contains over 15 hours of videos covering all kinds of important topics.
|
* The [Complete Phaser 3 Game Development course](https://academy.zenva.com/product/html5-game-phaser-mini-degree/?a=13) contains over 15 hours of videos covering all kinds of important topics.
|
||||||
* Plus, there are [over 700 Phaser tutorials](http://phaser.io/learn) listed on the official website.
|
* Plus, there are [over 700 Phaser tutorials](http://phaser.io/learn) listed on the official website.
|
||||||
|
|
||||||
Also, please subscribe to the [Phaser World](https://phaser.io/community/newsletter) newsletter for details about new tutorials as they are published.
|
We've 3 tutorials related specifically to creating **Facebook Instant Games** with Phaser:
|
||||||
|
|
||||||
### Facebook Instant Games
|
|
||||||
|
|
||||||
Phaser 3.13 introduced the new [Facebook Instant Games](http://phaser.io/news/2018/10/facebook-instant-games-phaser-tutorial) Plugin. The plugin provides a seamless bridge between Phaser and version 6.2 of the Facebook Instant Games SDK. Every single SDK function is available via the plugin and we will keep track of the official SDK to make sure they stay in sync.
|
|
||||||
|
|
||||||
The plugin offers the following features:
|
|
||||||
|
|
||||||
* Easy integration with the Phaser Loader so load events update the Facebook progress circle.
|
|
||||||
* Events for every plugin method, allowing the async calls of the SDK to be correctly inserted into the Phaser game flow. When SDK calls resolve they will surface naturally as a Phaser event and you'll know you can safely act upon them without potentially doing something mid-way through the game step.
|
|
||||||
* All Plugin methods check if the call is part of the supported APIs available in the SDK, without needing to launch an async request first.
|
|
||||||
* Instant access to platform, player and locale data.
|
|
||||||
* Easily load player photos directly into the Texture Manager, ready for use with a Game Object.
|
|
||||||
* Subscribe to game bots.
|
|
||||||
* The plugin has a built-in Data Manager which makes dealing with data stored on Facebook seamless. Just create whatever data properties you need and they are automatically synced.
|
|
||||||
* Support for FB stats, to retrieve, store and increment stats into cloud storage.
|
|
||||||
* Save Session data with built-in session length validation.
|
|
||||||
* Easy context switching, to swap between game instances and session data retrieval.
|
|
||||||
* Easily open a Facebook share, invite, request or game challenge window and populate the text and image content using any image stored in the Texture cache.
|
|
||||||
* Full Leaderboard support. Retrieve, scan and update leaderboard entries, as well as player matching.
|
|
||||||
* Support for in-app purchases, with product catalogs, the ability to handle purchases, get past purchases and consume previously unlocked purchases.
|
|
||||||
* Easily preload a set of interstitial ads, in both banner and video form, then display the ad at any point in your game, with in-built tracking of ads displayed and inventory available.
|
|
||||||
* Plus other features, such as logging to FB Analytics, creating short cuts, switching games, etc.
|
|
||||||
|
|
||||||
We've 3 tutorials related to Facebook Instant Games and Phaser:
|
|
||||||
|
|
||||||
* [Getting Started with Facebook Instant Games](http://phaser.io/news/2018/10/facebook-instant-games-phaser-tutorial)
|
* [Getting Started with Facebook Instant Games](http://phaser.io/news/2018/10/facebook-instant-games-phaser-tutorial)
|
||||||
* [Facebook Instant Games Leaderboards Tutorial](http://phaser.io/news/2018/11/facebook-instant-games-leaderboards-tutorial)
|
* [Facebook Instant Games Leaderboards Tutorial](http://phaser.io/news/2018/11/facebook-instant-games-leaderboards-tutorial)
|
||||||
* [Displaying Ads in your Instant Games](http://phaser.io/news/2018/12/facebook-instant-games-ads-tutorial)
|
* [Displaying Ads in your Instant Games](http://phaser.io/news/2018/12/facebook-instant-games-ads-tutorial)
|
||||||
|
|
||||||
A special build of Phaser with the Facebook Instant Games Plugin ready-enabled is [available on jsDelivr](https://www.jsdelivr.com/projects/phaser). Include the following in your html:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<script src="//cdn.jsdelivr.net/npm/phaser@3.23.0/dist/phaser-facebook-instant-games.js"></script>
|
|
||||||
```
|
|
||||||
|
|
||||||
or the minified version:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<script src="//cdn.jsdelivr.net/npm/phaser@3.23.0/dist/phaser-facebook-instant-games.min.js"></script>
|
|
||||||
```
|
|
||||||
|
|
||||||
The build files are in the git repository in the `dist` folder, and you can also include the plugin in custom builds.
|
|
||||||
|
|
||||||
### Source Code Examples
|
### Source Code Examples
|
||||||
|
|
||||||
During our development of Phaser 3, we created hundreds of examples with the full source code and assets ready available. These examples are now fully integrated into the [Phaser website](https://phaser.io/examples). You can also browse them on [Phaser 3 Labs](https://labs.phaser.io) via a more advanced interface, or clone the [examples repo][examples]. We are constantly adding to and refining these examples.
|
During our development of Phaser 3, we created hundreds of examples with the full source code and assets ready available. These examples are now fully integrated into the [Phaser website](https://phaser.io/examples). You can also browse them on [Phaser 3 Labs](https://labs.phaser.io) via a more advanced interface, or clone the [examples repo][examples]. We are constantly adding to and refining these examples.
|
||||||
|
|
||||||
|
### Huge list of Phaser 3 Plugins
|
||||||
|
|
||||||
|
Super community member RexRainbow has been publishing Phaser 3 content for years, building up an impressive catalogue in that time. You'll find [loads of plugins](https://rexrainbow.github.io/phaser3-rex-notes/docs/site/index.html#list-of-my-plugins), from UI controls such as text input boxes, to Firebase support, Finite State Machines and lots more. As well as the plugins there is also a comprehensive set of 'Notes' about Phaser 3, going into great detail about how the various systems work. It's an invaluable resource and well worth checking out at [https://rexrainbow.github.io](https://rexrainbow.github.io/phaser3-rex-notes/docs/site/index.html)
|
||||||
|
|
||||||
### Create Your First Phaser 3 Example
|
### Create Your First Phaser 3 Example
|
||||||
|
|
||||||
Create an `index.html` page locally and paste the following code into it:
|
Create an `index.html` page locally and paste the following code into it:
|
||||||
|
@ -225,7 +181,7 @@ Create an `index.html` page locally and paste the following code into it:
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/phaser@3.23.0/dist/phaser-arcade-physics.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/phaser@3.24.0/dist/phaser-arcade-physics.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -313,7 +269,9 @@ Run it in your browser and you'll see the following:
|
||||||
|
|
||||||
This is a tiny example, and there are hundreds more for you to explore, but hopefully it shows how expressive and quick Phaser is to use. With just a few easily readable lines of code, we've got something pretty impressive up on screen!
|
This is a tiny example, and there are hundreds more for you to explore, but hopefully it shows how expressive and quick Phaser is to use. With just a few easily readable lines of code, we've got something pretty impressive up on screen!
|
||||||
|
|
||||||
Subscribe to our newsletter for further tutorials and examples.
|
![Ourcade](https://phaser.io/images/github/ourcade.jpg "Ourcade")
|
||||||
|
|
||||||
|
Ourcade have published [two great Phaser 3 books](https://blog.ourcade.co/). They'll take you from getting set-up, through to finishing your first game using modern JavaScript or TypeScript and they're both completely free! They also publish a huge range of quality tutorials and videos, so be sure to check out their site every week.
|
||||||
|
|
||||||
![Building Phaser](https://phaser.io/images/github/div-building-phaser.png "Building Phaser")
|
![Building Phaser](https://phaser.io/images/github/div-building-phaser.png "Building Phaser")
|
||||||
|
|
||||||
|
@ -336,132 +294,74 @@ You can then run `webpack` to create a development build in the `build` folder w
|
||||||
|
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
## Version 3.23 - Ginro - 27th April 2020
|
## Version 3.24 - Rem - 13th July 2020
|
||||||
|
|
||||||
### JSDocs
|
### Arcade Physics New Features, Updates and Fixes
|
||||||
|
|
||||||
The entire Phaser 3 API now has 100% complete JSDoc coverage!
|
* When colliding physics groups with the search tree enabled, there was an unnecessary intersection test for each body returned by the search (thanks @samme)
|
||||||
|
* When doing an overlap collision, there was an unnecessary intersection test for each pair of overlapping bodies (thanks @samme)
|
||||||
The following sections had their documentation completed in this release:
|
* Sprite vs. Static Group collision tests now always use the static tree (thanks @samme)
|
||||||
|
* Fixed a bug where if you added a static body to a sprite with scale ≠ 1, the body position was incorrect (thanks @samme)
|
||||||
* Animations
|
* If you passed in an array of `children` when creating a Physics Group, they didn't receive bodies. Fix #5152 (thanks @samme)
|
||||||
* Create
|
* New types allow for better docs / TypeScript defs especially in the Factory functions: `ArcadePhysicsCallback`, `GameObjectWithBody`, `GameObjectWithDynamicBody`, `GameObjectWithStaticBody`, `ImageWithDynamicBody`, `ImageWithStaticBody`, `SpriteWithDynamicBody` and `SpriteWithStaticBody`. Fix #4994 (thanks @samme @gnesher)
|
||||||
* Curves
|
* `Body.updateFromGameObject` is a new method that extracts the relevant code from `preUpdate`, allowing you to read the body's new position and center immediately, before the next physics step. It also lets `refreshBody` work for dynamic bodies, where previously it would error (thanks @samme)
|
||||||
* Geom
|
* Momentum exchange wasn't working correctly vs. immovable bodies. The movable body tended to stop. Fix #4770 (thanks @samme)
|
||||||
* Math
|
* The Body mass was decreasing the inertia instead of increasing it. Fix #4770 (thanks @samme)
|
||||||
* Renderer
|
* The separation vector seemed to be incorrect, causing the slip / slide collisions. The separation is now correct for circle–circle collisions (although not fully for circle–rectangle collisions), part fix #4770 (thanks @samme)
|
||||||
* Textures
|
* The Arcade Body delta was incorrectly calculated on bodies created during the `update` step, causing the position to be off. Fix #5204 (thanks @zackexplosion @samme)
|
||||||
* Tilemaps
|
* `Arcade.Components.Size.setBodySize` is a new method available on Arcade Physics Game Objects that allows you to set the body size. This replaces `setSize` which is now deprecated. Fix #4786 (thanks @wingyplus)
|
||||||
|
|
||||||
### Removed
|
|
||||||
|
|
||||||
The following features have been removed in this version of Phaser:
|
|
||||||
|
|
||||||
* Impact Physics has been removed completely and is no longer a choice of physics system. The resulting `Scene.impact` property and Impact config object have also been removed.
|
|
||||||
|
|
||||||
### Deprecated
|
|
||||||
|
|
||||||
The following features are now deprecated and will be removed in a future version of Phaser:
|
|
||||||
|
|
||||||
* The Light Pipeline and associated components will be removed. This feature was never properly finished and adds too much redundant, non-optional code into the core API. The ability to load normal maps alongside textures will _remain_, for use in your own lighting shaders, which gives you far more control over the final effect.
|
|
||||||
|
|
||||||
### New: Rope Game Object
|
|
||||||
|
|
||||||
This version of Phaser contains the brand new Rope Game Object. A Rope is a special kind of Game Object that has a repeating texture that runs in a strip, either horizontally or vertically. Unlike a Sprite, you can define how many vertices the Rope has, and can modify each of them during run-time, allowing for some really lovely effects.
|
|
||||||
|
|
||||||
Ropes can be created via the Game Object Factory in the normal way (`this.add.rope()`) and you should look at the examples and documentation for further implementation details.
|
|
||||||
|
|
||||||
Note that Ropes are a WebGL only feature.
|
|
||||||
|
|
||||||
### New Features
|
### New Features
|
||||||
|
|
||||||
* `Line.GetEasedPoints` is a new function that will take a Line, a quantity, and an ease function, and returns an array of points where each point has been spaced out across the length of the Line based on the ease function given.
|
* The Animation component has a new property `nextAnimsQueue` which allows you to sequence Sprite animations to play in order, i.e: `this.mole.anims.play('digging').anims.chain('lifting').anims.chain('looking').anims.chain('lowering');` (thanks @tgroborsch)
|
||||||
* `XHRSettings.withCredentials` is a new boolean property that controls the `withCredentials` setting of the XHR Request made by the Loader. It indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates. You can set this on a per-file basis, or global in the Game Config.
|
* `Group.setActive` is a new method that will set the active state of a Group, just like it does on other Game Objects (thanks @samme)
|
||||||
* `Config.loaderWithCredentials` is the new global setting for `XHRSettings.withCredentials`.
|
* `Group.setName` is a new method that will set the name property of a Group, just like it does on other Game Objects (thanks @samme)
|
||||||
* `Camera.renderToGame` is a new property used in conjunction with `renderToTexture`. It controls if the Camera should still render to the Game canvas after rendering to its own texture or not. By default, it will render to both, but you can now toggle this at run-time.
|
* `TWEEN_STOP` is a new event dispatched by a Tween when it stops playback (thanks @samme @RollinSafary)
|
||||||
* `Camera.setRenderToTexture` has a new optional parameter `renderToGame` which sets the `Camera.renderToGame` property, controlling if the Camera should render to both its texture and the Game canvas, or just its texture.
|
* You can now specify an `onStop` callback when creating a Tween as part of the tween config, which is invoked when a Tween stops playback (thanks @samme @RollinSafary)
|
||||||
* The free version of Texture Packer exports a `pivot` property when using JSON Array or Hash, however the Texture Packer Phaser export uses the `anchor` property. This update allows the loaders to work with either property, regardless of which export you use (thanks @veleek)
|
* Previously, if you created a timeline and passed no tweens in the config, the timeline would be created but all config properties were ignored. Now the timeline's own properties (completeDelay, loop, loopDelay, useFrames, onStart, onUpdate, onLoop, onYoyo, onComplete, etc.) are set from the config properly (thanks @samme)
|
||||||
* `get()` is a new method in the HTML and Web Audio Sound Managers that will get the first sound in the manager matching the given key, if any (thanks @samme)
|
* `TextStyle.wordWrapWidth` lets you set the maximum width of a line of text (thanks @mikewesthad)
|
||||||
* `getAll()` is a new method in the HTML and Web Audio Sound Managers that will get all sounds in the manager matching the given key, if any (thanks @samme)
|
* `TextStyle.wordWrapCallback` is a custom function that will is responsible for wrapping the text (thanks @mikewesthad)
|
||||||
* `removeAll()` is a new method in the HTML and Web Audio Sound Managers that will remove all sounds in the manager, destroying them (thanks @samme)
|
* `TextStyle.wordWrapCallbackScope` is the scope that will be applied when the `wordWrapCallback` is invoked (thanks @mikewesthad)
|
||||||
* `stopByKey()` is a new method in the HTML and Web Audio Sound Managers that will stop any sound in the manager matching the given key, if any (thanks @samme)
|
* `TextStyle.wordWrapUseAdvanced` controls whether or not to use the advanced wrapping algorithm (thanks @mikewesthad)
|
||||||
* `Rectangle.FromXY` is a new function that will create the smallest Rectangle containing two coordinate pairs, handy for marquee style selections (thanks @samme)
|
* `KeyboardPlugin.removeAllKeys` is a new method that allows you to automatically remove all Key instances that the plugin has created, making house-keeping a little easier (thanks @samme)
|
||||||
* `PathFollower.pathDelta` is a new property that holds the distance the follower has traveled from the previous point to the current one, at the last update (thanks @samme)
|
* `Math.RotateTo` is a new function that will position a point at the given angle and distance (thanks @samme)
|
||||||
* `Vector2.fuzzyEquals` is a new method that will check whether the Vector is approximately equal to a given Vector (thanks @samme)
|
* `Display.Bounds.GetBounds` is a new function that will return the un-transformed bounds of the given Game Object as a Rectangle (thanks @samme)
|
||||||
* `Vector2.setAngle` is a new method that will set the angle of the Vector (thanks @samme)
|
|
||||||
* `Vector2.setLength` is a new method that will set the length, or magnitude of the Vector (thanks @samme)
|
|
||||||
* `Vector2.normalizeLeftHand` is a new method that will rotate the Vector to its perpendicular, in the negative direction (thanks @samme)
|
|
||||||
* `Vector2.limit` is a new method that will limit the length, or magnitude of the Vector (thanks @samme)
|
|
||||||
* `Vector2.reflect` is a new method that will reflect the Vector off a line defined by a normal (thanks @samme)
|
|
||||||
* `Vector2.mirror` is a new method that will reflect the Vector across another (thanks @samme)
|
|
||||||
* `Vector2.rotate` is a new method that will rotate the Vector by an angle amount (thanks @samme)
|
|
||||||
* `Math.Angle.Random` is a new function that will return a random angle in radians between -pi and pi (thanks @samme)
|
|
||||||
* `Math.Angle.RandomDegrees` is a new function that will return a random angle in degrees between -180 and 180 (thanks @samme)
|
|
||||||
* `Physics.Arcade.World.fixedStep` is a new boolean property that synchronizes the physics fps to the rendering fps when enabled. This can help in some cases where "glitches" can occur in the movement of objects. These glitches are especially noticeable on objects that move at constant speed and the fps are not consistent. Enabling this feature disables the fps and timeScale properties of the Arcade.World class (thanks @jjcapellan)
|
|
||||||
* `Curves.Path.getTangent` is a new method that gets a unit vector tangent at a relative position on the path (thanks @samme)
|
|
||||||
* `DataManager.inc` is a new method that will increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0 (thanks @rexrainbow)
|
|
||||||
* `DataManager.toggle` is a new method that will toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false (thanks @rexrainbow)
|
|
||||||
* The Tiled parser will now recognize Tiled `point objects` and export them with `point: true`. Equally, Sprites generated via `createFromObjects` are now just set to the position of the Point object, using the Sprites dimensions. This is a breaking change, so if you are using Point objects and `createFromObjects` please re-test your maps against this release of Phaser (thanks @samme)
|
|
||||||
* You can now use Blob URLs when loading `Audio` objects via the Loader (thanks @aucguy)
|
|
||||||
* You can now use Blob URLs when loading `Video` objects via the Loader (thanks @aucguy)
|
|
||||||
* Tiled Image Collections now have rudimentary support and will create a single tileset per image. This is useful for prototyping, but should not be used heavily in production. See #4964 (thanks @gogoprog)
|
|
||||||
* When loading files using your own XHR Settings you can now use the new property `headers` to define an object containing multiple headers, all of which will be sent with the xhr request (thanks @jorbascrumps)
|
|
||||||
* `Camera.rotateTo` is a new Camera effect that allows you to set the rotation of the camera to a given value of the duration specified (thanks @jan1za)
|
|
||||||
|
|
||||||
### Updates
|
### Updates
|
||||||
|
|
||||||
* `XHRLoader` will now use the `XHRSettings.withCredentials` as set in the file or global loader config.
|
* The `Pointer.dragStartX/YGlobal` and `Pointer.dragX/Y` values are now populated from the `worldX/Y`, which means using those values directly in Input Drag callbacks will now work when the Camera is zoomed. Fix #4755 (thanks @braindx)
|
||||||
* `Animation.setCurrentFrame` will no longer try to call `setOrigin` or `updateDisplayOrigin` if the Game Object doesn't have the Origin component, preventing unknown function errors.
|
* The `browser` field has been added to the Phaser `package.json` pointing to the `dist/phaser.js` umd build (thanks @FredKSchott)
|
||||||
* `MatterTileBody` now extends `EventEmitter`, meaning you can listen to collision events from Tiles directly and it will no longer throw errors about `gameObject.emit` not working. Fix #4967 (thanks @reinildo)
|
* Calling `TimeStep.wake()` while the loop is running will now cause nothing to happen, rather than sleeping and then waking again (thanks @samme)
|
||||||
* Added `MatterJS.BodyType` to `GameObject.body` type. Fix #4962 (thanks @meisterpeeps)
|
* `Container.getBounds` will no longer set the temp rect bounds to the first child of the Container by default (which would error if the child had no bounds, like a Graphics object) and instead sets it as it iterates the children (thanks @blopa)
|
||||||
* The `JSONHash` loader didn't load custom pivot information, but `JSONArray` did. So that functionality has been duplicated into the `JSONHash` file type (thanks @veleek)
|
* `File.state` will now be set to the `FILE_LOADING` state while loading and `FILE_LOADED` after loading (thanks @samme)
|
||||||
* When enabling a Game Object for input debug, the debug body's depth was 0. It's now set to be the same depth as the actual Game Object (thanks @mktcode)
|
* `BaseCamera.cull` now moves some of its calculations outside of the cull loop to speed it up (thanks @samme)
|
||||||
* Spine Files can now be loaded via a manifest, allowing you to specify a prefix in the loader object and providing absolute paths to textures. Fix #4813 (thanks @FostUK @a610569731)
|
* `SceneManager.createSceneFromInstance` had a small refactor to avoid a pointless condition (thanks @samme)
|
||||||
* `collideSpriteVsGroup` now exits early when the Sprite has `checkCollision.none`, skipping an unnecessary iteration of the group (thanks @samme)
|
|
||||||
* `collideSpriteVsGroup` when looping through the tree results now skips bodies with `checkCollision.none` (thanks @samme)
|
|
||||||
* When enabling a Game Object for Input Debugging the created debug shape will now factor in the position, scale and rotation of the Game Objects parent Container, if it has one (thanks @scott20145)
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* The conditional checking if the `PathFollower` was at the end of the path or not was incorrect (thanks @samme)
|
* Fixed a TypeError warning when importing JSON objects directly to the `url` argument of any of the Loader filetypes. Fix #5189 (thanks @awweather @samme)
|
||||||
* Creating an `Arcade Physics Body` from a scaled Game Object would use the un-scaled dimensions for the body. They now use the scaled dimensions. This may be a breaking change in some games, so please be aware of it (thanks @samme)
|
* The `NOOP` function was incorrectly imported by the Mouse and Keyboard Manager. Fix #5170 (thanks @samme @gregolai)
|
||||||
* Creating an `Arcade Physics Static Body` from a scaled Game Object would use the un-scaled dimensions for the body. They now use the scaled dimensions. This may be a breaking change in some games, so please be aware of it (thanks @samme)
|
* When Audio files failed to decode on loading, they would always show 'undefined' as the key in the error log, now they show the actual key (thanks @samme)
|
||||||
* The `Arcade Physics Static Body` center was incorrect after construction. Probably caused problems with circle collisions. Fix #4770 (thanks @samme)
|
* When the Sprite Sheet parser results in zero frames, the warning will now tell you the texture name that caused it (thanks @samme)
|
||||||
* An Arcade Physics Body `center` and `position` are now correct after construction and before preUpdate(), for any Game Object origin or scale (thanks @samme)
|
* `KeyboardPlugin.checkDown` didn't set the `duration` to zero if the parameter was omitted, causing it to always return false. Fix #5146 (thanks @lozzajp)
|
||||||
* When calling `Body.setSize` with the `center` parameter as `true` the calculated offset would be incorrect for scaled Game Objects. The offset now takes scaling into consideration (thanks @samme)
|
* If you passed in an array of `children` when creating a Group, they were not added and removed correctly. Fix #5151 (thanks @samme)
|
||||||
* `HTML5AudioFile.load` would throw an error in strict mode (thanks @samme)
|
* When using HTML5 Audio with `pauseOnBlur` (the default), if you play a sound, schedule stopping the sound (e.g., timer, tween complete callback), leave the page, and return to the page, the sound `stop()` will error (thanks @samme)
|
||||||
* When using the `No Audio` Sound Manager, calling `destroy()` would cause a Maximum call stack size exceeded error as it was missing 6 setter methods. It will now destroy properly (thanks @samme)
|
* Using a Render Texture when you're also using the headless renderer would cause an error (thanks @samme)
|
||||||
* When using HTML5 Audio, setting the game or sound volume outside of the range 0-1 would throw an index size error. The value is now clamped before being set (thanks @samme)
|
* `Ellipse.setWidth` would incorrectly set the `xRadius` to the diameter (thanks @rexrainbow)
|
||||||
* Sound Managers were still listening to Game BLUR, FOCUS, and PRE_STEP events after being destroyed. These events are now cleared up properly (thanks @samme)
|
* `Ellipse.setHeight` would incorrectly set the `yRadius` to the diameter (thanks @rexrainbow)
|
||||||
* In WebGL, the `TextureTintPipeline` is now set before rendering any camera effects. If the pipeline had been changed, the effects would not run (thanks @TroKEMp)
|
* When specifically setting the `parent` property in the Game Config to `null` the canvas was appended to the document body, when it should have been ignored (allowing you to add it to the dom directly). Fix #5191 (thanks @MerganThePirate)
|
||||||
* When transitioning to a sleeping Scene, the transition `data` wasn't sent to the Scene `wake` method. It's now sent across to both sleeping and waking scenes. Fix #5078 (thanks @MrMadClown)
|
* Containers will now apply nested masks correctly when using the Canvas Renderer specifically (thanks @scott20145)
|
||||||
* `Scale.lockOrientation('portrait')` would throw a runtime error in Firefox: 'TypeError: 'mozLockOrientation' called on an object that does not implement interface Screen.' It no longer does this. Fix #5069 (thanks @123survesh)
|
* Calling `Scale.startFullScreen` would fail in Safari on Mac OS, throwing a `fullscreenfailed` error. It now triggers fullscreen mode correctly, as on other browsers. Fix #5143 (thanks @samme @novaknole)
|
||||||
* The `FILE_COMPLETE` event was being emitted twice for a JSON loaded animation file. It now only fires once. Fix #5059 (thanks @jjcapellan)
|
* Calling `setCrop` on a Matter Physics Sprite would throw a TypeError, but will now crop correctly. Not that it only crops the texture, the body is unaffected. Fix #5211 (thanks @MatthewRorke @samme)
|
||||||
* If you restart or stop / start a scene and then queue at least one new file in `preload`, the scenes `update` function is called before `create`, likely causing an error. Fix #5065 (thanks @samme)
|
* The Static Tilemap Layer would ignore the layer rotation and parent transform when using WebGL (but worked in Canvas). Both modes now work in the same manner (thanks @cruzdanilo)
|
||||||
* `Circle.GetPoints` will now check that `stepRate` is > 0 to avoid division by zero errors leading to the quantity becoming infinity (thanks @jdcook)
|
* Calling `getTextBounds` on a BitmapText object would return the incorrect values if the origin had been changed, but the text itself had not, as it was using out of date dimensions. Changing the origin now automatically triggers BitmapText to be dirty, forcing the bounds to be refreshed. Fix #5121 (thanks @thenonamezz)
|
||||||
* `Ellipse.GetPoints` will now check that `stepRate` is > 0 to avoid division by zero errors leading to the quantity becoming infinity (thanks @jdcook)
|
* The ISO Triangle shape would skip rendering the left side of the first triangle in the batch. It now renders all ISO Triangles correctly. Fix #5164 (thanks @mattjennings)
|
||||||
* `Line.GetPoints` will now check that `stepRate` is > 0 to avoid division by zero errors leading to the quantity becoming infinity (thanks @jdcook)
|
|
||||||
* `Polygon.GetPoints` will now check that `stepRate` is > 0 to avoid division by zero errors leading to the quantity becoming infinity (thanks @jdcook)
|
|
||||||
* `Rectangle.GetPoints` will now check that `stepRate` is > 0 to avoid division by zero errors leading to the quantity becoming infinity (thanks @jdcook)
|
|
||||||
* `Triangle.GetPoints` will now check that `stepRate` is > 0 to avoid division by zero errors leading to the quantity becoming infinity (thanks @jdcook)
|
|
||||||
* Changing the game size with a scale mode of FIT resulted in a canvas with a incorrect aspect ratio. Fix #4971 (thanks @Kitsee @samme)
|
|
||||||
* The Matter Physics `Common.isString` function would cause a 'TypeError: Invalid calling object' in Internet Explorer (thanks @samme)
|
|
||||||
* `Arcade.Body.checkCollision.none` did not prevent collisions with Tiles. Now it does (thanks @samme)
|
|
||||||
* When running in HEADLESS mode, using a `Text` Game Object would cause a runtime error "Cannot read property gl of null". Fix #4976 (thanks @raimon-segura @samme)
|
|
||||||
* The Tilemap `LayerData` class `properties` property has been changed from 'object' to an array of objects, which is what Tiled exports when defining layer properties in the editor. Fix #4983 (thanks @Nightspeller)
|
|
||||||
* `AudioFile` and `VideoFile` had their state set to `undefined` instead of `FILE_PROCESSING` (thanks @samme)
|
|
||||||
* `Container.getBounds` would return incorrect values if it had child Containers within it. Fix #4580 (thanks @Minious @thedrint)
|
|
||||||
* The Loader no longer prepends the current path to the URL if it's a Blob object (thanks @aucguy)
|
|
||||||
* Spine Atlases can now be loaded correctly via Asset Packs, as they now have the right index applied to them (thanks @jdcook)
|
|
||||||
* Input events for children inside nested Containers would incorrectly fire depending on the pointer position (thanks @rexrainbow)
|
|
||||||
* Animations with both `yoyo` and `repeatDelay` set will respect the delay after each yoyo runs (thanks @cruzdanilo)
|
|
||||||
* `CanvasTexture.setSize` forgot to update the `width` and `height` properties of the Texture itself. These now match the underlying canvas element. Fix #5054 (thanks @sebbernery)
|
|
||||||
|
|
||||||
### Examples, Documentation and TypeScript
|
### Examples, Documentation and TypeScript
|
||||||
|
|
||||||
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
|
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
|
||||||
|
|
||||||
@JasonHK @supertommy @majalon @samme @MartinBlackburn @halilcakar @jcyuan @MrMadClown @Dinozor @EmilSV @Jazcash
|
@samme @SanderVanhove @SirJosh3917 @mooreInteractive @A-312 @lozzajp @mikewesthad @j-waters @futuremarc
|
||||||
|
|
||||||
Please see the complete [Change Log](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md) for previous releases.
|
Please see the complete [Change Log](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md) for previous releases.
|
||||||
|
|
||||||
|
@ -486,14 +386,14 @@ Phaser is a [Photon Storm](http://www.photonstorm.com) production.
|
||||||
|
|
||||||
Created by [Richard Davey](mailto:rich@photonstorm.com). Powered by coffee, anime, pixels and love.
|
Created by [Richard Davey](mailto:rich@photonstorm.com). Powered by coffee, anime, pixels and love.
|
||||||
|
|
||||||
The Phaser logo and characters are © 2019 Photon Storm Limited.
|
The Phaser logo and characters are © 2020 Photon Storm Limited.
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
"Above all, video games are meant to be just one thing: fun. Fun for everyone." - Satoru Iwata
|
"Above all, video games are meant to be just one thing: fun. Fun for everyone." - Satoru Iwata
|
||||||
|
|
||||||
[get-js]: https://github.com/photonstorm/phaser/releases/download/v3.23.0/phaser.js
|
[get-js]: https://github.com/photonstorm/phaser/releases/download/v3.24.0/phaser.js
|
||||||
[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v3.23.0/phaser.min.js
|
[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v3.24.0/phaser.min.js
|
||||||
[clone-http]: https://github.com/photonstorm/phaser.git
|
[clone-http]: https://github.com/photonstorm/phaser.git
|
||||||
[clone-ssh]: git@github.com:photonstorm/phaser.git
|
[clone-ssh]: git@github.com:photonstorm/phaser.git
|
||||||
[clone-ghwin]: github-windows://openRepo/https://github.com/photonstorm/phaser
|
[clone-ghwin]: github-windows://openRepo/https://github.com/photonstorm/phaser
|
||||||
|
|
Loading…
Reference in a new issue