function OnStart()
{
// Copy DroidScript asset folder you put your assets in to local storage (for this example all assets in Misc folder)
app.ExtractAssets(“Misc”,”/sdcard/Misc”)
// Create a layout
lay = app.CreateLayout("Linear","VCenter,FillXY");
// Create a WebView to display the web server content
web = app.CreateView(0.9,0.9);
lay.AddChild(web)
app.AddChild(web)
app.AddLayout(lay)
// Create a WebServer to serve files (needed if .html file not single self-contained file)
serv=app.CreateWebServer(8000)
serv.SetFolder("/sdcard/DroidScript/testAframe");
serv.Start();
// comment out next line if prefer to serve Aframe scene over wifi instead of on device local WebView
web.LoadUrl("http://127.0.0.1:8080");
}
function OnStart()
{
// Copy DroidScript asset folder you put your assets in to local storage (for this example all assets in Misc folder)
app.ExtractAssets(“Misc”,”/sdcard/Misc”)
// Create a layout
lay = app.CreateLayout("Linear","VCenter,FillXY");
// Create a WebView to display the web server content
web = app.CreateView(0.9,0.9);
lay.AddChild(web)
app.AddChild(web)
app.AddLayout(lay)
// Create a WebServer to serve files (needed if .html file not single self-contained file)
serv=app.CreateWebServer(8000)
serv.SetFolder("/sdcard/Misc");