agents defs from DB
This commit is contained in:
@@ -13,8 +13,9 @@ class DashboardsController extends EICController {
|
||||
*
|
||||
* @returns
|
||||
*/
|
||||
spaceViewer() {
|
||||
async spaceViewer() {
|
||||
const models = {
|
||||
agents : new AgentsModel('/agents')
|
||||
}
|
||||
|
||||
const ttb = new app.LoadedModules.Threetobus({
|
||||
@@ -26,8 +27,11 @@ class DashboardsController extends EICController {
|
||||
grid: true,
|
||||
})
|
||||
|
||||
const m1 = ttb.agentFromJSON('agent42', this.agentDefs.molecule1)
|
||||
ttb.scene.add(m1)
|
||||
this.agentDefs = await models.agents.getSprites('Basic 3D')
|
||||
const a1 = ttb.agentFromJSON('agent42', this.agentDefs.nocode1)
|
||||
const a2 = ttb.agentFromJSON('agent42', this.agentDefs.nocode2)
|
||||
ttb.scene.add(a1)
|
||||
ttb.scene.add(a2)
|
||||
|
||||
//TODO: eventsMapping: address child by suffix in assignations
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
}
|
||||
],
|
||||
"models": [
|
||||
"AgentsModel"
|
||||
],
|
||||
"views": [
|
||||
"visualisers/SpaceView"
|
||||
@@ -34,7 +35,6 @@
|
||||
],
|
||||
"json": [
|
||||
{"id":"arenaConfig", "name": "arena/arenaConfig1.json"},
|
||||
{"id":"agentDefs", "name": "agents/basic3D.json"},
|
||||
{"id":"eventsMapping", "name": "threetobus/eventsMapping.json"}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user