Created
May 18, 2016 12:50
-
-
Save michaelfairley/12b812876c9e5cfa70701b7e75d52fdb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let cube = [ | |
// Front | |
Vertex { position: [ 0.5, 0.5, 0.5], normal: [ 0.0, 0.0, 1.0] }, | |
Vertex { position: [ 0.5, -0.5, 0.5], normal: [ 0.0, 0.0, 1.0] }, | |
Vertex { position: [-0.5, 0.5, 0.5], normal: [ 0.0, 0.0, 1.0] }, | |
Vertex { position: [-0.5, 0.5, 0.5], normal: [ 0.0, 0.0, 1.0] }, | |
Vertex { position: [ 0.5, -0.5, 0.5], normal: [ 0.0, 0.0, 1.0] }, | |
Vertex { position: [-0.5, -0.5, 0.5], normal: [ 0.0, 0.0, 1.0] }, | |
// Back | |
Vertex { position: [ 0.5, 0.5, -0.5], normal: [ 0.0, 0.0, -1.0] }, | |
Vertex { position: [-0.5, 0.5, -0.5], normal: [ 0.0, 0.0, -1.0] }, | |
Vertex { position: [ 0.5, -0.5, -0.5], normal: [ 0.0, 0.0, -1.0] }, | |
Vertex { position: [ 0.5, -0.5, -0.5], normal: [ 0.0, 0.0, -1.0] }, | |
Vertex { position: [-0.5, 0.5, -0.5], normal: [ 0.0, 0.0, -1.0] }, | |
Vertex { position: [-0.5, -0.5, -0.5], normal: [ 0.0, 0.0, -1.0] }, | |
// Left | |
Vertex { position: [-0.5, 0.5, 0.5], normal: [-1.0, 0.0, 0.0] }, | |
Vertex { position: [-0.5, -0.5, 0.5], normal: [-1.0, 0.0, 0.0] }, | |
Vertex { position: [-0.5, 0.5, -0.5], normal: [-1.0, 0.0, 0.0] }, | |
Vertex { position: [-0.5, 0.5, -0.5], normal: [-1.0, 0.0, 0.0] }, | |
Vertex { position: [-0.5, -0.5, 0.5], normal: [-1.0, 0.0, 0.0] }, | |
Vertex { position: [-0.5, -0.5, -0.5], normal: [-1.0, 0.0, 0.0] }, | |
// Right | |
Vertex { position: [ 0.5, 0.5, 0.5], normal: [ 1.0, 0.0, 0.0] }, | |
Vertex { position: [ 0.5, 0.5, -0.5], normal: [ 1.0, 0.0, 0.0] }, | |
Vertex { position: [ 0.5, -0.5, 0.5], normal: [ 1.0, 0.0, 0.0] }, | |
Vertex { position: [ 0.5, -0.5, 0.5], normal: [ 1.0, 0.0, 0.0] }, | |
Vertex { position: [ 0.5, 0.5, -0.5], normal: [ 1.0, 0.0, 0.0] }, | |
Vertex { position: [ 0.5, -0.5, -0.5], normal: [ 1.0, 0.0, 0.0] }, | |
// Bottom | |
Vertex { position: [ 0.5, -0.5, 0.5], normal: [ 0.0, -1.0, 0.0] }, | |
Vertex { position: [ 0.5, -0.5, -0.5], normal: [ 0.0, -1.0, 0.0] }, | |
Vertex { position: [-0.5, -0.5, 0.5], normal: [ 0.0, -1.0, 0.0] }, | |
Vertex { position: [-0.5, -0.5, 0.5], normal: [ 0.0, -1.0, 0.0] }, | |
Vertex { position: [ 0.5, -0.5, -0.5], normal: [ 0.0, -1.0, 0.0] }, | |
Vertex { position: [-0.5, -0.5, -0.5], normal: [ 0.0, -1.0, 0.0] }, | |
// Top | |
Vertex { position: [ 0.5, 0.5, 0.5], normal: [ 0.0, 1.0, 0.0] }, | |
Vertex { position: [-0.5, 0.5, 0.5], normal: [ 0.0, 1.0, 0.0] }, | |
Vertex { position: [ 0.5, 0.5, -0.5], normal: [ 0.0, 1.0, 0.0] }, | |
Vertex { position: [ 0.5, 0.5, -0.5], normal: [ 0.0, 1.0, 0.0] }, | |
Vertex { position: [-0.5, 0.5, 0.5], normal: [ 0.0, 1.0, 0.0] }, | |
Vertex { position: [-0.5, 0.5, -0.5], normal: [ 0.0, 1.0, 0.0] }, | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment