init
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"$id": "https://github.com/mikedh/trimesh/blob/main/trimesh/resources/schema/primitive/box.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"additionalProperties": false,
|
||||
"description": "A 3D box primitive.",
|
||||
"properties": {
|
||||
"extents": {
|
||||
"description": "The length of each side of the 3D box. The center of mass will be at the origin, and the minimum values will be at (-extents / 2) and the maximum values will be at (extents / 2).",
|
||||
"items": {
|
||||
"maxItems": 3,
|
||||
"minItems": 3,
|
||||
"type": "number"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"kind": {
|
||||
"pattern": "(^box$)",
|
||||
"type": "string"
|
||||
},
|
||||
"transform": {
|
||||
"$ref": "transform.schema.json"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"extents",
|
||||
"kind"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"$id": "https://github.com/mikedh/trimesh/blob/main/trimesh/resources/schema/primitive/capsule.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"additionalProperties": false,
|
||||
"description": "A 3D capsule primitive: a cylinder capped by tangent hemispheres.",
|
||||
"properties": {
|
||||
"height": {
|
||||
"description": "The total height of the capsule including caps.",
|
||||
"type": "number"
|
||||
},
|
||||
"kind": {
|
||||
"pattern": "(^capsule$)",
|
||||
"type": "string"
|
||||
},
|
||||
"radius": {
|
||||
"description": "The radius of the cylinder and hemispherical caps.",
|
||||
"type": "number"
|
||||
},
|
||||
"transform": {
|
||||
"$ref": "transform.schema.json"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"radius",
|
||||
"height",
|
||||
"kind"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"$id": "https://github.com/mikedh/trimesh/blob/main/trimesh/resources/schema/primitive/cylinder.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"additionalProperties": false,
|
||||
"description": "A 3D cylinder primitive.",
|
||||
"properties": {
|
||||
"height": {
|
||||
"description": "The height of the cylinder along Z. The maximum Z value will be at (height / 2) and the minimum will be at (-height / 2)",
|
||||
"type": "number"
|
||||
},
|
||||
"kind": {
|
||||
"pattern": "(^cylinder$)",
|
||||
"type": "string"
|
||||
},
|
||||
"radius": {
|
||||
"description": "The radius of the cylinder.",
|
||||
"type": "number"
|
||||
},
|
||||
"transform": {
|
||||
"$ref": "transform.schema.json"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"radius",
|
||||
"height",
|
||||
"kind"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"$id": "https://github.com/mikedh/trimesh/blob/main/trimesh/resources/schema/primitive/extrusion.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"additionalProperties": false,
|
||||
"description": "A 2D polygon extruded from Z=0 along positive Z by `height` then transformed by the `transform` matrix.",
|
||||
"properties": {
|
||||
"height": {
|
||||
"type": "number"
|
||||
},
|
||||
"kind": {
|
||||
"pattern": "(^extrusion$)",
|
||||
"type": "string"
|
||||
},
|
||||
"polygon": {
|
||||
"$ref": "wkt.polygon.schema.json"
|
||||
},
|
||||
"transform": {
|
||||
"$ref": "transform.schema.json"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"polygon",
|
||||
"height"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"$id": "https://github.com/mikedh/trimesh/blob/main/trimesh/resources/schema/primitive/primitive.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "box.schema.json"
|
||||
},
|
||||
{
|
||||
"$ref": "sphere.schema.json"
|
||||
},
|
||||
{
|
||||
"$ref": "capsule.schema.json"
|
||||
},
|
||||
{
|
||||
"$ref": "cylinder.schema.json"
|
||||
},
|
||||
{
|
||||
"$ref": "extrusion.schema.json"
|
||||
}
|
||||
],
|
||||
"description": "A geometric primitive."
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"$id": "https://github.com/mikedh/trimesh/blob/main/trimesh/resources/schema/primitive/scenegraph.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
|
||||
"description": "A scene graph in the simplest possible JSON format.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"prefixItems": [
|
||||
{ "type": "string", "description": "Node name of frame from." },
|
||||
{ "type": "string", "description": "Node name of frame to." },
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"geometry": {
|
||||
"type": "string",
|
||||
"description": "Name of the geometry transformed to this frame."
|
||||
},
|
||||
"matrix": { "$ref": "transform.schema.json" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"$id": "https://github.com/mikedh/trimesh/blob/main/trimesh/resources/schema/primitive/sphere.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"additionalProperties": false,
|
||||
"description": "A 3D sphere primitive.",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"pattern": "(^sphere$)",
|
||||
"type": "string"
|
||||
},
|
||||
"radius": {
|
||||
"type": "number"
|
||||
},
|
||||
"transform": {
|
||||
"$ref": "transform.schema.json"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"radius",
|
||||
"kind"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"$id": "https://github.com/mikedh/trimesh/blob/main/trimesh/resources/schema/primitive/transform.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"description": "A homogeneous transformation matrix. If not passed it is assumed to be an identity matrix ",
|
||||
"items": {
|
||||
"items": {
|
||||
"maxItems": 4,
|
||||
"minItems": 4,
|
||||
"type": "number"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4,
|
||||
"type": "array"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"$id": "https://github.com/mikedh/trimesh/blob/main/trimesh/resources/schema/primitive/trimesh.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"additionalProperties": false,
|
||||
"description": "A 3D triangular mesh in the simplest possible JSON format.",
|
||||
"properties": {
|
||||
"faces": {
|
||||
"items": {
|
||||
"items": {
|
||||
"maxItems": 3,
|
||||
"minItems": 3,
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"kind": {
|
||||
"pattern": "(^trimesh$)",
|
||||
"type": "string"
|
||||
},
|
||||
"vertices": {
|
||||
"items": {
|
||||
"items": {
|
||||
"maxItems": 3,
|
||||
"minItems": 3,
|
||||
"type": "number"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"vertices",
|
||||
"faces"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"$id": "https://github.com/mikedh/trimesh/blob/main/trimesh/resources/schema/primitive/wkt.polygon.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"description": "A single polygon in the Well Known Text format (WKT).",
|
||||
"pattern": " *POLYGON *\\( *\\( *([+-]?([0-9]*[.])?[0-9]+ *[+-]?([0-9]*[.])?[0-9]+ *,* *)*\\) *\\) *",
|
||||
"type": "string"
|
||||
}
|
||||
Reference in New Issue
Block a user