mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-08 21:54:26 +02:00
have visual refs working and better error models
This commit is contained in:
parent
9221088853
commit
af76c03ad1
10 changed files with 212 additions and 74 deletions
|
@ -5,6 +5,7 @@ var events = _.clone(Backbone.Events);
|
|||
var sys = null;
|
||||
var graphicsEffects = {};
|
||||
var gitEngine = null;
|
||||
var gitVisuals = null;
|
||||
|
||||
$(document).ready(function(){
|
||||
sys = arbor.ParticleSystem(4000, 500, 0.5, false, 55, 0.005, 'verlet');
|
||||
|
@ -18,6 +19,7 @@ $(document).ready(function(){
|
|||
});
|
||||
|
||||
gitEngine = new GitEngine();
|
||||
gitVisuals = new GitVisuals();
|
||||
|
||||
var repulsionBreathe = function(r) {
|
||||
sys.parameters({repulsion: r});
|
||||
|
@ -40,9 +42,10 @@ Node.prototype.drawCircleNode = function(ctx, pt) {
|
|||
ctx.strokeStyle = graphics.nodeEdge;
|
||||
ctx.lineWidth = graphics.nodeStrokeWidth;
|
||||
ctx.fillStyle = graphics.nodeFill;
|
||||
var radius = graphics.nodeRadius;
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.arc(pt.x, pt.y, 10, 0, Math.PI*2, true);
|
||||
ctx.arc(pt.x, pt.y, radius, 0, Math.PI*2, true);
|
||||
ctx.closePath();
|
||||
ctx.stroke();
|
||||
ctx.fill();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue