diff --git a/extensions/2.0/Vendor/EXT_primitive_voxels/schema/bounds.schema.json b/extensions/2.0/Vendor/EXT_primitive_voxels/schema/box.schema.json similarity index 68% rename from extensions/2.0/Vendor/EXT_primitive_voxels/schema/bounds.schema.json rename to extensions/2.0/Vendor/EXT_primitive_voxels/schema/box.schema.json index fbaefefe20..d77223606a 100644 --- a/extensions/2.0/Vendor/EXT_primitive_voxels/schema/bounds.schema.json +++ b/extensions/2.0/Vendor/EXT_primitive_voxels/schema/box.schema.json @@ -1,9 +1,9 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "bounds.schema.json", - "title": "Bounds", + "$id": "box.schema.json", + "title": "Box", "type": "object", - "description": "The bounds property describes which section of the primitive is mapped to the voxel grid. bounds.min and bounds.max specify a rectangular region of the voxel grid in the appropriate coordinate system.", + "description": "The box property indicates that the voxels conform to a box-based grid. box.min and box.max represent the corners of the box grid in local coordinates.", "allOf": [ { "$ref": "glTFProperty.schema.json" diff --git a/extensions/2.0/Vendor/EXT_primitive_voxels/schema/cylinder.schema.json b/extensions/2.0/Vendor/EXT_primitive_voxels/schema/cylinder.schema.json new file mode 100644 index 0000000000..c44f8c8c0b --- /dev/null +++ b/extensions/2.0/Vendor/EXT_primitive_voxels/schema/cylinder.schema.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "cylinder.schema.json", + "title": "Cylinder", + "type": "object", + "description": "The cylinder property indicates that the voxels conform to a cylindrical grid. Each sub-property defines the section of the cylinder that the grid actually occupies.", + "allOf": [ + { + "$ref": "glTFProperty.schema.json" + } + ], + "properties": { + "radius": { + "type": "array", + "description": "The radial extents of the cylindrical grid in local space. The elements represent the minimum and maximum values respectively.", + "items": { + "type": "number", + "minimum": 0 + }, + "minItems": 2, + "maxItems": 2 + }, + "height": { + "type": "array", + "description": "The height extents of the cylindrical grid in local space. The elements represent the minimum and maximum values respectively.", + "items": { + "type": "number" + }, + "minItems": 2, + "maxItems": 2 + }, + "angle": { + "type": "array", + "description": "The angular extents of the cylindrical grid in local space. Values must be in the range [-pi, pi]. The elements represent the minimum and maximum values respectively.", + "items": { + "type": "number" + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "radius", + "height" + ] +} \ No newline at end of file diff --git a/extensions/2.0/Vendor/EXT_primitive_voxels/schema/ellipsoid.schema.json b/extensions/2.0/Vendor/EXT_primitive_voxels/schema/ellipsoid.schema.json new file mode 100644 index 0000000000..bae98f02e7 --- /dev/null +++ b/extensions/2.0/Vendor/EXT_primitive_voxels/schema/ellipsoid.schema.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "ellipsoid.schema.json", + "title": "Ellipsoid", + "type": "object", + "description": "The ellipsoid property indicates that the voxels conform to an ellipsoidal grid. Each sub-property defines the section of the ellipsoid that the grid actually occupies.", + "allOf": [ + { + "$ref": "glTFProperty.schema.json" + } + ], + "properties": { + "radii": { + "type": "array", + "description": "The radii of the ellipsoid along the X, Y, and Z axes in the local coordinate system.", + "items": { + "type": "number", + "minimum": 0 + }, + "minItems": 3, + "maxItems": 3 + }, + "longitude": { + "type": "array", + "description": "The range along the longitude of the ellipsoid that the grid occupies. The elements represent the minimum and maximum values (west and east) respectively.", + "items": { + "type": "number", + "minimum": -180.0, + "maximum": 180.0 + }, + "minItems": 2, + "maxItems": 2 + }, + "latitude": { + "type": "array", + "description": "The range along the latitude of the ellipsoid that the grid occupies. The elements represent the minimum and maximum values (south and north) respectively.", + "items": { + "type": "number", + "minimum": -90.0, + "maximum": 90.0 + }, + "minItems": 2, + "maxItems": 2 + }, + "ratio": { + "type": "array", + "description": "The ratio along the radii of the ellipsoid that the grid occupies. The elements represent the minimum and maximum values respectively.", + "items": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "minItems": 2, + "maxItems": 2 + }, + "height": { + "type": "array", + "description": "The range of height above or below the ellipsoid that the grid occupies. Negative values are inside the ellipsoid, while positive values are outside. The elements represent the minimum and maximum values respectively.", + "items": { + "type": "number" + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "radii" + ], + "oneOf": [ + "ratio", + "height" + ] +} \ No newline at end of file diff --git a/extensions/2.0/Vendor/EXT_primitive_voxels/schema/mesh.primitive.EXT_primitive_voxels.schema.json b/extensions/2.0/Vendor/EXT_primitive_voxels/schema/mesh.primitive.EXT_primitive_voxels.schema.json index 080052b2ed..812281bda2 100644 --- a/extensions/2.0/Vendor/EXT_primitive_voxels/schema/mesh.primitive.EXT_primitive_voxels.schema.json +++ b/extensions/2.0/Vendor/EXT_primitive_voxels/schema/mesh.primitive.EXT_primitive_voxels.schema.json @@ -20,15 +20,25 @@ "minItems": 3, "maxItems": 3 }, - "bounds": { - "$ref": "bounds.schema.json" + "box": { + "$ref": "box.schema.json" + }, + "cylinder": { + "$ref": "cylinder.schema.json" + }, + "ellipsoid": { + "$ref": "ellipsoid.schema.json" }, "padding": { "$ref": "padding.schema.json" } }, "required": [ - "dimension", - "bounds" + "dimensions" + ], + "oneOf": [ + { "required": [ "box" ] }, + { "required": [ "cylinder" ] }, + { "required": [ "ellipsoid" ] } ] } \ No newline at end of file