Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ponali committed Dec 17, 2023
1 parent 558018b commit 858f4c6
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 49 deletions.
12 changes: 6 additions & 6 deletions files/jsart/demos/browser.js

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions files/jsart/demos/browser.txt

This file was deleted.

18 changes: 0 additions & 18 deletions files/jsart/demos/cube.js

This file was deleted.

4 changes: 2 additions & 2 deletions files/jsart/demos/daydun.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
}
function CalculateC(x,y){ let ox = x - width / 2;let oy = y - height / 2;let mx = -(width / 2);let my = -(height / 2);let dist = Math.sqrt((ox ** 2) + (oy ** 2));let max = Math.sqrt((mx ** 2) + (my ** 2));let out = max - dist;if (out > 256) {out = 255;};return [out, dist] };
let pxC=CalculateC(x,y);
let out = (()=>{ let sw=window.daydunSupport.sw; let sh=window.daydunSupport.sh; let c=pxC[0]; let ic=pxC[1]; let cl=window.daydunSupport.mouseDown; let k=window.daydunSupport.keyvents; x=Math.floor((x/sw)*256);y=Math.floor((y/sh)*256);mx=(mx/sw)*256;my=(my/sh)*256;sw=256;sh=256; if(x==0&&y==0){if(!window.ftchr){(()=>{ fetch("https://jsart.ponali.repl.co/demos/browser.js").then(data=>data.text()).then((body)=>{window.ftchr.func= new Function("i","t","x","y","mx","my","sw","sh","c","ic","cl","k","return "+body);}) })();window.ftchr={"func":(()=>{return 255;})};}} return window.ftchr.func(i,t,x,y,mx,my,sw,sh,c,ic,cl,k); })();
let out = (()=>{ let sw=window.daydunSupport.sw; let sh=window.daydunSupport.sh; let c=pxC[0]; let ic=pxC[1]; let cl=window.daydunSupport.mouseDown; let k=window.daydunSupport.keyvents; x=Math.floor((x/sw)*256);y=Math.floor((y/sh)*256);mx=(mx/sw)*256;my=(my/sh)*256;sw=256;sh=256; if(x==0&&y==0){if(!window.ftchr){(()=>{ fetch("https://ponali.github.io/files/jsart/demos/browser.js").then(data=>data.text()).then((body)=>{window.ftchr.func= new Function("i","t","x","y","mx","my","sw","sh","c","ic","cl","k","return "+body);}) })();window.ftchr={"func":(()=>{return 255;})};}} return window.ftchr.func(i,t,x,y,mx,my,sw,sh,c,ic,cl,k); })();
return out;
})();

