Skip to content

Instantly share code, notes, and snippets.

@munrocket
Last active May 14, 2025 04:14
Show Gist options
  • Save munrocket/d4fc18abfb9c98f0cfce6eda772dcb45 to your computer and use it in GitHub Desktop.
Save munrocket/d4fc18abfb9c98f0cfce6eda772dcb45 to your computer and use it in GitHub Desktop.

Revisions

  1. munrocket revised this gist Oct 22, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion shadertoy_exporter.js
    Original file line number Diff line number Diff line change
    @@ -3,8 +3,8 @@ function shader_exporter(duration, width, heigth, paused) {
    document.getElementById('demogl').style.width = width + 'px';
    document.getElementById('demogl').style.height = heigth + 'px';
    document.getElementById('myResetButton').click();
    if (paused) document.getElementById('myPauseButton').click();
    document.getElementById('myRecord').click();
    if (paused) document.getElementById('myPauseButton').click();
    let t0 = performance.now();
    function loop(){
    if (performance.now() - t0 > duration * 1000) {
  2. munrocket revised this gist Oct 22, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions shadertoy_exporter.js
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,7 @@ function shader_exporter(duration, width, heigth, paused) {
    function loop(){
    if (performance.now() - t0 > duration * 1000) {
    document.getElementById('myRecord').click();
    if (paused) document.getElementById('myPauseButton').click();
    } else {
    requestAnimFrame(loop)
    }
  3. munrocket revised this gist Oct 22, 2021. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions shadertoy_exporter.js
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    // copy paste this in console
    function shader_exporter(duration, width, heigth) {
    function shader_exporter(duration, width, heigth, paused) {
    document.getElementById('demogl').style.width = width + 'px';
    document.getElementById('demogl').style.height = heigth + 'px';
    document.getElementById('myResetButton').click();
    document.getElementById('myPauseButton').click();
    if (paused) document.getElementById('myPauseButton').click();
    document.getElementById('myRecord').click();
    let t0 = performance.now();
    function loop(){
    @@ -15,4 +15,4 @@ function shader_exporter(duration, width, heigth) {
    };
    requestAnimFrame(loop);
    }
    shader_exporter(6.28318530, 512, 512);
    shader_exporter(6.28318530, 512, 512, false);
  4. munrocket revised this gist Oct 14, 2021. 1 changed file with 17 additions and 15 deletions.
    32 changes: 17 additions & 15 deletions shadertoy_exporter.js
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,18 @@
    // copy paste this in console
    let myTime = 6.28318530;
    document.getElementById('demogl').style.width = '512px';
    document.getElementById('demogl').style.height = '512px';
    document.getElementById('myResetButton').click();
    document.getElementById('myPauseButton').click();
    document.getElementById('myRecord').click();
    let t0 = performance.now();
    function loop(){
    if (performance.now() - t0 > myTime * 1000) {
    document.getElementById('myRecord').click();
    } else {
    requestAnimFrame(loop)
    }
    };
    requestAnimFrame(loop);
    function shader_exporter(duration, width, heigth) {
    document.getElementById('demogl').style.width = width + 'px';
    document.getElementById('demogl').style.height = heigth + 'px';
    document.getElementById('myResetButton').click();
    document.getElementById('myPauseButton').click();
    document.getElementById('myRecord').click();
    let t0 = performance.now();
    function loop(){
    if (performance.now() - t0 > duration * 1000) {
    document.getElementById('myRecord').click();
    } else {
    requestAnimFrame(loop)
    }
    };
    requestAnimFrame(loop);
    }
    shader_exporter(6.28318530, 512, 512);
  5. munrocket renamed this gist Oct 14, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. munrocket revised this gist Oct 14, 2021. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion shadertoy_record.js
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,11 @@
    // copy paste this in console
    let myTime = 6.28318530;
    let t0 = performance.now();
    document.getElementById('demogl').style.width = '512px';
    document.getElementById('demogl').style.height = '512px';
    document.getElementById('myResetButton').click();
    document.getElementById('myPauseButton').click();
    document.getElementById('myRecord').click();
    let t0 = performance.now();
    function loop(){
    if (performance.now() - t0 > myTime * 1000) {
    document.getElementById('myRecord').click();
  7. munrocket revised this gist Jun 13, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions shadertoy_record.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    // copy paste this in console
    let myTime = 6.28318530;
    let t0 = performance.now();
    document.getElementById('myResetButton').click();
    document.getElementById('myPauseButton').click();
    document.getElementById('myRecord').click();
    function loop(){
  8. munrocket revised this gist Jun 13, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions shadertoy_record.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    // copy paste this in console
    let myTime = 6.28318530;
    let t0 = performance.now();
    document.getElementById('myPauseButton').click();
    document.getElementById('myRecord').click();
    function loop(){
    if (performance.now() - t0 > myTime * 1000) {
  9. munrocket revised this gist Jun 13, 2021. 1 changed file with 12 additions and 1 deletion.
    13 changes: 12 additions & 1 deletion shadertoy_record.js
    Original file line number Diff line number Diff line change
    @@ -1 +1,12 @@
    let myTime = 6.28318530; let t0 = performance.now(); document.getElementById('myRecord').click(); function loop(){if (performance.now() - t0 > myTime * 1000) { document.getElementById('myRecord').click();} else { requestAnimFrame(loop)}}; requestAnimFrame(loop);
    // copy paste this in console
    let myTime = 6.28318530;
    let t0 = performance.now();
    document.getElementById('myRecord').click();
    function loop(){
    if (performance.now() - t0 > myTime * 1000) {
    document.getElementById('myRecord').click();
    } else {
    requestAnimFrame(loop)
    }
    };
    requestAnimFrame(loop);
  10. munrocket created this gist Jun 13, 2021.
    1 change: 1 addition & 0 deletions shadertoy_record.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    let myTime = 6.28318530; let t0 = performance.now(); document.getElementById('myRecord').click(); function loop(){if (performance.now() - t0 > myTime * 1000) { document.getElementById('myRecord').click();} else { requestAnimFrame(loop)}}; requestAnimFrame(loop);