Commit c4269e36 authored by Roque's avatar Roque

erp5_officejs_drone_simulator: app site, pages and assets

parent 86c2869f
/*global window, rJS, domsugar, DroneGameManager*/
/*jslint nomen: true, indent: 2, maxlen: 80, white: true, evil: false */
(function (window, rJS, domsugar, DroneGameManager) {
"use strict";
var canvas, offscreen,
WIDTH = 680, HEIGHT = 340,
LOGIC_FILE_LIST = [
'gadget_erp5_page_drone_simulator_logic.js',
'gadget_erp5_page_drone_simulator_droneaaailefixe.js',
'gadget_erp5_page_drone_simulator_dronelogfollower.js'
];
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareMethod('render', function render() {
var gadget = this,
loading = domsugar('span', ["Loading..."]),
container = domsugar('div');
canvas = domsugar('canvas');
loading.id = "loading";
container.className = 'container';
container.appendChild(canvas);
domsugar(gadget.element, [loading, container]);
canvas.width = WIDTH;
canvas.height = HEIGHT;
// https://doc.babylonjs.com/divingDeeper/scene/offscreenCanvas
offscreen = canvas.transferControlToOffscreen();
})
// To be called outside
.declareMethod('runGame', function runGame(options) {
options.canvas = offscreen;
options.canvas_original = canvas;
options.width = canvas.width;
options.height = canvas.height;
options.logic_url_list = LOGIC_FILE_LIST;
var gadget = this,
game_manager = new DroneGameManager(gadget);
return game_manager.play(options)
.push(function () {
return game_manager.result();
});
});
}(window, rJS, domsugar, DroneGameManager));
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<head> <head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />
<title>Drone Simulator Flight Comparison</title> <title>Drone Simulator Log Page</title>
<link rel="http://www.renderjs.org/rel/interface" href="interface_page.html"> <link rel="http://www.renderjs.org/rel/interface" href="interface_page.html">
<!-- renderjs --> <!-- renderjs -->
...@@ -19,10 +19,22 @@ ...@@ -19,10 +19,22 @@
<script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_global.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script> <script src="domsugar.js" type="text/javascript"></script>
<script src="gadget_erp5_page_babylonjs_main.js" type="text/javascript"></script> <script src="gadget_erp5_page_drone_simulator_log_page.js" type="text/javascript"></script>
<script src="gadget_erp5_page_drone_simulator_gadget.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<form>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
<input name="action_run" class="dialogconfirm" type="submit" value="Run" style="margin-bottom: 20pt;margin-top: 20pt;">
<span id="distance"></span>
<div class="simulator_div"></div>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view_babylonjs"
data-gadget-sandbox="public">
</div>
</form>
</body> </body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Drone Simulator Panel</title>
<link rel="http://www.renderjs.org/rel/interface" href="interface_panel.html">
<!--
data-i18n=Editable
data-i18n=Home
data-i18n=Modules
data-i18n=Worklists
data-i18n=History
data-i18n=Search
data-i18n=Logout
data-i18n=Views
data-i18n=Workflows
data-i18n=Actions
data-i18n=Jumps
data-i18n=Global
data-i18n=My Account
-->
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_global.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_panel_drone_simulator.js" type="text/javascript"></script>
</head>
<body>
<div>
<div data-role="header">
<div class="ui-btn-left">
<div class="ui-controlgroup-controls">
<button data-i18n="Close" class="ui-btn-icon-notext ui-icon-delete">Close</button>
</div>
</div>
</div>
<div>
<ul></ul>
<dl></dl>
</div>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<!--
data-i18n=Others
data-i18n=Tools
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Drone Simulator Script Page</title>
<link rel="http://www.renderjs.org/rel/interface" href="interface_page.html">
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="jiodev.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<script src="gadget_erp5_page_drone_simulator_script_page.js" type="text/javascript"></script>
</head>
<body>
<form>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
<input name="action_run" class="dialogconfirm" type="submit" value="Run" style="margin-bottom: 20pt;margin-top: 20pt;">
<a data-i18n="Storages"></a> <!-- for zelenium test common macro -->
<div class="simulator_div"></div>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view_babylonjs"
data-gadget-sandbox="public">
</div>
</form>
</body>
</html>
\ No newline at end of file
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_drone_simulator_gadget.html</string> </value> <value> <string>gadget_erp5_page_drone_simulator_script_page.html</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>drone_simulator_gadget_html</string> </value> <value> <string>ojs_drone_simulator_script_page_html</string> </value>
</item> </item>
<item> <item>
<key> <string>language</string> </key> <key> <string>language</string> </key>
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Drone Simulator Gadget</string> </value> <value> <string>Drone Simulator Script Page</string> </value>
</item> </item>
<item> <item>
<key> <string>version</string> </key> <key> <string>version</string> </key>
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1664478783.04</float> <float>1664980878.92</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1004.696.58996.11161</string> </value> <value> <string>1004.65523.1234.17</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1667230263.06</float> <float>1671032907.71</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1664478763.22</float> <float>1664980786.17</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_drone_simulator_gadget.js</string> </value> <value> <string>gadget_erp5_page_drone_simulator_script_page.js</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>drone_simulator_gadget_js</string> </value> <value> <string>ojs_drone_simulator_script_page_js</string> </value>
</item> </item>
<item> <item>
<key> <string>language</string> </key> <key> <string>language</string> </key>
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Drone Simulator Gadget JS</string> </value> <value> <string>Drone Simulator Script Page JS</string> </value>
</item> </item>
<item> <item>
<key> <string>version</string> </key> <key> <string>version</string> </key>
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1664478735.96</float> <float>1664980875.32</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1004.22554.1789.1262</string> </value> <value> <string>1005.193.31229.15496</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1668541098.4</float> <float>1671108872.26</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -323,7 +323,7 @@ ...@@ -323,7 +323,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1664478663.3</float> <float>1664980860.44</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
{
"short_name": "Drone Simulator",
"name": "OfficeJS Drone Simulator",
"description": "Drone simulator to run AI scripts and flight logs",
"icons": [{
"src": "drone.png",
"sizes": "any",
"type": "image/png"
}],
"start_url": "../../",
"display": "standalone"
}
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>42.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_officejs_drone_simulator</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
url_list = [
"gadget_erp5_page_drone_simulator_logic.js",
"gadget_erp5_page_drone_simulator_script_page.html",
"gadget_erp5_page_drone_simulator_script_page.js",
"gadget_erp5_page_drone_simulator_log_page.html",
"gadget_erp5_page_drone_simulator_log_page.js",
"gadget_erp5_panel_drone_simulator.html",
"gadget_erp5_panel_drone_simulator.js",
"gadget_erp5_page_drone_simulator_droneaaailefixe.js",
"gadget_erp5_page_drone_simulator_dronelogfollower.js",
"drone.png",
"gadget_officejs_drone_simulator.json",
"assets/map/terrain.jpg",
"assets/map/map.babylon",
"assets/drone/drone.babylon",
"assets/drone/drone_bleu.jpg",
"assets/drone/drone_bleu_old.jpg",
"assets/drone/drone_rouge.jpg",
"assets/drone/drone_rouge_old.jpg",
"assets/skybox/sky_nx.jpg",
"assets/skybox/sky_ny.jpg",
"assets/skybox/sky_nz.jpg",
"assets/skybox/sky_px.jpg",
"assets/skybox/sky_py.jpg",
"assets/skybox/sky_pz.jpg"
]
return url_list
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>REQUEST=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_getDroneSimulatorPrecacheManifestList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment