Browse Source

html dégeu avec cube qui tourne en appuyant sur les bouttons

nbillard 1 year ago
parent
commit
ca1f6d0088
2 changed files with 1372 additions and 0 deletions
  1. 1313
    0
      canvas.js
  2. 59
    0
      index.html

+ 1313
- 0
canvas.js
File diff suppressed because it is too large
View File


+ 59
- 0
index.html View File

@@ -0,0 +1,59 @@
1
+<!doctype html>
2
+<html class="no-js" lang="">
3
+    <head>
4
+        <meta charset="utf-8">
5
+        <meta http-equiv="x-ua-compatible" content="ie=edge">
6
+        <title>Rubick's cube</title>
7
+        <meta name="description" content="">
8
+        <meta name="viewport" content="width=device-width initial-scale=1">
9
+
10
+
11
+        <link rel="stylesheet" type="text/css" href="style.css">
12
+        <script src="https://cdnjs.cloudflare.com/ajax/libs/gl-matrix/2.8.1/gl-matrix-min.js"></script>
13
+
14
+    </head>
15
+    <body>
16
+        <!--[if lt IE 8]>
17
+            <p class="browserupgrade">
18
+            You are using an <strong>outdated</strong> browser. Please
19
+            <a href="http://browsehappy.com/">upgrade your browser</a> to improve
20
+            your experience.
21
+            </p>
22
+        <![endif]-->
23
+        <div>
24
+            <input type="button" value="Rotate X1" id="rotate_x1">
25
+            <input type="button" value="Rotate X1 inverted" id="rotate_x1i">
26
+            <input type="button" value="Rotate X2" id="rotate_x2">
27
+            <input type="button" value="Rotate X2 inverted" id="rotate_x2i">
28
+            <input type="button" value="Rotate X3" id="rotate_x3">
29
+            <input type="button" value="Rotate X3 inverted" id="rotate_x3i">
30
+            <br/>
31
+            <input type="button" value="Rotate Y1" id="rotate_y1">
32
+            <input type="button" value="Rotate Y1 inverted" id="rotate_y1i">
33
+            <input type="button" value="Rotate Y2" id="rotate_y2">
34
+            <input type="button" value="Rotate Y2 inverted" id="rotate_y2i">
35
+            <input type="button" value="Rotate Y3" id="rotate_y3">
36
+            <input type="button" value="Rotate Y3 inverted" id="rotate_y3i">
37
+            <br/>
38
+            <input type="button" value="Rotate Z1" id="rotate_z1">
39
+            <input type="button" value="Rotate Z1 inverted" id="rotate_z1i">
40
+            <input type="button" value="Rotate Z2" id="rotate_z2">
41
+            <input type="button" value="Rotate Z2 inverted" id="rotate_z2i">
42
+            <input type="button" value="Rotate Z3" id="rotate_z3">
43
+            <input type="button" value="Rotate Z3 inverted" id="rotate_z3i">
44
+            <input type="button" value="Shuffle" id="shuffle">
45
+        </div>
46
+        <!-- <button type="button" id="rotate_x1">Rotate X1</button> -->
47
+            <div id="canvas-container" class="to-middle">
48
+                <canvas id="glCanvas" width="640px" height="480px"></canvas>
49
+                <div class="y_slider">
50
+                    <input type="range" min="-180" max="180" value="0" class="slider" id="y_rotation">
51
+                </div>
52
+                <div class="x_slider">
53
+                    <input type="range" min="-180" max="180" value="0" class="slider" id="x_rotation">
54
+                </div>
55
+            </div>
56
+        </main>
57
+        <script src="canvas.js"></script>
58
+    </body>
59
+</html>

Loading…
Cancel
Save