main: work in progress [might break]

This commit is contained in:
Leon van Kammen 2024-09-24 16:13:37 +02:00
parent b3cdc74578
commit 4a54a59199
7 changed files with 29 additions and 5 deletions

View File

@ -1,3 +1,4 @@
 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 . . ____ _____________ ________. ._. ._. . . . . . . . .  . . ____ _____________ ________. ._. ._. . . . . . . . .
 . . _\ \/ /\______ \/ _____// | \. . . . . . . .  . . _\ \/ /\______ \/ _____// | \. . . . . . . .

View File

@ -45,9 +45,27 @@ console(){
# info: adds javascript/css url/script to DOM # info: adds javascript/css url/script to DOM
require(){ require(){
file=$(basename "$1") file=$(basename "$1")
ext="${file/*\./}"
case $ext in
js|css)
js '(async () => { js '(async () => {
await AFRAME.utils.require({"'$file'": "'$1'"}) await AFRAME.utils.require({"'$file'": "'$1'"})
})(); return ""' })(); return ""'
;;
glb|gltf|obj|usdz|fbx)
require 'https://xrfragment.org/dist/xrfragment.aframe.js'
echo "<a-entity xrf='$1'></a-entity>" >> /root/index.html
;;
*)
alert $ext "extension is not supported (yet)"
;;
esac
} }
# usage: man <topic> # usage: man <topic>

View File

@ -45,7 +45,7 @@ test -d /dev/browser || {
setup_listen_homedir(){ setup_listen_homedir(){
sleep 4 # wait for inode of /mnt/root to become live (due to move_root_to_9pfs) sleep 4 # wait for inode of /mnt/root to become live (due to move_root_to_9pfs)
inotifyd echo /mnt/root | awk ' infinite inotifyd echo /mnt/root | awk '
# listen for writes to rootdir and send them to DOM # listen for writes to rootdir and send them to DOM
/^[we] \/mnt\/root index\.html/ { system("cat "$2"/"$3" | grep -vE \"^#!\" > /dev/browser/html") } /^[we] \/mnt\/root index\.html/ { system("cat "$2"/"$3" | grep -vE \"^#!\" > /dev/browser/html") }

View File

@ -8,3 +8,4 @@ enterAR
exitVR exitVR
exitAR exitAR
tail -n1 -f /dev/browser/console /var/log/messages tail -n1 -f /dev/browser/console /var/log/messages
require https://coderofsalvation.github.io/xrsh-media/assets/background.glb

View File

@ -13,3 +13,7 @@ test -f index.js && chmod +x index.js && ./index.js | grep -v undefined
# start index.html # start index.html
test -f index.html && chmod +x index.html && ./index.html test -f index.html && chmod +x index.html && ./index.html
# uncomment to set location (3D scene file [with XR Fragments] )
#require https://xrfragment.org/index.glb
#require https://coderofsalvation.github.io/xrsh-media/assets/background.glb

View File

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
echo "[OK] hook.d/save/tolog: reporting save to OS" echo "[OK] hook.d/save/tolog: reporting save to OS"
logger "state was saved at $(date)" logger "state was saved at $(date)" &>/dev/null

BIN
dist/v86-linux.iso vendored

Binary file not shown.