-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
75 lines (68 loc) · 2.36 KB
/
index.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<html>
<head>
<title>dice.io demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="css/app.min.css">
<script src="js/diceio.min.js?v=0.6.1"></script>
<script src="js/app.min.js?v=0.6.1"></script>
</head>
<body>
<!-- Top bar -->
<div class="topnav">
<div class="topnav-title">dice.io demo</div>
<div class="topnav-nickname"></div>
</div>
<!-- Roll results container -->
<div class="rolls"></div>
<!-- Bottom bar -->
<div class="bottomnav">
<div class="formula-container">
<form spellcheck="false" autocomplete="off" onsubmit="return false;">
<ul>
<li>
<input type="text" class="formula" placeholder="Type a dice formula and press 'Enter' key..." value="" />
</li>
</ul>
</form>
</div>
<div class="formula-icon"></div>
</div>
<!-- Nickname modal -->
<div class="modal">
<div class="modal-content">
<form spellcheck="false" autocomplete="off" onsubmit="return false;">
<div class="modal-container">
<label for="nickname"><b>Nickname</b></label>
<input class="modal-nickname" type="text" placeholder="Enter nickname" name="nickname" required />
<button class="modal-button" type="submit">Login</button>
</div>
</form>
</div>
</div>
<script>
(function () {
var diceRoller = new DiceIO({
channel: 'demo',
// connect: true,
// historyOnConnect: false,
// nickname: 'Frodo',
// serverUrl: window.location.origin,
// socketOptions: { path: window.location.pathname + 'socket.io' },
// engine: DiceIO.engines.DICE_JS,
// engine: DiceIO.engines.RPG_DICE_JS,
// engine: DiceIO.engines.RPG_DICE_ROLLER,
// onError: onErrorCallback,
// onDisconnect: onDisconnectCallback,
// onConnect: onConnectCallback,
// onHistory: onHistoryCallback,
// onRoll: onRollCallback,
});
// diceRoller.setEngine(DiceIO.engines.DICE_JS);
// diceRoller.setNickname('Frodo');
// diceRoller.getHistory();
var app = new DemoApp(diceRoller);
})();
</script>
</body>
</html>