main: work in progress [might break]
This commit is contained in:
parent
b3cdc74578
commit
4a54a59199
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
[38;5;93m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
[38;5;93m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||||
[38;5;57m . . ____ _____________ ________. ._. ._. . . . . . . . .
|
[38;5;57m . . ____ _____________ ________. ._. ._. . . . . . . . .
|
||||||
[38;5;93m . . _\ \/ /\______ \/ _____// | \. . . . . . . .
|
[38;5;93m . . _\ \/ /\______ \/ _____// | \. . . . . . . .
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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") }
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue