-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
First we need to define a JSON input format, easiest that comes to mind is:
- list of vertices
- list of normals
- list of groups
Each group will have
- material
- patch type
- list of patches
Each patch will have
- ordered list of indices for the patch type
Example
{
vertices: [
{-1, 1, 1 },
{ 1, 1, 1 },
{ 1, 1, -1 },
{-1, 1, -1 },
{-1, -1, 1 },
{ 1, -1, 1 },
{ 1, -1, -1 },
{-1, -1, -1 }
],
geometry: [
{
material: { diffuse: { 1, 1, 1 } },
type: "quadrilateral",
degree: 1,
patches: [
{ 0, 1, 2, 3 },
{ 7, 6, 5, 4 },
{ 1, 5, 6, 2 },
{ 2, 6, 7, 3 },
{ 3, 7, 4, 0 },
{ 0, 4, 5, 1 },
]
}
]
}
Reactions are currently unavailable