From b1afc6f2f488f96e65ace22e0bf2299d546cac20 Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Wed, 28 Sep 2022 07:16:30 +0200 Subject: [PATCH] mobile submission interface and example of live source --- index.html | 24 ++++++++++++++++++++++-- submit.html | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 submit.html diff --git a/index.html b/index.html index e90cc50..95463a8 100644 --- a/index.html +++ b/index.html @@ -41,7 +41,7 @@ -
+
@@ -788,6 +788,9 @@ AFRAME.registerComponent('pinchprimary', { // currently only 1 hand, the right o var el = this.el this.el.addEventListener('pinchended', function (event) { // if positioned close enough to a target zone, trigger action + // see own trigger-box component. Could use dedicated threejs helpers instead. + // https://github.com/Utopiah/aframe-triggerbox-component/blob/master/aframe-triggerbox-component.js#L66 + // could make trigger zones visible as debug mode // unselect current target if any selectedElement = null; save() @@ -1250,6 +1253,22 @@ AFRAME.registerComponent('glossary', { }, }); +var added = [] +AFRAME.registerComponent('fot', { + init:function(){ + let generatorName = this.attrName + setInterval( _ => fetch("https://fabien.benetou.fr/PIMVRdata/FoT?action=source#" + Date.now()).then(res => res.text() ).then(res => { + res.split("\n").slice(0,maxItemsFromSources).map( (n,i) => { + found = added.find((str) => str === n) + if (typeof found === 'undefined'){ + added.push(n) + addNewNote( n, "-1 "+(1+i/10)+" -2", ".1 .1 .1", null, generatorName ) +} + }) + }), 100 ) + }, +}); + AFRAME.registerComponent('issues', { init:function(){ let generatorName = this.attrName @@ -1392,7 +1411,7 @@ function remotesave(){ } var generators = "line-link-entities link screenstack dynamic-view selectionboxonpinches keyboard " - + "commands-from-external-json glossary timeline issues web-url background-via-url observableui hidableenvironment" + + "commands-from-external-json glossary timeline issues web-url background-via-url observableui hidableenvironmentfot" // could be an array proper completed on each component registration // could change model opacity based on hand position, fading out when within a (very small here) safe space @@ -1403,6 +1422,7 @@ var generators = "line-link-entities link screenstack dynamic-view selectionboxo
diff --git a/submit.html b/submit.html new file mode 100644 index 0000000..c9c42d5 --- /dev/null +++ b/submit.html @@ -0,0 +1,43 @@ + +Send text and commands to the immersive space : +
+ +
+ +
+
+jxr toggleVisibilityEntitiesFromClass('fot') + +
+
+Documentation as : + + + +