This thing is getting pretty useable. Check out my loop.

This commit is contained in:
George Michael Brower 2011-02-13 22:24:35 -05:00
parent 9843e59773
commit 6152bdb728
3 changed files with 25 additions and 6 deletions

View File

@ -23,8 +23,8 @@
//<![CDATA[
var timer;
window.onload = function() {
GUI.loadJSON({"guis":[{"open":true,"width":280,"openHeight":319,"scroll":1,"values":["time",1.35,8.5602,0.2792,0.0871,46.3269,false,null,0,null],"timer":{"windowMin":8617.568021757952,"windowWidth":11596,"playhead":10000,"snapIncrement":250,"useSnap":true,"scrubbers":[{"points":[{"value":"gui-dat","time":-3250},{"value":"over","time":5500},{"value":"time","time":9750}]},{"points":[{"value":1.3499999999999999,"time":644.1387},{"value":1.3499999999999999,"time":9750,"tween":"CircularEaseIn"}]},{"points":[{"value":0,"time":-2750,"tween":"SinusoidalEaseInOut"},{"value":7,"time":659.1556},{"value":7,"time":2211.2348},{"value":5.525,"time":5500},{"value":8.955,"time":6413.8663},{"value":8.339963195382083,"time":12000,"tween":"SinusoidalEaseInOut"},{"value":0,"time":16500}]},{"points":[{"value":0.5049,"time":-532.8902,"tween":"Hold"},{"value":0.5544,"time":1666.4321},{"value":0.01,"time":3382.0743,"tween":"Hold"},{"value":0.9900000000000001,"time":5500},{"value":0.18810000000000002,"time":9500,"tween":"Hold"},{"value":0.3069,"time":9750},{"value":0.1683,"time":11000},{"value":0.0495,"time":11750}]},{"points":[{"value":0.39899999999999997,"time":1652.5592,"tween":"SinusoidalEaseInOut"},{"value":7.6000000000000005,"time":3471.5432,"tween":"Hold"},{"value":0.8,"time":5500},{"value":1.3,"time":6000},{"value":0.1,"time":9750},{"value":0.01,"time":11500,"tween":"SinusoidalEaseInOut"},{"value":1.9000000000000001,"time":15250}]},{"points":[{"value":10,"time":795.5192,"tween":"Hold"},{"value":10,"time":5500},{"value":75,"time":5500,"tween":"CircularEaseOut"},{"value":45,"time":9750}]},{"points":[]},{"points":[{"time":9750}]},{"points":[{"value":0,"time":250,"tween":"Hold"}]},{"points":[{"time":18250}]}]}},{"open":true,"width":280,"openHeight":127,"scroll":0,"values":[null,true,250,null]}]});
GUI.loadJSON({"guis":[{"open":true,"width":280,"openHeight":287,"scroll":1,"values":["over time",1.35,8.955,0.9833,1.254,10,false,null,0],"timer":{"windowMin":1687.2598554396586,"windowWidth":11596,"playhead":6413.8663,"snapIncrement":250,"useSnap":false,"scrubbers":[{"points":[{"value":"","time":-961.1787},{"value":"gui-dat","time":197.8981},{"value":"over time","time":5000}]},{"points":[{"value":1.3499999999999999,"time":644.1387}]},{"points":[{"value":0.5,"time":72.8056,"tween":"CircularEaseOut"},{"value":7,"time":659.1556},{"value":7,"time":2211.2348},{"value":5.525,"time":4992.5319},{"value":8.955,"time":6413.8663}]},{"points":[{"value":0.5049,"time":-532.8902,"tween":"Hold"},{"value":0.5544,"time":1666.4321},{"value":0.01,"time":3382.0743,"tween":"Hold"},{"value":0.01,"time":4969.9097},{"value":1,"time":6393.5388}]},{"points":[{"value":0.39899999999999997,"time":1652.5592,"tween":"QuarticEaseIn"},{"value":1.254,"time":3471.5432}]},{"points":[{"value":10,"time":795.5192,"tween":"Hold"},{"value":10,"time":5000}]},{"points":[]},{"points":[]},{"points":[{"value":0,"time":250,"tween":"Hold"}]}]}},{"open":true,"width":280,"openHeight":127,"scroll":0,"values":[null,false,250,null]}]});
var fizzyText = new FizzyText("gui-dat");
var gui = new GUI();
@ -39,10 +39,10 @@
gui.add(fizzyText, "scale", 0.25, 4);
// Sliders with min and max
gui.add(fizzyText, "maxSize", 0.5, 7);
gui.add(fizzyText, "maxSize", 0, 20);
gui.add(fizzyText, "growthSpeed", 0.01, 1);
gui.add(fizzyText, "speed", 0.1, 2);
gui.add(fizzyText, "speed", 0, 10);
// Sliders with min, max and increment.
gui.add(fizzyText, "noiseStrength", 10, 100, 5);
@ -60,8 +60,21 @@
timerControls.add(GUI, "save");
var thing = {
loop: function() {
timer.playhead = -3500;
timer.play();
}
};
gui.add(fizzyText, 'y', -500, 500);
gui.add(thing, 'loop');
GUI.hide();
timer.playhead = 0;
timer.play();

View File

@ -426,7 +426,7 @@ GUI.ScrubberPoint = function(scrubber, time, value) {
});
var barSize = 4;
var rectSize = 7;
var rectSize = 5;
var c1 = '#ffd800';
var c2 = '#ff9000';
@ -441,10 +441,14 @@ GUI.ScrubberPoint = function(scrubber, time, value) {
this.onSelect = function() {
if (type == 'number') {
timer.showTweenSelector();
timer.tweenSelector.value = 'al';
positionTweenSelector();
}
}
this.onBlur = function() {
@ -581,7 +585,7 @@ GUI.ScrubberPoint = function(scrubber, time, value) {
if (n != null) {
g.lineWidth = rectSize/2;
g.lineWidth = 2;
g.strokeStyle='#222';
g.beginPath();

View File

@ -176,6 +176,7 @@ GUI.Timer = function(gui) {
_this.activePoint.remove();
_this.activePoint = null;
}
_this.hideTweenSelector();
break;
}
}, false);
@ -293,3 +294,4 @@ GUI.Timer = function(gui) {
this.windowWidth = gui.json.timer.windowWidth;
}
}