Merge branch 'master' of https://github.com/croakfang/UmaViewer
This commit is contained in:
@@ -52,11 +52,11 @@ namespace Gallop.Live.Cutt
|
|||||||
|
|
||||||
bool EnablePlayModeTimeline(TimelinePlayerMode playerMode);
|
bool EnablePlayModeTimeline(TimelinePlayerMode playerMode);
|
||||||
|
|
||||||
FindKeyResult FindKeyCached(int frame, bool ignoreCache);
|
FindKeyResult FindKeyCached(float frame, bool ignoreCache);
|
||||||
|
|
||||||
FindKeyResult FindCurrentKey(int frame);
|
FindKeyResult FindCurrentKey(int frame);
|
||||||
|
|
||||||
FindKeyResult FindCurrentKeyNeighbor(int frame, int baseIndex);
|
FindKeyResult FindCurrentKeyNeighbor(float frame, int baseIndex);
|
||||||
|
|
||||||
List<LiveTimelineKey> GetRange(int index, int count);
|
List<LiveTimelineKey> GetRange(int index, int count);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ namespace Gallop.Live.Cutt
|
|||||||
|
|
||||||
private bool _isNowAlterUpdate;
|
private bool _isNowAlterUpdate;
|
||||||
|
|
||||||
private int _oldFrame;
|
private float _oldFrame;
|
||||||
|
|
||||||
private float _oldLiveTime;
|
private float _oldLiveTime;
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ namespace Gallop.Live.Cutt
|
|||||||
|
|
||||||
public bool _limitFovForWidth = false;
|
public bool _limitFovForWidth = false;
|
||||||
|
|
||||||
private int _currentFrame;
|
private float _currentFrame;
|
||||||
|
|
||||||
private bool _isExtraCameraLayer;
|
private bool _isExtraCameraLayer;
|
||||||
|
|
||||||
@@ -301,10 +301,10 @@ namespace Gallop.Live.Cutt
|
|||||||
_isNowAlterUpdate = true;
|
_isNowAlterUpdate = true;
|
||||||
_oldLiveTime = currentLiveTime;
|
_oldLiveTime = currentLiveTime;
|
||||||
currentLiveTime = liveTime;
|
currentLiveTime = liveTime;
|
||||||
_oldFrame = Mathf.RoundToInt(_oldLiveTime * 60f);
|
_oldFrame = _oldLiveTime * 60f;
|
||||||
_deltaTime = currentLiveTime - _oldLiveTime;
|
_deltaTime = currentLiveTime - _oldLiveTime;
|
||||||
_deltaTimeRatio = _deltaTime / 0.0166666675f;
|
_deltaTimeRatio = _deltaTime / 0.0166666675f;
|
||||||
_currentFrame = Mathf.RoundToInt(currentLiveTime * 60f);
|
_currentFrame = currentLiveTime * 60f;
|
||||||
AlterUpdate_CharaMotionSequence(liveTime);
|
AlterUpdate_CharaMotionSequence(liveTime);
|
||||||
AlterUpdate_FacialData(liveTime);
|
AlterUpdate_FacialData(liveTime);
|
||||||
AlterUpdate_LipSync(liveTime);
|
AlterUpdate_LipSync(liveTime);
|
||||||
@@ -449,7 +449,7 @@ namespace Gallop.Live.Cutt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void FindTimelineKey(out LiveTimelineKey curKey, out LiveTimelineKey nextKey, ILiveTimelineKeyDataList keys, int curFrame)
|
public static void FindTimelineKey(out LiveTimelineKey curKey, out LiveTimelineKey nextKey, ILiveTimelineKeyDataList keys, float curFrame)
|
||||||
{
|
{
|
||||||
FindKeyResult findKeyResult = keys.FindKeyCached(curFrame, availableFindKeyCache);
|
FindKeyResult findKeyResult = keys.FindKeyCached(curFrame, availableFindKeyCache);
|
||||||
curKey = findKeyResult.key;
|
curKey = findKeyResult.key;
|
||||||
@@ -556,7 +556,7 @@ namespace Gallop.Live.Cutt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void FindTimelineKeyCurrent(out LiveTimelineKey curKey, ILiveTimelineKeyDataList keys, int curFrame)
|
public static void FindTimelineKeyCurrent(out LiveTimelineKey curKey, ILiveTimelineKeyDataList keys, float curFrame)
|
||||||
{
|
{
|
||||||
LiveTimelineKey nextKey;
|
LiveTimelineKey nextKey;
|
||||||
FindTimelineKey(out curKey, out nextKey, keys, curFrame);
|
FindTimelineKey(out curKey, out nextKey, keys, curFrame);
|
||||||
@@ -926,7 +926,7 @@ namespace Gallop.Live.Cutt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AlterUpdate_CameraSwitcher(LiveTimelineWorkSheet sheet, int currentFrame)
|
private void AlterUpdate_CameraSwitcher(LiveTimelineWorkSheet sheet, float currentFrame)
|
||||||
{
|
{
|
||||||
if (sheet.cameraSwitcherKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !sheet.cameraSwitcherKeys.EnablePlayModeTimeline(_playMode))
|
if (sheet.cameraSwitcherKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !sheet.cameraSwitcherKeys.EnablePlayModeTimeline(_playMode))
|
||||||
{
|
{
|
||||||
@@ -972,7 +972,7 @@ namespace Gallop.Live.Cutt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AlterUpdate_CameraPos(LiveTimelineWorkSheet sheet, int currentFrame)
|
private void AlterUpdate_CameraPos(LiveTimelineWorkSheet sheet, float currentFrame)
|
||||||
{
|
{
|
||||||
if (sheet.cameraPosKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !sheet.cameraPosKeys.EnablePlayModeTimeline(_playMode))
|
if (sheet.cameraPosKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !sheet.cameraPosKeys.EnablePlayModeTimeline(_playMode))
|
||||||
{
|
{
|
||||||
@@ -1023,7 +1023,7 @@ namespace Gallop.Live.Cutt
|
|||||||
return keyData.GetValue(timelineControl);
|
return keyData.GetValue(timelineControl);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CalculateCameraPos(out Vector3 pos, LiveTimelineWorkSheet sheet, int currentFrame)
|
public bool CalculateCameraPos(out Vector3 pos, LiveTimelineWorkSheet sheet, float currentFrame)
|
||||||
{
|
{
|
||||||
FindTimelineConfig config = default(FindTimelineConfig);
|
FindTimelineConfig config = default(FindTimelineConfig);
|
||||||
config.curKey = null;
|
config.curKey = null;
|
||||||
@@ -1036,7 +1036,7 @@ namespace Gallop.Live.Cutt
|
|||||||
return CalculateCameraPos(out pos, sheet, currentFrame, camera, ref config, ref fnGetCameraPosValue);
|
return CalculateCameraPos(out pos, sheet, currentFrame, camera, ref config, ref fnGetCameraPosValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CalculateCameraPos(out Vector3 pos, LiveTimelineWorkSheet sheet, LiveTimelineKey curKey, LiveTimelineKey nextKey, int currentFrame)
|
public bool CalculateCameraPos(out Vector3 pos, LiveTimelineWorkSheet sheet, LiveTimelineKey curKey, LiveTimelineKey nextKey, float currentFrame)
|
||||||
{
|
{
|
||||||
FindTimelineConfig config = default(FindTimelineConfig);
|
FindTimelineConfig config = default(FindTimelineConfig);
|
||||||
config.curKey = curKey;
|
config.curKey = curKey;
|
||||||
@@ -1049,7 +1049,7 @@ namespace Gallop.Live.Cutt
|
|||||||
return CalculateCameraPos(out pos, sheet, currentFrame, camera, ref config, ref fnGetCameraPosValue);
|
return CalculateCameraPos(out pos, sheet, currentFrame, camera, ref config, ref fnGetCameraPosValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CalculateCameraPos(out Vector3 pos, LiveTimelineWorkSheet sheet, int currentFrame, CacheCamera targetCamera, ref FindTimelineConfig config, ref Func<LiveTimelineKeyCameraPositionData, LiveTimelineControl, FindTimelineConfig, Vector3> getFunc)
|
public bool CalculateCameraPos(out Vector3 pos, LiveTimelineWorkSheet sheet, float currentFrame, CacheCamera targetCamera, ref FindTimelineConfig config, ref Func<LiveTimelineKeyCameraPositionData, LiveTimelineControl, FindTimelineConfig, Vector3> getFunc)
|
||||||
{
|
{
|
||||||
pos = Vector3.zero;
|
pos = Vector3.zero;
|
||||||
LiveTimelineKey curKey = null;
|
LiveTimelineKey curKey = null;
|
||||||
@@ -1135,7 +1135,7 @@ namespace Gallop.Live.Cutt
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AlterUpdate_CameraLookAt(LiveTimelineWorkSheet sheet, int currentFrame, ref Vector3 outLookAt)
|
private void AlterUpdate_CameraLookAt(LiveTimelineWorkSheet sheet, float currentFrame, ref Vector3 outLookAt)
|
||||||
{
|
{
|
||||||
if (!sheet.cameraLookAtKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) && sheet.cameraLookAtKeys.EnablePlayModeTimeline(_playMode))
|
if (!sheet.cameraLookAtKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) && sheet.cameraLookAtKeys.EnablePlayModeTimeline(_playMode))
|
||||||
{
|
{
|
||||||
@@ -1153,7 +1153,7 @@ namespace Gallop.Live.Cutt
|
|||||||
return keyData.GetValue(timelineControl, camPos);
|
return keyData.GetValue(timelineControl, camPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CalculateCameraLookAt(out Vector3 lookAtPos, LiveTimelineWorkSheet sheet, int currentFrame)
|
public bool CalculateCameraLookAt(out Vector3 lookAtPos, LiveTimelineWorkSheet sheet, float currentFrame)
|
||||||
{
|
{
|
||||||
CacheCamera camera = GetCamera(sheet.targetCameraIndex);
|
CacheCamera camera = GetCamera(sheet.targetCameraIndex);
|
||||||
FindTimelineConfig config = default(FindTimelineConfig);
|
FindTimelineConfig config = default(FindTimelineConfig);
|
||||||
@@ -1166,7 +1166,7 @@ namespace Gallop.Live.Cutt
|
|||||||
return CalculateCameraLookAt(out lookAtPos, sheet, currentFrame, camera, ref config, ref fnGetCameraLookAtValue, ref fnGetCameraPosValue);
|
return CalculateCameraLookAt(out lookAtPos, sheet, currentFrame, camera, ref config, ref fnGetCameraLookAtValue, ref fnGetCameraPosValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool CalculateCameraLookAt(out Vector3 lookAtPos, LiveTimelineWorkSheet sheet, int currentFrame, CacheCamera targetCamera, ref FindTimelineConfig config, ref Func<LiveTimelineKeyCameraLookAtData, LiveTimelineControl, Vector3, FindTimelineConfig, Vector3> getLookAtValueFunc, ref Func<LiveTimelineKeyCameraPositionData, LiveTimelineControl, FindTimelineConfig, Vector3> getPosValueFunc)
|
private bool CalculateCameraLookAt(out Vector3 lookAtPos, LiveTimelineWorkSheet sheet, float currentFrame, CacheCamera targetCamera, ref FindTimelineConfig config, ref Func<LiveTimelineKeyCameraLookAtData, LiveTimelineControl, Vector3, FindTimelineConfig, Vector3> getLookAtValueFunc, ref Func<LiveTimelineKeyCameraPositionData, LiveTimelineControl, FindTimelineConfig, Vector3> getPosValueFunc)
|
||||||
{
|
{
|
||||||
lookAtPos = Vector3.zero;
|
lookAtPos = Vector3.zero;
|
||||||
CacheCamera camera = GetCamera(sheet.targetCameraIndex);
|
CacheCamera camera = GetCamera(sheet.targetCameraIndex);
|
||||||
@@ -1250,7 +1250,7 @@ namespace Gallop.Live.Cutt
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AlterUpdate_CameraFov(LiveTimelineWorkSheet sheet, int currentFrame)
|
private void AlterUpdate_CameraFov(LiveTimelineWorkSheet sheet, float currentFrame)
|
||||||
{
|
{
|
||||||
if (sheet.cameraFovKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !sheet.cameraFovKeys.EnablePlayModeTimeline(_playMode))
|
if (sheet.cameraFovKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !sheet.cameraFovKeys.EnablePlayModeTimeline(_playMode))
|
||||||
{
|
{
|
||||||
@@ -1292,7 +1292,7 @@ namespace Gallop.Live.Cutt
|
|||||||
camera.camera.fieldOfView = num;
|
camera.camera.fieldOfView = num;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AlterUpdate_CameraRoll(LiveTimelineWorkSheet sheet, int currentFrame)
|
private void AlterUpdate_CameraRoll(LiveTimelineWorkSheet sheet, float currentFrame)
|
||||||
{
|
{
|
||||||
if (sheet.cameraRollKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !sheet.cameraRollKeys.EnablePlayModeTimeline(_playMode))
|
if (sheet.cameraRollKeys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !sheet.cameraRollKeys.EnablePlayModeTimeline(_playMode))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -393,13 +393,13 @@ namespace Gallop.Live.Cutt
|
|||||||
return ret.index;
|
return ret.index;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FindKeyResult FindKeyCached(int frame, bool forceRefind)
|
public FindKeyResult FindKeyCached(float frame, bool forceRefind)
|
||||||
{
|
{
|
||||||
FindKeyCached(frame, forceRefind, out var current, out var _);
|
FindKeyCached(frame, forceRefind, out var current, out var _);
|
||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FindKeyCached(int frame, bool forceRefind, out FindKeyResult current, out FindKeyResult next)
|
public void FindKeyCached(float frame, bool forceRefind, out FindKeyResult current, out FindKeyResult next)
|
||||||
{
|
{
|
||||||
if (forceRefind || _lastFindIndex < 0)
|
if (forceRefind || _lastFindIndex < 0)
|
||||||
{
|
{
|
||||||
@@ -418,7 +418,7 @@ namespace Gallop.Live.Cutt
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FindKey(out FindKeyResult ret, out FindKeyResult next, int frame)
|
public void FindKey(out FindKeyResult ret, out FindKeyResult next, float frame)
|
||||||
{
|
{
|
||||||
int count = thisList.Count;
|
int count = thisList.Count;
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
@@ -434,7 +434,7 @@ namespace Gallop.Live.Cutt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BinSearch(out FindKeyResult ret, out FindKeyResult next, int frame, int indexS, int indexE, int listSize)
|
private void BinSearch(out FindKeyResult ret, out FindKeyResult next, float frame, int indexS, int indexE, int listSize)
|
||||||
{
|
{
|
||||||
int num = (indexE - indexS >> 1) + indexS;
|
int num = (indexE - indexS >> 1) + indexS;
|
||||||
T val = thisList[num];
|
T val = thisList[num];
|
||||||
@@ -498,13 +498,13 @@ namespace Gallop.Live.Cutt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public FindKeyResult FindCurrentKeyNeighbor(int frame, int baseIndex)
|
public FindKeyResult FindCurrentKeyNeighbor(float frame, int baseIndex)
|
||||||
{
|
{
|
||||||
FindCurrentKeyNeighbor(frame, baseIndex, out var ret, out var _);
|
FindCurrentKeyNeighbor(frame, baseIndex, out var ret, out var _);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FindCurrentKeyNeighbor(int frame, int baseIndex, out FindKeyResult ret, out FindKeyResult next)
|
public void FindCurrentKeyNeighbor(float frame, int baseIndex, out FindKeyResult ret, out FindKeyResult next)
|
||||||
{
|
{
|
||||||
ret.key = null;
|
ret.key = null;
|
||||||
ret.index = -1;
|
ret.index = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user