look ma, theres 3D now
This commit is contained in:
@@ -26,8 +26,6 @@ class MainDashboardView extends EICDomContent {
|
||||
super()
|
||||
Object.assign(this, app.helpers.activeAttributes)
|
||||
//this.tileMarkup = app.Assets.Store.html['/app/assets/html/mailing/tile.html']
|
||||
this.snap = null
|
||||
this.snaptobus = null
|
||||
}
|
||||
|
||||
DOMContentLoaded(options) {
|
||||
@@ -35,38 +33,10 @@ class MainDashboardView extends EICDomContent {
|
||||
const components = ui.eicfy(this.el)
|
||||
this.setupTriggers(components)
|
||||
this.setupRefs(components)
|
||||
this.snaptobus = new Snaptobus({
|
||||
snap: Snap("svg.stb"),
|
||||
spriteDefs: this.agentTypes,
|
||||
busConfig: [
|
||||
{
|
||||
chan: 'gps:agents', // What to subscribe to
|
||||
events: [ // What to select on this chan
|
||||
{ eventName: 'moving', // which event will trigger a change
|
||||
snaps: [
|
||||
{
|
||||
selector: '#${aid}', // what svg elements do we change ?
|
||||
assign: { // what do we change and with what from the payload ?
|
||||
cx: 'attrs.x',
|
||||
cy: 'attrs.y',
|
||||
},
|
||||
animate: true
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
})
|
||||
// var agent = this.snap.circle(150, 150, 20);
|
||||
// agent.attr({
|
||||
// id: 'agent42',
|
||||
// fill: "#BFB",
|
||||
// stroke: "#0A0",
|
||||
// strokeWidth: 2
|
||||
// });
|
||||
this.createAgent('molecule2', 'agent42', 100,100)
|
||||
//setTimeout(this.moveit.bind(this), 3000);
|
||||
|
||||
this.ttb = new app.LoadedModules.Threetobus(this.outputs.paper43)
|
||||
this.ttb.init()
|
||||
|
||||
}
|
||||
|
||||
DOMContentFocused(options) {
|
||||
@@ -90,22 +60,6 @@ class MainDashboardView extends EICDomContent {
|
||||
})
|
||||
}
|
||||
|
||||
// moveit(){
|
||||
// var myCircle = this.snap.select('#agent42')
|
||||
|
||||
// var newx = parseInt(myCircle.attr('cx')) + 600
|
||||
// var newy = parseInt(myCircle.attr('cy')) + 200
|
||||
|
||||
// // animate translate
|
||||
// myCircle.animate(
|
||||
// {
|
||||
// cx: newx,
|
||||
// cy: newy,
|
||||
// },
|
||||
// 1000, // duration in ms
|
||||
// mina.linear // easing
|
||||
// )
|
||||
// }
|
||||
}
|
||||
|
||||
app.registerClass('MainDashboardView', MainDashboardView)
|
||||
|
||||
Reference in New Issue
Block a user