{if items and #items > 0 then
for i,v in pairs(items) do
print('\t')
end
end}
{for i=1,5 do
local urls = app.opts[ 'plugin_federation_url_' .. i]
if #urls > 0 then
local fediurl = urls:gsub(' .*','')
local thumburl = urls:gsub('.* ','')
print('\t')
end
end}
{if item then
print([[
]])
else
local room = app.opts.plugin_janusxr_portalroom
if room == 'random' then room = app.plugin.janusxr.getRandomRoom() end
print('')
end}
{if true then
function addPortal(id,x,v,url,i,z,thumbprefix,rotation,scale)
print('\t\t')
end
end}
{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
for i,v in pairs(items) do
local width = 3.2
local center = -((#items*width)/1.3) + (i*width)
local url = v.url
if v.dir then url = url .. "/" end
addPortal('dir',center, v, url,i, -4, 'img', '0 0 0', '0.2 0.2 0.2')
end
end}
{if not item then
local portals = {}
for i=1,5 do
local urls = app.opts[ 'plugin_federation_url_' .. i]
if #urls > 0 then
local fediurl = urls:gsub(' .*','')
table.insert(portals, fediurl )
end
end
if #portals > 0 then
print([[
]])
end
for i,fediurl in pairs(portals) do
local width = 3.2
local center = -((#portals*width)/1.3) + (i*width)
addPortal('federated',center, {title=fediurl}, fediurl,i, 4, 'federated', '0 180 0', '0.1 0.1 0.1')
end
end}
${opts.plugin_janusxr_jml}