restructured rendering, added Tweener & smoothMove
This commit is contained in:
@@ -2,7 +2,7 @@ class DashboardsController extends EICController {
|
||||
|
||||
constructor(params) {
|
||||
super(params)
|
||||
|
||||
this.agentDefs = app.Assets.Store.json.agentDefs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -10,12 +10,29 @@ class DashboardsController extends EICController {
|
||||
* @returns
|
||||
*/
|
||||
index() {
|
||||
let models = {
|
||||
const models = {
|
||||
// mailings: new MailingsModel(payload['/mailings'].permissions)
|
||||
}
|
||||
// await app.Assets.loadHtml({name:'mailing/tile.html'})
|
||||
|
||||
const ttb = new app.LoadedModules.Threetobus()
|
||||
ttb.initScene()
|
||||
const m1 = ttb.buildFromJSON(this.agentDefs.molecule1)
|
||||
m1.name = 'agent42'
|
||||
ttb.scene.add(m1)
|
||||
setTimeout(() => {
|
||||
ttb.smoothRelMove({
|
||||
object: m1,
|
||||
dX: 5,
|
||||
dY:0,
|
||||
dZ:0,
|
||||
delay: 1500,
|
||||
easing: 'Quadratic',
|
||||
easingMode: 'InOut',
|
||||
})
|
||||
},3000)
|
||||
|
||||
this.loadWindow(
|
||||
'dashboards/MainDashboardView',
|
||||
'visualisers/SpaceView',
|
||||
{
|
||||
title: '3D view',
|
||||
static: true,
|
||||
@@ -29,11 +46,14 @@ class DashboardsController extends EICController {
|
||||
},
|
||||
{
|
||||
models: models,
|
||||
mode: '3D'
|
||||
agentDefs: this.agentDefs,
|
||||
rendererId:'3drenderer',
|
||||
mode: '3D',
|
||||
ttb: ttb,
|
||||
}
|
||||
)
|
||||
this.loadWindow(
|
||||
'dashboards/MainDashboardView',
|
||||
'visualisers/SpaceView',
|
||||
{
|
||||
title: '2D View',
|
||||
static: true,
|
||||
@@ -47,7 +67,10 @@ class DashboardsController extends EICController {
|
||||
},
|
||||
{
|
||||
models: models,
|
||||
mode: '2D'
|
||||
agentDefs: this.agentDefs,
|
||||
rendererId:'2drenderer',
|
||||
mode: '2D',
|
||||
ttb: ttb,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user