wip
This commit is contained in:
parent
78ec717551
commit
ebe8eb3cfb
10 changed files with 81 additions and 16 deletions
1
src/janusweb/media/assets/webui/apps/xrforge/xrforge.js
Normal file
1
src/janusweb/media/assets/webui/apps/xrforge/xrforge.js
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
//alert("xrforge")
|
||||||
10
src/janusweb/media/assets/webui/apps/xrforge/xrforge.json
Normal file
10
src/janusweb/media/assets/webui/apps/xrforge/xrforge.json
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"templates": {
|
||||||
|
},
|
||||||
|
"scripts": [
|
||||||
|
"./xrforge.js"
|
||||||
|
],
|
||||||
|
"css": []
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
28
src/janusweb/media/assets/webui/xrforge.json
Normal file
28
src/janusweb/media/assets/webui/xrforge.json
Normal 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": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -61,8 +61,8 @@ div#xrecosystem{
|
||||||
<div id="logo"></div>
|
<div id="logo"></div>
|
||||||
<h2>Turn files into AR/VR 🥽 experiences</h2>
|
<h2>Turn files into AR/VR 🥽 experiences</h2>
|
||||||
<center>
|
<center>
|
||||||
|
A <b>Virtual Worlds Mixer</b> (VWM), powered by <a href="https://coderofsalvation.github.io/janus-guide">JanusXR</a> & <a href="https://xrfragment.org">XR Fragments</a>.<br>
|
||||||
A static website generator for interconnected XR experiences.<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> & <a href="https://xrfragment.org">XR Fragments</a>.
|
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<div class="btn">
|
<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>
|
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>
|
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>
|
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>
|
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
|
||||||
XRForge can seed itself via local or remote
|
|
||||||
<u tabindex="0">datastores
|
<u tabindex="0">datastores
|
||||||
<span>
|
<span>
|
||||||
<br>
|
<br>
|
||||||
|
|
@ -129,6 +128,8 @@ div#xrecosystem{
|
||||||
<br>
|
<br>
|
||||||
<table class="table table-dark table-striped">
|
<table class="table table-dark table-striped">
|
||||||
<tr><td>
|
<tr><td>
|
||||||
|
<a href="https://icosa.gallery">Icosa.gallery</a><br>
|
||||||
|
<a href="https://mayfold.app">Manyfold</a><br>
|
||||||
Azure Blob <br>
|
Azure Blob <br>
|
||||||
Azure Files <br>
|
Azure Files <br>
|
||||||
B2 <br>
|
B2 <br>
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ return {
|
||||||
data.janusurl = (v.janusxr and v.janusxr.wrap) and app.opts.baseurl .. util.stripPath(v.url)
|
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 parent has redirect to item set, use parent url
|
||||||
if not data.janusurl or v.parent.redirect == v.url then
|
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
|
end
|
||||||
if v.janusxr and v.janusxr.wrap and v.janusxr.wrap.file then
|
if v.janusxr and v.janusxr.wrap and v.janusxr.wrap.file then
|
||||||
-- what to do here? no generated portals?
|
-- what to do here? no generated portals?
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ end}
|
||||||
|
|
||||||
function initRoom(r)
|
function initRoom(r)
|
||||||
if r.janusxr and r.janusxr.room then
|
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
|
room = r.janusxr.room
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,12 @@ app.on('scan_experience_file', function(exp)
|
||||||
exp.janusxr.wrap = nil -- erase previous 3D models
|
exp.janusxr.wrap = nil -- erase previous 3D models
|
||||||
print("✅ └─ plugin/janusxr: " .. exp.file.name)
|
print("✅ └─ plugin/janusxr: " .. exp.file.name)
|
||||||
if data:match(pattern_aframe) and app.opts.plugin_janusxr_wrap_aframe ~= '' then
|
if data:match(pattern_aframe) and app.opts.plugin_janusxr_wrap_aframe ~= '' then
|
||||||
if not data:match("<a-sky") then
|
--if not data:match("<a-sky") then
|
||||||
exp.janusxr.room = 'room_plane'
|
-- exp.janusxr.room = 'room_plane'
|
||||||
exp.janusxr.wrap = {redirect = true } -- redirect to file verbatim
|
-- exp.janusxr.wrap = {redirect = true } -- redirect to file verbatim
|
||||||
else
|
--else
|
||||||
exp.janusxr.wrap = {file = true } -- include markup in footer
|
-- exp.janusxr.wrap = {file = true } -- include markup in footer
|
||||||
end
|
--end
|
||||||
app.markViewable(exp,50)
|
app.markViewable(exp,50)
|
||||||
print("✅ └─ plugin/janusxr: AFRAME markup detected")
|
print("✅ └─ plugin/janusxr: AFRAME markup detected")
|
||||||
else
|
else
|
||||||
|
|
@ -63,9 +63,11 @@ app.on('scan_experience_file', function(exp)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
if wrap and not (exp.janusxr and exp.janusxr.jml ~= nil) then
|
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)
|
app.markViewable(exp)
|
||||||
exp.janusxr = { wrap = { object = true }}
|
exp.parent.redirect = nil
|
||||||
exp.janusxr.room = me.wrapRoomAroundFile( exp )
|
|
||||||
app.pub("scan_experience_janusxr", nil, {exp=exp, item=item}) -- be nice to other plugins
|
app.pub("scan_experience_janusxr", nil, {exp=exp, item=item}) -- be nice to other plugins
|
||||||
app.addExperience( exp, exp.file.ino )
|
app.addExperience( exp, exp.file.ino )
|
||||||
print("✅ └─ plugin/janusxr: wrapping " .. exp.path)
|
print("✅ └─ plugin/janusxr: wrapping " .. exp.path)
|
||||||
|
|
@ -241,7 +243,7 @@ local plugin = {
|
||||||
end)
|
end)
|
||||||
table.sort(ordered) -- ensure same order
|
table.sort(ordered) -- ensure same order
|
||||||
if url then
|
if url then
|
||||||
room = ordered[ me.hash_string_to_number(url) % #ordered ]
|
room = ordered[ (me.hash_string_to_number(url) % #ordered) + 1 ]
|
||||||
else
|
else
|
||||||
room = ordered[ math.random( #ordered ) ]
|
room = ordered[ math.random( #ordered ) ]
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ local grid = {
|
||||||
local turns = 0
|
local turns = 0
|
||||||
local index = 0
|
local index = 0
|
||||||
for i, v in pairs(items) do
|
for i, v in pairs(items) do
|
||||||
|
jml = '<!-- ' .. util.dump(v) .. ' -->\n'
|
||||||
local url = v.redirect and v.redirect or v.url
|
local url = v.redirect and v.redirect or v.url
|
||||||
local overlay = v.title:match('overlay') and true or false
|
local overlay = v.title:match('overlay') and true or false
|
||||||
-- Position current item
|
-- Position current item
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,24 @@ return function(lust)
|
||||||
|
|
||||||
describe('ℹ️ wrap 3D file', function() -- Can be nested
|
describe('ℹ️ wrap 3D file', function() -- Can be nested
|
||||||
it('detect & serve to iframe', function()
|
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)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,12 @@ download(){
|
||||||
test -d janusweb-${version} || tar -xvf janusweb-${version}.tar.gz
|
test -d janusweb-${version} || tar -xvf janusweb-${version}.tar.gz
|
||||||
mv janusweb-${version} janusweb
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
"$@"
|
"$@"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue