{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openvisual.org/schema/palinopsia/1.0",
  "title": "OVS: Palinopsia",
  "description": "Trailing or ghost afterimages of moving or stationary objects. Characteristic of VSS and certain neurological conditions.",
  "allOf": [
    { "$ref": "https://openvisual.org/schema/symptom-base/1.0" },
    {
      "type": "object",
      "properties": {
        "ovs_type":        { "const": "ovs:palinopsia" },
        "subtype":         { "type": "string", "enum": ["illusory", "hallucinatory"], "description": "Illusory: brief normal afterimages. Hallucinatory: vivid, long-lasting." },
        "shape":           { "type": "string", "enum": ["circle", "soft_box"], "description": "Spatial extent of the afterimage region" },
        "trail_layers":    { "type": "integer", "minimum": 0, "description": "Number of ghost trail copies behind moving objects" },
        "trail_alpha":     { "type": "number",  "minimum": 0, "maximum": 1, "description": "Trail opacity" },
        "trail_fade_rate": { "type": "number",  "minimum": 0, "maximum": 1, "description": "Exponential opacity decay rate per frame" },
        "trail_color_rgba":{ "type": "string",  "description": "Trail tint color" },
        "ghost_count":     { "type": "integer", "minimum": 0, "description": "Number of persistent stationary ghost copies" },
        "ghost_alpha":     { "type": "number",  "minimum": 0, "maximum": 1, "description": "Ghost opacity" },
        "ghost_life_sec":  { "type": "number",  "minimum": 0, "description": "Ghost lifetime in seconds" },
        "manual_angle_deg":{ "type": "number",  "description": "Manual direction override for ghost projection in degrees" },
        "motion_weight":   { "type": "number",  "minimum": 0, "maximum": 1, "description": "How strongly motion direction influences ghost projection" },
        "rotation_deg":    { "type": "number",  "description": "Rotation of the afterimage region in degrees" }
      }
    }
  ]
}
