Skip to content

Instantly share code, notes, and snippets.

@fraguada
Created January 25, 2015 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fraguada/69d523af7f75049db39e to your computer and use it in GitHub Desktop.
Save fraguada/69d523af7f75049db39e to your computer and use it in GitHub Desktop.
JSON Output of a mesh with vertex normals and colors
{
"metadata": {
"formatVersion": 3.1,
"sourceFile": "this",
"generatedBy": "this",
"vertices": 12,
"normals": 12,
"faces": 20,
"colors": 12,
"uvs": 0,
"materials": 0
},
"scale": 1.0,
"vertices": [
0.0,
0.0,
5.0,
4.472136,
0.0,
2.236068,
1.381966,
4.253254,
2.236068,
-3.618034,
2.628655,
2.236068,
-3.618034,
-2.628655,
2.236068,
1.381966,
-4.253254,
2.236068,
3.618034,
2.628655,
-2.236068,
-1.381966,
4.253254,
-2.236068,
-4.472136,
0.0,
-2.236068,
-1.381966,
-4.253254,
-2.236068,
3.618034,
-2.628655,
-2.236068,
0.0,
0.0,
-5.0
],
"normals": [
0.0,
0.0,
1.0,
0.894427,
0.0,
0.447214,
0.276393,
0.850651,
0.447214,
-0.723607,
0.525731,
0.447214,
-0.723607,
-0.525731,
0.447214,
0.276393,
-0.850651,
0.447214,
0.723607,
0.525731,
-0.447214,
-0.276393,
0.850651,
-0.447214,
-0.894427,
0.0,
-0.447214,
-0.276393,
-0.850651,
-0.447214,
0.723607,
-0.525731,
-0.447214,
0.0,
0.0,
-1.0
],
"colors": [
8388352,
25600,
2263842,
8190976,
10145074,
11403055,
3329330,
10025880,
8388352,
25600,
2263842,
8190976
],
"faces": [
160,
0,
1,
2,
0,
1,
2,
0,
1,
2,
160,
0,
2,
3,
0,
2,
3,
0,
2,
3,
160,
0,
3,
4,
0,
3,
4,
0,
3,
4,
160,
0,
4,
5,
0,
4,
5,
0,
4,
5,
160,
0,
5,
1,
0,
5,
1,
0,
5,
1,
160,
1,
5,
10,
1,
5,
10,
1,
5,
10,
160,
1,
6,
2,
1,
6,
2,
1,
6,
2,
160,
1,
10,
6,
1,
10,
6,
1,
10,
6,
160,
2,
6,
7,
2,
6,
7,
2,
6,
7,
160,
2,
7,
3,
2,
7,
3,
2,
7,
3,
160,
3,
7,
8,
3,
7,
8,
3,
7,
8,
160,
3,
8,
4,
3,
8,
4,
3,
8,
4,
160,
4,
8,
9,
4,
8,
9,
4,
8,
9,
160,
4,
9,
5,
4,
9,
5,
4,
9,
5,
160,
5,
9,
10,
5,
9,
10,
5,
9,
10,
160,
6,
10,
11,
6,
10,
11,
6,
10,
11,
160,
6,
11,
7,
6,
11,
7,
6,
11,
7,
160,
7,
11,
8,
7,
11,
8,
7,
11,
8,
160,
8,
11,
9,
8,
11,
9,
8,
11,
9,
160,
9,
11,
10,
9,
11,
10,
9,
11,
10
],
"morphTargets": [],
"morphColors": [],
"uvs": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment