mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 14:08:28 +00:00
Fix spritesheet from atlas from compressed texture.
This commit is contained in:
parent
93b4b083f1
commit
a74f99563b
3 changed files with 22 additions and 5 deletions
|
@ -76,6 +76,7 @@ The Phaser Input and related classes have been updated to be more consistent wit
|
|||
* Compressed texture files which are incompatible with WebGL will now fail to load, and display a console warning explaining why. Previously they might seem to load, but not display properly.
|
||||
* Add experimental support for BPTC compressed textures in PVR files.
|
||||
* Change `S3TCRGB` to `S3TCSRGB` in `WebGLTextureCompression`, `CompressedTextureFileConfig`, and `FileConfig` typedefs.
|
||||
* Fix generating spritesheets from members of texture atlases based on compressed textures. (Thanks @vladyslavfolkuian)
|
||||
* The `BloomFX` and `BlurFX` and any custom pipeline that relies on using the `UtilityPipeline` full or half frame targets will now correctly draw even after the renderer size changes. Fix #6677 (thanks @Nerodon)
|
||||
* The `PostFXPipeline.postBatch` method will now bind the current Render Target after the pipeline has booted for the first time. This fixes glitch errors on mobile devices where Post FX would appear corrupted for a single frame. Fix #6681 (thanks @moufmouf @tongliang999)
|
||||
* The `Matter.Body` function `scale` has been updated so if the Body originally had an `inertia` of `Infinity` this will be restored at the end of the call. This happens if you set a Matter Body to have fixed rotation. Fix #6369 (thanks @sushovande)
|
||||
|
|
|
@ -361,9 +361,9 @@ var MultiPipeline = new Class({
|
|||
flipX = -1;
|
||||
}
|
||||
|
||||
// Auto-invert the flipY if this is coming from a GLTexture
|
||||
// Auto-invert the flipY if this is coming from a GL RenderTexture
|
||||
|
||||
if (gameObject.flipY || (frame.source.isGLTexture && !texture.flipY))
|
||||
if (gameObject.flipY || (frame.source.isGLTexture && frame.source.isRenderTexture && !texture.flipY))
|
||||
{
|
||||
if (!customPivot)
|
||||
{
|
||||
|
|
|
@ -538,16 +538,27 @@ var TextureManager = new Class({
|
|||
|
||||
if (atlasData)
|
||||
{
|
||||
var parse = function (texture, sourceIndex, atlasData)
|
||||
{
|
||||
if (Array.isArray(atlasData.textures) || Array.isArray(atlasData.frames))
|
||||
{
|
||||
Parser.JSONArray(texture, sourceIndex, atlasData);
|
||||
}
|
||||
else
|
||||
{
|
||||
Parser.JSONHash(texture, sourceIndex, atlasData);
|
||||
}
|
||||
};
|
||||
if (Array.isArray(atlasData))
|
||||
{
|
||||
for (var i = 0; i < atlasData.length; i++)
|
||||
{
|
||||
Parser.JSONHash(texture, i, atlasData[i]);
|
||||
parse(texture, i, atlasData[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Parser.JSONHash(texture, 0, atlasData);
|
||||
parse(texture, 0, atlasData);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1129,7 +1140,12 @@ var TextureManager = new Class({
|
|||
|
||||
if (sheet)
|
||||
{
|
||||
var texture = this.create(key, sheet.source.image);
|
||||
var source = sheet.source.image;
|
||||
if (!source)
|
||||
{
|
||||
source = sheet.source.glTexture;
|
||||
}
|
||||
var texture = this.create(key, source);
|
||||
|
||||
if (sheet.trimmed)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue