added audio loop to portalrooms

This commit is contained in:
Leon van Kammen 2026-11-06 11:45:50 +01:00
parent c083470916
commit cb7e6fe770
3 changed files with 11 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View file

@ -12,10 +12,16 @@
return url return url
end end
portalroom = #items > 0 and #remoteitems > 0
audio_bgloop = URL('janusweb/media/audio/bgloop.ogg')
end} end}
<fireboxroom> <fireboxroom>
<assets> <assets>
{if portalroom then
print(' <assetsound id="bgloop" src="${audio_bgloop}"/>')
end}
{if defined(items) and #items > 0 then {if defined(items) and #items > 0 then
for i,v in pairs(items) do for i,v in pairs(items) do
if #v.thumbnail > 0 then if #v.thumbnail > 0 then
@ -61,6 +67,11 @@ end}
room = '' -- xrfragments 3D files dont need to be wrapped with room room = '' -- xrfragments 3D files dont need to be wrapped with room
end end
print(' <room skybox="true" pos="' .. pos .. '" showavatar="false" use_local_asset="' .. room .. '">') print(' <room skybox="true" pos="' .. pos .. '" showavatar="false" use_local_asset="' .. room .. '">')
if portalroom then
print(' <sound id="bgloop" loop="true" auto_play="true"/>')
end
if room == 'empty_floor' then if room == 'empty_floor' then
print(' <!-- helper to be able to walk/teleport -->') print(' <!-- helper to be able to walk/teleport -->')
print(' <object id="plane" color_write="false" rotation="90 0 0" collision_id="plane" scale="100 100 1" collision_scale="100 100 1"/>') print(' <object id="plane" color_write="false" rotation="90 0 0" collision_id="plane" scale="100 100 1" collision_scale="100 100 1"/>')