Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About spine4.1 perf issue fixed (test spine4.1/container batch test) #387

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,672 changes: 3,672 additions & 0 deletions public/assets/spine/4.1/spineboy/spineboy-ess.json

Large diffs are not rendered by default.

73,290 changes: 37,937 additions & 35,353 deletions public/plugins/3.8.95/SpineCanvasPlugin.js

Large diffs are not rendered by default.

1,255 changes: 1,254 additions & 1 deletion public/plugins/3.8.95/SpineCanvasPlugin.min.js

Large diffs are not rendered by default.

9,558 changes: 6,505 additions & 3,053 deletions public/plugins/3.8.95/SpineCanvasPluginDebug.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/plugins/3.8.95/SpineCanvasPluginDebug.js.map

Large diffs are not rendered by default.

79,111 changes: 40,845 additions & 38,266 deletions public/plugins/3.8.95/SpinePlugin.js

Large diffs are not rendered by default.

1,273 changes: 1,272 additions & 1 deletion public/plugins/3.8.95/SpinePlugin.min.js

Large diffs are not rendered by default.

81,409 changes: 42,332 additions & 39,077 deletions public/plugins/3.8.95/SpinePluginDebug.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/plugins/3.8.95/SpinePluginDebug.js.map

Large diffs are not rendered by default.

77,646 changes: 40,116 additions & 37,530 deletions public/plugins/3.8.95/SpineWebGLPlugin.js

Large diffs are not rendered by default.

1,267 changes: 1,266 additions & 1 deletion public/plugins/3.8.95/SpineWebGLPlugin.min.js

Large diffs are not rendered by default.

9,578 changes: 6,517 additions & 3,061 deletions public/plugins/3.8.95/SpineWebGLPluginDebug.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/plugins/3.8.95/SpineWebGLPluginDebug.js.map

Large diffs are not rendered by default.

42 changes: 20 additions & 22 deletions public/plugins/spine4.1/SpineCanvasPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -24620,35 +24620,33 @@ var SpinePlugin = new Class({
return null;
}

var gl = this.gl;
var i;
var atlasPage;
var realTextureKey;

if (this.isWebGL)
if (!this.spineTextures.has(atlasKey))
{
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
}
var gl = this.gl;
var i;
var atlasPage;
var realTextureKey;

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));
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
}
else

for (i = 0; i < atlas.pages.length; i ++)
{
atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));
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))
{
this.spineTextures.add(spineTextureKey, atlas);

this.spineTextures.add(atlasKey, atlas);
}

var preMultipliedAlpha = atlasData.preMultipliedAlpha;
Expand Down
Loading