forked from jakesgordon/javascript-state-machine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmatter.js
More file actions
18 lines (15 loc) · 633 Bytes
/
matter.js
File metadata and controls
18 lines (15 loc) · 633 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var StateMachine = require('../src/app'),
visualize = require('../src/plugin/visualize');
var Matter = StateMachine.factory({
init: 'solid',
transitions: [
{ name: 'melt', from: 'solid', to: 'liquid', dot: { headport: 'nw' } },
{ name: 'freeze', from: 'liquid', to: 'solid', dot: { headport: 'se' } },
{ name: 'vaporize', from: 'liquid', to: 'gas', dot: { headport: 'nw' } },
{ name: 'condense', from: 'gas', to: 'liquid', dot: { headport: 'se' } }
]
});
Matter.visualize = function() {
return visualize(Matter, { name: 'matter', orientation: 'horizontal' })
}
module.exports = Matter