{
  "id": "puzzle",
  "calls": [
    {
      "name": "aether_actors_add",
      "arguments": {
        "actors": [
          {
            "id": "player",
            "name": "Player",
            "kind": "cube",
            "position": [
              0,
              1,
              0
            ],
            "color": "#e5bb53",
            "group": "Example",
            "scale": [
              1,
              1,
              1
            ]
          },
          {
            "id": "ground",
            "name": "Ground",
            "kind": "cube",
            "position": [
              0,
              -0.5,
              0
            ],
            "color": "#243c50",
            "group": "Example",
            "scale": [
              1,
              1,
              1
            ]
          },
          {
            "id": "switch0",
            "name": "Switch 1",
            "kind": "cube",
            "position": [
              -4,
              1,
              0
            ],
            "color": "#60afdf",
            "group": "Example",
            "scale": [
              1,
              1,
              1
            ]
          },
          {
            "id": "switch1",
            "name": "Switch 2",
            "kind": "cube",
            "position": [
              0,
              1,
              0
            ],
            "color": "#b494e0",
            "group": "Example",
            "scale": [
              1,
              1,
              1
            ]
          },
          {
            "id": "switch2",
            "name": "Switch 3",
            "kind": "cube",
            "position": [
              4,
              1,
              0
            ],
            "color": "#e7b967",
            "group": "Example",
            "scale": [
              1,
              1,
              1
            ]
          }
        ]
      }
    },
    {
      "name": "aether_model_compose",
      "arguments": {
        "actor_id": "player",
        "recipe": {
          "shapes": [
            {
              "kind": "box",
              "min": [
                -0.5,
                -0.5,
                -0.5
              ],
              "max": [
                0.5,
                0.5,
                0.5
              ]
            }
          ]
        }
      }
    },
    {
      "name": "aether_model_compose",
      "arguments": {
        "actor_id": "ground",
        "recipe": {
          "shapes": [
            {
              "kind": "box",
              "min": [
                -12,
                -0.5,
                -8
              ],
              "max": [
                12,
                0.5,
                8
              ]
            }
          ]
        }
      }
    },
    {
      "name": "aether_model_compose",
      "arguments": {
        "actor_id": "switch0",
        "recipe": {
          "shapes": [
            {
              "kind": "box",
              "min": [
                -1,
                -1,
                -1
              ],
              "max": [
                1,
                1,
                1
              ]
            }
          ]
        }
      }
    },
    {
      "name": "aether_model_compose",
      "arguments": {
        "actor_id": "switch1",
        "recipe": {
          "shapes": [
            {
              "kind": "box",
              "min": [
                -1,
                -1,
                -1
              ],
              "max": [
                1,
                1,
                1
              ]
            }
          ]
        }
      }
    },
    {
      "name": "aether_model_compose",
      "arguments": {
        "actor_id": "switch2",
        "recipe": {
          "shapes": [
            {
              "kind": "box",
              "min": [
                -1,
                -1,
                -1
              ],
              "max": [
                1,
                1,
                1
              ]
            }
          ]
        }
      }
    },
    {
      "name": "aether_gameplay_apply",
      "arguments": {
        "program": {
          "version": 1,
          "scriptModules": [],
          "components": [],
          "animationControllers": [],
          "widgets": [],
          "randomSeed": 1,
          "title": "Three switches",
          "description": "Light all three switches. Each key toggles two switches. Use 1, 2 and 3. All state changes and animation are authored rules.",
          "variables": {
            "a": 0,
            "b": 0,
            "c": 0,
            "moves": 0,
            "won": 0
          },
          "rules": [
            {
              "name": "Switch one",
              "event": "key",
              "key": "Digit1",
              "when": 1,
              "set": [
                {
                  "variable": "a",
                  "value": "1-a"
                },
                {
                  "variable": "b",
                  "value": "1-b"
                },
                {
                  "variable": "moves",
                  "value": "moves+1"
                }
              ],
              "actions": []
            },
            {
              "name": "Switch two",
              "event": "key",
              "key": "Digit2",
              "when": 1,
              "set": [
                {
                  "variable": "b",
                  "value": "1-b"
                },
                {
                  "variable": "c",
                  "value": "1-c"
                },
                {
                  "variable": "moves",
                  "value": "moves+1"
                }
              ],
              "actions": []
            },
            {
              "name": "Switch three",
              "event": "key",
              "key": "Digit3",
              "when": 1,
              "set": [
                {
                  "variable": "a",
                  "value": "1-a"
                },
                {
                  "variable": "b",
                  "value": "1-b"
                },
                {
                  "variable": "c",
                  "value": "1-c"
                },
                {
                  "variable": "moves",
                  "value": "moves+1"
                }
              ],
              "actions": []
            },
            {
              "name": "All lit",
              "event": "tick",
              "when": "a && b && c",
              "set": [
                {
                  "variable": "won",
                  "value": 1
                }
              ],
              "actions": []
            }
          ],
          "prefabs": [],
          "sounds": [],
          "sensors": [],
          "bindings": [
            {
              "actorId": "player",
              "position": [
                0,
                -5,
                0
              ],
              "rotation": [
                0,
                0,
                0
              ],
              "scale": [
                1,
                1,
                1
              ],
              "visible": 0
            },
            {
              "actorId": "switch0",
              "position": [
                -4,
                "1+a*2",
                0
              ],
              "rotation": [
                0,
                "time*a",
                0
              ],
              "scale": [
                1,
                1,
                1
              ],
              "visible": 1
            },
            {
              "actorId": "switch1",
              "position": [
                0,
                "1+b*2",
                0
              ],
              "rotation": [
                0,
                "time*b",
                0
              ],
              "scale": [
                1,
                1,
                1
              ],
              "visible": 1
            },
            {
              "actorId": "switch2",
              "position": [
                4,
                "1+c*2",
                0
              ],
              "rotation": [
                0,
                "time*c",
                0
              ],
              "scale": [
                1,
                1,
                1
              ],
              "visible": 1
            }
          ],
          "camera": {
            "actorId": "ground",
            "mode": "fixed",
            "offset": [
              0,
              10,
              18
            ],
            "lookAt": [
              0,
              2,
              0
            ],
            "alternateOffset": [
              0,
              1,
              0
            ],
            "alternateLookAt": [
              0,
              1,
              -100
            ],
            "switchKey": "",
            "smoothing": 5,
            "far": 10000,
            "pointerLock": false
          },
          "menu": [],
          "hud": [
            {
              "label": "Switch 1",
              "value": "a",
              "decimals": 0,
              "suffix": ""
            },
            {
              "label": "Switch 2",
              "value": "b",
              "decimals": 0,
              "suffix": ""
            },
            {
              "label": "Switch 3",
              "value": "c",
              "decimals": 0,
              "suffix": ""
            },
            {
              "label": "Moves",
              "value": "moves",
              "decimals": 0,
              "suffix": ""
            }
          ],
          "messages": [
            {
              "when": "won",
              "text": "All switches are lit. Puzzle complete."
            }
          ],
          "points": [],
          "boxes": [],
          "controls": [
            {
              "label": "Switch 1",
              "code": "Digit1"
            },
            {
              "label": "Switch 2",
              "code": "Digit2"
            },
            {
              "label": "Switch 3",
              "code": "Digit3"
            }
          ],
          "pauseWhen": "won"
        }
      }
    }
  ]
}