menus, better routes, dev tools, styling

This commit is contained in:
STEINNI
2025-10-04 20:27:47 +00:00
parent b5b76d51cc
commit 213dcb6c4c
20 changed files with 1902 additions and 159 deletions
@@ -0,0 +1,79 @@
class DashboardsController extends EICController {
constructor(params) {
super(params)
this.arenaConfig = app.Assets.Store.json.arenaConfig
this.agentDefs = app.Assets.Store.json.agentDefs
this.eventsMapping = app.Assets.Store.json.eventsMapping
}
/**
*
* @returns
*/
spaceViewer() {
const models = {
}
const ttb = new app.LoadedModules.Threetobus({
eventsMapping: this.eventsMapping,
sceneSize: this.arenaConfig.arenaSize,
})
ttb.initScene({
axes: true,
grid: true,
})
const m1 = ttb.agentFromJSON('agent42', this.agentDefs.molecule1)
ttb.scene.add(m1)
//TODO: eventsMapping: address child by suffix in assignations
this.loadWindow(
'visualisers/SpaceView',
{
title: '3D view',
static: true,
expanded: false,
withSettings: true,
windowStyle:{
width: '800px',
height: '600px',
left: '50px',
top: '100px',
}
},
{
models: models,
agentDefs: this.agentDefs,
rendererId:'3drenderer',
mode: '3D',
ttb: ttb,
}
)
this.loadWindow(
'visualisers/SpaceView',
{
title: '2D View',
static: true,
expanded: false,
withSettings: true,
windowStyle:{
width: '600px',
height: '450px',
right:'10px',
top:'100px',
}
},
{
models: models,
agentDefs: this.agentDefs,
rendererId:'2drenderer',
mode: '2D',
ttb: ttb,
}
)
}
}
app.registerClass('DashboardsController', DashboardsController);
@@ -0,0 +1,41 @@
{
"routes": [
{
"url": "/",
"role": [ "*" ],
"exturl": "/live/spaceviewer"
},
{
"url": "/spaceviewer",
"role": [ "*" ],
"controller" : "/live/DashboardsController",
"method": "spaceViewer"
}
],
"models": [
],
"views": [
"visualisers/SpaceView"
],
"controllerDependencies": [
"/helpers/basicDialogs",
"/helpers/validators",
"/helpers/activeAttributes",
"/thirdparty/Threetobus/three.module",
"/thirdparty/Threetobus/OrbitControls.module",
"/thirdparty/Threetobus/tween.module",
"/thirdparty/Threetobus/threetobus.module"
],
"assets": {
"styles": [
],
"html": [
{ "id":"sapceViewSetting", "name": "sapceViewSetting.html"}
],
"json": [
{"id":"arenaConfig", "name": "arena/arenaConfig1.json"},
{"id":"agentDefs", "name": "agents/basic3D.json"},
{"id":"eventsMapping", "name": "threetobus/eventsMapping.json"}
]
}
}