Skip to content

Instantly share code, notes, and snippets.

@GeePawHill
Last active July 11, 2017 00:09
Show Gist options
  • Save GeePawHill/fb6654370e8aeed2287d7e0fece60456 to your computer and use it in GitHub Desktop.
Save GeePawHill/fb6654370e8aeed2287d7e0fece60456 to your computer and use it in GitHub Desktop.
Actors allButOvals = new Actors();
buildPhrase();
clear();
head("Dependencies");
mark(146);
OvalText thrower = new OvalText("Thrower", new Point(1000d, 200d), commentFormat);
sketch(1000d, thrower);
OvalText catcher = new OvalText("Catcher", new Point(1500d, 200d), commentFormat);
sketch(1000d, catcher);
Spot throwerSpot = new Spot(1000d, 850d);
Spot catcherSpot = new Spot(1500d, 850d);
allButOvals.add(throwerSpot, catcherSpot);
sketch(1d, throwerSpot);
sketch(1d, catcherSpot);
Arrow throwerArrow = new Arrow(thrower, false, throwerSpot, false, commentFormat);
sketch(500d, throwerArrow);
Arrow catcherArrow = new Arrow(catcher, false, catcherSpot, false, commentFormat);
sketch(500d, catcherArrow);
allButOvals.add(throwerArrow, catcherArrow);
mark(153);
Letters runtime = new Letters("Runtime", new Point(1250d, 220d), commentFormat);
sketch(500d, runtime);
allButOvals.add(runtime);
mark(160);
Arrow runtimeOne = knowLine(allButOvals, 350d, false);
mark(166);
Cross crossOne = new Cross(runtimeOne, 125d, 100d, new Point(0d, -10d));
sketch(500d, crossOne);
allButOvals.add(crossOne);
mark(172);
Arrow runtimeTwo = knowLine(allButOvals, 475d, true);
mark(176);
Cross crossTwo = new Cross(runtimeTwo, 125d, 100d, new Point(0d, -10d));
sketch(500d, crossTwo);
allButOvals.add(crossTwo);
mark(190);
Letters compiletime = new Letters("Compile Time", new Point(1250d, 550d), commentFormat);
sketch(500d, compiletime);
allButOvals.add(compiletime);
mark(194);
Arrow compiletimeOne = knowLine(allButOvals, 680d, false);
mark(202);
Cross crossThree = new Cross(compiletimeOne, 125d, 100d, new Point(0d, -10d));
sketch(500d, crossThree);
allButOvals.add(crossThree);
mark(207);
Arrow compiletimeTwo = knowLine(allButOvals, 800d, true);
mark(212);
Cross crossFour = new Cross(compiletimeTwo, 125d, 100d, new Point(0d, -10d));
sketch(500d, crossFour);
allButOvals.add(crossFour);
return endBuild();
}
A Sample Undo with annotations:
public void slow(Context context, OnFinished onFinished)
{
// sets oldOpacity from its node
// changes a node's opacity aynchronously
}
public void undo(Context context)
{
actor.group().setOpacity(oldOpacity);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment