This commit is contained in:
Cameron Taylor 2021-09-01 20:37:37 -04:00
parent 84c2185027
commit fdd28336c1
2 changed files with 35 additions and 1 deletions

View file

@ -64,6 +64,8 @@ class FlxAnimate extends FlxSymbol
// fix render order of ALL layers!
// seperate frameList into layers
// go thru animate file to see how it should all be ordered
// per frame symbol stuff to fix lip sync (in ParseAnimate?)
// definitely need to dig through Animate.json stuff
function actualFrameRender()
{

View file

@ -96,6 +96,8 @@ class ParseAnimate
public static var matrixHelp:Array<Array<Float>> = [];
public static var trpHelpIDK:Array<Array<Float>> = [];
public static var loopedFrameShit:Int = 0;
public static function resetFrameList()
{
frameList = [];
@ -127,11 +129,30 @@ class ParseAnimate
if (frameInput == null)
frameInput = 0;
var oldFrm:Int = frameInput;
if (curLoopType == "SF")
{
trace(layer.LN);
trace(frameArray);
trace(frameInput);
trace(curLoopType);
}
if (curLoopType == "LP")
frameInput = frameArray[frameInput % frameArray.length];
else if (curLoopType == "SF")
{
frameInput = frameArray[loopedFrameShit];
// see what happens when something has more than 2 layer?
}
else
frameInput = frameArray[frameInput];
// trace(frameMap.get(frameInput));
var frame:Frame = frameMap.get(frameInput);
for (element in frame.E)
@ -154,6 +175,7 @@ class ParseAnimate
depthTypeBeat = "";
curLoopType = "";
loopedFrameShit = 0;
}
else
{
@ -161,7 +183,17 @@ class ParseAnimate
trpHelpIDK.push([element.SI.TRP.x, element.SI.TRP.y]);
depthTypeBeat += "->" + element.SI.SN;
curLoopType = element.SI.LP;
parseTimeline(symbolMap.get(element.SI.SN).TL, tabbed + 1, element.SI.FF);
var inputFrame:Int = element.SI.FF;
// JANKY FIX, MAY NOT ACCOUNT FOR ALL SCENARIOS!
if (curLoopType == "SF")
{
trace("LOOP SHIT: " + inputFrame);
loopedFrameShit = inputFrame;
}
parseTimeline(symbolMap.get(element.SI.SN).TL, tabbed + 1, inputFrame);
}
}