fixed move & rotate tweens + mapping to child OK

This commit is contained in:
STEINNI
2025-10-01 19:09:54 +00:00
parent 7a50311fcd
commit b5b76d51cc
20 changed files with 196 additions and 74 deletions
@@ -2,6 +2,7 @@ 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
}
@@ -16,6 +17,7 @@ class DashboardsController extends EICController {
const ttb = new app.LoadedModules.Threetobus({
eventsMapping: this.eventsMapping,
sceneSize: this.arenaConfig.arenaSize,
})
ttb.initScene({
axes: true,
@@ -24,27 +26,6 @@ class DashboardsController extends EICController {
const m1 = ttb.agentFromJSON('agent42', this.agentDefs.molecule1)
ttb.scene.add(m1)
// setTimeout(() => {
// ttb.smoothMove({
// object: m1,
// dX: 5,
// dY:0,
// dZ:0,
// delay: 1500,
// easing: 'Quadratic',
// easingMode: 'InOut',
// })
// },3000)
//TODO : side switches
// window.addEventListener('keydown', (e) => {
// if (e.key.toLowerCase() === 'g') {
// ttb.grid.visible = !grid.visible
// }
// if (e.key.toLowerCase() === 'a') {
// ttb.axes.visible = !axes.visible
// }
// })
//TODO: eventsMapping: address child by suffix in assignations