bugfix
This commit is contained in:
parent
dd12979ae8
commit
78ec717551
3 changed files with 11 additions and 7 deletions
|
|
@ -101,7 +101,7 @@ return {
|
|||
data.janusurl = (v.janusxr and v.janusxr.wrap) and app.opts.baseurl .. util.stripPath(v.url)
|
||||
-- if parent has redirect to item set, use parent url
|
||||
if not data.janusurl or v.parent.redirect == v.url then
|
||||
data.janusurl = app.opts.baseurl .. util.stripPath(v.parent.url)
|
||||
data.janusurl = app.opts.baseurl .. util.stripPath(v.parent.redirect)
|
||||
end
|
||||
if v.janusxr and v.janusxr.wrap and v.janusxr.wrap.file then
|
||||
-- what to do here? no generated portals?
|
||||
|
|
|
|||
|
|
@ -48,10 +48,10 @@ end}
|
|||
room = app.opts.plugin_janusxr_portalroom
|
||||
end
|
||||
|
||||
function initRoom(i)
|
||||
if i.janusxr and i.janusxr.room then
|
||||
function initRoom(r)
|
||||
if r.janusxr and r.janusxr.room then
|
||||
pos = '0 0 1' -- todo make startup location configurable
|
||||
room = i.janusxr.room
|
||||
room = r.janusxr.room
|
||||
end
|
||||
end
|
||||
initRoom(item or {})
|
||||
|
|
|
|||
|
|
@ -33,10 +33,14 @@ app.on('scan_experience_file', function(exp)
|
|||
exp.janusxr = exp.janusxr or {}
|
||||
exp.janusxr.wrap = nil -- erase previous 3D models
|
||||
print("✅ └─ plugin/janusxr: " .. exp.file.name)
|
||||
if data:match(pattern_aframe) and app.opts.plugin_janusxr_wrap_aframe == 'enabled' then
|
||||
exp.janusxr.wrap = {file = true }
|
||||
if data:match(pattern_aframe) and app.opts.plugin_janusxr_wrap_aframe ~= '' then
|
||||
if not data:match("<a-sky") then
|
||||
exp.janusxr.room = 'room_plane'
|
||||
exp.janusxr.wrap = {redirect = true } -- redirect to file verbatim
|
||||
else
|
||||
exp.janusxr.wrap = {file = true } -- include markup in footer
|
||||
end
|
||||
app.markViewable(exp,50)
|
||||
-- *TODO* assign room if no sky or equirect
|
||||
print("✅ └─ plugin/janusxr: AFRAME markup detected")
|
||||
else
|
||||
exp.janusxr.wrap = {redirect = true}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue