diff --git a/src/page/index.html b/src/page/index.html
index c95c5c9..79ef047 100644
--- a/src/page/index.html
+++ b/src/page/index.html
@@ -21,19 +21,19 @@ ${header}
end}
diff --git a/src/page/janusxr.html b/src/page/janusxr.html
index 7fc8d86..271d2ae 100644
--- a/src/page/janusxr.html
+++ b/src/page/janusxr.html
@@ -36,7 +36,7 @@
end
end}
- {if items and #items > 0 then
+ {if not item and items and #items > 0 then
local portals = {}
for i,v in pairs(items) do table.insert(portals, v) end
if parent then table.insert(portals, p) end
@@ -48,7 +48,7 @@
addPortal('dir',center, v, url,i, -4, 'img', '0 0 0', '0.2 0.2 0.2')
end
end}
- {if true then
+ {if not item then
local portals = {}
for i=1,5 do
local urls = app.opts[ 'plugin_federation_url_' .. i]
@@ -68,5 +68,7 @@
addPortal('federated',center, {title=fediurl}, fediurl,i, 4, 'federated', '0 180 0', '0.1 0.1 0.1')
end
end}
+
+ ${opts.plugin_janusxr_jml}
diff --git a/src/plugin/janusxr.lua b/src/plugin/janusxr.lua
index 82baffe..3f63a73 100644
--- a/src/plugin/janusxr.lua
+++ b/src/plugin/janusxr.lua
@@ -101,6 +101,14 @@ local plugin = {
default='https://xrforge.isvery.ninja https://www.janusxr.org',
values=''
},
+ {
+ key='app.opts.plugin_janusxr_jml',
+ title='Extra JML',
+ info='Add extra JML markup to each experience',
+ default = '',
+ control='textarea',
+ values=''
+ }
},
getRandomRoom = function()
local me = app.plugin.janusxr
diff --git a/src/plugin/xrfragments.lua b/src/plugin/xrfragments.lua
index 8db0f51..f3860d9 100644
--- a/src/plugin/xrfragments.lua
+++ b/src/plugin/xrfragments.lua
@@ -7,10 +7,12 @@ app.on('scan_experience_file', function(exp)
local me = app.plugin.xrfragments
foreach( util.split( app.opts.plugin_xrfragments_filetypes, ' '), function(k,ext)
if exp.path:lower():match("."..ext.."$") then
+ local hasHref = false
if ext == 'glb' then
+ exp.view3D = true
-- detect XR Fragment exp https://xrfragment.org/#%F0%9F%93%9C%20level0%3A%20File
local tree = me.extract_glb_json( util.stripPath(exp.path) )
- local hasHref = me.detectHrefInStruct(tree)
+ hasHref = me.detectHrefInStruct(tree)
end
-- check sidecarfiles: https://xrfragment.org/#sidecar%20files
local sidecarExts = {"png","vtt","ogg","json"}
@@ -18,7 +20,6 @@ app.on('scan_experience_file', function(exp)
local sfile = exp.path:gsub("."..ext.."$", "."..sidecarExt)
if util.fileExist( sfile ) then
exp.sidecarfile[ sidecarExt ] = "/" .. util.stripPath(sfile)
- exp.view3D = true
exp.parent.portal3D = false
end
end)
@@ -31,7 +32,7 @@ app.on('scan_experience_file', function(exp)
if util.fileExist( jsonfile ) then
exp.sidecarfile.JSONXRF = me.detectHrefInStruct( json.decode( util.readfile(jsonfile) ) )
end
- exp.tag.xrfragments = hasPNG or hasWebVTT or hasOGG or hasJSONref
+ exp.tag.xrfragments = hasHref or hasPNG or hasWebVTT or hasOGG or hasJSONref
if exp.tag.xrfragments then
print("✅ └─ plugin/xrfragments: detected xrfragments experience")
end