starting KF Editor
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
class EditorsController 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
|
||||
}
|
||||
|
||||
|
||||
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/SpaceView',
|
||||
{
|
||||
title: '<i class="icon-edit"></i> Keyframe edito 3D view',
|
||||
static: true,
|
||||
expanded: false,
|
||||
withSettings: true,
|
||||
windowStyle: this._boxFromPrefs('live.spaceview.3D', { x: 50, y:100, w:600, h:400 }),
|
||||
},
|
||||
{
|
||||
models: models,
|
||||
agentDefs: this.agentDefs,
|
||||
rendererId:'3drenderer',
|
||||
mode: '3D',
|
||||
ttb: ttb,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
this.loadWindow(
|
||||
'editors/SpaceView',
|
||||
{
|
||||
title: '<i class="icon-edit"></i> Keyframe editor 2D View',
|
||||
static: true,
|
||||
expanded: false,
|
||||
withSettings: true,
|
||||
windowStyle: this._boxFromPrefs('live.spaceview.2D', { x: 500, y:100, w:600, h:400 }),
|
||||
},
|
||||
{
|
||||
models: models,
|
||||
agentDefs: this.agentDefs,
|
||||
rendererId:'2drenderer',
|
||||
mode: '2D',
|
||||
ttb: ttb,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
async sprites() {
|
||||
|
||||
}
|
||||
|
||||
async eventmaps(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('EditorsController', EditorsController);
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"url": "/keyframe",
|
||||
"role": [ "*" ],
|
||||
"controller" : "/editors/EditorsController",
|
||||
"method": "keyframe"
|
||||
},
|
||||
{
|
||||
"url": "/sprites",
|
||||
"role": [ "*" ],
|
||||
"controller" : "/editors/EditorsController",
|
||||
"method": "sprites"
|
||||
},
|
||||
{
|
||||
"url": "/eventmaps",
|
||||
"role": [ "*" ],
|
||||
"controller" : "/editors/EditorsController",
|
||||
"method": "eventmaps"
|
||||
}
|
||||
],
|
||||
"models": [
|
||||
"AgentsModel"
|
||||
],
|
||||
"views": [
|
||||
"editors/KeyframeView"
|
||||
],
|
||||
"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": [
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user