mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
Merge branch '3.8' into 4.0-beta
# Conflicts: # spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java
This commit is contained in:
commit
31d040ee05
@ -60,12 +60,18 @@ public class AnimationState {
|
|||||||
* 2) The next track entry applied after this one does not have a timeline to set this property.<br>
|
* 2) The next track entry applied after this one does not have a timeline to set this property.<br>
|
||||||
* Result: Mix from the setup pose to the timeline pose. */
|
* Result: Mix from the setup pose to the timeline pose. */
|
||||||
static private final int FIRST = 1;
|
static private final int FIRST = 1;
|
||||||
|
/** 1) A previously applied timeline has set this property.<br>
|
||||||
|
* 2) The next track entry to be applied does have a timeline to set this property.<br>
|
||||||
|
* 3) The next track entry after that one does not have a timeline to set this property.<br>
|
||||||
|
* Result: Mix from the current pose to the timeline pose, but do not mix out. This avoids "dipping" when crossfading
|
||||||
|
* animations that key the same property. A subsequent timeline will set this property using a mix. */
|
||||||
|
static private final int HOLD_SUBSEQUENT = 2;
|
||||||
/** 1) This is the first timeline to set this property.<br>
|
/** 1) This is the first timeline to set this property.<br>
|
||||||
* 2) The next track entry to be applied does have a timeline to set this property.<br>
|
* 2) The next track entry to be applied does have a timeline to set this property.<br>
|
||||||
* 3) The next track entry after that one does not have a timeline to set this property.<br>
|
* 3) The next track entry after that one does not have a timeline to set this property.<br>
|
||||||
* Result: Mix from the setup pose to the timeline pose, but do not mix out. This avoids "dipping" when crossfading animations
|
* Result: Mix from the setup pose to the timeline pose, but do not mix out. This avoids "dipping" when crossfading animations
|
||||||
* that key the same property. A subsequent timeline will set this property using a mix. */
|
* that key the same property. A subsequent timeline will set this property using a mix. */
|
||||||
static private final int HOLD = 2;
|
static private final int HOLD_FIRST = 3;
|
||||||
/** 1) This is the first timeline to set this property.<br>
|
/** 1) This is the first timeline to set this property.<br>
|
||||||
* 2) The next track entry to be applied does have a timeline to set this property.<br>
|
* 2) The next track entry to be applied does have a timeline to set this property.<br>
|
||||||
* 3) The next track entry after that one does have a timeline to set this property.<br>
|
* 3) The next track entry after that one does have a timeline to set this property.<br>
|
||||||
@ -74,9 +80,9 @@ public class AnimationState {
|
|||||||
* 2 track entries in a row have a timeline that sets the same property.<br>
|
* 2 track entries in a row have a timeline that sets the same property.<br>
|
||||||
* Eg, A -> B -> C -> D where A, B, and C have a timeline setting same property, but D does not. When A is applied, to avoid
|
* Eg, A -> B -> C -> D where A, B, and C have a timeline setting same property, but D does not. When A is applied, to avoid
|
||||||
* "dipping" A is not mixed out, however D (the first entry that doesn't set the property) mixing in is used to mix out A
|
* "dipping" A is not mixed out, however D (the first entry that doesn't set the property) mixing in is used to mix out A
|
||||||
* (which affects B and C). Without using D to mix out, A would be applied fully until mixing completes, then snap into
|
* (which affects B and C). Without using D to mix out, A would be applied fully until mixing completes, then snap to the mixed
|
||||||
* place. */
|
* out position. */
|
||||||
static private final int HOLD_MIX = 3;
|
static private final int HOLD_MIX = 4;
|
||||||
|
|
||||||
static private final int SETUP = 1, CURRENT = 2;
|
static private final int SETUP = 1, CURRENT = 2;
|
||||||
|
|
||||||
@ -329,7 +335,11 @@ public class AnimationState {
|
|||||||
timelineBlend = MixBlend.setup;
|
timelineBlend = MixBlend.setup;
|
||||||
alpha = alphaMix;
|
alpha = alphaMix;
|
||||||
break;
|
break;
|
||||||
case HOLD:
|
case HOLD_SUBSEQUENT:
|
||||||
|
timelineBlend = blend;
|
||||||
|
alpha = alphaHold;
|
||||||
|
break;
|
||||||
|
case HOLD_FIRST:
|
||||||
timelineBlend = MixBlend.setup;
|
timelineBlend = MixBlend.setup;
|
||||||
alpha = alphaHold;
|
alpha = alphaHold;
|
||||||
break;
|
break;
|
||||||
@ -758,10 +768,8 @@ public class AnimationState {
|
|||||||
ObjectSet<String> propertyIds = this.propertyIds;
|
ObjectSet<String> propertyIds = this.propertyIds;
|
||||||
|
|
||||||
if (to != null && to.holdPrevious) {
|
if (to != null && to.holdPrevious) {
|
||||||
for (int i = 0; i < timelinesCount; i++) {
|
for (int i = 0; i < timelinesCount; i++)
|
||||||
propertyIds.addAll(((Timeline)timelines[i]).getPropertyIds());
|
timelineMode[i] = propertyIds.addAll(((Timeline)timelines[i]).getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;
|
||||||
timelineMode[i] = HOLD;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -784,7 +792,7 @@ public class AnimationState {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
timelineMode[i] = HOLD;
|
timelineMode[i] = HOLD_FIRST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -157,7 +157,7 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
|
|||||||
new GUIContent("Multiply"),
|
new GUIContent("Multiply"),
|
||||||
new GUIContent("Multiply x2")
|
new GUIContent("Multiply x2")
|
||||||
};
|
};
|
||||||
static GUIContent _rendererQueueText = new GUIContent("Renderer Queue");
|
static GUIContent _rendererQueueText = new GUIContent("Render Queue Offset");
|
||||||
static GUIContent _cullingModeText = new GUIContent("Culling Mode");
|
static GUIContent _cullingModeText = new GUIContent("Culling Mode");
|
||||||
static GUIContent[] _cullingModeOptions = { new GUIContent("Off"), new GUIContent("Front"), new GUIContent("Back") };
|
static GUIContent[] _cullingModeOptions = { new GUIContent("Off"), new GUIContent("Front"), new GUIContent("Back") };
|
||||||
static GUIContent _pixelSnapText = new GUIContent("Pixel Snap");
|
static GUIContent _pixelSnapText = new GUIContent("Pixel Snap");
|
||||||
@ -169,7 +169,7 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
|
|||||||
static GUIContent _rimPowerText = new GUIContent("Rim Power");
|
static GUIContent _rimPowerText = new GUIContent("Rim Power");
|
||||||
static GUIContent _specularToggleText = new GUIContent("Specular", "Enable Specular.");
|
static GUIContent _specularToggleText = new GUIContent("Specular", "Enable Specular.");
|
||||||
static GUIContent _colorAdjustmentToggleText = new GUIContent("Color Adjustment", "Enable material color adjustment.");
|
static GUIContent _colorAdjustmentToggleText = new GUIContent("Color Adjustment", "Enable material color adjustment.");
|
||||||
static GUIContent _colorAdjustmentColorText = new GUIContent("Overlay Color & Alpha");
|
static GUIContent _colorAdjustmentColorText = new GUIContent("Overlay Color");
|
||||||
static GUIContent _colorAdjustmentHueText = new GUIContent("Hue");
|
static GUIContent _colorAdjustmentHueText = new GUIContent("Hue");
|
||||||
static GUIContent _colorAdjustmentSaturationText = new GUIContent("Saturation");
|
static GUIContent _colorAdjustmentSaturationText = new GUIContent("Saturation");
|
||||||
static GUIContent _colorAdjustmentBrightnessText = new GUIContent("Brightness");
|
static GUIContent _colorAdjustmentBrightnessText = new GUIContent("Brightness");
|
||||||
@ -404,13 +404,13 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// GUILayout.Label(Styles.advancedText, EditorStyles.boldLabel);
|
EditorGUI.BeginDisabledGroup(true);
|
||||||
// m_MaterialEditor.RenderQueueField();
|
_materialEditor.RenderQueueField();
|
||||||
// m_MaterialEditor.EnableInstancingField();
|
EditorGUI.EndDisabledGroup();
|
||||||
|
|
||||||
EditorGUI.BeginChangeCheck();
|
EditorGUI.BeginChangeCheck();
|
||||||
EditorGUI.showMixedValue = _renderQueue.hasMixedValue;
|
EditorGUI.showMixedValue = _renderQueue.hasMixedValue;
|
||||||
int renderQueue = EditorGUILayout.IntSlider(_rendererQueueText, (int)_renderQueue.floatValue, 0, 49);
|
int renderQueue = EditorGUILayout.IntField(_rendererQueueText, (int)_renderQueue.floatValue);
|
||||||
if (EditorGUI.EndChangeCheck()) {
|
if (EditorGUI.EndChangeCheck()) {
|
||||||
SetInt("_RenderQueue", renderQueue);
|
SetInt("_RenderQueue", renderQueue);
|
||||||
dataChanged = true;
|
dataChanged = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user