// code to launch:
// (()=>{ if(x==0&&y==0){if(!window.dyftchr){(()=>{ fetch("https://jsart.ponali.repl.co/demos/daydun.js").then(data=>data.text()).then((body)=>{window.dyftchr.func= new Function("i","t","x","y","mx","my","return "+body);}) })();window.dyftchr={"func":(()=>{return 0xff00ff;})};}} return window.dyftchr.func(i,t,x,y,mx,my); })()
// (()=>{ if(x==0&&y==0){if(!window.dyftchr){(()=>{ fetch("https://ponali.github.io/files/jsart/demos/daydun.js").then(data=>data.text()).then((body)=>{window.dyftchr.func= new Function("i","t","x","y","mx","my","return "+body);}) })();window.dyftchr={"func":(()=>{return 0xff00ff;})};}} return window.dyftchr.func(i,t,x,y,mx,my); })()
2 changes: 1 addition & 1 deletion files/jsart/demos/dream.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
k = window.dream.screenCapture[0].k;
}
}
let out = (()=>{ x=Math.floor((x/sw)*256);y=Math.floor((y/sh)*256);mx=(mx/sw)*256;my=(my/sh)*256;sw=256;sh=256; if(x==0&&y==0){if(!window.dftchr){(()=>{ fetch("https://jsart.ponali.repl.co/demos/browser.js").then(data=>data.text()).then((body)=>{window.dftchr.func= new Function("i","t","x","y","mx","my","sw","sh","c","ic","cl","k","return "+body);}) })();window.dftchr={"func":(()=>{return 255;})};}} return window.dftchr.func(i,t,x,y,mx,my,sw,sh,c,ic,cl,k); })();
let out = (()=>{ x=Math.floor((x/sw)*256);y=Math.floor((y/sh)*256);mx=(mx/sw)*256;my=(my/sh)*256;sw=256;sh=256; if(x==0&&y==0){if(!window.dftchr){(()=>{ fetch("https://ponali.github.io/files/jsart/demos/browser.js").then(data=>data.text()).then((body)=>{window.dftchr.func= new Function("i","t","x","y","mx","my","sw","sh","c","ic","cl","k","return "+body);}) })();window.dftchr={"func":(()=>{return 255;})};}} return window.dftchr.func(i,t,x,y,mx,my,sw,sh,c,ic,cl,k); })();
/*if(window.dream.interval>180){
window.dream.screenCapture[window.dream.screenCapture.length-1].data.push(out);
let screen = window.dream.screenCapture[window.dream.screenCapture.length-100];
Expand Down
2 changes: 1 addition & 1 deletion files/jsart/demos/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
window.filterVRam=[];
for(i=0;i<65536;i++){
let out=0;
out=((i,t,x,y,mx,my,sw,sh,c,ic,cl,k)=>{ x=Math.floor((x/sw)*256);y=Math.floor((y/sh)*256);mx=(mx/sw)*256;my=(my/sh)*256;sw=256;sh=256; if(x==0&&y==0){if(!window.ftftchr){(()=>{ fetch("https://jsart.ponali.repl.co/demos/browser.js").then(data=>data.text()).then((body)=>{window.ftftchr.func= new Function("i","t","x","y","mx","my","sw","sh","c","ic","cl","k","return "+body);}) })();window.ftftchr={"func":(()=>{return 255;})};}} return window.ftftchr.func(i,t,x,y,mx,my,sw,sh,c,ic,cl,k); })(i,t,(i%sw),Math.floor(i/sw),mx,my,sw,sh,c,ic,cl,k);
out=((i,t,x,y,mx,my,sw,sh,c,ic,cl,k)=>{ x=Math.floor((x/sw)*256);y=Math.floor((y/sh)*256);mx=(mx/sw)*256;my=(my/sh)*256;sw=256;sh=256; if(x==0&&y==0){if(!window.ftftchr){(()=>{ fetch("https://ponali.github.io/files/jsart/demos/browser.js").then(data=>data.text()).then((body)=>{window.ftftchr.func= new Function("i","t","x","y","mx","my","sw","sh","c","ic","cl","k","return "+body);}) })();window.ftftchr={"func":(()=>{return 255;})};}} return window.ftftchr.func(i,t,x,y,mx,my,sw,sh,c,ic,cl,k); })(i,t,(i%sw),Math.floor(i/sw),mx,my,sw,sh,c,ic,cl,k);
window.filterVRam.push(out);
}

Expand Down
4 changes: 2 additions & 2 deletions files/jsart/demos/notepad.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
window.notepad.displayedText=ct;
}else{
window.notepad={"currentText":"Welcome to Notepad for JSArt!","displayedText":[],"fetched":{},"textMode":0,"capsLock":false,"shift":false,"keyLength":0};
fetch("https://jsart.ponali.repl.co/modules/txt-small.txt").then(data=>data.text()).then(body=>{
fetch("https://ponali.github.io/files/jsart/modules/txt-small.txt").then(data=>data.text()).then(body=>{
window.notepad.fetched.textSm=(new Function("i","t","x","y","mx","my","sw","sh","c","ic","cl","k",body));
});
fetch("https://jsart.ponali.repl.co/modules/txt-engine.txt").then(data=>data.text()).then(body=>{
fetch("https://ponali.github.io/files/jsart/modules/txt-engine.txt").then(data=>data.text()).then(body=>{
window.notepad.fetched.text=(new Function("i","t","x","y","mx","my","sw","sh","c","ic","cl","k",body));
});
}
Expand Down
4 changes: 2 additions & 2 deletions files/jsart/demos/pluto.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 858f4c6

Please sign in to comment.