diff --git a/.vscode/launch.json b/.vscode/launch.json
index 3e95856..908785a 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -22,6 +22,13 @@
"request": "launch",
"reAttach": true,
"file": "${workspaceFolder}/Pendulum/Pendulum.html"
+ },
+ {
+ "name": "RotatingCube",
+ "type": "firefox",
+ "request": "launch",
+ "reAttach": true,
+ "file": "${workspaceFolder}/RotatingCube/RotatingCube.html"
}
]
}
\ No newline at end of file
diff --git a/RotatingCube/RotatingCube.html b/RotatingCube/RotatingCube.html
new file mode 100644
index 0000000..8c2051e
--- /dev/null
+++ b/RotatingCube/RotatingCube.html
@@ -0,0 +1,19 @@
+
+
+
+
+ Draw cube with specification of face color
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/RotatingCube/RotatingCube.js b/RotatingCube/RotatingCube.js
new file mode 100644
index 0000000..a3c9933
--- /dev/null
+++ b/RotatingCube/RotatingCube.js
@@ -0,0 +1,166 @@
+// ColoredCube.js (c) 2012 matsuda
+
+const vertex_shader = `
+ attribute vec4 a_Position;
+ attribute vec4 a_Color;
+ uniform mat4 u_MvpMatrix;
+ varying vec4 v_Color;
+
+ void main()
+ {
+ gl_Position = u_MvpMatrix * a_Position;
+ v_Color = a_Color;
+ } `;
+
+
+const fragment_shader = `
+ #ifdef GL_ES
+ precision mediump float;
+ #endif
+
+ varying vec4 v_Color;
+
+ void main()
+ {
+ gl_FragColor = v_Color;
+ } `;
+
+function main()
+{
+ // Retrieve