Last active
November 6, 2015 12:21
-
-
Save satori99/37e7e2c3318123efa0b9 to your computer and use it in GitHub Desktop.
BufferGeometry Cube with MultiMaterial faces
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
{ | |
"metadata": { | |
"version": 4.3, | |
"type": "Object", | |
"description": "BufferGeometry Cube Mesh with 6 Materials" | |
}, | |
"object": { | |
"uuid": "89529CC6-CBAC-412F-AFD1-FEEAE785BA19", | |
"name": "Cube", | |
"type": "Mesh", | |
"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1], | |
"geometry": "C3BF1E70-0BE7-4E6D-B184-C9F1E84A3423", | |
"material": "87D95D6C-6BB4-4B8F-8166-A3A6945BFF00", | |
"children": [ | |
] | |
}, | |
"geometries": [ | |
{ | |
"uuid": "C3BF1E70-0BE7-4E6D-B184-C9F1E84A3423", | |
"type": "BufferGeometry", | |
"data": { | |
"attributes": { | |
"position": { | |
"itemSize": 3, | |
"type": "Float32Array", | |
"array": [ | |
-1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, | |
1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, | |
1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, | |
-1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, | |
-1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, | |
-1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1 | |
] | |
}, | |
"normal": { | |
"itemSize": 3, | |
"type": "Float32Array", | |
"array": [ | |
0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, | |
1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, | |
0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, | |
-1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, | |
0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, | |
0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0 | |
] | |
}, | |
"uv": { | |
"itemSize": 2, | |
"type": "Float32Array", | |
"array": [ | |
0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, | |
0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, | |
0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, | |
0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, | |
0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, | |
0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0 | |
] | |
} | |
}, | |
"index": { | |
"itemSize": 1, | |
"type": "Uint32Array", | |
"array": [ | |
0, 1, 2, 2, 3, 0, | |
4, 5, 6, 6, 7, 4, | |
8, 9, 10, 10, 11, 8, | |
12, 13, 14, 14, 15, 12, | |
16, 17, 18, 18, 19, 16, | |
20, 21, 22, 22, 23, 20 | |
] | |
}, | |
"groups": [ | |
{ "start": 0, "count": 6, "materialIndex": 0 }, | |
{ "start": 6, "count": 6, "materialIndex": 1 }, | |
{ "start": 12, "count": 6, "materialIndex": 2 }, | |
{ "start": 18, "count": 6, "materialIndex": 3 }, | |
{ "start": 24, "count": 6, "materialIndex": 4 }, | |
{ "start": 30, "count": 6, "materialIndex": 5 } | |
], | |
"boundingSphere": { | |
"center": [ 0, 0, 0 ], | |
"radius": 1.414214 | |
} | |
} | |
} | |
], | |
"materials": [ | |
{ | |
"uuid": "87D95D6C-6BB4-4B8F-8166-A3A6945BFF00", | |
"type": "MultiMaterial", | |
"materials": [ | |
{ | |
"uuid": "87D95D6C-6BB4-4B8F-8166-A3A6945BFF01", | |
"type": "MeshPhongMaterial", | |
"color": 16724787, | |
"specular": 3355443, | |
"shininess": 15 | |
}, | |
{ | |
"uuid": "87D95D6C-6BB4-4B8F-8166-A3A6945BFF02", | |
"type": "MeshPhongMaterial", | |
"color": 3407667, | |
"specular": 3355443, | |
"shininess": 15 | |
}, | |
{ | |
"uuid": "87D95D6C-6BB4-4B8F-8166-A3A6945BFF03", | |
"type": "MeshPhongMaterial", | |
"color": 3355647, | |
"specular": 3355443, | |
"shininess": 15 | |
}, | |
{ | |
"uuid": "87D95D6C-6BB4-4B8F-8166-A3A6945BFF04", | |
"type": "MeshPhongMaterial", | |
"color": 16777011, | |
"specular": 3355443, | |
"shininess": 15 | |
}, | |
{ | |
"uuid": "87D95D6C-6BB4-4B8F-8166-A3A6945BFF05", | |
"type": "MeshPhongMaterial", | |
"color": 16724991, | |
"specular": 3355443, | |
"shininess": 15 | |
}, | |
{ | |
"uuid": "87D95D6C-6BB4-4B8F-8166-A3A6945BFF06", | |
"type": "MeshPhongMaterial", | |
"color": 3407871, | |
"specular": 3355443, | |
"shininess": 15 | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment