mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
Merge branch '3.8' into 3.9-beta
This commit is contained in:
commit
f956dc4bfc
@ -6147,7 +6147,7 @@ var spine;
|
||||
skeletonData.animations.push(new spine.Animation(name, timelines, duration));
|
||||
};
|
||||
SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {
|
||||
if (!map.curve)
|
||||
if (!map.hasOwnProperty("curve"))
|
||||
return;
|
||||
if (map.curve == "stepped")
|
||||
timeline.setStepped(frameIndex);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -6147,7 +6147,7 @@ var spine;
|
||||
skeletonData.animations.push(new spine.Animation(name, timelines, duration));
|
||||
};
|
||||
SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {
|
||||
if (!map.curve)
|
||||
if (!map.hasOwnProperty("curve"))
|
||||
return;
|
||||
if (map.curve == "stepped")
|
||||
timeline.setStepped(frameIndex);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -6147,7 +6147,7 @@ var spine;
|
||||
skeletonData.animations.push(new spine.Animation(name, timelines, duration));
|
||||
};
|
||||
SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {
|
||||
if (!map.curve)
|
||||
if (!map.hasOwnProperty("curve"))
|
||||
return;
|
||||
if (map.curve == "stepped")
|
||||
timeline.setStepped(frameIndex);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -6147,7 +6147,7 @@ var spine;
|
||||
skeletonData.animations.push(new spine.Animation(name, timelines, duration));
|
||||
};
|
||||
SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {
|
||||
if (!map.curve)
|
||||
if (!map.hasOwnProperty("curve"))
|
||||
return;
|
||||
if (map.curve == "stepped")
|
||||
timeline.setStepped(frameIndex);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -6147,7 +6147,7 @@ var spine;
|
||||
skeletonData.animations.push(new spine.Animation(name, timelines, duration));
|
||||
};
|
||||
SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {
|
||||
if (!map.curve)
|
||||
if (!map.hasOwnProperty("curve"))
|
||||
return;
|
||||
if (map.curve == "stepped")
|
||||
timeline.setStepped(frameIndex);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -6147,7 +6147,7 @@ var spine;
|
||||
skeletonData.animations.push(new spine.Animation(name, timelines, duration));
|
||||
};
|
||||
SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {
|
||||
if (!map.curve)
|
||||
if (!map.hasOwnProperty("curve"))
|
||||
return;
|
||||
if (map.curve == "stepped")
|
||||
timeline.setStepped(frameIndex);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -784,7 +784,7 @@ module spine {
|
||||
}
|
||||
|
||||
readCurve (map: any, timeline: CurveTimeline, frameIndex: number) {
|
||||
if (!map.curve) return;
|
||||
if (!map.hasOwnProperty("curve")) return;
|
||||
if (map.curve == "stepped")
|
||||
timeline.setStepped(frameIndex);
|
||||
else {
|
||||
|
||||
24
spine-ts/player/example/embedding-binary-example.html
Normal file
24
spine-ts/player/example/embedding-binary-example.html
Normal file
File diff suppressed because one or more lines are too long
24
spine-ts/player/example/embedding-json-example.html
Normal file
24
spine-ts/player/example/embedding-json-example.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -117,6 +117,14 @@ namespace Spine.Unity {
|
||||
|
||||
[System.Serializable]
|
||||
public class SpriteMaskInteractionMaterials {
|
||||
public bool AnyMaterialCreated {
|
||||
get {
|
||||
return materialsMaskDisabled.Length > 0 ||
|
||||
materialsInsideMask.Length > 0 ||
|
||||
materialsOutsideMask.Length > 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Material references for switching material sets at runtime when <see cref="SkeletonRenderer.maskInteraction"/> changes to <see cref="SpriteMaskInteraction.None"/>.</summary>
|
||||
public Material[] materialsMaskDisabled = new Material[0];
|
||||
/// <summary>Material references for switching material sets at runtime when <see cref="SkeletonRenderer.maskInteraction"/> changes to <see cref="SpriteMaskInteraction.VisibleInsideMask"/>.</summary>
|
||||
@ -417,12 +425,16 @@ namespace Spine.Unity {
|
||||
|
||||
rendererBuffers.UpdateSharedMaterials(workingSubmeshInstructions);
|
||||
|
||||
bool materialsChanged = rendererBuffers.MaterialsChangedInLastUpdate();
|
||||
if (updateTriangles) { // Check if the triangles should also be updated.
|
||||
meshGenerator.FillTriangles(currentMesh);
|
||||
meshRenderer.sharedMaterials = rendererBuffers.GetUpdatedSharedMaterialsArray();
|
||||
} else if (rendererBuffers.MaterialsChangedInLastUpdate()) {
|
||||
} else if (materialsChanged) {
|
||||
meshRenderer.sharedMaterials = rendererBuffers.GetUpdatedSharedMaterialsArray();
|
||||
}
|
||||
if (materialsChanged && (this.maskMaterials.AnyMaterialCreated)) {
|
||||
this.maskMaterials = new SpriteMaskInteractionMaterials();
|
||||
}
|
||||
|
||||
meshGenerator.FillLateVertexData(currentMesh);
|
||||
|
||||
@ -512,6 +524,11 @@ namespace Spine.Unity {
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Application.isPlaying) {
|
||||
if (maskInteraction != SpriteMaskInteraction.None && maskMaterials.materialsMaskDisabled.Length == 0)
|
||||
maskMaterials.materialsMaskDisabled = meshRenderer.sharedMaterials;
|
||||
}
|
||||
|
||||
if (maskMaterials.materialsMaskDisabled.Length > 0 && maskMaterials.materialsMaskDisabled[0] != null &&
|
||||
maskInteraction == SpriteMaskInteraction.None) {
|
||||
this.meshRenderer.materials = maskMaterials.materialsMaskDisabled;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user