-
Notifications
You must be signed in to change notification settings - Fork 4
/
bpmn.html
executable file
·41 lines (39 loc) · 1.33 KB
/
bpmn.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<title>Morphic BPMN!</title>
<script type="text/javascript" src="morphic.js"></script>
<script type="text/javascript" src="bpmn.js"></script>
<script type="text/javascript">
var world, start, frame;
window.onload = function () {
world = new WorldMorph(document.getElementById('world'));
world.worldCanvas.focus();
frame = new FrameMorph();
frame.color = new Color(55, 55, 55);
frame.texture = 'bg.png';
frame.setExtent(world.extent());
frame.reactToWorldResize = function (rect) {
frame.changed();
frame.bounds = rect;
frame.rerender();
}
world.add(frame);
start = new BPM_EventMorph('start');
start.setPosition(new Point(50, 50));
frame.add(start);
// world.isDevMode = true;
loop();
};
function loop() {
requestAnimationFrame(loop);
world.doOneCycle();
}
</script>
</head>
<body>
<canvas id="world" tabindex="1" width="800" height="600" style="position: absolute;">
<p>Your browser doesn't support canvas.</p>
</canvas>
</body>
</html>