Skip to main content

material_v1_0.json

material.json Copy Json { "$schema": "http://json-schema.org/draft-04/schema#", "definitions": { "texture_map": { "type": "object"...

material_v1_0.json

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "texture_map": {
      "type": "object",
      "properties": {
        "image_path": {
          "type": "string",
          "default": ""
        },
        "tile_mode": {
          "enum": [
            "normal",
            "auto_size",
            "mirror_x",
            "mirror_y",
            "mirror_xy"
          ]
        },
        "rotation_angle": {
          "type": "number"
        },
        "layout_angle": {
          "type": "number"
        },
        "dpi": {
          "type": "integer",
          "minimum": 0
        },
        "dpi_h": {
          "type": "integer",
          "minimum": 0
        },
        "crop": {
          "type": "object",
          "properties": {
            "x": {
              "type": "number",
              "minimum": 0
            },
            "y": {
              "type": "number",
              "minimum": 0
            },
            "width": {
              "type": "number",
              "minimum": 0
            },
            "height": {
              "type": "number",
              "minimum": 0
            }
          },
          "required": [
            "x",
            "y",
            "width",
            "height"
          ]
        },
        "mip_map": {
          "type": "boolean"
        },
        "flip_x": {
          "type": "boolean"
        },
        "flip_y": {
          "type": "boolean"
        }
      },
      "required": [
        "image_path"
      ]
    },
    "diffuse": {
      "type": "object",
      "properties": {
        "texture_map": {
          "$ref": "#/definitions/texture_map"
        },
        "color": {
          "$ref": "../color/color.json"
        },
        "blend_mode": {
          "enum": [
            "overlay",
            "multiply",
            "recolor"
          ]
        }
      },
      "required": [
        "texture_map"
      ]
    },
    "specular": {
      "type": "object",
      "properties": {
        "texture_map": {
          "$ref": "#/definitions/texture_map"
        },
        "color": {
          "$ref": "../color/color.json"
        },
        "spread": {
          "type": "number"
        }
      },
      "required": [
        "spread",
        "color"
      ]
    },
    "normal": {
      "type": "object",
      "properties": {
        "texture_map": {
          "$ref": "#/definitions/texture_map"
        },
        "depth": {
          "type": "number"
        }
      },
      "required": [
        "texture_map",
        "depth"
      ]
    },
    "channel": {
      "type": "object",
      "properties": {
        "diffuse": {
          "$ref": "#/definitions/diffuse"
        },
        "specular": {
          "$ref": "#/definitions/specular"
        },
        "normal": {
          "$ref": "#/definitions/normal"
        }
      },
      "required": [
        "diffuse"
      ]
    },
    "vect3d": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "z": {
          "type": "number"
        }
      },
      "required": [
        "x",
        "y",
        "z"
      ]
    },
    "marker": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "pos": {
          "$ref": "#/definitions/vect3d"
        }
      },
      "required": [
        "pos",
        "name"
      ]
    },
    "edge": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "markers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/marker"
          },
          "minimum": 2
        }
      },
      "required": [
        "name"
      ]
    }
  },
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "type": {
          "enum": [
            "fabric",
            "seam",
            "artwork",
            "trim",
            "trim_edge"
          ]
        },
        "channel": {
          "$ref": "#/definitions/channel"
        },
        "diffuse": {
          "$ref": "#/definitions/diffuse"
        },
        "specular": {
          "$ref": "#/definitions/specular"
        },
        "normal": {
          "$ref": "#/definitions/normal"
        },
        "physics": {
          "$ref": "physics.json"
        },
        "print_execution": {
          "type": "string"
        },
        "metadata": {
          "type": "object"
        },
        "transparency": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "user_information": {
          "type": "string"
        },
        "hide_background": {
          "type": "boolean"
        }
      },
      "required": [
        "name",
        "type"
      ]
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "enum": [
            "trim3d"
          ]
        },
        "channels": {
          "type": "array",
          "items": {
            "channel": {
              "$ref": "#/definitions/channel"
            }
          }
        },
        "path": {
          "type": "string"
        },
        "mass": {
          "type": "number",
          "minimum": 0
        },
        "up_axis": {
          "type": "integer"
        },
        "front_axis": {
          "type": "integer"
        },
        "mirror": {
          "type": "boolean"
        },
        "scale": {
          "$ref": "#/definitions/vect3d"
        },
        "metadata": {
          "type": "object"
        },
        "markers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/marker"
          }
        },
        "edges": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/edge"
          }
        },
        "transparency": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "user_information": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "type",
        "path"
      ]
    }
  ]
}

Did this answer your question?