clarify what jxr actually is and what can it do #52
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Basically relying on
eval()thus able to run JavaScript within the current scope.parseJXR()takes a string representing the code and expand shorthands including :Xsstarting the following command in X secondsqs selectorreturing aquerySelector(selector)sa attribute valueforsetAttribute(attribute, value)obsvfornewNoteFromObservableCell()lgforaddGltfFromURLAsTarget()These shorthands are relatively verbose functions that are estimated to be quite useful in this specific context of having text and code in a spacial environment, editable with a virtual and optionally physical keyboard.
Note that
interpretAny()requires a backend and thus is executed with a different scope. It allows code that is not JavaScript to be executed. Examples include containers with other languages e.g Bash, Python or Julia.See https://twitter.com/utopiah/status/1533064468292419585
For now the result is only displayed and is only from text to text. See https://twitter.com/utopiah/status/1562501178495082496 suggesting
toDataURL()for other kind of contents.Consider minimizing syntax and instead rely on provenance.
For example instead of relying on e.g
./as suggested in #50 rely instead on the presence of thewebdavclass.Rely on spacialized interaction specific keywords e.g
Provide syntax highlighting.
Existing
selectedElementlastPointSketchfromdraw()commandhistorygroupSelectiontargetsSearch for DSL (domain specific language) on text or text manipulation, ideally spatially.
Potential example https://dougengelbart.org/images/about/augment/chart-viewspecs.htm (arguable)
See also
<a-console>helpers https://github.com/kylebakerio/a-console/blob/master/a-console.js#L307 for https://github.com/kylebakerio/a-console#live-codingResponsive programming as a design principle, cf https://fabien.benetou.fr/Languages/OwnConcepts#ResponsiveProgramming , i.e surfacing the code itself, creating an affordance back.
See the
onreleasedevent introduced in list-editing branch https://git.benetou.fr/utopiah/text-code-xr-engine/src/branch/list-editing/index.html#L86Example for clipboard
jxr qs #billboard sa scale 1 1 1Consider the generalization with e.g going from
onreleasedtoonpinched. Maybe it could become an optional parameter for the jxr component, namely when to actually execute.Note that for now executing is done with the secondary pinch whereas those 2 events are done on primary pinch.
Examples of more complex usage e.g
via https://git.benetou.fr/utopiah/text-code-xr-engine/src/branch/game-multiple-levels/jxr-core.js#L166
from https://git.benetou.fr/utopiah/text-code-xr-engine/src/branch/game-multiple-levels/