added janusxr export
This commit is contained in:
parent
89bf973a18
commit
26a3d22882
4 changed files with 40 additions and 2 deletions
|
|
@ -231,9 +231,9 @@ boot(){
|
||||||
mount_rclone
|
mount_rclone
|
||||||
set_upload_path
|
set_upload_path
|
||||||
force_public
|
force_public
|
||||||
|
start_hook_daemon
|
||||||
get_xrfragment_assets
|
get_xrfragment_assets
|
||||||
mount_dir
|
mount_dir
|
||||||
start_hook_daemon
|
|
||||||
scan_libraries &
|
scan_libraries &
|
||||||
hook boot # emit unixy hook-event (/root/hook.d/boot/* scripts)
|
hook boot # emit unixy hook-event (/root/hook.d/boot/* scripts)
|
||||||
|
|
||||||
|
|
|
||||||
32
manyfold/root/hook.d/inotify_MODIFY/package_janusxr.sh
Executable file
32
manyfold/root/hook.d/inotify_MODIFY/package_janusxr.sh
Executable file
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/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
|
||||||
|
|
@ -68,6 +68,12 @@
|
||||||
<td><%= link_to @model.creator.name, @model.creator, itemprop: "author" %></td>
|
<td><%= link_to @model.creator.name, @model.creator, itemprop: "author" %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<i class="bi bi-people" role="img"></i>
|
||||||
|
</td>
|
||||||
|
<td><%= link_to "JanusXR room", "/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/janusxr.html" %></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<i class="bi bi-file-zip" role="img"></i>
|
<i class="bi bi-file-zip" role="img"></i>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- Saved from local source at 2025-10-23T17:12:49Z using monolith v2.10.1 -->
|
<!-- Saved from local source at 2025-10-24T13:48:06Z using monolith v2.10.1 -->
|
||||||
<!DOCTYPE html><html><head>
|
<!DOCTYPE html><html><head>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue