photonstorm
4f8e509f91
Fixed JSON Hash parsing.
2016-10-19 14:29:52 +01:00
photonstorm
18b12dfc3e
Huge amount of work getting the WebGL renderer sorted out, tidied up and merged with the latest Texture and Transform components.
2016-10-18 17:03:25 +01:00
Richard Davey
35854ea58d
Cache now adds in Default and Missing images to the new Texture Manager.
2016-10-13 00:08:11 +01:00
photonstorm
ce3308ea1d
Hooking the Loader and Cache into the new Texture Manager.
2016-10-11 14:52:17 +01:00
Richard Davey
e0ef9cab8b
Hooked the Texture Manager into the Cache.
2016-10-10 23:57:51 +01:00
Richard Davey
ea9c9ae7b3
Removed gl texture ID.
2016-10-07 00:59:10 +01:00
photonstorm
2d84ea8938
Removed SS in Atlas.
2016-09-27 14:27:12 +01:00
photonstorm
840d3669b0
Updated tutorial code so you can't bounce off stars.
2016-09-27 13:57:32 +01:00
Richard Davey
1c415a0d7e
Cache.addBitmapFontFromAtlas allows you to add a Bitmap Font to the Cache, that is comprised of a frame from a Texture Atlas, and the font data (in JSON or XML format). Once added you can use the Bitmap Font in the same way as you would any Bitmap Font ( #2614 )
2016-09-27 02:00:31 +01:00
Richard Davey
bb452e2b4e
Merge pull request #2763 from arefiev/skip-frames-in-spritesheets
...
Add a parameter to load.spritesheet which tells it how many frames to…
2016-09-26 20:44:17 +01:00
Richard Davey
6bd0ab6a8c
Updated jsdocs and jshint fixes.
2016-09-20 01:48:30 +01:00
Mikhail Arefiev
e3b8071d43
Add a parameter to load.spritesheet which tells it how many frames to skip. Good when you have huge PNGs with multiple spritesheets in each.
2016-09-20 01:50:11 +03:00
Felipe Alfonso
ce9e9fbd6c
Dynamic loading of compressed textures.
2016-08-07 17:47:55 -04:00
Felipe Alfonso
5ce4643dfa
Compressed textures are able to upload to GPU
2016-08-01 19:40:35 -04:00
Felipe Alfonso
100aa413bf
Texture loading depending on webgl extensions included default truecolor
2016-08-01 16:27:39 -04:00
Felipe Alfonso
8960cf26d7
texture meta data parsed and saved in cache
2016-07-28 21:33:31 -04:00
photonstorm
fced3f86ec
Phaser 2.6.0 Release.
2016-07-08 15:46:26 +01:00
Richard Davey
63158a1dbf
Argument swapped for destroyBaseTexture
.
2016-07-06 22:31:26 +01:00
Richard Davey
886c641ddc
* The default image texture, for when none is supplied, is now available under Phaser.Cache.DEFAULT
.
...
* The missing image texture, for when an image has failed to load, is now available under `Phaser.Cache.MISSING`.
* Phaser.Cache.addImage will now check the key given, and if `__default` or `__missing` it will update the new consts `Phaser.Cache.DEFAULT` and `Phaser.Cache.MISSING` accordingly, allowing you to replace the default or missing image textures used by Phaser.
* Phaser.Cache.getPixiTexture has now been removed, as the Pixi Cache isn't used internally anywhere any longer.
* Phaser.Cache.getPixiBaseTexture has now been removed, as the Pixi Cache isn't used internally anywhere any longer.
2016-07-06 21:46:40 +01:00
photonstorm
7817d47a25
Updated Cache docs.
2016-06-14 12:18:32 +01:00
David Hayes
346aed2866
Distinguish between Arrays and Objects when cloning in Cache.getJSON.
...
Fixes #2551 .
2016-06-10 10:33:33 -05:00
David Hayes
8317563d27
Don't extend Phaser.Utils when doing deep copy in Phaser.Cache.getJSON.
2016-06-03 10:16:07 -05:00
photonstorm
f40cfbe2ae
2015 - 2016.
2016-04-04 22:16:16 +01:00
Allen Evans
1a02d2da6c
Fix cache reference bug in web GL context restoration.
2016-01-06 07:35:53 +00:00
photonstorm
99751a5e8e
BaseTexture.skipRender is a new boolean that can be set to skip the rendering phase in the WebGL Sprite Batch. You may want to do this if you have a parent Sprite with no visible texture (i.e. uses the internal __default
texture) that has children that you do want to render, without causing a batch flush in the process.
2015-10-15 11:39:59 +01:00
Nikolas Lotz
6d4dad7bb4
Apply default X/Y-Spacing
...
Applies default X/Y-Spacing when omitted as a parameter
2015-10-08 20:14:16 +02:00
Nikolas Lotz
33503e7fa7
adds missing API doc param to addBitmapFont()
...
added missing API doc parameter "atlasType" to Cache::addBitmapFont(...)
2015-09-24 19:18:04 +02: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
photonstorm
bcedd921b7
Cache.addSpriteSheet didn't include default values for the frameMax
, margin
and spacing
arguments (thanks @vladkens #2017 #2018 )
2015-08-24 11:43:34 +01:00
Vladislav Forsh
888f88ece8
Fixed js doc for cache.getRenderTexture
2015-08-11 20:31:31 +03:00
photonstorm
a8934c392d
Phaser.Sound will now automatically check the Cache to see if the audio file it is using is still there or not. If not then it will automatically called Sound.destroy
on itself. If you do not desire this result then you should ensure that you undertake all house-keeping yourself, and properly destroy Sound objects _before_ calling Cache.removeSound
( #1946 )
2015-07-27 14:02:04 +01:00
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
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
photonstorm
7271eb5e2d
Removed un-needed cache arguments and fixed jshint error.
2015-07-16 14:58:51 +01: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
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