xrforge/manyfold/root/hook.d/experience_updated/300-package_janusxr.sh

28 lines
529 B
Bash
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
dir="$(dirname $1)"
cd "$dir"
echo "[package_janusxr.sh] packing janusxr.html"
glb=$(ls *.glb | head -n1) # todo: check datapackage.json instead of first match
jml='
<html>
<head>
<title>janusxr room</title>
</head>
<body>
<script src="https://web.janusvr.com/janusweb.js"></script>
<janus-viewer>
<FireBoxRoom>
<Room>
<Object id="experience" src="'$glb'" locked="true" pos="0 0 0"></Object>
</Room>
</FireBoxRoom>
</janus-viewer>
</body>
</html>
'
echo "$jml" > janusxr.html