Commit graph

170 commits

Author SHA1 Message Date
photonstorm
257a22b170 When loading Video with the asBlob argument set it now uses a 'blob' type for the XHR loader, and doesn't cast the resulting file as a Blob upon load. This fixes loading videos as blobs on Chrome for Android (thanks @JuCarr #2433) 2016-04-18 16:17:27 +01:00
photonstorm
f40cfbe2ae 2015 - 2016. 2016-04-04 22:16:16 +01:00
photonstorm
866994743b URI + ? fix. 2016-02-18 14:34:20 +00:00
Rafael Barbosa Lopes
a267e81b26 Doc: Loader.enableParallel is Boolean. 2016-02-04 10:06:12 -02:00
Richard Davey
4e7fad353e Loader.audiosprite is renamed to Loader.audioSprite (the old one still works for legacy reasons) (thanks @epaezrubio #2145) 2016-02-03 23:53:50 +00:00
Richard Davey
92dae1951b Merge pull request #2204 from tfelix/master
Asset packs are now correctly spliced between waiting files.
2016-02-02 16:58:33 +02:00
Richard Davey
1d2d707b32 Merge pull request #2168 from nlotz/dev
fix typos in API docs
2016-02-01 19:01:58 +02:00
Richard Davey
fc5530657d Merge pull request #2236 from milkey-mouse/fix-datauri-error
Fix issue #2234: Errors in getAudioURL() and getVideoURL() when using blob: or data: URIs
2016-02-01 18:51:56 +02:00
Richard Davey
806f93bc84 Merge pull request #2251 from milkey-mouse/fix-404-success
Fix issue #2250: Loader.binary returns success on 404
2016-02-01 18:45:54 +02:00
nexiuhm
1c65c48341 onLoadUpdate now recives the last ( 100 ) update. 2016-01-14 17:09:41 +01:00
Milkey Mouse
d1c4297802 Fix #2250
changes by @mhstar89
2015-12-09 19:54:48 -08:00
Milkey Mouse
0c2e8d8ce9 Implement jackfreak's changes (Issue #2234) 2015-11-30 14:07:22 -08:00
tfelix
734eba7f84 Asset packs are now correctly spliced between waiting files. 2015-11-15 02:48:05 +01:00
nlotz
da45d04a70 fix typos in API docs 2015-10-27 09:10:14 +01:00
photonstorm
5c30a228bb Fixed assignment of TEXTURE_ATLAS_JSON_PYXEL constant (#2050) 2015-09-14 11:23:31 +01:00
Richard Davey
1c7b33107f Merge pull request #2050 from joshpmcghee/dev
Feature: Add support for loading single-layer Pyxel Edit TileMap as an Atlas
2015-09-14 13:21:21 +03:00
Richard Davey
1e7f8dddd9 jsdoc fix. 2015-09-03 00:46:48 +01:00
Josh McGhee
4a19aca212 some cleaning up and documentation polish 2015-09-01 01:03:51 +01:00
Josh McGhee
cbd7265bee cherry pick commits from master. Read: I'm not clever. 2015-09-01 00:57:54 +01:00
Rafael Barbosa Lopes
1485fd110a Updated to use a matching expression instead.
Replaced the booleans with a matching expression. Now, URLs
beginning with the following patterns will be ignored:

- blob:
- data:
- http://
- https://
- //

As suggested by @pnstickne.
2015-08-28 17:19:24 -03:00
Rafael Barbosa Lopes
14632cdfb5 Prevent 'data:' URLs from being prefixed
Fixes an issue where 'data:' URLs may get prefixed by
`#baseURL` and `#path` properties making these URLs invalid.
2015-08-28 15:14:30 -03:00
Richard Davey
8b6d696316 jsdoc fix. 2015-08-26 03:59:18 +01:00
photonstorm
1e88bdda70 Loader.bitmapFont wouldn't automatically set the atlasURL value if just the key was given. 2015-08-25 13:46:28 +01:00
photonstorm
b365ebf570 jshint fix. 2015-08-03 16:45:03 +01:00
photonstorm
d23e5d6eba BitmapText.smoothed is a new boolean property that allows you to set texture smoothing on a bitmap font or not. By default smoothing is always on, but you can turn it off which helps for bitmap fonts created from pixel art style character sets. 2015-07-31 15:58:00 +01:00
photonstorm
c032d57183 Loader.images is a new method that allows you to pass an array of image keys, and optionally the urls, to the Loader and have them all added to the load queue in one go. 2015-07-30 15:01:52 +01:00
photonstorm
f28bc82fe3 Fixed packfiles undefined path error. 2015-07-22 10:53:15 +01:00
photonstorm
f15fe6706c All undefined argument checks were changed from if (typeof x === 'undefined') to if (x === undefined) removing the typeof check and saving some bytes across the codebase in the process. 2015-07-22 10:37:15 +01:00
Richard Davey
6921b30d94 The Loader can now load external fragment shaders (.frag files) 2015-07-15 23:22:25 +01:00
Richard Davey
502dd548fb Loader.path is a string and if set it is placed before any _relative_ file path given to the Loader. For example: load.path = "images/sprites/"; followed by load.image("ball", "ball.png"); and load.image("tree", "level1/oaktree.png"); would load the ball file from images/sprites/ball.png and the tree from images/sprites/level1/oaktree.png. The path is added before the filename but *after* the Loader.baseURL. The path _must_ end with a "/". Set it to nothing to disable the path. 2015-07-12 23:43:35 +01:00
Richard Davey
a7a74550a5 Merge pull request #1837 from Feenposhleen/dev
JSON support for BitmapFont atlases
2015-06-17 01:49:23 +01:00
Richard Davey
8a750a1f1e Merge pull request #1777 from boniatillo-com/assetpack_audiosprite
Load audiosprite from asset pack
2015-06-16 16:43:06 +01:00
photonstorm
8de9e0c076 Fixed loadEvent argument. 2015-06-13 02:30:00 +01:00
photonstorm
7d308a2169 Added loadEvent parameter to Loader.video. 2015-06-12 19:19:43 +01:00
Charlo
70428fd39c Fixed linting errors 2015-06-06 12:54:14 +02:00
Charlo
17a8116382 Added JSON support for BitmapFont 2015-06-06 12:35:08 +02:00
photonstorm
621e51d949 Docs update about the lovely 48000 Hz music bug. 2015-05-23 03:37:04 +01:00
photonstorm
d2bcb3562b If transformUrl is given an invalid URL it returns false. 2015-05-19 14:19:24 +01:00
photonstorm
4fa99f52c5 jsdocs fix and video loader fallback for Firefox. 2015-05-14 23:23:22 +01:00
photonstorm
aabeccbdac Working but needs refining. 2015-05-14 19:10:36 +01:00
photonstorm
71b242386d Added video loadeddata callback for Firefox (which doesn't throw the canplay event until you actually start to play the video.. awesome, thanks Firefox) 2015-05-14 16:52:09 +01:00
photonstorm
45278a1816 Tidied up the video loader. 2015-05-05 16:25:30 +01:00
photonstorm
d8c109b0a2 Tidying comments. 2015-05-05 14:00:05 +01:00
photonstorm
afb162849a Docs update. 2015-05-04 03:00:03 +01:00
photonstorm
77468e7876 Loader.video allows you to load a video file into Phaser. It works in the same way as Loader.audio, allowing you to pass an array of video files - and it will load the first one the device is capable of playing back. You can optionally load the video via xhr where the video data is converted to a Blob upon successful load. 2015-05-03 13:53:03 +01:00
Boniatillo.com
9017081ef6 Fix to #1776: load audiosprite from assetpack
The loader process the asset pack but use the method "audio" instead of
"audiosprite". The fix is to call "audiosprite" with the right
arguments.
2015-05-02 10:40:38 +02:00
photonstorm
4c0e34e788 jsdoc fixes. 2015-04-29 13:13:47 +01:00
photonstorm
30450cb9bc Loader.atlas and Cache.addTextureAtlas will now automatically determine the format of the JSON data (array or hash) when added to the Cache. You no longer need to specify it explicitly if JSON, only if XML. 2015-04-23 02:35:09 +01:00
photonstorm
6c96568dd1 Files can now be added to the Loader with an absolute URL even if you have a Loader.baseURL set. In previous versions the baseURL would still be prepended to the file URL, but the Loader now checks if the a file URL begins with http or // and skips prepending the baseURL to it.
All calls to Loader methods that add files to the queue, such as `Loader.image` or `Loader.atlas`, now have the URL as an optional parameter. If not set Loader will assume the URL to be based on the key given. For example the following: `game.load.image("boom", "boom.png")` can now be expressed as just `game.load.image("boom")`, or `game.load.atlas("player", "player.png", "player.json")` can now be shortened to `game.load.atlas("player")`. Please see the freshly updated jsdocs for full details.
2015-04-21 02:14:41 +01:00
photonstorm
79ace60997 Added guard around the xhr onload try / catch block, so it doesn't incorrectly report errors as being from the Loader when they may have been throw by the create method. 2015-03-25 16:13:52 +00:00