Richard Davey
50480d815f
* Cache.getFrame has a new cache
parameter (that defaults to the Image cache, but can be changed to any other)
...
* Cache.getFrameCount has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameData has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.hasFrameData has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameByIndex has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameByName has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
re: #1935
2015-07-26 13:14:25 +01:00
photonstorm
328fd32290
Cache.removeImage now calls destroy on the image BaseTexture, removing it from the PIXI global caches without throwing a warning.
2015-07-24 13:21:18 +01:00
photonstorm
9a83ddcab9
Updated to latest Creature runtimes, added to GameObjectFactory.
2015-07-23 13:25:08 +01:00
jamesgroat
10587e07ee
Use _cacheMap to map from constant to _cache.
2015-07-22 16:53:07 -07:00
photonstorm
858ad51610
Phaser 2.4 release.
2015-07-22 15:31:30 +01:00
photonstorm
ffaa7d711f
Removed BaseTextureCache requirement from BitmapData.
...
Fixed jshint.
Updated TS defs.
2015-07-22 13:23:40 +01:00
photonstorm
8eb34f96ce
WebGL context loss and restoration is now handled directly by Phaser.
...
Cache.clearGLTextures empties out all of the GL Textures from Images stored in the cache. This is called automatically when the WebGL context is lost and then restored.
2015-07-22 12:59:32 +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
photonstorm
bb6c5bbbdc
Key added to TextureAtlas and SpriteSheet, fixing the 'undefined' key error in LoadTexture.
2015-07-20 12:00:37 +01:00
photonstorm
45944d689c
Fix for #1914
2015-07-16 22:45:25 +01:00
Richard Davey
fcaa6cec68
Merge pull request #1912 from Feenposhleen/feature/fixing-json-fonts
...
Improving JSON BitmapText implementation
2015-07-16 15:37:09 +01:00
photonstorm
7271eb5e2d
Removed un-needed cache arguments and fixed jshint error.
2015-07-16 14:58:51 +01:00
Charlo
795a7c80a8
Improving JSON BitmapText implementation
2015-07-16 13:30:55 +02:00
Richard Davey
9314c5a767
LoaderParser.bitmapFont, xmlBitmapFont and jsonBitmapFont all now return the font data rather than write it to the now deprecated PIXI global font cache.
2015-07-16 01:17:03 +01:00
Richard Davey
3c7293ab57
Updated AnimationParser and fixed LoadTexture calls.
2015-07-16 01:02:59 +01:00
Richard Davey
bab50d7c88
* The Cache has been internally refactored considerably. Image data is now all stored in the same object, rather than being split across the PIXI global caches (such as PIXI.TextureCache and PIXI.BaseTextureCache), which are no longer used by Phaser.
...
* Internally the Cache now uses a single _cache object, which is partitioned to store the various different object types. Before the cache used lots of private objects, one per data type, but it's now a lot cleaner and we've managed to cut out hundreds of lines of duplicate code in the process.
* Cache.getImage has a new argument which lets you return either just the HTML Image element or the entire image cache object, which includes the baseTexture and frame data.
* Cache.getImage will return a __default image if the key isn't given, or a __missing image if the key is given but not found in the cache. This means it will always return a valid image and no longer cause Phaser to throw runtime errors deeper down with invalid image objects.
2015-07-16 00:46:28 +01:00
Richard Davey
5e33a2ea92
TS defs updates for the Cache changes.
2015-07-15 23:22:51 +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
1f66cdbcb5
Lots of jsdoc updates and small fixes.
2015-07-15 21:52:19 +01:00
photonstorm
f52b553eaf
Loads more Cache optimisations and tweaks.
2015-07-15 17:06:29 +01:00
photonstorm
d663d290c2
hasFrameData added and some LoadTexture updates.
2015-07-15 16:33:01 +01:00
photonstorm
8dd3e06747
Loads of Cache optimisations and updates.
2015-07-15 15:00:21 +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
d027bf8ba7
BitmapData.generateTexture will take a snapshot of the BitmapDatas canvas at that moment in time and convert it into an Image, which is then stored in the Phaser image Cache based on the key given. You can then use the new texture for any future sprites or texture based objects.
2015-07-09 00:19:07 +01:00
photonstorm
102c74e121
Deprecated the following:
...
* Camera.screenView
* ScaleManager.maxIterations
* ScaleManager.enterPortrait (see onOrientationChange)
* ScaleManager.enterLandscape (see onOrientationChange)
* ScaleManager.enterFullScreen (see onFullScreenChange)
* ScaleManager.leaveFullScreen (see onFullScreenChange)
* ScaleManager.fullScreenFailed (see onFullScreenError)
* ScaleManager.checkResize
* ScaleManager.checkOrientation
* ScaleManager.setScreenSize (see updateLayout)
* ScaleManager.setSize (see reflowCanvas)
* ScaleManager.checkOrientationState (see reflowCanvas)
* ScaleManager.orientation (see screenOrientation)
* Gamepad.disabled (see enabled)
* Input.currentPointers (see totalActivePointers)
* Input.disabled (see enabled)
* Keyboard.disabled (see enabled)
* Mouse.disabled (see enabled)
* Mouse.mouseMoveCallback (see Input.addMoveCallback)
* MSPointer.disabled (see enabled)
* Touch.disabled (see enabled)
* Cache.getUrl (see getURL)
* Math.truncate (see Math.trunc)
* Math.snapToInArray (see Phaser.ArrayUtils.findClosest)
* Math.interpolateFloat (see Math.linear)
* Math.normalizeLatitude (use Phaser.Math.clamp(lat, -90, 90))
* Math.normalizeLongitude (use Phaser.Math.wrap(lng, -180, 180))
* Math.chanceRoll (use Phaser.Utils.chanceRoll)
* Math.numberArray (use Phaser.ArrayUtils.numberArray)
* Math.numberArrayStep (use Phaser.ArrayUtils.numberArrayStep)
* Math.limitValue (use Phaser.Math.clamp)
* Math.randomSign (use Phaser.Utils.randomChoice(-1, 1))
* Math.angleLimit (use Phaser.Math.clamp)
* Math.getRandom (use Phaser.ArrayUtils.getRandomItem)
* Math.removeRandom (use Phaser.ArrayUtils.removeRandomItem)
* Math.floor (use Math.trunc)
* Math.ceil (use Phaser.Math.roundAwayFromZero)
* Math.shift (use Phaser.ArrayUtils.rotate)
* Math.shuffleArray (use Phaser.ArrayUtils.shuffle)
* Math.distanceRounded (do the rounding locally)
* Canvas.getOffset (see Phaser.DOM.getOffset)
* Canvas.getAspectRatio (see Phaser.DOM.getAspectRatio)
* TilemapLayer.tileColor (use TilemapLayer.debugSettings.missingImageFill)
* Phaser.ArrayList alias removed, now use Phaser.ArraySet
* Utils.transposeArray (see Phaser.ArrayUtils.transposeMatrix)
* Utils.rotateArray (see Phaser.ArrayUtils.rotateMatrix)
* Utils.shuffle (see Phaser.ArrayUtils.shuffle)
2015-06-17 03:14:31 +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
560f98b40b
Merge pull request #1828 from luckylooke/patch-2
...
docs: parameter description augmented
2015-06-17 01:41:25 +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
photonstorm
af42f5d4c9
Cache.getJSON has a new parameter: clone
. If set it will return a clone of the object stored in the Cache rather than a reference to it.
2015-06-12 12:16:58 +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
ed82097151
Removed un-necessary PIXI.TextureCache pollution in Phaser.LoaderParser.bitmapFont.
2015-06-03 05:28:23 +01:00
luckylooke
ee22bbbd05
docs: parameter description augmented
...
addTilemap 'url' parameter text augmented
2015-05-31 13:21:33 +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
9ee0de9192
Cache.addVideo allows you to add a loaded video into the Phaser Cache. This is called automatically by the Phaser Loader, but may be invoked directly as well.
...
Cache.checkVideoKey allows you to check if a video is stored in the cache based on the given key.
Cache.getVideo allows you to extract a video from the Cache based on its key. The video element itself (or the Blob is loaded with asBlob true) will be found in the `data` property of the returned object.
Cache.removeVideo will remove a video from the Cache based on the given key.
2015-05-03 13:53: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
c6e9d7cad3
Removing PIXI.TextureCache calls as no longer used.
2015-04-27 16:22:35 +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