Sync: Update sune 'Meddler'

This commit is contained in:
2025-09-07 14:07:49 -07:00
parent 5cb9a235e9
commit aac4c67dbf

View File

@@ -1 +1 @@
[{"id":"99k0yae","name":"Meddler","pinned":false,"avatar":"","url":"gh://multipleof4/.sune/meddler.sune","updatedAt":1759188433725,"settings":{"model":"openai/gpt-5-chat","temperature":"","top_p":"","top_k":"","frequency_penalty":"","presence_penalty":"","repetition_penalty":"","min_p":"","top_a":"","max_tokens":"","verbosity":"","reasoning_effort":"default","system_prompt":"","html":"<canvas id=\"c_meddle_perma\" width=\"512\" height=\"512\" \n class=\"mx-auto my-4 w-32 h-32 animate-spin-slow\"></canvas>\n\n<style>\n @keyframes spin-slow {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n .animate-spin-slow {\n animation: spin-slow 20s linear infinite;\n }\n</style>\n\n<script>\n(()=>{\n const S_ID = window.SUNE.id;\n const W = 512, H = 512;\n const IMG_URL = 'https://raw.githubusercontent.com/multipleof4/sune/refs/heads/master/public/%E2%9C%BA.png';\n\n // Lightweight random selection (instead of completing cycle once)\n const rndIndex = max => Math.floor(Math.random() * max);\n\n const cVisible = document.getElementById('c_meddle_perma');\n if(!cVisible) return;\n cVisible.id = `c_meddle_perma_${S_ID}`;\n const ctxV = cVisible.getContext('2d',{willReadFrequently:true});\n\n // Offscreen original & inverse\n const cO = document.createElement('canvas');\n cO.width=W; cO.height=H;\n const ctxO = cO.getContext('2d');\n const cI = document.createElement('canvas');\n cI.width=W; cI.height=H;\n const ctxI = cI.getContext('2d');\n\n let dOrig, dInv;\n\n function meddleStep(){\n if(!dOrig || !dInv) return;\n const dV = ctxV.getImageData(0,0,W,H);\n const L = dV.data, O = dOrig.data, I = dInv.data;\n // swap ~2000 random pixels each frame\n for(let k=0;k<2000;k++){\n const o = rndIndex(W*H)*4;\n // randomly choose which way to swap\n if(Math.random()<0.5){\n L[o]=O[o]; L[o+1]=O[o+1]; L[o+2]=O[o+2]; L[o+3]=O[o+3];\n }else{\n L[o]=I[o]; L[o+1]=I[o+1]; L[o+2]=I[o+2]; L[o+3]=I[o+3];\n }\n }\n ctxV.putImageData(dV,0,0);\n requestAnimationFrame(meddleStep);\n }\n\n const img=new Image;\n img.crossOrigin=\"anonymous\";\n img.onload=()=>{\n ctxO.drawImage(img,0,0,W,H);\n dOrig=ctxO.getImageData(0,0,W,H);\n dInv=ctxO.createImageData(W,H);\n for(let i=0;i<dOrig.data.length;i+=4){\n dInv.data[i] = 255-dOrig.data[i];\n dInv.data[i+1]= 255-dOrig.data[i+1];\n dInv.data[i+2]= 255-dOrig.data[i+2];\n dInv.data[i+3]= dOrig.data[i+3];\n }\n // start muddled from halfway: blend once\n ctxV.putImageData(dOrig,0,0);\n requestAnimationFrame(meddleStep);\n };\n img.src=IMG_URL;\n})();\n</script>\n","extension_html":"<sune src='https://raw.githubusercontent.com/sune-org/store/refs/heads/main/sync.sune' private />"},"storage":{}}] [{"id":"99k0yae","name":"Meddler","pinned":false,"avatar":"","url":"gh://multipleof4/.sune/meddler.sune","updatedAt":1757279269833,"settings":{"model":"openai/gpt-5-chat","temperature":"","top_p":"","top_k":"","frequency_penalty":"","presence_penalty":"","repetition_penalty":"","min_p":"","top_a":"","max_tokens":"","verbosity":"","reasoning_effort":"default","system_prompt":"","html":"<canvas id=\"c_meddle_perma\" width=\"512\" height=\"512\" \n class=\"mx-auto my-4 w-32 h-32 animate-spin-slow\"></canvas>\n\n<style>\n @keyframes spin-slow {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n .animate-spin-slow {\n animation: spin-slow 20s linear infinite;\n }\n</style>\n\n<script>\n(()=>{\n const S_ID = window.SUNE.id;\n const W = 512, H = 512;\n const IMG_URL = 'https://raw.githubusercontent.com/multipleof4/sune/refs/heads/master/public/%E2%9C%BA.png';\n\n // Lightweight random selection (instead of completing cycle once)\n const rndIndex = max => Math.floor(Math.random() * max);\n\n const cVisible = document.getElementById('c_meddle_perma');\n if(!cVisible) return;\n cVisible.id = `c_meddle_perma_${S_ID}`;\n const ctxV = cVisible.getContext('2d',{willReadFrequently:true});\n\n // Offscreen original & inverse\n const cO = document.createElement('canvas');\n cO.width=W; cO.height=H;\n const ctxO = cO.getContext('2d');\n const cI = document.createElement('canvas');\n cI.width=W; cI.height=H;\n const ctxI = cI.getContext('2d');\n\n let dOrig, dInv;\n\n function meddleStep(){\n if(!dOrig || !dInv) return;\n const dV = ctxV.getImageData(0,0,W,H);\n const L = dV.data, O = dOrig.data, I = dInv.data;\n // swap ~2000 random pixels each frame\n for(let k=0;k<2000;k++){\n const o = rndIndex(W*H)*4;\n // randomly choose which way to swap\n if(Math.random()<0.5){\n L[o]=O[o]; L[o+1]=O[o+1]; L[o+2]=O[o+2]; L[o+3]=O[o+3];\n }else{\n L[o]=I[o]; L[o+1]=I[o+1]; L[o+2]=I[o+2]; L[o+3]=I[o+3];\n }\n }\n ctxV.putImageData(dV,0,0);\n requestAnimationFrame(meddleStep);\n }\n\n const img=new Image;\n img.crossOrigin=\"anonymous\";\n img.onload=()=>{\n ctxO.drawImage(img,0,0,W,H);\n dOrig=ctxO.getImageData(0,0,W,H);\n dInv=ctxO.createImageData(W,H);\n for(let i=0;i<dOrig.data.length;i+=4){\n dInv.data[i] = 255-dOrig.data[i];\n dInv.data[i+1]= 255-dOrig.data[i+1];\n dInv.data[i+2]= 255-dOrig.data[i+2];\n dInv.data[i+3]= dOrig.data[i+3];\n }\n // start muddled from halfway: blend once\n ctxV.putImageData(dOrig,0,0);\n requestAnimationFrame(meddleStep);\n };\n img.src=IMG_URL;\n})();\n</script>\n","extension_html":"<sune src='https://raw.githubusercontent.com/sune-org/store/refs/heads/main/sync.sune' private />"},"storage":{}}]