- Added changes/support for 'blob:' uri's in upstream, extended to 'data:'
- Added upstream documentation
- Some small fixes for XHD from upstream
Conflicts:
src/loader/Loader.js
Previously XHD was special-cased for 'json' file assets, but not all JSON
requests. Now it is used for all XHR transfers when `useXDomainRequest` is
enabled.
If XDR is used outside of IE 9 then a warning is emitted to the console.
The `useXDomainRequest` property has also been deprecated
This may address consistency issues as mentioned in
https://github.com/photonstorm/phaser/issues/1361
- Cleaned up abnormal case handling
- Disabled parallel loading by default; it can be enabled with
`enableParallel`.
- Minor quibbles
- Removed unused `dataLoadError`
Loaded/loading assets are skipped if they have been superceded. This makes
the behavior consistent with respect to `addToFileList`, if the queue is
inspected or modified while loading.
- Added `withSyncPoint` and `addSyncPoint` methods to allow explicit
adding of synchronization points (synchronization points are explained
in `withSyncPoint`.
- Changed the file/asset `sync` attribute to `syncPoint` to reflect
terminology.
Employee the use of image.complete and a width/height check to detect when
it is available "from cache" and skip having to run though the
onload/onerror cases.
Parallel loading is now supported, configured by
`loader.concurrentRequestCount`. Each file (a pack is now considered a
type of file) asset can be marked with `sync`, which is done for both pack
files and script files.
When a `sync` asset is encountered it must be loaded before any previous
resource any following resource is loaded (but it doesn't have to wait for
previous resources). Pack files are an exception in that they can download
(but are not processed) and they can fetch-around other `sync` assets.
Because of the concurrent nature there is no guarantee of the order in
which the individual events will file in relation to eachother, but local
ordering (e.g. onFileError always before onFileComplete) and overall
ordering (e.g. onLoadStart .. onFile? .. onLoadComplete) is preserved.
There is also increased error hardening and a few previous edge-cases
fixed (and likely a few bugs added).
Cache now has support for XML files stored in their own container. You can add them with `cache.addXML` (typically this is done from the Loader automatically for you) and get them with `cache.getXML(key)`. There is also `cache.checkXMLKey(key)`, `cache.checkKeys` and `cache.removeXML(key)`.
Pointer.withinGame is now accurate based on game scale and updated as the Pointer moves.
Stage.bounds is now updated if the game canvas offset changes position. Note that it gives the un-scaled game dimensions.
Timer.clearPendingEvents will purge any events marked for deletion, this is run automatically at the start of the update loop.
The main Timer loop could incorrectly remove TimeEvent if a new one was added specifically during an event callback (thanks @garyyeap, fix#710)
We've had a number of people in the channel ask for the ability to know when a file has started loading and to get the file names of said files.
Added the OnFileStart signal to do just that.
Loader.setPreloadSprite() will now set sprite.visible = true once the crop has been applied. Should help avoid issues (#430) on super-slow connections.
InputHandler.pixelPerfectOver - performs a pixel perfect check to see if any pointer is over the current object (warning: very expensive!)
InputHandler.pixelPerfectClick - performs a pixel perfect check but only when the pointer touches/clicks on the current object.
Previously using a Pixel Perfect check didn't work if the Sprite was rotated or had a non-zero anchor point, now works under all conditions + atlas frames.
Tweens - Example showing how to use the tween events, onStart, onLoop and onComplete.
Lots of documentation fixes in the Tween class.
Tweens fire an onLoop event if they are set to repeat. onComplete is now only fired for the final repeat (or never if the repeat is infinite)
Tween.onStart is now called when the tween starts AFTER the delay value, if given (thanks stevenbouma)
Throw exceptions if wrong format given to tilemap or textureatlas. Previously, old onload remained active and error happened in the wrong (and hard to diagnose) place.
* Button.setFrames will set the current frame based on the button state immediately.
* InputHandler now creates the _pointerData array on creation and populates with one empty set of values, so pointerOver etc all work before a start call.
* Added Canvas.setUserSelect() to disable touchCallouts and user selections within the canvas.
* When the game boots it will now by default disable user-select and touch action events on the game canvas.
* Loaded.setPreloadSprite now rounds the width/height values and starts from 1. This fixes canvas draw errors in IE9/10 and Firefox.