{
  "id": "platform",
  "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": "pickup",
            "name": "Collectible",
            "kind": "cube",
            "position": [
              4,
              2,
              0
            ],
            "color": "#73e5c5",
            "group": "Example",
            "scale": [
              1,
              1,
              1
            ]
          },
          {
            "id": "goal",
            "name": "Goal",
            "kind": "cube",
            "position": [
              9,
              1,
              0
            ],
            "color": "#9b8ce9",
            "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": "pickup",
        "recipe": {
          "shapes": [
            {
              "kind": "box",
              "min": [
                -0.325,
                -0.325,
                -0.325
              ],
              "max": [
                0.325,
                0.325,
                0.325
              ]
            }
          ]
        }
      }
    },
    {
      "name": "aether_model_compose",
      "arguments": {
        "actor_id": "goal",
        "recipe": {
          "shapes": [
            {
              "kind": "box",
              "min": [
                -0.5,
                -1,
                -1
              ],
              "max": [
                0.5,
                1,
                1
              ]
            }
          ]
        }
      }
    },
    {
      "name": "aether_gameplay_apply",
      "arguments": {
        "program": {
          "version": 1,
          "scriptModules": [],
          "components": [],
          "animationControllers": [],
          "widgets": [],
          "randomSeed": 1,
          "title": "Jump & collect",
          "description": "Collect the green cube, then reach the purple gate. Move with A/D and jump with Space. The rules, camera and HUD are editable in Gameplay.",
          "variables": {
            "x": 0,
            "y": 0.5,
            "vy": 0,
            "speed": 4,
            "coins": 0,
            "won": 0
          },
          "rules": [
            {
              "name": "Jump",
              "event": "key",
              "key": "Space",
              "when": "y<=0.501",
              "set": [
                {
                  "variable": "vy",
                  "value": 7
                }
              ],
              "actions": []
            },
            {
              "name": "Horizontal movement",
              "event": "tick",
              "when": 1,
              "set": [
                {
                  "variable": "x",
                  "value": "clamp(x+(input.KeyD-input.KeyA)*speed*dt,-10,10)"
                }
              ],
              "actions": []
            },
            {
              "name": "Gravity",
              "event": "tick",
              "when": 1,
              "set": [
                {
                  "variable": "vy",
                  "value": "vy-18*dt"
                },
                {
                  "variable": "y",
                  "value": "max(0.5,y+vy*dt)"
                }
              ],
              "actions": []
            },
            {
              "name": "Ground contact",
              "event": "tick",
              "when": "y<=0.5",
              "set": [
                {
                  "variable": "vy",
                  "value": 0
                }
              ],
              "actions": []
            },
            {
              "name": "Collect",
              "event": "tick",
              "when": "hypot(x-4,y-2)<1.2",
              "set": [
                {
                  "variable": "coins",
                  "value": 1
                }
              ],
              "actions": []
            },
            {
              "name": "Goal",
              "event": "tick",
              "when": "coins==1 && x>8",
              "set": [
                {
                  "variable": "won",
                  "value": 1
                }
              ],
              "actions": []
            }
          ],
          "prefabs": [],
          "sounds": [],
          "sensors": [],
          "bindings": [
            {
              "actorId": "player",
              "position": [
                "x",
                "y",
                0
              ],
              "rotation": [
                0,
                0,
                0
              ],
              "scale": [
                1,
                1,
                1
              ],
              "visible": 1
            },
            {
              "actorId": "pickup",
              "position": [
                4,
                2,
                0
              ],
              "rotation": [
                0,
                0,
                0
              ],
              "scale": [
                1,
                1,
                1
              ],
              "visible": "coins==0"
            }
          ],
          "camera": {
            "actorId": "player",
            "mode": "fixed",
            "offset": [
              0,
              10,
              18
            ],
            "lookAt": [
              0,
              0,
              0
            ],
            "alternateOffset": [
              0,
              1,
              0
            ],
            "alternateLookAt": [
              0,
              1,
              -100
            ],
            "switchKey": "",
            "smoothing": 5,
            "far": 10000,
            "pointerLock": false
          },
          "menu": [
            {
              "label": "Movement speed",
              "options": [
                {
                  "label": "Standard",
                  "description": "",
                  "set": {
                    "speed": 4
                  }
                },
                {
                  "label": "Fast",
                  "description": "",
                  "set": {
                    "speed": 6
                  }
                }
              ]
            }
          ],
          "hud": [
            {
              "label": "Collectibles",
              "value": "coins",
              "decimals": 0,
              "suffix": "/ 1"
            },
            {
              "label": "Position",
              "value": "x",
              "decimals": 1,
              "suffix": ""
            }
          ],
          "messages": [
            {
              "when": "won",
              "text": "Complete! You collected the cube and reached the goal."
            }
          ],
          "points": [],
          "boxes": [],
          "controls": [
            {
              "label": "Left",
              "code": "KeyA"
            },
            {
              "label": "Right",
              "code": "KeyD"
            },
            {
              "label": "Jump",
              "code": "Space"
            }
          ],
          "pauseWhen": "won"
        }
      }
    }
  ]
}