Files
P42_UI/app/controllers/editors/EditorsController.js
T
2025-10-14 16:31:07 +00:00

64 lines
1.6 KiB
JavaScript

class EditorsController extends WindozController {
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
}
async keyframe() {
const models = {
agents : new AgentsModel('/agents')
}
// const ttb = new app.LoadedModules.Threetobus({
// eventsMapping: this.eventsMapping,
// sceneSize: this.arenaConfig.arenaSize,
// })
// ttb.initScene({
// axes: true,
// grid: true,
// })
// 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
this.loadWindow(
'editors/KeyFameView',
{
title: '<i class="icon-edit"></i> Keyframe edito 3D view',
static: true,
expanded: true,
withSettings: true,
windowStyle: WindozDomContent.boxFromPrefs('editors.keyframe', { x: 50, y:50, w:1000, h:800 }),
},
{
models: models,
agentDefs: this.agentDefs,
//ttb: ttb,
}
)
}
async sprites() {
}
async eventmaps(){
}
}
app.registerClass('EditorsController', EditorsController);