This commit is contained in:
Leon van Kammen 2026-09-27 12:41:12 +02:00
parent 78ec717551
commit ebe8eb3cfb
10 changed files with 81 additions and 16 deletions

View file

@ -0,0 +1 @@
//alert("xrforge")

View file

@ -0,0 +1,10 @@
{
"templates": {
},
"scripts": [
"./xrforge.js"
],
"css": []
}

View file

@ -0,0 +1,28 @@
{
"apps": {
"navigation": "./apps/navigation/navigation.json",
"comms": "./apps/comms/comms.json",
"avatar": "./apps/avatar/avatar.json",
"settings": "./apps/settings/settings.json",
"inventory": "./apps/inventory/inventory.json",
"editor": "./apps/editor/editor.json?v=12",
"transporter": "./apps/transporter/transporter.json",
"locomotion": "./apps/locomotion/locomotion.json",
"virtualgamepad": "./apps/virtualgamepad/virtualgamepad.json",
"buttons": "./apps/buttons/buttons.json",
"xrmenu": "./apps/xrmenu/xrmenu.json?v=14",
"xrfragment": "./apps/xrfragment/xrfragment.json",
"xrforge": "./apps/xrforge/xrforge.json",
"vfs": "./apps/vfs/vfs.json"
},
"includes": [
],
"templates": {
"janusweb.ui": "./default.html"
},
"css": [
"./themes/default.css"
],
"scripts": [
]
}

View file

@ -61,8 +61,8 @@ div#xrecosystem{
<div id="logo"></div>
<h2>Turn files into AR/VR 🥽 experiences</h2>
<center>
A <b>Virtual Worlds Mixer</b> (VWM), powered by <a href="https://coderofsalvation.github.io/janus-guide">JanusXR</a> &amp; <a href="https://xrfragment.org">XR Fragments</a>.<br>
A static website generator for interconnected XR experiences.<br>
Generate and manage open virtual worlds, powered by <a href="https://coderofsalvation.github.io/janus-guide">JanusXR</a> &amp; <a href="https://xrfragment.org">XR Fragments</a>.
<br/>
<br/>
<div class="btn">
@ -119,8 +119,7 @@ div#xrecosystem{
How? Well it's backed by <a href="https://coderofsalvation.github.io/janus-guide/" target="_blank">JanusXR-</a> and <a href="https://xrfragment.org" target="_blank">XR Fragment- URLs</a>.<br>
The metaverse has shown: people <b>like 3D</b> but certain <b>existing</b> 2D ecosystems are king.<br>
They're just more cost-efficient to use.<br>
Hence, XRForge incorporates the opensource <a href="https://coderofsalvation.github.io/janus-guide/" target="_blank">JanusXR</a>-client called <a href="https://github.com/jbaicoianu/janusweb" target="_blank">JanusWeb</a>, which promotes <b>projecting these ecosystems</b> as virtual <b>hyperlinked</b> worlds (via XR translators).<br>
XRForge can seed itself via local or remote
Hence, XRForge promotes <b>projecting these ecosystems</b> as virtual <b>hyperlinked</b> worlds, via <a href="https://coderofsalvation.github.io/janus-guide/" target="_blank">JanusXR</a> translators, tapping into various
<u tabindex="0">datastores
<span>
<br>
@ -129,6 +128,8 @@ div#xrecosystem{
<br>
<table class="table table-dark table-striped">
<tr><td>
<a href="https://icosa.gallery">Icosa.gallery</a><br>
<a href="https://mayfold.app">Manyfold</a><br>
Azure Blob <br>
Azure Files <br>
B2 <br>

View file

@ -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.redirect)
data.janusurl = app.opts.baseurl .. util.stripPath(v.parent.redirect or v.parent.url)
end
if v.janusxr and v.janusxr.wrap and v.janusxr.wrap.file then
-- what to do here? no generated portals?

View file

@ -50,7 +50,7 @@ end}
function initRoom(r)
if r.janusxr and r.janusxr.room then
pos = '0 0 1' -- todo make startup location configurable
pos = '0 0 2' -- todo make startup location configurable
room = r.janusxr.room
end
end

View file

@ -34,12 +34,12 @@ app.on('scan_experience_file', function(exp)
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 ~= '' 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
--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)
print("✅ └─ plugin/janusxr: AFRAME markup detected")
else
@ -63,9 +63,11 @@ app.on('scan_experience_file', function(exp)
end
end)
if wrap and not (exp.janusxr and exp.janusxr.jml ~= nil) then
-- initialize the parent
exp.parent.janusxr = { wrap = { object = true }}
exp.parent.janusxr.room = me.wrapRoomAroundFile( exp.parent )
app.markViewable(exp)
exp.janusxr = { wrap = { object = true }}
exp.janusxr.room = me.wrapRoomAroundFile( exp )
exp.parent.redirect = nil
app.pub("scan_experience_janusxr", nil, {exp=exp, item=item}) -- be nice to other plugins
app.addExperience( exp, exp.file.ino )
print("✅ └─ plugin/janusxr: wrapping " .. exp.path)
@ -241,7 +243,7 @@ local plugin = {
end)
table.sort(ordered) -- ensure same order
if url then
room = ordered[ me.hash_string_to_number(url) % #ordered ]
room = ordered[ (me.hash_string_to_number(url) % #ordered) + 1 ]
else
room = ordered[ math.random( #ordered ) ]
end

View file

@ -14,6 +14,7 @@ local grid = {
local turns = 0
local index = 0
for i, v in pairs(items) do
jml = '<!-- ' .. util.dump(v) .. ' -->\n'
local url = v.redirect and v.redirect or v.url
local overlay = v.title:match('overlay') and true or false
-- Position current item

View file

@ -7,7 +7,24 @@ return function(lust)
describe('ℹ️ wrap 3D file', function() -- Can be nested
it('detect & serve to iframe', function()
-- *TODO*
app.init()
app.use( require('page/dir').middleware )
app.use( app.response() )
app.on('response', function(opts)
expect( not opts.res._body:match('use_local_asset=""') ).to.be.truthy()
end)
local url = '/myverse/murials/murial2D'
foreach(app.cache.items, function(k,exp)
if exp.url:match(url) then
if exp.url:match( url .. "$") then
--print_r(exp)
lust.queueServerRequest('GET', url, nil, nil, nil, nil, nil, 8080 )
app.run()
end
end
end)
end)
end)

View file

@ -40,7 +40,12 @@ download(){
test -d janusweb-${version} || tar -xvf janusweb-${version}.tar.gz
mv janusweb-${version} janusweb
}
test -d src/janusweb || cp -Lr janusweb src/janusweb
set -x
rsync -avL janusweb src/.
# cleanup
rm src/janusweb/janusxr.com || true
# set xrforge as defualt config
cp src/janusweb/media/assets/webui/{xrforge,default}.json
}
"$@"