Skip to content

Commit 9a22257

Browse files
committed
Spine 3.51 Plugin
1 parent a422714 commit 9a22257

6 files changed

Lines changed: 75 additions & 27 deletions

File tree

plugins/spine/dist/SpineCanvasPlugin.js

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11739,7 +11739,6 @@ var GameObject = new Class({
1173911739

1174011740
while (parent)
1174111741
{
11742-
// indexes.unshift([parent.getIndex(child), parent.name]);
1174311742
indexes.unshift(parent.getIndex(child));
1174411743

1174511744
child = parent;
@@ -11754,8 +11753,7 @@ var GameObject = new Class({
1175411753
}
1175511754
}
1175611755

11757-
// indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);
11758-
indexes.unshift(this.scene.sys.displayList.getIndex(child));
11756+
indexes.unshift(this.displayList.getIndex(child));
1175911757

1176011758
return indexes;
1176111759
},
@@ -28457,7 +28455,7 @@ var SpineFile = new Class({
2845728455
{
2845828456
var textureURL = textures[i];
2845928457

28460-
var key = this.prefix + textureURL;
28458+
var key = textureURL;
2846128459

2846228460
var image = new ImageFile(loader, key, textureURL, textureXhrSettings);
2846328461

@@ -41267,6 +41265,12 @@ var Pipeline = {
4126741265
if (pipeline === undefined) { pipeline = PIPELINE_CONST.MULTI_PIPELINE; }
4126841266

4126941267
var renderer = this.scene.sys.renderer;
41268+
41269+
if (!renderer)
41270+
{
41271+
return false;
41272+
}
41273+
4127041274
var pipelines = renderer.pipelines;
4127141275

4127241276
this.postPipelines = [];
@@ -41308,6 +41312,12 @@ var Pipeline = {
4130841312
setPipeline: function (pipeline, pipelineData, copyData)
4130941313
{
4131041314
var renderer = this.scene.sys.renderer;
41315+
41316+
if (!renderer)
41317+
{
41318+
return this;
41319+
}
41320+
4131141321
var pipelines = renderer.pipelines;
4131241322

4131341323
if (pipelines)
@@ -41359,6 +41369,12 @@ var Pipeline = {
4135941369
setPostPipeline: function (pipelines, pipelineData, copyData)
4136041370
{
4136141371
var renderer = this.scene.sys.renderer;
41372+
41373+
if (!renderer)
41374+
{
41375+
return this;
41376+
}
41377+
4136241378
var pipelineManager = renderer.pipelines;
4136341379

4136441380
if (pipelineManager)
@@ -41513,7 +41529,7 @@ var Pipeline = {
4151341529
},
4151441530

4151541531
/**
41516-
* Removes a single Post Pipeline instance from this Game Object, based on the given name, and destroys it.
41532+
* Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.
4151741533
*
4151841534
* If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.
4151941535
*
@@ -41529,7 +41545,7 @@ var Pipeline = {
4152941545
{
4153041546
var pipelines = this.postPipelines;
4153141547

41532-
for (var i = 0; i < pipelines.length; i++)
41548+
for (var i = pipelines.length - 1; i >= 0; i--)
4153341549
{
4153441550
var instance = pipelines[i];
4153541551

@@ -41540,11 +41556,11 @@ var Pipeline = {
4154041556
instance.destroy();
4154141557

4154241558
SpliceOne(pipelines, i);
41543-
41544-
return this;
4154541559
}
4154641560
}
4154741561

41562+
this.hasPostPipeline = (this.postPipelines.length > 0);
41563+
4154841564
return this;
4154941565
},
4155041566

plugins/spine/dist/SpineCanvasPlugin.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/spine/dist/SpinePlugin.js

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11739,7 +11739,6 @@ var GameObject = new Class({
1173911739

1174011740
while (parent)
1174111741
{
11742-
// indexes.unshift([parent.getIndex(child), parent.name]);
1174311742
indexes.unshift(parent.getIndex(child));
1174411743

1174511744
child = parent;
@@ -11754,8 +11753,7 @@ var GameObject = new Class({
1175411753
}
1175511754
}
1175611755

11757-
// indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);
11758-
indexes.unshift(this.scene.sys.displayList.getIndex(child));
11756+
indexes.unshift(this.displayList.getIndex(child));
1175911757

1176011758
return indexes;
1176111759
},
@@ -30868,7 +30866,7 @@ var SpineFile = new Class({
3086830866
{
3086930867
var textureURL = textures[i];
3087030868

30871-
var key = this.prefix + textureURL;
30869+
var key = textureURL;
3087230870

3087330871
var image = new ImageFile(loader, key, textureURL, textureXhrSettings);
3087430872

@@ -43961,6 +43959,12 @@ var Pipeline = {
4396143959
if (pipeline === undefined) { pipeline = PIPELINE_CONST.MULTI_PIPELINE; }
4396243960

4396343961
var renderer = this.scene.sys.renderer;
43962+
43963+
if (!renderer)
43964+
{
43965+
return false;
43966+
}
43967+
4396443968
var pipelines = renderer.pipelines;
4396543969

4396643970
this.postPipelines = [];
@@ -44002,6 +44006,12 @@ var Pipeline = {
4400244006
setPipeline: function (pipeline, pipelineData, copyData)
4400344007
{
4400444008
var renderer = this.scene.sys.renderer;
44009+
44010+
if (!renderer)
44011+
{
44012+
return this;
44013+
}
44014+
4400544015
var pipelines = renderer.pipelines;
4400644016

4400744017
if (pipelines)
@@ -44053,6 +44063,12 @@ var Pipeline = {
4405344063
setPostPipeline: function (pipelines, pipelineData, copyData)
4405444064
{
4405544065
var renderer = this.scene.sys.renderer;
44066+
44067+
if (!renderer)
44068+
{
44069+
return this;
44070+
}
44071+
4405644072
var pipelineManager = renderer.pipelines;
4405744073

4405844074
if (pipelineManager)
@@ -44207,7 +44223,7 @@ var Pipeline = {
4420744223
},
4420844224

4420944225
/**
44210-
* Removes a single Post Pipeline instance from this Game Object, based on the given name, and destroys it.
44226+
* Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.
4421144227
*
4421244228
* If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.
4421344229
*
@@ -44223,7 +44239,7 @@ var Pipeline = {
4422344239
{
4422444240
var pipelines = this.postPipelines;
4422544241

44226-
for (var i = 0; i < pipelines.length; i++)
44242+
for (var i = pipelines.length - 1; i >= 0; i--)
4422744243
{
4422844244
var instance = pipelines[i];
4422944245

@@ -44234,11 +44250,11 @@ var Pipeline = {
4423444250
instance.destroy();
4423544251

4423644252
SpliceOne(pipelines, i);
44237-
44238-
return this;
4423944253
}
4424044254
}
4424144255

44256+
this.hasPostPipeline = (this.postPipelines.length > 0);
44257+
4424244258
return this;
4424344259
},
4424444260

plugins/spine/dist/SpinePlugin.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/spine/dist/SpineWebGLPlugin.js

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11739,7 +11739,6 @@ var GameObject = new Class({
1173911739

1174011740
while (parent)
1174111741
{
11742-
// indexes.unshift([parent.getIndex(child), parent.name]);
1174311742
indexes.unshift(parent.getIndex(child));
1174411743

1174511744
child = parent;
@@ -11754,8 +11753,7 @@ var GameObject = new Class({
1175411753
}
1175511754
}
1175611755

11757-
// indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);
11758-
indexes.unshift(this.scene.sys.displayList.getIndex(child));
11756+
indexes.unshift(this.displayList.getIndex(child));
1175911757

1176011758
return indexes;
1176111759
},
@@ -30600,7 +30598,7 @@ var SpineFile = new Class({
3060030598
{
3060130599
var textureURL = textures[i];
3060230600

30603-
var key = this.prefix + textureURL;
30601+
var key = textureURL;
3060430602

3060530603
var image = new ImageFile(loader, key, textureURL, textureXhrSettings);
3060630604

@@ -43571,6 +43569,12 @@ var Pipeline = {
4357143569
if (pipeline === undefined) { pipeline = PIPELINE_CONST.MULTI_PIPELINE; }
4357243570

4357343571
var renderer = this.scene.sys.renderer;
43572+
43573+
if (!renderer)
43574+
{
43575+
return false;
43576+
}
43577+
4357443578
var pipelines = renderer.pipelines;
4357543579

4357643580
this.postPipelines = [];
@@ -43612,6 +43616,12 @@ var Pipeline = {
4361243616
setPipeline: function (pipeline, pipelineData, copyData)
4361343617
{
4361443618
var renderer = this.scene.sys.renderer;
43619+
43620+
if (!renderer)
43621+
{
43622+
return this;
43623+
}
43624+
4361543625
var pipelines = renderer.pipelines;
4361643626

4361743627
if (pipelines)
@@ -43663,6 +43673,12 @@ var Pipeline = {
4366343673
setPostPipeline: function (pipelines, pipelineData, copyData)
4366443674
{
4366543675
var renderer = this.scene.sys.renderer;
43676+
43677+
if (!renderer)
43678+
{
43679+
return this;
43680+
}
43681+
4366643682
var pipelineManager = renderer.pipelines;
4366743683

4366843684
if (pipelineManager)
@@ -43817,7 +43833,7 @@ var Pipeline = {
4381743833
},
4381843834

4381943835
/**
43820-
* Removes a single Post Pipeline instance from this Game Object, based on the given name, and destroys it.
43836+
* Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.
4382143837
*
4382243838
* If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.
4382343839
*
@@ -43833,7 +43849,7 @@ var Pipeline = {
4383343849
{
4383443850
var pipelines = this.postPipelines;
4383543851

43836-
for (var i = 0; i < pipelines.length; i++)
43852+
for (var i = pipelines.length - 1; i >= 0; i--)
4383743853
{
4383843854
var instance = pipelines[i];
4383943855

@@ -43844,11 +43860,11 @@ var Pipeline = {
4384443860
instance.destroy();
4384543861

4384643862
SpliceOne(pipelines, i);
43847-
43848-
return this;
4384943863
}
4385043864
}
4385143865

43866+
this.hasPostPipeline = (this.postPipelines.length > 0);
43867+
4385243868
return this;
4385343869
},
4385443870

plugins/spine/dist/SpineWebGLPlugin.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)