Richard Davey
fb1ea7a01e
Updated documentation.
2016-09-21 22:59:20 +01:00
Richard Davey
6aff35b5fd
Frame.rotationDirection
has been removed. It isn't needed, as modern texture packers only rotate 90 degrees clockwise anyway, and Phaser only supports this rotation direction.
2016-09-21 22:53:30 +01:00
Richard Davey
ed13db65d3
Docs update.
2016-09-20 02:00:05 +01:00
Richard Davey
b0ce81bec0
Multiple Batched Texture support is now available. This is a WebGL feature that can seriously decrease the volume of draw calls made in complex, or asset heavy, games. To enable it you can either use the new renderer type Phaser.WEBGL_MULTI
, or you can pass the property multiTexture: true
in a Phaser.Game configuration object. Once enabled, it cannot be disabled.
...
`game.renderer.setTexturePriority` is the method that goes with the Multiple Texture support. It takes an array as its single argument. The array consists of Phaser.Cache image key strings. Phaser will then try to batch as many of the textures as it can, depending on the hardware limits. If for example the GPU can only batch 8 textures, and you provide an array of 16, then only the first 8 in the array will be batched.
2016-09-19 23:31:32 +01:00
Richard Davey
b1473c55b9
Defs update #2737
2016-09-08 01:46:54 +01:00
Richard Davey
17f8181338
Defs update #2747
2016-09-08 01:44:53 +01:00
Richard Davey
c42c447bfb
Weapon.multiFire is a new property that allows you to set a Weapon as being allowed to call fire
as many times as you like, per game loop. This allows a single Weapon instance to fire multiple bullets.
...
Weapon.fire has two new arguments: `offsetX` and `offsetY`. If the bullet is fired from a tracked Sprite or Pointer, or the `from` argument is set, this applies a horizontal and vertical offset from the launch position.
Weapon.fireOffset attempts to fire a single Bullet from a tracked Sprite or Pointer, but applies an offset to the position first. This is a shorter form of calling `Weapon.fire` and passing in the offset arguments.
Weapon.fireMany attempts to fire multiple bullets from the positions defined in the given array. If you provide a `from` argument, or if there is a tracked Sprite or Pointer, then the positions are treated as __offsets__ from the given objects position. If `from` is undefined, and there is no tracked object, then the bullets are fired from the given positions, as they exist in the world.
2016-09-08 01:42:19 +01:00
Richard Davey
ec29511f42
Docs update.
2016-09-07 23:23:47 +01:00
Richard Davey
fb524d351b
Docs update.
2016-09-07 23:23:47 +01:00
Richard Davey
7f7a355686
Preparing for Phaser 3.0.0 dev.
2016-08-26 02:20:05 +01:00
Richard Davey
dd39f9ab08
Updated TS defs.
2016-08-26 01:24:15 +01:00
photonstorm
94a0dbe547
Text.updateText now sets Text.dirty = false
, which stops Text objects from having updateText
called twice on them after creation.
2016-08-25 14:16:48 +01:00
photonstorm
19dbd8bba8
The Weapon.fireRateVariance property was never taken into account internally. It's now applied to the firing rate correctly (thanks @noseglid #2715 )
2016-08-25 13:31:43 +01:00
photonstorm
2409499b4d
Docs update.
2016-08-25 13:07:42 +01:00
Richard Davey
08809217cd
Docs update.
2016-08-23 09:42:19 +01:00
photonstorm
cbef6d6648
Formatting fix.
2016-08-22 18:38:40 +01:00
photonstorm
7b9c4114b2
Preparing for 2.6.2 release.
2016-08-22 12:31:02 +01:00
Richard Davey
19342fa3af
ArcadePhysics Body.rotation now reads its initial value from sprite.angle instead of sprite.rotation. The property was immediately replaced with the correct value in Body.preUpdate regardless, but it keeps it consistent (thanks @samme #2708 )
2016-08-21 10:27:58 +01:00
photonstorm
4382944a2e
A tinted Texture in Canvas mode wouldn't be updated properly if it was also cropped, beyond the initial crop. Now a cropped texture will re-tint itself every time the crop is updated, and has changed (thanks @phoenixyjll #2688 )
2016-08-18 15:55:13 +01:00
photonstorm
04e70e820c
Updated KeyCode docs placement #2653
2016-08-18 15:35:43 +01:00
Richard Davey
129a652f07
Docs update.
2016-08-17 00:38:52 +01:00
Richard Davey
8d69d0e2e8
Docs update.
2016-08-17 00:38:52 +01:00
Richard Davey
63ce6ae6c4
Defs update #2689
2016-08-16 21:01:41 +01:00
Richard Davey
a0c6ae6c51
Phaser.Image now has the ScaleMinMax component.
2016-08-03 05:00:09 +01:00
Richard Davey
e955cf4222
Sound.play would throw the error "Uncaught DOMException: Failed to execute 'disconnect' on 'AudioNode': the given destination is not connected." in Chrome, if you tried to play an audio marker that didn't exist, while a valid marker was already playing.
2016-08-03 04:04:22 +01:00
Richard Davey
688752c5de
Math.getShortestAngle will return the shortest angle between the two given angles. Angles are in the range -180 to 180, which is what Sprite.angle
uses. So you can happily feed this method two sprite angles, and get the shortest angle back between them ( #2494 )
2016-07-29 03:39:51 +01:00
photonstorm
f246c276cb
Multi-Texture support has now been built into our version of Pixi. This can offer dramatic performance increases in WebGL games on GPUs that support multiple texture bindings (which is most of them these days).
...
WebGLRenderer.setTexturePriority is the method used to set the priority of textures when the GPU supports multi-texture batching.
Rope has two new properties `textureIndices` and `textureIndex` to handle multi-texture support.
Strip has two new properties `textureIndices` and `textureIndex` to handle multi-texture support.
The following shaders have all been updated to support multi-textures: `ComplexPrimitiveShader`, `PixiFastShader`, `PixiShader`, `PrimitiveShader`, `StripShader`.
WebGLFastSpriteBatch.vertSize was increased from 10 to 11.
BaseTexture.textureIndex is a new property that controls the index of the texture within the GPU texture cache. Usually you don't change this yourself, and use `renderer.setTexturePriority` instead, but the property is public and available for more advanced use-cases.
CanvasRenderer.setTexturePriority is an empty function, but included to allow you to simply call `game.renderer.setTexturePriority` without first having to wrap that in a WebGL check.
2016-07-26 14:56:12 +01:00
photonstorm
dfaf0b99dd
Merge branch 'multitexture-gl' into dev
2016-07-26 14:47:26 +01:00
photonstorm
86affde81b
The file pixi/utils/Polyk.js has been removed, as it was no longer used with Pixi or Phaser (we replaced it with EarCut a while ago)
2016-07-26 14:30:06 +01:00
Richard Davey
19e609185a
Math.rotateToAngle takes two angles (in radians), and an interpolation value, and returns a new angle, based on the shortest rotational distance between the two.
2016-07-25 00:39:38 +01:00
Richard Davey
b69cae4206
The methods setStageReference
and removeStageReference
have been removed from all Pixi classes. Objects no longer have stage
properties, or references to the Stage object. This is because no reference to the Stage is required for any calculations, and Phaser can only have 1 Stage, so adding and removing references to it were superfluous actions.
2016-07-23 14:31:17 +01:00
Richard Davey
ce764e098d
As a result of changes in #2573 Graphics objects were calling updateLocalBounds
on any shape change, which could cause dramatic performances drops in Graphics heavy situations ( #2618 ). Graphics objects now have a new flag _boundsDirty
which is used to detect if the bounds have been invalidated, i.e. by a Graphics being cleared or drawn to. If this is set to true then updateLocalBounds
is called once in the postUpdate
method (thanks @pengchuan #2618 )
2016-07-23 12:52:35 +01:00
Richard Davey
3d2cb3f8b3
Docs update.
2016-07-23 12:28:16 +01:00
Richard Davey
75272974e9
The Emitter.makeParticles collide
argument didn't work, as a result of #2661 , but is now properly respected thanks to that change (thanks @samme #2662 )
2016-07-23 10:08:34 +01:00
Richard Davey
6947057427
The property checkCollision.none
in the ArcadePhysics.Body class was available, but never used internally. It is now used and checked by the separate
method. By setting checkCollision.none = true
you can disable all collision and overlap checks on a Body, but still retain its motion updates (thanks @samme #2661 )
2016-07-23 10:01:38 +01:00
Richard Davey
46c20ab00a
The property checkCollision.none
has been removed from the ArcadePhysics.Body class. It was never used internally, so lead to confusion about its use. To disable a body, use body.enable = false
(thanks @samme #2661 )
2016-07-23 09:43:01 +01:00
photonstorm
9fb27b6fe2
Moving all the getTiles calls back again, as it's just a bit TOO API breaking to move them, for the sake of a few KB.
2016-07-22 14:05:35 +01:00
Richard Davey
91b9513e7e
TilemapLayer.getTileX, getTileY and getTileXY all now required a Phaser.TilemapLayer (or Phaser.TilemapLayerGL) as the first argument.
...
Tilemap.getRayCastTiles now requires a Phaser.TilemapLayer (or Phaser.TilemapLayerGL) as the first argument.
Tilemap.getTiles now requires a Phaser.TilemapLayer (or Phaser.TilemapLayerGL) as the first argument.
2016-07-22 04:10:55 +01:00
Richard Davey
020cb01056
Canvas tilemap renderer fixes.
2016-07-22 03:55:21 +01:00
Richard Davey
be92e41366
The private methods TilemapLayer._fixX
, _unfixX
, _fixY
and _unfixY
have been moved to `Tilemap.
2016-07-22 03:20:56 +01:00
Richard Davey
ef9f53e350
TilemapLayer.getRayCastTiles has been moved to Tilemap.getRayCastTiles.
...
TilemapLayer.rayStepRate has been moved to Tilemap.rayStepRate.
TilemapLayer.getTiles has been moved to Tilemap.getTiles.
2016-07-22 03:03:50 +01:00
Richard Davey
9eff79f2c2
Phaser.Tileset has a new property lastgid
which is populated automatically by the TilemapParser when importing Tiled map data, or can be set manually if building your own tileset.
2016-07-22 02:35:33 +01:00
Richard Davey
79e135087f
ScaleManager.hasPhaserSetFullScreen is a new boolean that identifies if the browser is in full screen mode or not, and if Phaser was the one that requested it. As it's possible to enter full screen mode outside of Phaser, and it then gets confused about what bounding parent to use.
2016-07-21 02:11:16 +01:00
Richard Davey
cff28860fa
The Loader.headers object has a new property requestedWith
. By default this is set to false
, but it can be used to set the X-Requested-With
header to XMLHttpRequest
(or any other value you need). To enable this do this.load.headers.requestedWith = 'XMLHttpRequest'
before adding anything to the Loader #2398
2016-07-20 12:45:11 +01:00
Richard Davey
60b8d78ab8
Group.align updates.
2016-07-20 12:29:30 +01:00
Richard Davey
0e24b1b946
Docs update.
2016-07-20 12:21:16 +01:00
Richard Davey
b8429b683e
Docs update.
2016-07-20 12:21:16 +01:00
Richard Davey
418c87ea1a
Weapon.autofire wouldn't fire after the first bullet, or until fire
was called, neither of which are requirements. If you now set this boolean the Weapon will fire continuously until you toggle it back to false (thanks @alverLopez #2647 )
2016-07-20 11:52:48 +01:00
Richard Davey
1e181fa30d
Tidying up new Tilemap classes.
2016-07-18 23:24:49 +01:00
Richard Davey
d3e460567b
Updated config to handle WebGL Tilemap renderer for testing.
2016-07-18 23:05:03 +01:00