[
    {
        "name": "Physics",
        "comment": " Highly experimental toy physics engine in Elm.\n\nThe API is currently shaping up and will be most likely changed.\n\n\n## World\n\n@docs World, world, setGravity, addBody\n\n\n## Body\n\n@docs Body, body, setMass, addShape, rotateBy, offsetBy\n\n\n## Shape\n\n@docs Shape, box, plane\n\n\n## Physics\n\n@docs step, foldl, contacts\n\n",
        "unions": [
            {
                "name": "Body",
                "comment": " Body is a solid matter without any moving parts\n",
                "args": [],
                "cases": []
            },
            {
                "name": "Shape",
                "comment": " Shape is an integral part of a body. It is positioned in the body's coordinate system.\n\nWe support two types of shapes, a [box](#box) and a [plane](#plane).\n\n",
                "args": [],
                "cases": []
            },
            {
                "name": "World",
                "comment": " ",
                "args": [],
                "cases": []
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "addBody",
                "comment": " You can also add bodies to the world\n",
                "type": "Body -> World -> World"
            },
            {
                "name": "addShape",
                "comment": " Adds [shapes](#Shape) to the body. For example, call this to add a box:\n\n    body\n        |> addShape (box (vec3 1 1 1))\n\n",
                "type": "Shape -> Body -> Body"
            },
            {
                "name": "body",
                "comment": " This gives you an empty body, add shapes to turn it into smth meaningful\n",
                "type": "Body"
            },
            {
                "name": "box",
                "comment": " A box shape defined by its half extends. To create a 2x2 box, call this:\n\n    box (vec3 1 1 1)\n\n",
                "type": "Vec3 -> Shape"
            },
            {
                "name": "contacts",
                "comment": " Get the contact points in the world for visual debugging\n",
                "type": "World -> List Vec3"
            },
            {
                "name": "foldl",
                "comment": " Fold over each shape in the world. Use this to convert shapes into visual representation, e.g. WebGL entities.\n\n    entities =\n        foldl\n        ({ transform, bodyId, shapeId } currentEntities ->\n            makeEntity transform bodyId shapeId :: currentEntities\n        )\n        []\n        world\n\n  - `transform` is a transformation matrix that offsets and rotates a shape into the world coorditantes\n\n  - `bodyId` is an id of a body the shape belongs to, each new body in the world gets and id starting from 0\n\n  - `shapeId` is an id of the shape, each new shape in a body gets and id starting from 0\n\nUse `bodyId` and `shapeId` to link additional information from the outside of the engine, e.g. which mesh to render\nor what color should this shape be.\n\n",
                "type": "({ transform : Mat4, bodyId : BodyId, shapeId : ShapeId } -> a -> a) -> a -> World -> a"
            },
            {
                "name": "offsetBy",
                "comment": " Move the body from its current position\n",
                "type": "Vec3 -> Body -> Body"
            },
            {
                "name": "plane",
                "comment": " A plane shape, with a normal pointing in the direction of the z axis\n",
                "type": "Shape"
            },
            {
                "name": "rotateBy",
                "comment": " Rotate the body around the axis by a specific angle from its current orientation\n",
                "type": "Vec3 -> Float -> Body -> Body"
            },
            {
                "name": "setGravity",
                "comment": " Call it to set the world's gravity,\ncause by default it's an open space\n\n    world\n        |> setGravity (vec3 0 0 -10)\n\n",
                "type": "Vec3 -> World -> World"
            },
            {
                "name": "setMass",
                "comment": " After creating a body, you have to give it a mass. Bodies without mass don't move!\n",
                "type": "Float -> Body -> Body"
            },
            {
                "name": "step",
                "comment": " Simulate the world, given the time delta since the last step.\n\nCall this function on a message from the AnimationFrame subscription!\n\n",
                "type": "Time -> World -> World"
            },
            {
                "name": "world",
                "comment": " Let be the new world!\n",
                "type": "World"
            }
        ],
        "binops": []
    }
]