You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,14 @@
7
7
*`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.
8
8
*`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.
9
9
*`Config.loaderWithCredentials` is the new global setting for `XHRSettings.withCredentials`.
10
+
*`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.
11
+
*`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.
10
12
11
13
### Updates
12
14
13
15
*`XHRLoader` will now use the `XHRSettings.withCredentials` as set in the file or global loader config.
16
+
*`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.
17
+
*`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)
14
18
15
19
### Bug Fixes
16
20
@@ -20,7 +24,7 @@
20
24
21
25
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:
Phaser is a fast, free, and fun open source HTML5 game framework that offers WebGL and Canvas rendering across desktop and mobile web browsers. Games can be compiled to iOS, Android and native apps by using 3rd party tools. You can use JavaScript or TypeScript for development.
6
11
7
12
Along with the fantastic open source community, Phaser is actively developed and maintained by [Photon Storm](http://www.photonstorm.com). As a result of rapid support, and a developer friendly API, Phaser is currently one of the [most starred](https://github.com/collections/javascript-game-engines) game frameworks on GitHub.
* If this Camera has been set to render to a texture then this holds a reference
213
231
* to the HTML Canvas Element that the Camera is drawing to.
@@ -304,6 +322,9 @@ var Camera = new Class({
304
322
*
305
323
* You should not enable this unless you plan on actually using the texture it creates
306
324
* somehow, otherwise you're just doubling the work required to render your game.
325
+
*
326
+
* If you only require the Camera to render to a texture, and not also to the Game,
327
+
* them set the `renderToGame` parameter to `false`.
307
328
*
308
329
* To temporarily disable rendering to a texture, toggle the `renderToTexture` boolean.
309
330
*
@@ -314,11 +335,14 @@ var Camera = new Class({
314
335
* @since 3.13.0
315
336
*
316
337
* @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - An optional WebGL Pipeline to render with, can be either a string which is the name of the pipeline, or a pipeline reference.
338
+
* @param {boolean} [renderToGame=true] - If you do not need the Camera to still render to the Game, set this parameter to `false`.
317
339
*
318
340
* @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.
Copy file name to clipboardExpand all lines: src/gameobjects/blitter/Bob.js
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,7 @@ var Bob = new Class({
152
152
*
153
153
* @param {(string|integer|Phaser.Textures.Frame)} [frame] - The frame to be used during rendering.
154
154
*
155
-
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
155
+
* @return {this} This Bob Game Object.
156
156
*/
157
157
setFrame: function(frame)
158
158
{
@@ -178,7 +178,7 @@ var Bob = new Class({
178
178
* @method Phaser.GameObjects.Bob#resetFlip
179
179
* @since 3.0.0
180
180
*
181
-
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
181
+
* @return {this} This Bob Game Object.
182
182
*/
183
183
resetFlip: function()
184
184
{
@@ -202,7 +202,7 @@ var Bob = new Class({
202
202
* @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object.
203
203
* @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using.
204
204
*
205
-
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
205
+
* @return {this} This Bob Game Object.
206
206
*/
207
207
reset: function(x,y,frame)
208
208
{
@@ -234,7 +234,7 @@ var Bob = new Class({
234
234
* @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object.
235
235
* @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object.
236
236
*
237
-
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
237
+
* @return {this} This Bob Game Object.
238
238
*/
239
239
setPosition: function(x,y)
240
240
{
@@ -252,7 +252,7 @@ var Bob = new Class({
252
252
*
253
253
* @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.
254
254
*
255
-
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
255
+
* @return {this} This Bob Game Object.
256
256
*/
257
257
setFlipX: function(value)
258
258
{
@@ -269,7 +269,7 @@ var Bob = new Class({
269
269
*
270
270
* @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.
271
271
*
272
-
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
272
+
* @return {this} This Bob Game Object.
273
273
*/
274
274
setFlipY: function(value)
275
275
{
@@ -287,7 +287,7 @@ var Bob = new Class({
287
287
* @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.
288
288
* @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.
289
289
*
290
-
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
290
+
* @return {this} This Bob Game Object.
291
291
*/
292
292
setFlip: function(x,y)
293
293
{
@@ -307,7 +307,7 @@ var Bob = new Class({
307
307
*
308
308
* @param {boolean} value - The visible state of the Game Object.
309
309
*
310
-
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
310
+
* @return {this} This Bob Game Object.
311
311
*/
312
312
setVisible: function(value)
313
313
{
@@ -327,7 +327,7 @@ var Bob = new Class({
327
327
*
328
328
* @param {number} value - The alpha value used for this Bob. Between 0 and 1.
329
329
*
330
-
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
330
+
* @return {this} This Bob Game Object.
331
331
*/
332
332
setAlpha: function(value)
333
333
{
@@ -344,7 +344,7 @@ var Bob = new Class({
344
344
*
345
345
* @param {number} value - The tint value used for this Bob. Between 0 and 0xffffff.
346
346
*
347
-
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
Copy file name to clipboardExpand all lines: src/gameobjects/components/PathFollower.js
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ var PathFollower = {
110
110
* @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.
111
111
* @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.
112
112
*
113
-
* @return {Phaser.GameObjects.PathFollower} This Game Object.
113
+
* @return {this} This Game Object.
114
114
*/
115
115
setPath: function(path,config)
116
116
{
@@ -142,7 +142,7 @@ var PathFollower = {
142
142
* @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.
143
143
* @param {number} [offset=0] - Rotation offset in degrees.
144
144
*
145
-
* @return {Phaser.GameObjects.PathFollower} This Game Object.
145
+
* @return {this} This Game Object.
146
146
*/
147
147
setRotateToPath: function(value,offset)
148
148
{
@@ -181,7 +181,7 @@ var PathFollower = {
181
181
* @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.
182
182
* @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.
183
183
*
184
-
* @return {Phaser.GameObjects.PathFollower} This Game Object.
0 commit comments