Commit graph

851 commits

Author SHA1 Message Date
photonstorm
be8499fa49 Moved ts defs to new home. 2014-11-02 23:00:15 +00:00
photonstorm
807e443a31 The Input class has been given a minor refactor to tidy things up. Specifically:
* pointerN are aliases to backed pointers[N-1] array. This simplifies (and increases the efficiency of) looping through all the pointers when applicable; also eliminates pointer-existance checks Removes various hard-coded limits (added MAX_POINTERS); changed maxPointers default
    * Removed some special-casing from cases where it did not matter
    * Removed === false/true, == usage for consistency, changed missing value check to typeof, etc.
    * Updated documentation for specificty; added @public\@protected
    * @deprecated currentPointers due to odd set pattern; totalCurrentPointers is more appropriate.
(thanks @pnstickne #1283)
2014-11-02 12:26:46 +00:00
photonstorm
97edb7b830 Pointer.addClickTrampoline now adds in support for click trampolines. These raise pointer events into click events, which are required internally for a few edge cases like IE11 full screen mode support, but are also useful if you know you specifically need a DOM click event from a pointer (thanks @pnstickne #1282) 2014-11-02 12:18:23 +00:00
photonstorm
8b2628d99c All of the Input classes now use the more consistent enabled property instead of disabled. I.e. you can now check if (input.mouse.enabled) rather than if (!input.mouse.disabled). The disabled property has been moved to a getter for backwards compatibility but is deprecated and will be removed in a future version (thanks @pnstickne #1257) 2014-11-02 12:14:47 +00:00
photonstorm
e853cb14bb readme update 2014-11-02 11:04:03 +00:00
photonstorm
59b25ab6bb Animation.setFrame used the wrong frames array if useLocalFrameIndex was false and a numeric frame ID was given (thanks @Skeptron #1284) 2014-11-02 11:04:03 +00:00
photonstorm
e57c700816 The Gamepad.addCallbacks context parameter was never actually remembered, causing the callbacks to run in the wrong context (thanks @englercj #1285) 2014-11-02 11:04:02 +00:00
photonstorm
ce32d492af Phaser.Polygon has been refactored to address some Pixi v2 migration issues (thanks @pnstickne for the original implementation #1267)
Polygon.area is now only calculated when the Polygon points list is modified, rather than on every call.

Phaser.Polygon can now accept the points list in a variety of formats: Arrays of Points, numbers, objects with public x/y properties or any combination of, or as a parameter list (thanks @pnstickne for the original implementation #1267)

Polygon.contains now correctly calculates the result  (thanks @pnstickne @BurnedToast #1267)
2014-10-29 07:46:56 +00:00
photonstorm
dc20ab6020 Text.updateText was incorrectly increasing the size of the texture each time it was called (thanks @spayton #1261) 2014-10-29 07:46:56 +00:00
photonstorm
d1b79f90a5 Polygon.contains was toggling the return value on each valid hit (thanks @Singularetantum #1265 #1266) 2014-10-29 07:46:56 +00:00
photonstorm
1df98d82e3 You can now call Tween.to again on a Tween that has already completed. This will re-use the same tween, on the original object, without having to recreate the Tween again. This allows a single tween instance to be re-used multiple times, providing they are linked to the same object (thanks InsaneHero) 2014-10-28 01:49:20 +00:00
photonstorm
dfa442db93 Particle.Emitter will now automatically set particle.body.skipQuadTree to true to help with collision speeds within Arcade Physics.
Particle.Emitter.explode (or `Emitter.start` with the `explode` parameter set to `true`) will immediately emit the required quantity of particles and not delay until the next frame to do so. This means you can re-use a single emitter across multiple places in your game that require explode-style emissions, just by adjusting the `emitter.x` and `emitter.y` properties before calling explode (thanks Insanehero)
2014-10-27 23:29:43 +00:00
photonstorm
a471cfc235 Game.destroy now destroys either the WebGLRenderer or CanvasRenderer, whichever Pixi was using. 2014-10-27 22:09:39 +00:00
photonstorm
da87c75e00 Loader.useXDomainRequest used to be enabled automatically for IE9 but is now always set to false. Please enable it only if you know your server set-up / CDN requires it, as some most certainly do, but we're finding them to be less and less used these days, so we feel it's safe to now disable this by default (#1248)
Loader.json was using the wrong context in IE9 with XDomainRequest calls (thanks @pnstickne #1258)
2014-10-27 12:31:55 +00:00
photonstorm
0f3cda0aed Cache.getRenderTexture will retrieve a RenderTexture that is stored in the Phaser Cache. This method replaces Cache.getTexture which is now deprecated.
Cache.autoResolveURL is a new boolean (default `false`) that automatically builds a cached map of all loaded assets vs. their absolute URLs, for use with Cache.getURL and Cache.checkURL. Note that in 2.1.3 and earlier this was enabled by default, but has since been moved behind this property which needs to be set to `true` *before* you load any assets to enable.

Cache._resolveUrl has been renamed to Cache._resolveURL internally and gained a new parameter. This method is a private internal one.

Cache.getUrl is deprecated. The same method is now available as Cache.getURL.

XML files weren't being added to the URL map.

Cache._resolveURL was causing a Sound double-load in Firefox and causing errors (thanks @domonyiv #1253)
2014-10-27 11:46:24 +00:00
photonstorm
12c2f83bfc Repackaging for 2.1.4 release. 2014-10-27 10:59:37 +00:00
Richard Davey
35c42e3073 Tilemaps in WebGL wouldn't update after the first frame due to a subtle change in how Pixi uploads new textures to the GPU. 2014-10-25 10:09:04 +01:00
photonstorm
18f6b320ab Preparing for Phaser v2.2.0 2014-10-23 13:52:39 +01:00
photonstorm
fbe68e330d Phaser 2.1.3 build. 2014-10-22 21:42:12 +01:00
photonstorm
9b16b11c88 Small Roadmap update. 2014-10-21 22:45:36 +01:00
photonstorm
01a068f53c Rectangle.scale allows you to scale the width and height of a Rectangle. 2014-10-21 00:25:54 +01:00
photonstorm
9d58297eb9 Button.setSounds now works if given an AudioSprite as the sound source. 2014-10-20 23:17:05 +01:00
photonstorm
1a357e18c8 Rectangle contains updates. 2014-10-20 14:28:09 +01:00
photonstorm
b580746cb8 Input.hitTest now accurately detects hits on the extreme edges of a display object (thanks InsaneHero) 2014-10-20 14:28:09 +01:00
photonstorm
d70406588c Filter.update now caches the previous pointer position to avoid flooding the uniform. Also the mouse uniform is now a value between 0 and 1 depending on the position within the game view. 2014-10-17 19:29:50 +01:00
photonstorm
f0b7670506 Fixed an issue where audio files with query strings after them would fail the canPlayAudio checks (thanks Vithar) 2014-10-17 18:50:12 +01:00
photonstorm
52f1663642 Fixed the Filter mouse uniform value population. 2014-10-17 16:52:28 +01:00
photonstorm
4f1ba99120 BitmapData.getFirstPixel will scan the BitmapData and return the color and location of the first non-transparent pixel encountered. You can specify one of 4 scan directions: top to bottom, bottom to top, left to right and right to left.
BitmapData.getBounds will return a `Rectangle` object that encompasses the full extent of the non-transparent pixels in the BitmapData. This can be useful if you wish to trim away transparent pixels from the sides of a BitmapData down to size before saving.
2014-10-17 16:51:50 +01:00
photonstorm
fbfb107146 JSDoc fixes in the Rope class (thanks @Rovanion) 2014-10-15 22:05:38 +01:00
photonstorm
2657de0daa Sound.fadeTo allows you to fade the Sound to the given volume over the duration specified (thanks @nickryall #1225) 2014-10-15 21:48:00 +01:00
photonstorm
db68dd2780 docs update. 2014-10-15 21:39:33 +01:00
photonstorm
9140163c85 Fixed a reference error to the Loader.baseURL in Cache._resolveUrl method (thanks @neurofuzzy #1235) 2014-10-15 21:36:44 +01:00
photonstorm
4ac162216a readme updates. 2014-10-14 01:10:26 +01:00
photonstorm
3997a7c372 Time.prevTime is a new property that contains the raw value of the game timer from the previous update.
Timer.timeCap has been changed from `1000` to `1 / 60 * 1000` to bring it in line with Time.timeCap.
2014-10-13 16:18:42 +01:00
photonstorm
5d84f38f6e Device.canPlayAudio now supports the opus files directly, as well as opus encoded audio stored in ogg containers (#1232) 2014-10-13 13:52:41 +01:00
photonstorm
ac27f12c95 Fixes for Pixi update WebGL UV calls. 2014-10-11 04:18:42 +01:00
photonstorm
163a6c46f3 Updated to Pixi 2.0.0-dev. 2014-10-10 20:36:04 +01:00
photonstorm
022d7094d5 jsdoc fixes and frameRate change. 2014-10-10 14:49:01 +01:00
photonstorm
bee0e73748 Preparing for 2.1.3 dev. 2014-10-09 16:32:31 +01:00
photonstorm
9f24c08216 Updated readme and docs. 2014-10-09 16:12:53 +01:00
photonstorm
506a091257 Sound.allowMultiple allows you to have multiple instances of a single Sound playing at once. This is only useful when running under Web Audio, and we recommend you implement a local pooling system to not flood the sound channels. But it allows for one Sound object to play overlapping times, useful for gun effects and similar (#1220) 2014-10-09 14:44:25 +01:00
photonstorm
a2a60f207f Updated readme and TS defs. 2014-10-09 14:16:24 +01:00
photonstorm
94b6c01f31 readme updates. 2014-10-09 14:16:23 +01:00
photonstorm
b00866cee9 AnimationManager.name will now return the name property of the currently playing animation, if any. 2014-10-09 14:06:13 +01:00
Richard Davey
5dbe6b6017 The Uint32Array check used in Utils was incorrectly replacing Uint32Array on Safari, causing errors like BitmapData.getPixel32 to fail and other related issues (fixes #1043 and #1197) 2014-10-05 12:35:40 +01:00
photonstorm
ab78710daa BitmapData.textureLine takes a Phaser.Line object and an image in the image cache. It then accurately draws the image as a repeating texture for the full length of the line. 2014-10-03 02:21:09 +01:00
photonstorm
173786c60d Color.createColor now populates the color property of the returned object with the results of Phaser.Color.getColor.
Color.createColor now has a `color32` property with the results of `Phaser.Color.getColor32`.
Color.hexToColor has been optimised to inline the regex and has moved the createColor call so it now populates the color object fully, not just setting the r,g,b properties.
2014-10-01 16:51:34 +01:00
photonstorm
2794d94b08 Color.createColor now populates the color objects color and color32 properties with the results of Phaser.Color.getColor and getColor32 respectively. 2014-10-01 15:19:57 +01:00
photonstorm
d65c526184 Cache.addBitmapData has a new parameter: frameData allowing you to pass a Phaser.FrameData object along with the BitmapData.
Cache.getFrameData has a new parameter: `map` which allows you to specify which cache to get the FrameData from, i.e. `Phaser.Cache.IMAGE` or `Phaser.Cache.BITMAPDATA`.
Sprite.loadTexture if given a BitmapData as the texture will now query the cache to see if it has any associated FrameData, and if so it will load that into the AnimationManager.
2014-10-01 03:10:13 +01:00
photonstorm
26f9e05dca BitmapData.shadow(color, blur, x, y) provides a quick way to set all the relevant shadow settings, which are then be used in future draw calls. 2014-09-30 22:50:08 +01:00