{
    "effectName": "Warp",
    "description": "The warp effect distorts the pixels in the layers below it. The Canvas option in Layer Blending must be enabled for it to work.",
    "canvasMode": true,
    "properties": [
        {
            "id": "Warp_Type",
            "label": "Warp Type",
            "description": "The distortion algorithm applied to pixels from lower layers. Options include water drops, dissolve, circle reveal, swirls, ripples, mirroring, copying, and flipping.",
            "type": "enum",
            "controlType": "choice",
            "options": [
                "water drops",
                "dissolve",
                "circle reveal",
                "banded swirl",
                "ripple",
                "single water drop",
                "circular swirl",
                "drop",
                "wavy",
                "sample on",
                "mirror",
                "copy",
                "flip",
                "speed"
            ],
            "default": "water drops"
        },
        {
            "id": "Warp_Treatment_APPLYLAST",
            "label": "Treatment",
            "description": "Controls how the warp intensity changes over the effect duration. Constant maintains full distortion, In ramps from none to full, and Out ramps from full to none.",
            "type": "enum",
            "controlType": "choice",
            "options": [
                "constant",
                "in",
                "out"
            ],
            "default": "constant"
        },
        {
            "id": "Warp_X",
            "label": "X",
            "description": "Horizontal position of the warp center point or focal area, as a percentage of the buffer width.",
            "type": "int",
            "controlType": "slider",
            "default": 50,
            "min": 0,
            "max": 100,
            "valueCurve": true
        },
        {
            "id": "Warp_Y",
            "label": "Y",
            "description": "Vertical position of the warp center point or focal area, as a percentage of the buffer height.",
            "type": "int",
            "controlType": "slider",
            "default": 50,
            "min": 0,
            "max": 100,
            "valueCurve": true
        },
        {
            "id": "Warp_Cycle_Count",
            "label": "Cycle Count",
            "description": "Number of times the warp animation repeats over the effect duration. Higher values make the distortion cycle faster.",
            "type": "int",
            "controlType": "slider",
            "default": 1,
            "min": 1,
            "max": 10,
            "settingPrefix": "TEXTCTRL"
        },
        {
            "id": "Warp_Speed",
            "label": "Speed",
            "description": "Controls the rate at which the warp distortion animates. Higher values produce faster-moving distortion patterns.",
            "type": "int",
            "controlType": "slider",
            "default": 20,
            "min": 0,
            "max": 40,
            "settingPrefix": "TEXTCTRL"
        },
        {
            "id": "Warp_Frequency",
            "label": "Frequency",
            "description": "Controls the spatial frequency of the distortion pattern. Higher values create tighter, more closely spaced ripples or waves.",
            "type": "int",
            "controlType": "slider",
            "default": 20,
            "min": 0,
            "max": 40,
            "settingPrefix": "TEXTCTRL"
        }
    ],
    "visibilityRules": [
        {
            "when": { "property": "Warp_Type", "notOneOf": ["dissolve", "drop", "wavy"] },
            "enable": ["Warp_X"]
        },
        {
            "when": { "property": "Warp_Type", "notOneOf": ["dissolve", "drop", "wavy", "speed"] },
            "enable": ["Warp_Y"]
        },
        {
            "when": {
                "allOf": [
                    { "property": "Warp_Type", "notOneOf": ["water drops", "wavy", "sample on", "mirror", "transpose", "speed"] },
                    { "property": "Warp_Treatment_APPLYLAST", "equals": "constant" }
                ]
            },
            "enable": ["Warp_Cycle_Count"]
        },
        {
            "when": { "property": "Warp_Type", "oneOf": ["water drops", "ripple", "circular swirl", "wavy"] },
            "enable": ["Warp_Speed"]
        },
        {
            "when": { "property": "Warp_Type", "oneOf": ["banded swirl", "ripple"] },
            "enable": ["Warp_Frequency"]
        }
    ]
}
