annot-server/static/js/pianoroll.js
changeset 46 7cff1f0a6882
parent 28 6025b8470d18
child 48 a7abfcfd7959
equal deleted inserted replaced
44:76f2fa4eb4f7 46:7cff1f0a6882
     6 var prHeight2 = 645;
     6 var prHeight2 = 645;
     7 var sceneHeight = prHeight1 + prHeight2;
     7 var sceneHeight = prHeight1 + prHeight2;
     8 var sceneBgColor = 0xFFFFFF;
     8 var sceneBgColor = 0xFFFFFF;
     9 var lineColor = 0x444444;
     9 var lineColor = 0x444444;
    10 //var manualFramerate = 24;
    10 //var manualFramerate = 24;
    11 var pixelsPerSecond1 = Math.floor(sceneWidth / 30); // nb of pixels per second
    11 var pixelsPerSecond1 = Math.floor(sceneWidth / 10); // nb of pixels per second
    12 var manualFramerate = pixelsPerSecond1 / 4;
    12 var manualFramerate = pixelsPerSecond1 / 4;
    13 var pixelsPerSecond2 = Math.floor(sceneWidth / 60); // nb of pixels per second
    13 var pixelsPerSecond2 = Math.floor(sceneWidth / 60); // nb of pixels per second
    14 var lineInterval = 5000; // means line every 5 seconds
    14 var lineInterval = 5000; // means line every 5 seconds
    15 var nbLines = -1;
    15 var nbLines = -1;
    16 var noteHeight = 110;
    16 var noteHeight = 110;
    95 stage.addChild(graphics);
    95 stage.addChild(graphics);
    96 
    96 
    97 function moveContainer() {
    97 function moveContainer() {
    98     container1.x -= pixelsPerSecond1/manualFramerate;
    98     container1.x -= pixelsPerSecond1/manualFramerate;
    99     container2.x -= pixelsPerSecond2/manualFramerate;
    99     container2.x -= pixelsPerSecond2/manualFramerate;
       
   100     renderer.render(stage);
       
   101 }
       
   102 function moveContainerMore() {
       
   103     container1.x -= 10*(pixelsPerSecond1/manualFramerate);
       
   104     container2.x -= 10*(pixelsPerSecond2/manualFramerate);
       
   105     renderer.render(stage);
       
   106 }
       
   107 function moveContainerRight() {
       
   108     container1.x += 10*(pixelsPerSecond1/manualFramerate);
       
   109     container2.x += 10*(pixelsPerSecond2/manualFramerate);
   100     renderer.render(stage);
   110     renderer.render(stage);
   101 }
   111 }
   102 
   112 
   103 function addBunny(data){
   113 function addBunny(data){
   104     var timeFromZero = data.content[1];
   114     var timeFromZero = data.content[1];