See also https://git.benetou.fr/utopiah/text-code-xr-engine/issues/27 and https://git.benetou.fr/utopiah/text-code-xr-engine/issues/7
Motivated by modifying https://fabien.benetou.fr/Testing/FOSSXR2022 directly, see https://twitter.com/utopiah/status/1577711613964083200
PS: this, saving back a re-sorted list, should be a dedicated issue.
To save back a sorted list see flattening within a bbox https://gist.github.com/Utopiah/26bae9fecc7a921f8bfd38cf5fc91612#file-logo_vr_hubs-js-L44 then potentially `save()` and `remoteSave()` with an additional URL parameter.
Without boundaries it comes down to :
`Array.from( document.querySelectorAll(classname) ).sort((a, b) => a.object3D.position.y < b.object3D.position.y ).map( e => e.getAttribute("value"))`
Note that this would also be useful for sorting issues. See also https://git.benetou.fr/utopiah/text-code-xr-engine/issues/44 as a repository could be considered a PIM/PKM dedicated to code.
Example of result https://fabien.benetou.fr/PIMVRdata/FOSSXR
Somehow position does not seem to change https://fabien.benetou.fr/PIMVRdata/FOSSXR?action=diff . Might have to rely on `getAttribute()` instead. Somehow doing so via the console works. Actually... https://twitter.com/utopiah/status/1532770837560008705
PS: this, saving back a re-sorted list, should be a dedicated issue.
See also #27 and #7
Motivated by modifying https://fabien.benetou.fr/Testing/FOSSXR2022 directly, see https://twitter.com/utopiah/status/1577711613964083200
Testing in dedicated branch, e.g
fossxr
here.To save back a sorted list see flattening within a bbox https://gist.github.com/Utopiah/26bae9fecc7a921f8bfd38cf5fc91612#file-logo_vr_hubs-js-L44 then potentially
save()
andremoteSave()
with an additional URL parameter.Without boundaries it comes down to :
Array.from( document.querySelectorAll(classname) ).sort((a, b) => a.object3D.position.y < b.object3D.position.y ).map( e => e.getAttribute("value"))
Note that this would also be useful for sorting issues. See also #44 as a repository could be considered a PIM/PKM dedicated to code.
Example of result https://fabien.benetou.fr/PIMVRdata/FOSSXR
Somehow position does not seem to change https://fabien.benetou.fr/PIMVRdata/FOSSXR?action=diff . Might have to rely on
getAttribute()
instead. Somehow doing so via the console works. Actually... https://twitter.com/utopiah/status/1532770837560008705PS: this, saving back a re-sorted list, should be a dedicated issue.