mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 12:13:19 +00:00
plugin/spine4.1 SpinePlugin.createSkeleton atlasPage need always setTexture
This commit is contained in:
parent
575d9dd70c
commit
0824d5c5ab
13 changed files with 153 additions and 181 deletions
46
plugins/spine4.1/dist/SpineCanvasPlugin.js
vendored
46
plugins/spine4.1/dist/SpineCanvasPlugin.js
vendored
|
@ -24623,35 +24623,31 @@ var SpinePlugin = new Class({
|
|||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
}
|
||||
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
if (this.isWebGL)
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
else
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
}
|
||||
}
|
||||
|
||||
var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey;
|
||||
|
||||
if (!this.spineTextures.has(spineTextureKey))
|
||||
{
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
this.spineTextures.add(spineTextureKey, atlas);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
46
plugins/spine4.1/dist/SpineCanvasPluginDebug.js
vendored
46
plugins/spine4.1/dist/SpineCanvasPluginDebug.js
vendored
|
@ -37211,35 +37211,31 @@ var SpinePlugin = new Class({
|
|||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
}
|
||||
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
if (this.isWebGL)
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
else
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
}
|
||||
}
|
||||
|
||||
var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey;
|
||||
|
||||
if (!this.spineTextures.has(spineTextureKey))
|
||||
{
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
this.spineTextures.add(spineTextureKey, atlas);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
46
plugins/spine4.1/dist/SpinePlugin.js
vendored
46
plugins/spine4.1/dist/SpinePlugin.js
vendored
|
@ -15144,35 +15144,31 @@ var SpinePlugin = new Class({
|
|||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
}
|
||||
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
if (this.isWebGL)
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
else
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
}
|
||||
}
|
||||
|
||||
var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey;
|
||||
|
||||
if (!this.spineTextures.has(spineTextureKey))
|
||||
{
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
this.spineTextures.add(spineTextureKey, atlas);
|
||||
}
|
||||
|
||||
|
|
2
plugins/spine4.1/dist/SpinePlugin.min.js
vendored
2
plugins/spine4.1/dist/SpinePlugin.min.js
vendored
File diff suppressed because one or more lines are too long
46
plugins/spine4.1/dist/SpinePluginDebug.js
vendored
46
plugins/spine4.1/dist/SpinePluginDebug.js
vendored
|
@ -37446,35 +37446,31 @@ var SpinePlugin = new Class({
|
|||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
}
|
||||
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
if (this.isWebGL)
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
else
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
}
|
||||
}
|
||||
|
||||
var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey;
|
||||
|
||||
if (!this.spineTextures.has(spineTextureKey))
|
||||
{
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
this.spineTextures.add(spineTextureKey, atlas);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
46
plugins/spine4.1/dist/SpineWebGLPlugin.js
vendored
46
plugins/spine4.1/dist/SpineWebGLPlugin.js
vendored
|
@ -27181,35 +27181,31 @@ var SpinePlugin = new Class({
|
|||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
}
|
||||
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
if (this.isWebGL)
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
else
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
}
|
||||
}
|
||||
|
||||
var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey;
|
||||
|
||||
if (!this.spineTextures.has(spineTextureKey))
|
||||
{
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
this.spineTextures.add(spineTextureKey, atlas);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
46
plugins/spine4.1/dist/SpineWebGLPluginDebug.js
vendored
46
plugins/spine4.1/dist/SpineWebGLPluginDebug.js
vendored
|
@ -37331,35 +37331,31 @@ var SpinePlugin = new Class({
|
|||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
}
|
||||
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
if (this.isWebGL)
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
else
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
}
|
||||
}
|
||||
|
||||
var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey;
|
||||
|
||||
if (!this.spineTextures.has(spineTextureKey))
|
||||
{
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
this.spineTextures.add(spineTextureKey, atlas);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -974,35 +974,31 @@ var SpinePlugin = new Class({
|
|||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
}
|
||||
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
if (this.isWebGL)
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
else
|
||||
{
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
}
|
||||
}
|
||||
|
||||
var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey;
|
||||
|
||||
if (!this.spineTextures.has(spineTextureKey))
|
||||
{
|
||||
var realTextureKey;
|
||||
|
||||
if (this.isWebGL)
|
||||
{
|
||||
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < atlas.pages.length; i ++)
|
||||
{
|
||||
atlasPage = atlas.pages[i];
|
||||
|
||||
realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;
|
||||
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
this.spineTextures.add(spineTextureKey, atlas);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue