120
REC
Activa el audio para dar vida al visual ♪
`; } function runThree(){ const codeEl = $('threeCode'); const frame = ensureStageFrame('threePreview'); const status = $('threeStatus'); if(!codeEl || !frame) return; window.PulsoCodeLayers = window.PulsoCodeLayers || {}; window.PulsoCodeLayers.three = { enabled: true, frameId: 'threePreview', opacity: Number($('threeOpacity')?.value || 0.85), blend: $('threeBlend')?.value || 'screen' }; frame.srcdoc = buildSrc(codeEl.value || starter); if(status) status.textContent = 'Running Three as a live composited layer on the main canvas.'; } window.PulsoThreeEditor = { run: runThree }; document.addEventListener('input', function(ev){ if(ev.target && (ev.target.id === 'threeOpacity' || ev.target.id === 'threeBlend')){ window.PulsoCodeLayers = window.PulsoCodeLayers || {}; const layer = window.PulsoCodeLayers.three || { enabled:false, frameId:'threePreview' }; layer.opacity = Number($('threeOpacity')?.value || 0.85); layer.blend = $('threeBlend')?.value || 'screen'; window.PulsoCodeLayers.three = layer; } }, true); document.addEventListener('click', function(ev){ if(ev.target && ev.target.id === 'threeRunBtn') runThree(); if(ev.target && ev.target.id === 'threeExampleBtn') { const c=$('threeCode'); if(c) c.value=example; runThree(); } if(ev.target && ev.target.id === 'threeClearBtn') { const c=$('threeCode'); if(c) c.value=''; const f=$('threePreview'); if(f) f.removeAttribute('srcdoc'); window.PulsoCodeLayers = window.PulsoCodeLayers || {}; window.PulsoCodeLayers.three = { enabled:false, frameId:'threePreview', opacity:0.85, blend:'screen' }; const st=$('threeStatus'); if(st) st.textContent='Editor cleared.'; } }, true); })(); `; } function runProcessing(){ const codeEl = $('processingCode'); const frame = ensureStageFrame('processingPreview'); const status = $('processingStatus'); if(!codeEl || !frame) return; window.PulsoCodeLayers = window.PulsoCodeLayers || {}; window.PulsoCodeLayers.processing = { enabled: true, frameId: 'processingPreview', opacity: Number($('processingOpacity')?.value || 0.85), blend: $('processingBlend')?.value || 'screen' }; frame.srcdoc = buildSrc(codeEl.value || starter); if(status) status.textContent = 'Running Processing as a live composited layer on the main canvas.'; } window.PulsoProcessingEditor = { run: runProcessing }; document.addEventListener('input', function(ev){ if(ev.target && (ev.target.id === 'processingOpacity' || ev.target.id === 'processingBlend')){ window.PulsoCodeLayers = window.PulsoCodeLayers || {}; const layer = window.PulsoCodeLayers.processing || { enabled:false, frameId:'processingPreview' }; layer.opacity = Number($('processingOpacity')?.value || 0.85); layer.blend = $('processingBlend')?.value || 'screen'; window.PulsoCodeLayers.processing = layer; } }, true); document.addEventListener('click', function(ev){ if(ev.target && ev.target.id === 'processingRunBtn') runProcessing(); if(ev.target && ev.target.id === 'processingExampleBtn') { const c=$('processingCode'); if(c) c.value=example; runProcessing(); } if(ev.target && ev.target.id === 'processingClearBtn') { const c=$('processingCode'); if(c) c.value=''; const f=$('processingPreview'); if(f) f.removeAttribute('srcdoc'); window.PulsoCodeLayers = window.PulsoCodeLayers || {}; window.PulsoCodeLayers.processing = { enabled:false, frameId:'processingPreview', opacity:0.85, blend:'screen' }; const st=$('processingStatus'); if(st) st.textContent='Editor cleared.'; } }, true); })();
PULSOGenerative Visual Studioby Pachyt