-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·48 lines (48 loc) · 2.42 KB
/
index.html
File metadata and controls
executable file
·48 lines (48 loc) · 2.42 KB
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
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Three.js Dice Roller | Codrops</title>
<meta name="description" content="Demo for the tutorial on how to code a dice roller with Three.js and cannon-es" />
<meta name="keywords" content="3d dice, three.js, cannon-es, webgl, rolling dice" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="css/base.css" />
<script>document.documentElement.className="js";var supportsCssVars=function(){var e,t=document.createElement("style");return t.innerHTML="root: { --tmp-var: bold; }",document.head.appendChild(t),e=!!(window.CSS&&window.CSS.supports&&window.CSS.supports("font-weight","var(--tmp-var)")),t.parentNode.removeChild(t),e};supportsCssVars()||alert("Please view this demo in a modern browser that supports CSS Variables.");</script>
<script src="//tympanus.net/codrops/adpacks/analytics.js"></script>
</head>
<body>
<main>
<div class="frame">
<div class="frame__title">
<h1 class="frame__title-main">Three.js Dice Roller</h1>
<a aria-label="Back to the article" class="frame__title-back" href="https://tympanus.net/codrops/?p=69521">
<span class="oh__inner">Back to the article</span>
<svg width="18px" height="18px" viewBox="0 0 24 24"><path vector-effect="non-scaling-stroke" d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path>
</svg>
</a>
</div>
<a class="frame__prev" href="https://tympanus.net/Development/TwistedText/">Previous demo</a>
</div>
<div class="content">
<canvas id="canvas"></canvas>
<div class="ui-controls">
<div class="score">Score: <span id="score-result"></span></div>
<button id="roll-btn">Throw the dice</button>
</div>
</div>
</main>
<script async src="https://unpkg.com/es-module-shims@1.3.6/dist/es-module-shims.js"></script>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.138.0/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.138.0/examples/jsm/"
}
}
</script>
<script src="https://tympanus.net/codrops/adpacks/cda_sponsor.js"></script>
<script type="module" src="./js/main.js"></script>
</body>
</html>