33 lines
671 B
Bash
33 lines
671 B
Bash
|
|
#!/bin/sh
|
|||
|
|
echo "$1" | grep datapackage || exit 0 # nothing to do
|
|||
|
|
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>
|
|||
|
|
<Assets>
|
|||
|
|
<AssetObject id="experience" src="'$glb'" ></AssetObject>
|
|||
|
|
</Assets>
|
|||
|
|
<Room>
|
|||
|
|
<Object id="experience" locked="true" pos="0 0 0"></Object>
|
|||
|
|
</Room>
|
|||
|
|
</FireBoxRoom>
|
|||
|
|
|
|||
|
|
</janus-viewer>
|
|||
|
|
</body>
|
|||
|
|
</html>
|
|||
|
|
'
|
|||
|
|
|
|||
|
|
echo "$jml" > janusxr.html
|