From dd8e8cf026a8704c3b0e350bf1506e9145e2dcf8 Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Sun, 16 Jul 2023 11:02:39 +0200 Subject: [PATCH] binded code snippets --- index.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 717b0f4..8ac6646 100644 --- a/index.html +++ b/index.html @@ -3504,10 +3504,10 @@ AFRAME.registerComponent('startfunctions', { document.body.addEventListener('highlighterready', _ => { fetch('https://fabien.benetou.fr/pub/home/future_of_text_demo/engine/codesplits.txt').then( r => r.text()).then( s => { s.split(/^$/m).filter( l => l.match(/\nfunc|\nAFRAME/)).slice(0,5).map( snippet => { - //let nw = addCodeEditor( snippet, "javascript", "0 "+(1+Math.random()/2)+" -.4" ) - //nw.element.classList.add('docs') - //setTimeout( _ => nw.element.setAttribute('scale', '.01 .01 .01'), 1000 ) - /* debug tests for picking */ + let nw = addCodeEditor( snippet, "javascript", "0 "+(1+Math.random()/2)+" -.4" ) + nw.element.classList.add('docs') + setTimeout( _ => nw.element.setAttribute('scale', '.01 .01 .01'), 1000 ) + /* debug tests for picking let el = document.createElement("a-box") el.classList.add('docs') el.setAttribute("scale", '.05 .05 .05') @@ -3515,7 +3515,8 @@ AFRAME.registerComponent('startfunctions', { el.setAttribute("wireframe", 'true') el.setAttribute("target", '') AFRAME.scenes[0].appendChild(el) - // somehow can't get picket + // somehow can't get picked + */ } ) } )