plugin/spine4.1 SpinePlugin.createSkeleton atlasPage need always setTexture

This commit is contained in:
JustinTien 2023-01-10 17:51:40 +08:00
parent 575d9dd70c
commit 0824d5c5ab
13 changed files with 153 additions and 181 deletions

View file

@ -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

View file

@ -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

View file

@ -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);
}

File diff suppressed because one or more lines are too long

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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);
}