36 lines
838 B
Lua
36 lines
838 B
Lua
|
|
local api = ...
|
||
|
|
local util = api.util
|
||
|
|
|
||
|
|
return {
|
||
|
|
name = "janusxr",
|
||
|
|
enabled = true,
|
||
|
|
|
||
|
|
init = function()
|
||
|
|
|
||
|
|
local xml = api.parser.xml.newParser()
|
||
|
|
local xmlstr = [[
|
||
|
|
<room use_local_asset="room3">
|
||
|
|
<object id="foo.glb"/>
|
||
|
|
<object id="cube"/>
|
||
|
|
</room>
|
||
|
|
]]
|
||
|
|
util.traverseXML( xml:ParseXmlText(xmlstr), function(node,raw)
|
||
|
|
print_r(node)
|
||
|
|
end)
|
||
|
|
|
||
|
|
end,
|
||
|
|
|
||
|
|
renderURI = function(ctx)
|
||
|
|
-- TODO:
|
||
|
|
-- janusxr should be an ECS SYSTEM respond to inserted xmls
|
||
|
|
-- gltf should be a ECS SYSTEM respond to inserted objects
|
||
|
|
-- browser should insert url response to entity (respond to 404 + autodelete entity e.g.)
|
||
|
|
--
|
||
|
|
--local URL = ctx.URL
|
||
|
|
--local me = api.ext.gltf
|
||
|
|
--if ctx.succes and URL.extension == 'GLB' or URL.extension == 'GLTF' then
|
||
|
|
|
||
|
|
--end
|
||
|
|
end
|
||
|
|
}
|