mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
spine4.1 plugin about createSkeleton perf issue (also optimize spine plugin spineFileCallback func)
This commit is contained in:
parent
9841602bbe
commit
9fa74e7dc4
26 changed files with 155082 additions and 133386 deletions
62138
plugins/spine/dist/SpineCanvasPlugin.js
vendored
62138
plugins/spine/dist/SpineCanvasPlugin.js
vendored
File diff suppressed because it is too large
Load diff
1255
plugins/spine/dist/SpineCanvasPlugin.min.js
vendored
1255
plugins/spine/dist/SpineCanvasPlugin.min.js
vendored
File diff suppressed because one or more lines are too long
8180
plugins/spine/dist/SpineCanvasPluginDebug.js
vendored
8180
plugins/spine/dist/SpineCanvasPluginDebug.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
63143
plugins/spine/dist/SpinePlugin.js
vendored
63143
plugins/spine/dist/SpinePlugin.js
vendored
File diff suppressed because it is too large
Load diff
1273
plugins/spine/dist/SpinePlugin.min.js
vendored
1273
plugins/spine/dist/SpinePlugin.min.js
vendored
File diff suppressed because one or more lines are too long
76781
plugins/spine/dist/SpinePluginDebug.js
vendored
76781
plugins/spine/dist/SpinePluginDebug.js
vendored
File diff suppressed because it is too large
Load diff
2
plugins/spine/dist/SpinePluginDebug.js.map
vendored
2
plugins/spine/dist/SpinePluginDebug.js.map
vendored
File diff suppressed because one or more lines are too long
62526
plugins/spine/dist/SpineWebGLPlugin.js
vendored
62526
plugins/spine/dist/SpineWebGLPlugin.js
vendored
File diff suppressed because it is too large
Load diff
1267
plugins/spine/dist/SpineWebGLPlugin.min.js
vendored
1267
plugins/spine/dist/SpineWebGLPlugin.min.js
vendored
File diff suppressed because one or more lines are too long
8200
plugins/spine/dist/SpineWebGLPluginDebug.js
vendored
8200
plugins/spine/dist/SpineWebGLPluginDebug.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
@ -653,12 +653,14 @@ var SpinePlugin = new Class({
|
|||
* @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?
|
||||
* @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.
|
||||
* @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.
|
||||
* @param {object} [settings] - An external Settings configuration object { prefix: '' }
|
||||
*
|
||||
* @return {Phaser.Loader.LoaderPlugin} The Loader instance.
|
||||
*/
|
||||
spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)
|
||||
spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)
|
||||
{
|
||||
var multifile;
|
||||
settings = settings || {};
|
||||
|
||||
if (Array.isArray(key))
|
||||
{
|
||||
|
@ -666,6 +668,9 @@ var SpinePlugin = new Class({
|
|||
{
|
||||
multifile = new SpineFile(this, key[i]);
|
||||
|
||||
// Support prefix key
|
||||
multifile.prefix = multifile.prefix || settings.prefix || '';
|
||||
|
||||
this.addFile(multifile.files);
|
||||
}
|
||||
}
|
||||
|
@ -673,6 +678,9 @@ var SpinePlugin = new Class({
|
|||
{
|
||||
multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);
|
||||
|
||||
// Support prefix key
|
||||
multifile.prefix = multifile.prefix || settings.prefix || '';
|
||||
|
||||
this.addFile(multifile.files);
|
||||
}
|
||||
|
||||
|
|
8
plugins/spine4.1/dist/SpineCanvasPlugin.js
vendored
8
plugins/spine4.1/dist/SpineCanvasPlugin.js
vendored
|
@ -24620,6 +24620,8 @@ var SpinePlugin = new Class({
|
|||
return null;
|
||||
}
|
||||
|
||||
if (!this.spineTextures.has(atlasKey))
|
||||
{
|
||||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
|
@ -24644,11 +24646,7 @@ var SpinePlugin = new Class({
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -37208,6 +37208,8 @@ var SpinePlugin = new Class({
|
|||
return null;
|
||||
}
|
||||
|
||||
if (!this.spineTextures.has(atlasKey))
|
||||
{
|
||||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
|
@ -37232,11 +37234,7 @@ var SpinePlugin = new Class({
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
File diff suppressed because one or more lines are too long
8
plugins/spine4.1/dist/SpinePlugin.js
vendored
8
plugins/spine4.1/dist/SpinePlugin.js
vendored
|
@ -15141,6 +15141,8 @@ var SpinePlugin = new Class({
|
|||
return null;
|
||||
}
|
||||
|
||||
if (!this.spineTextures.has(atlasKey))
|
||||
{
|
||||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
|
@ -15165,11 +15167,7 @@ var SpinePlugin = new Class({
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
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
8
plugins/spine4.1/dist/SpinePluginDebug.js
vendored
8
plugins/spine4.1/dist/SpinePluginDebug.js
vendored
|
@ -37443,6 +37443,8 @@ var SpinePlugin = new Class({
|
|||
return null;
|
||||
}
|
||||
|
||||
if (!this.spineTextures.has(atlasKey))
|
||||
{
|
||||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
|
@ -37467,11 +37469,7 @@ var SpinePlugin = new Class({
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
File diff suppressed because one or more lines are too long
8
plugins/spine4.1/dist/SpineWebGLPlugin.js
vendored
8
plugins/spine4.1/dist/SpineWebGLPlugin.js
vendored
|
@ -27178,6 +27178,8 @@ var SpinePlugin = new Class({
|
|||
return null;
|
||||
}
|
||||
|
||||
if (!this.spineTextures.has(atlasKey))
|
||||
{
|
||||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
|
@ -27202,11 +27204,7 @@ var SpinePlugin = new Class({
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -37328,6 +37328,8 @@ var SpinePlugin = new Class({
|
|||
return null;
|
||||
}
|
||||
|
||||
if (!this.spineTextures.has(atlasKey))
|
||||
{
|
||||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
|
@ -37352,11 +37354,7 @@ var SpinePlugin = new Class({
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -638,6 +638,7 @@ var SpinePlugin = new Class({
|
|||
* @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.
|
||||
* @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.
|
||||
* @param {object} [settings] - An external Settings configuration object { prefix: '' }
|
||||
*
|
||||
* @return {Phaser.Loader.LoaderPlugin} The Loader instance.
|
||||
*/
|
||||
spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)
|
||||
|
@ -971,6 +972,8 @@ var SpinePlugin = new Class({
|
|||
return null;
|
||||
}
|
||||
|
||||
if (!this.spineTextures.has(atlasKey))
|
||||
{
|
||||
var gl = this.gl;
|
||||
var i;
|
||||
var atlasPage;
|
||||
|
@ -995,11 +998,7 @@ var SpinePlugin = new Class({
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue