{
    "patcher": {
        "fileversion": 1,
        "appversion": {
            "major": 9,
            "minor": 3,
            "revision": 0,
            "architecture": "x64",
            "modernui": 1
        },
        "classnamespace": "box",
        "rect": [ 607.0, 95.0, 575.0, 666.0 ],
        "integercoordinates": 1,
        "boxes": [
            {
                "box": {
                    "id": "obj-16",
                    "maxclass": "newobj",
                    "numinlets": 1,
                    "numoutlets": 1,
                    "outlettype": [ "jit_gl_texture" ],
                    "patcher": {
                        "fileversion": 1,
                        "appversion": {
                            "major": 9,
                            "minor": 3,
                            "revision": 0,
                            "architecture": "x64",
                            "modernui": 1
                        },
                        "classnamespace": "box",
                        "rect": [ 59.0, 114.0, 364.0, 475.0 ],
                        "integercoordinates": 1,
                        "boxes": [
                            {
                                "box": {
                                    "id": "obj-14",
                                    "maxclass": "message",
                                    "numinlets": 2,
                                    "numoutlets": 1,
                                    "outlettype": [ "" ],
                                    "patching_rect": [ 186.0, 308.0, 49.0, 22.0 ],
                                    "text": "adapt 0"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-12",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 2,
                                    "outlettype": [ "", "bang" ],
                                    "patching_rect": [ 175.0, 284.0, 30.0, 22.0 ],
                                    "text": "t l b"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-11",
                                    "maxclass": "newobj",
                                    "numinlets": 2,
                                    "numoutlets": 2,
                                    "outlettype": [ "", "" ],
                                    "patching_rect": [ 134.0, 151.0, 60.0, 22.0 ],
                                    "text": "zl.change"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-10",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 1,
                                    "outlettype": [ "" ],
                                    "patching_rect": [ 175.0, 260.0, 75.0, 22.0 ],
                                    "text": "prepend dim"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-9",
                                    "maxclass": "newobj",
                                    "numinlets": 2,
                                    "numoutlets": 1,
                                    "outlettype": [ "" ],
                                    "patching_rect": [ 175.0, 236.0, 37.0, 22.0 ],
                                    "text": "join 2"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-8",
                                    "maxclass": "newobj",
                                    "numinlets": 2,
                                    "numoutlets": 1,
                                    "outlettype": [ "int" ],
                                    "patching_rect": [ 193.0, 212.0, 41.0, 22.0 ],
                                    "text": "/ 2"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-7",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 3,
                                    "outlettype": [ "int", "int", "int" ],
                                    "patching_rect": [ 134.0, 175.0, 100.0, 22.0 ],
                                    "text": "unpack i i i"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-4",
                                    "maxclass": "newobj",
                                    "numinlets": 2,
                                    "numoutlets": 2,
                                    "outlettype": [ "", "" ],
                                    "patching_rect": [ 134.0, 127.0, 59.0, 22.0 ],
                                    "text": "route dim"
                                }
                            },
                            {
                                "box": {
                                    "comment": "",
                                    "id": "obj-3",
                                    "index": 1,
                                    "maxclass": "outlet",
                                    "numinlets": 1,
                                    "numoutlets": 0,
                                    "patching_rect": [ 71.0, 365.0, 30.0, 30.0 ]
                                }
                            },
                            {
                                "box": {
                                    "filename": "jitgltextureinfo.js",
                                    "id": "obj-2",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 1,
                                    "outlettype": [ "" ],
                                    "patching_rect": [ 134.0, 103.0, 100.0, 22.0 ],
                                    "saved_object_attributes": {
                                        "embed": 0,
                                        "parameter_enable": 0
                                    },
                                    "text": "jit.gl.textureinfo",
                                    "textfile": {
                                        "filename": "jitgltextureinfo.js",
                                        "flags": 0,
                                        "embed": 0,
                                        "autowatch": 1
                                    }
                                }
                            },
                            {
                                "box": {
                                    "comment": "",
                                    "id": "obj-1",
                                    "index": 1,
                                    "maxclass": "inlet",
                                    "numinlets": 0,
                                    "numoutlets": 1,
                                    "outlettype": [ "jit_gl_texture" ],
                                    "patching_rect": [ 71.0, 36.0, 30.0, 30.0 ]
                                }
                            }
                        ],
                        "lines": [
                            {
                                "patchline": {
                                    "destination": [ "obj-2", 0 ],
                                    "order": 0,
                                    "source": [ "obj-1", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-3", 0 ],
                                    "order": 1,
                                    "source": [ "obj-1", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-12", 0 ],
                                    "source": [ "obj-10", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-7", 0 ],
                                    "source": [ "obj-11", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-14", 0 ],
                                    "source": [ "obj-12", 1 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-3", 0 ],
                                    "source": [ "obj-12", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-3", 0 ],
                                    "source": [ "obj-14", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-4", 0 ],
                                    "source": [ "obj-2", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-11", 0 ],
                                    "source": [ "obj-4", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-8", 0 ],
                                    "order": 0,
                                    "source": [ "obj-7", 1 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-9", 0 ],
                                    "order": 1,
                                    "source": [ "obj-7", 1 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-9", 1 ],
                                    "source": [ "obj-8", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-10", 0 ],
                                    "source": [ "obj-9", 0 ]
                                }
                            }
                        ]
                    },
                    "patching_rect": [ 90.0, 453.0, 44.0, 22.0 ],
                    "text": "p dims"
                }
            },
            {
                "box": {
                    "attr": "overlap",
                    "id": "obj-17",
                    "maxclass": "attrui",
                    "numinlets": 1,
                    "numoutlets": 1,
                    "outlettype": [ "" ],
                    "parameter_enable": 0,
                    "patching_rect": [ 116.0, 238.0, 108.0, 22.0 ],
                    "text_width": 66.0
                }
            },
            {
                "box": {
                    "attr": "face_dim",
                    "id": "obj-15",
                    "maxclass": "attrui",
                    "numinlets": 1,
                    "numoutlets": 1,
                    "outlettype": [ "" ],
                    "parameter_enable": 0,
                    "patching_rect": [ 88.0, 209.0, 150.0, 22.0 ],
                    "text_width": 77.0
                }
            },
            {
                "box": {
                    "fontface": 0,
                    "fontname": "Arial",
                    "fontsize": 12.0,
                    "id": "obj-5",
                    "maxclass": "jit.fpsgui",
                    "mode": 3,
                    "numinlets": 1,
                    "numoutlets": 2,
                    "outlettype": [ "", "" ],
                    "patching_rect": [ 396.0, 536.0, 73.0, 35.0 ]
                }
            },
            {
                "box": {
                    "id": "obj-9",
                    "maxclass": "message",
                    "numinlets": 2,
                    "numoutlets": 1,
                    "outlettype": [ "" ],
                    "patching_rect": [ 251.0, 347.0, 68.0, 22.0 ],
                    "text": "anim_reset"
                }
            },
            {
                "box": {
                    "id": "obj-25",
                    "maxclass": "newobj",
                    "numinlets": 1,
                    "numoutlets": 0,
                    "patcher": {
                        "fileversion": 1,
                        "appversion": {
                            "major": 9,
                            "minor": 3,
                            "revision": 0,
                            "architecture": "x64",
                            "modernui": 1
                        },
                        "classnamespace": "box",
                        "rect": [ 1215.0, 183.0, 316.0, 482.0 ],
                        "integercoordinates": 1,
                        "visible": 1,
                        "boxes": [
                            {
                                "box": {
                                    "fontface": 0,
                                    "fontname": "Arial",
                                    "fontsize": 12.0,
                                    "id": "obj-7",
                                    "maxclass": "jit.fpsgui",
                                    "numinlets": 1,
                                    "numoutlets": 2,
                                    "outlettype": [ "", "" ],
                                    "patching_rect": [ 91.0, 165.0, 58.0, 35.0 ]
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-5",
                                    "maxclass": "toggle",
                                    "numinlets": 1,
                                    "numoutlets": 1,
                                    "outlettype": [ "int" ],
                                    "parameter_enable": 0,
                                    "patching_rect": [ 50.0, 94.0, 24.0, 24.0 ]
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-1",
                                    "maxclass": "newobj",
                                    "numinlets": 2,
                                    "numoutlets": 1,
                                    "outlettype": [ "" ],
                                    "patching_rect": [ 50.0, 128.0, 50.0, 22.0 ],
                                    "text": "gate"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-9",
                                    "maxclass": "comment",
                                    "numinlets": 1,
                                    "numoutlets": 0,
                                    "patching_rect": [ 135.0, 251.0, 85.0, 20.0 ],
                                    "text": "start recording"
                                }
                            },
                            {
                                "box": {
                                    "attr": "codec",
                                    "id": "obj-8",
                                    "maxclass": "attrui",
                                    "numinlets": 1,
                                    "numoutlets": 1,
                                    "outlettype": [ "" ],
                                    "parameter_enable": 0,
                                    "patching_rect": [ 115.0, 319.0, 150.0, 22.0 ],
                                    "text_width": 70.0
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-6",
                                    "maxclass": "message",
                                    "numinlets": 2,
                                    "numoutlets": 1,
                                    "outlettype": [ "" ],
                                    "patching_rect": [ 110.0, 281.0, 31.0, 22.0 ],
                                    "text": "stop"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-4",
                                    "maxclass": "message",
                                    "numinlets": 2,
                                    "numoutlets": 1,
                                    "outlettype": [ "" ],
                                    "patching_rect": [ 91.0, 251.0, 34.0, 22.0 ],
                                    "text": "write"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-2",
                                    "maxclass": "comment",
                                    "numinlets": 1,
                                    "numoutlets": 0,
                                    "patching_rect": [ 99.0, 96.0, 117.0, 20.0 ],
                                    "text": "enable the readback"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-19",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 2,
                                    "outlettype": [ "jit_matrix", "" ],
                                    "patching_rect": [ 50.0, 382.0, 100.0, 22.0 ],
                                    "text": "jit.record"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-18",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 2,
                                    "outlettype": [ "bang", "" ],
                                    "patching_rect": [ 50.0, 165.0, 30.0, 22.0 ],
                                    "text": "t b l"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-14",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 2,
                                    "outlettype": [ "jit_matrix", "" ],
                                    "patching_rect": [ 50.0, 216.0, 166.0, 22.0 ],
                                    "text": "jit.gl.asyncread @automatic 0"
                                }
                            },
                            {
                                "box": {
                                    "comment": "",
                                    "id": "obj-20",
                                    "index": 1,
                                    "maxclass": "inlet",
                                    "numinlets": 0,
                                    "numoutlets": 1,
                                    "outlettype": [ "jit_gl_texture" ],
                                    "patching_rect": [ 81.0, 53.0, 30.0, 30.0 ]
                                }
                            }
                        ],
                        "lines": [
                            {
                                "patchline": {
                                    "destination": [ "obj-18", 0 ],
                                    "order": 1,
                                    "source": [ "obj-1", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-7", 0 ],
                                    "order": 0,
                                    "source": [ "obj-1", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-19", 0 ],
                                    "source": [ "obj-14", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-14", 0 ],
                                    "source": [ "obj-18", 1 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-14", 0 ],
                                    "source": [ "obj-18", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-1", 1 ],
                                    "source": [ "obj-20", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-19", 0 ],
                                    "source": [ "obj-4", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-1", 0 ],
                                    "source": [ "obj-5", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-19", 0 ],
                                    "source": [ "obj-6", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-19", 0 ],
                                    "source": [ "obj-8", 0 ]
                                }
                            }
                        ]
                    },
                    "patching_rect": [ 320.0, 536.0, 71.0, 22.0 ],
                    "text": "p RECORD"
                }
            },
            {
                "box": {
                    "id": "obj-12",
                    "linecount": 2,
                    "maxclass": "comment",
                    "numinlets": 1,
                    "numoutlets": 0,
                    "patching_rect": [ 99.0, 165.0, 175.0, 33.0 ],
                    "text": "bang rebuilds the capture after changine any attributes"
                }
            },
            {
                "box": {
                    "id": "obj-7",
                    "linecount": 2,
                    "maxclass": "comment",
                    "numinlets": 1,
                    "numoutlets": 0,
                    "patching_rect": [ 77.0, 312.0, 115.0, 33.0 ],
                    "text": "cameras managed by v8 script"
                }
            },
            {
                "box": {
                    "id": "obj-6",
                    "maxclass": "comment",
                    "numinlets": 1,
                    "numoutlets": 0,
                    "patching_rect": [ 251.0, 290.0, 237.0, 20.0 ],
                    "text": "w, a, s, d and mouse navigates the camera"
                }
            },
            {
                "box": {
                    "id": "obj-13",
                    "maxclass": "newobj",
                    "numinlets": 2,
                    "numoutlets": 2,
                    "outlettype": [ "", "" ],
                    "patching_rect": [ 389.0, 417.0, 123.0, 22.0 ],
                    "text": "substitute name anim"
                }
            },
            {
                "box": {
                    "id": "obj-8",
                    "maxclass": "newobj",
                    "numinlets": 1,
                    "numoutlets": 2,
                    "outlettype": [ "jit_gl_texture", "" ],
                    "patcher": {
                        "fileversion": 1,
                        "appversion": {
                            "major": 9,
                            "minor": 3,
                            "revision": 0,
                            "architecture": "x64",
                            "modernui": 1
                        },
                        "classnamespace": "box",
                        "rect": [ 796.0, 362.0, 619.0, 587.0 ],
                        "integercoordinates": 1,
                        "visible": 1,
                        "boxes": [
                            {
                                "box": {
                                    "id": "obj-9",
                                    "maxclass": "comment",
                                    "numinlets": 1,
                                    "numoutlets": 0,
                                    "patching_rect": [ 115.0, 38.0, 414.0, 20.0 ],
                                    "text": "scene elements live in here, will be automatically bound to the this jit.gl.node"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-3",
                                    "maxclass": "newobj",
                                    "numinlets": 8,
                                    "numoutlets": 2,
                                    "outlettype": [ "", "" ],
                                    "patching_rect": [ 61.0, 205.0, 119.0, 22.0 ],
                                    "text": "jit.gl.pbr @override 0"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-2",
                                    "maxclass": "newobj",
                                    "numinlets": 2,
                                    "numoutlets": 2,
                                    "outlettype": [ "", "" ],
                                    "patching_rect": [ 334.0, 119.0, 123.0, 22.0 ],
                                    "text": "substitute name node"
                                }
                            },
                            {
                                "box": {
                                    "comment": "",
                                    "id": "obj-1",
                                    "index": 2,
                                    "maxclass": "outlet",
                                    "numinlets": 1,
                                    "numoutlets": 0,
                                    "patching_rect": [ 334.0, 143.0, 30.0, 30.0 ]
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-94",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 2,
                                    "outlettype": [ "", "" ],
                                    "patching_rect": [ 61.0, 448.0, 71.0, 22.0 ],
                                    "text": "jit.gl.skybox"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-31",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 2,
                                    "outlettype": [ "", "" ],
                                    "patching_rect": [ 61.0, 260.0, 475.0, 22.0 ],
                                    "text": "jit.gl.gridshape @shape cube @position 0. 0. 4. @color 0.2 1. 0.2 1. @lighting_enable 1"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-32",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 2,
                                    "outlettype": [ "", "" ],
                                    "patching_rect": [ 61.0, 287.0, 479.0, 22.0 ],
                                    "text": "jit.gl.gridshape @shape torus @position -4. 0. 0. @color 0.2 0.4 1. 1. @lighting_enable 1"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-33",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 2,
                                    "outlettype": [ "", "" ],
                                    "patching_rect": [ 61.0, 314.0, 484.0, 22.0 ],
                                    "text": "jit.gl.gridshape @shape cylinder @position 4. 0. 0. @color 1. 1. 0.2 1. @lighting_enable 1"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-34",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 2,
                                    "outlettype": [ "", "" ],
                                    "patching_rect": [ 61.0, 341.0, 495.0, 22.0 ],
                                    "text": "jit.gl.gridshape @shape opencone @position 0. 4. 0. @color 1. 0.2 1. 1. @lighting_enable 1"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-35",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 2,
                                    "outlettype": [ "", "" ],
                                    "patching_rect": [ 61.0, 368.0, 473.0, 22.0 ],
                                    "text": "jit.gl.gridshape @shape torus @position 0. -4. 0. @color 0.2 1. 1. 1. @lighting_enable 1"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-40",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 1,
                                    "outlettype": [ "" ],
                                    "patching_rect": [ 61.0, 472.0, 55.0, 22.0 ],
                                    "text": "jit.gl.light"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-29",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 2,
                                    "outlettype": [ "jit_gl_texture", "" ],
                                    "patching_rect": [ 61.0, 424.0, 293.0, 22.0 ],
                                    "text": "jit.gl.environment @file photo_studio_loft_hall_2k.exr"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-20",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 3,
                                    "outlettype": [ "jit_gl_texture", "", "" ],
                                    "patching_rect": [ 62.0, 93.0, 291.0, 22.0 ],
                                    "text": "jit.gl.node @capture 1 @adapt 0 @layer -10 @fsaa 1"
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-30",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 2,
                                    "outlettype": [ "", "" ],
                                    "patching_rect": [ 62.0, 232.0, 493.0, 22.0 ],
                                    "text": "jit.gl.gridshape @shape sphere @position 0. 0. -4. @color 1. 0.2 0.2 1. @lighting_enable 1"
                                }
                            },
                            {
                                "box": {
                                    "comment": "",
                                    "id": "obj-5",
                                    "index": 1,
                                    "maxclass": "inlet",
                                    "numinlets": 0,
                                    "numoutlets": 1,
                                    "outlettype": [ "" ],
                                    "patching_rect": [ 62.0, 33.0, 30.0, 30.0 ]
                                }
                            },
                            {
                                "box": {
                                    "comment": "",
                                    "id": "obj-6",
                                    "index": 1,
                                    "maxclass": "outlet",
                                    "numinlets": 1,
                                    "numoutlets": 0,
                                    "patching_rect": [ 62.0, 141.0, 30.0, 30.0 ]
                                }
                            }
                        ],
                        "lines": [
                            {
                                "patchline": {
                                    "destination": [ "obj-1", 0 ],
                                    "source": [ "obj-2", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-2", 0 ],
                                    "source": [ "obj-20", 2 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-6", 0 ],
                                    "source": [ "obj-20", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-30", 0 ],
                                    "order": 0,
                                    "source": [ "obj-3", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-31", 0 ],
                                    "order": 5,
                                    "source": [ "obj-3", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-32", 0 ],
                                    "order": 4,
                                    "source": [ "obj-3", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-33", 0 ],
                                    "order": 3,
                                    "source": [ "obj-3", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-34", 0 ],
                                    "order": 2,
                                    "source": [ "obj-3", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-35", 0 ],
                                    "order": 1,
                                    "source": [ "obj-3", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-20", 0 ],
                                    "source": [ "obj-5", 0 ]
                                }
                            }
                        ]
                    },
                    "patching_rect": [ 65.0, 393.0, 85.0, 22.0 ],
                    "text": "p SCENE"
                }
            },
            {
                "box": {
                    "id": "obj-3",
                    "maxclass": "newobj",
                    "numinlets": 1,
                    "numoutlets": 2,
                    "outlettype": [ "", "" ],
                    "patching_rect": [ 216.0, 318.0, 272.0, 22.0 ],
                    "text": "jit.anim.drive @ui_listen 1 @speed 10 @ease 0.1"
                }
            },
            {
                "box": {
                    "fontsize": 19.071571906354514,
                    "id": "obj-200",
                    "maxclass": "comment",
                    "numinlets": 1,
                    "numoutlets": 0,
                    "patching_rect": [ 65.0, 38.0, 344.0, 28.0 ],
                    "text": "equirectangular capture and conversion"
                }
            },
            {
                "box": {
                    "id": "obj-1",
                    "maxclass": "toggle",
                    "numinlets": 1,
                    "numoutlets": 1,
                    "outlettype": [ "int" ],
                    "parameter_enable": 0,
                    "patching_rect": [ 65.0, 87.0, 24.0, 24.0 ]
                }
            },
            {
                "box": {
                    "id": "obj-2",
                    "maxclass": "newobj",
                    "numinlets": 1,
                    "numoutlets": 3,
                    "outlettype": [ "jit_matrix", "bang", "" ],
                    "patching_rect": [ 65.0, 122.0, 97.0, 22.0 ],
                    "text": "jit.world @fsaa 1"
                }
            },
            {
                "box": {
                    "id": "obj-4",
                    "maxclass": "newobj",
                    "numinlets": 1,
                    "numoutlets": 2,
                    "outlettype": [ "", "" ],
                    "patching_rect": [ 176.0, 393.0, 232.0, 22.0 ],
                    "text": "jit.anim.node @tripod 1 @animmode local"
                }
            },
            {
                "box": {
                    "id": "obj-202",
                    "maxclass": "comment",
                    "numinlets": 1,
                    "numoutlets": 0,
                    "patching_rect": [ 414.0, 394.0, 116.0, 20.0 ],
                    "text": "parent camera node"
                }
            },
            {
                "box": {
                    "id": "obj-10",
                    "maxclass": "button",
                    "numinlets": 1,
                    "numoutlets": 1,
                    "outlettype": [ "bang" ],
                    "parameter_enable": 0,
                    "patching_rect": [ 65.0, 169.0, 24.0, 24.0 ]
                }
            },
            {
                "box": {
                    "embedstate": [
                        [ "anim", "u455001811" ],
                        [ "enable", 1 ],
                        [ "face_dim", 1024 ],
                        [ "far_clip", 1000 ],
                        [ "near_clip", 0.1 ],
                        [ "node", "u351001757" ],
                        [ "overlap", 0 ]
                    ],
                    "filename": "none",
                    "id": "obj-11",
                    "maxclass": "newobj",
                    "numinlets": 1,
                    "numoutlets": 2,
                    "outlettype": [ "", "" ],
                    "patching_rect": [ 65.0, 347.0, 130.0, 22.0 ],
                    "saved_object_attributes": {
                        "embed": 1,
                        "parameter_enable": 0
                    },
                    "text": "v8",
                    "textfile": {
                        "text": "autowatch = 1;\ninlets = 1;\noutlets = 2;\n\nsetinletassist(0, \"bang/update\");\nsetoutletassist(0, \"to capturing jit.gl.node\");\nsetoutletassist(1, \"to camera jit.anim.node\");\n\n// ---------------------------------------------------------------------------\n// face table\n// ---------------------------------------------------------------------------\nlet FACES = [\n    { id: \"px\", label: \"+x\", rotate: [-90.,  0., 1., 0.]},\n    { id: \"nx\", label: \"-x\", rotate: [ 90.,  0., 1., 0.]},\n    { id: \"py\", label: \"+y\", rotate: [ -90.,  1., 0., 0.]},\n    { id: \"ny\", label: \"-y\", rotate: [ 90.,  1., 0., 0.]},\n    { id: \"pz\", label: \"+z\", rotate: [180.,  0., 1., 0.]},\n    { id: \"nz\", label: \"-z\", rotate: [  0.,  0., 1., 0.]}\n];\n\nlet faces = [];\n\n// ---------------------------------------------------------------------------\n// attributes\n// ---------------------------------------------------------------------------\n\nvar faceDim    = 1024;\nvar nodeName   = \"\";\nvar animName   = \"\";\nvar overlap    = 0.0;\nvar nearClip   = 0.1;\nvar farClip    = 1000.0;\nvar enabled    = 1;\n\ndeclareattribute(\"node\",        \"getNode\",       \"setNode\",       1);\ndeclareattribute(\"anim\",        \"getAnim\",       \"setAnim\",       1);\ndeclareattribute(\"face_dim\",    \"getFaceDim\",    \"setFaceDim\",    1);\ndeclareattribute(\"overlap\",     \"getOverlap\",    \"setOverlap\",    1);\ndeclareattribute(\"near_clip\",   \"getNearClip\",   \"setNearClip\",   1);\ndeclareattribute(\"far_clip\",    \"getFarClip\",    \"setFarClip\",    1);\ndeclareattribute(\"enable\",      \"getEnable\",     \"setEnable\",     1);\n\nfunction getNode()   { return nodeName; }\nfunction setNode(v)  { nodeName = String(v); }\n\nfunction getAnim()   { return animName; }\nfunction setAnim(v)  { animName = String(v); }\n\nfunction getFaceDim()  { return faceDim; }\nfunction setFaceDim(v) { faceDim = Math.max(16, Math.floor(v)); }\n\nfunction getOverlap()  { return overlap; }\nfunction setOverlap(v) { overlap = Math.max(0.0, Math.min(45.0, v)); }\n\nfunction getNearClip()  { return nearClip; }\nfunction setNearClip(v) { nearClip = Math.max(0.0001, v); }\n\nfunction getFarClip()   { return farClip; }\nfunction setFarClip(v)  { farClip = Math.max(nearClip + 0.0001, v); }\n\nfunction getEnable()    { return enabled; }\nfunction setEnable(v)   { enabled = v ? 1 : 0; }\n\n\n// ---------------------------------------------------------------------------\n// lifecycle\n// ---------------------------------------------------------------------------\n\nfunction loadbang() {\n    build();\n}\n\nfunction notifydeleted() {\n    clear();\n}\n\nfunction build() {\n    outlet(0, \"getname\");\n    outlet(1, \"getname\");\n    clear();\n    \n    for (let i = 0; i < FACES.length; i++) {\n        let f = FACES[i];\n\n        let an = new JitterObject(\"jit.anim.node\");\n        an.rotate = f.rotate;\n        if (animName.length) { an.anim = animName; }\n\n        let cam = new JitterObject(\"jit.gl.camera\");\n        cam.drawto = nodeName;\n        cam.vp_mode = \"absolute\";\n        cam.anim = an.name;\n\n        faces.push({ face: f, cam: cam, node: an });\n    }\n    update();\n}\n\nfunction clear() {\n    for (let i = 0; i < faces.length; i++) {\n        if (faces[i].cam)  { faces[i].cam.freepeer(); }\n        if (faces[i].node) { faces[i].node.freepeer(); }\n    }\n    faces = [];\n}\n\nlet cols= 3, rows = 2;\n\nfunction cellFor(i) {\n    let row = Math.floor(i / cols);\n    return [i - row * cols, row];\n}\n\nfunction bang()   { build(); }\nfunction update() { \n\n    let atlas = [faceDim * cols, faceDim * rows];\n    \n    outlet(0, \"adapt\", 0);\n    outlet(0, \"capture\", 1);\n    outlet(0, \"dim\", faceDim * cols, faceDim * rows);\n\n    let lens = 90.0 + overlap;\n    for (let i = 0; i < faces.length; i++) {\n        let e = faces[i];\n        let cell = cellFor(i);\n\n        e.node.rotate = e.face.rotate;\n        e.node.anim = animName;\n\n        e.cam.drawto = nodeName;\n        e.cam.vp_mode = \"normalized\";\n        e.cam.viewport = [cell[0] / cols, cell[1] / rows, 1.0 / cols, 1.0 / rows];\n        e.cam.lens_angle = lens;\n        e.cam.near_clip = nearClip;\n        e.cam.far_clip = farClip;\n        e.cam.enable = enabled;\n    }\n}\n",
                        "filename": "none",
                        "flags": 0,
                        "embed": 1,
                        "autowatch": 1
                    }
                }
            },
            {
                "box": {
                    "id": "obj-21",
                    "maxclass": "newobj",
                    "numinlets": 1,
                    "numoutlets": 2,
                    "outlettype": [ "jit_gl_texture", "" ],
                    "patcher": {
                        "fileversion": 1,
                        "appversion": {
                            "major": 9,
                            "minor": 3,
                            "revision": 0,
                            "architecture": "x64",
                            "modernui": 1
                        },
                        "classnamespace": "jit.gen",
                        "rect": [ 753.0, 120.0, 892.0, 787.0 ],
                        "integercoordinates": 1,
                        "boxes": [
                            {
                                "box": {
                                    "id": "obj-108",
                                    "maxclass": "newobj",
                                    "numinlets": 0,
                                    "numoutlets": 1,
                                    "outlettype": [ "" ],
                                    "patching_rect": [ 33.5, 13.0, 244.0, 22.0 ],
                                    "text": "in 1 @comment \"unfolded scene cube map\""
                                }
                            },
                            {
                                "box": {
                                    "code": "Param lens_angle(90);   // FOV the shader ASSUMES per face -- keep at 90\nParam cols(3);          // atlas columns  (cross 4, packed 3, strip 6)\nParam rows(2);          // atlas rows     (cross 3, packed 2, strip 1)\n\n// ---- 3D ray for this texel ----\nlon = snorm.x * pi;             // -pi   .. pi\nlat = snorm.y * pi * 0.5;       // -pi/2 .. pi/2\ncl  = cos(lat);\nray = vec(cl * cos(lon), sin(lat), cl * sin(lon));\n\n// ---- half-face zoom ----\nfz = 0.5 / tan(lens_angle * pi / 360);\n\nax = abs(ray.x);\nay = abs(ray.y);\naz = abs(ray.z);\n\n// assign defaults so no path can leave these unset\nu = 0.5;\nv = 0.5;\nfi = 5;\n\nif ((ax >= ay) && (ax >= az)) {\n\tif (ray.x > 0) {\n\t\t// +x : right +z, up +y, forward +x\n\t\tu = 0.5 + fz * ray.z / ax;\n\t\tv = 0.5 + fz * ray.y / ax;\n\t\tfi = 0;\n\t} else {\n\t\t// -x : right -z, up +y, forward -x\n\t\tu = 0.5 - fz * ray.z / ax;\n\t\tv = 0.5 + fz * ray.y / ax;\n\t\tfi = 1;\n\t}\n} else if (ay >= az) {\n\tif (ray.y > 0) {\n\t\t// +y : right +x, up +z, forward +y\n\t\tu = 0.5 + fz * ray.x / ay;\n\t\tv = 0.5 + fz * ray.z / ay;\n\t\tfi = 2;\n\t} else {\n\t\t// -y : right +x, up -z, forward -y\n\t\tu = 0.5 + fz * ray.x / ay;\n\t\tv = 0.5 - fz * ray.z / ay;\n\t\tfi = 3;\n\t}\n} else {\n\tif (ray.z > 0) {\n\t\t// +z : right -x, up +y, forward +z\n\t\tu = 0.5 - fz * ray.x / az;\n\t\tv = 0.5 + fz * ray.y / az;\n\t\tfi = 4;\n\t} else {\n\t\t// -z : right +x, up +y, forward -z\n\t\tu = 0.5 + fz * ray.x / az;\n\t\tv = 0.5 + fz * ray.y / az;\n\t\tfi = 5;\n\t}\n}\n\n// ---- atlas cell for this face ----\nix = 1;\niy = 1;\n\niy = floor(fi / cols);\nix = fi - iy * cols;\n\n\n// reverse the row: cell row 0 is the bottom of the atlas the cameras wrote,\n// but the top of the coordinate this samples in\nout1 = sample(in1, vec((ix + u) / cols, ((rows - 1 - iy) + v) / rows));\n",
                                    "fontface": 0,
                                    "fontname": "<Monospaced>",
                                    "fontsize": 12.0,
                                    "id": "obj-102",
                                    "maxclass": "codebox",
                                    "numinlets": 1,
                                    "numoutlets": 1,
                                    "outlettype": [ "" ],
                                    "patching_rect": [ 34.0, 52.0, 654.0, 674.0 ]
                                }
                            },
                            {
                                "box": {
                                    "id": "obj-4",
                                    "maxclass": "newobj",
                                    "numinlets": 1,
                                    "numoutlets": 0,
                                    "patching_rect": [ 33.5, 745.0, 37.0, 22.0 ],
                                    "text": "out 1"
                                }
                            }
                        ],
                        "lines": [
                            {
                                "patchline": {
                                    "destination": [ "obj-4", 0 ],
                                    "source": [ "obj-102", 0 ]
                                }
                            },
                            {
                                "patchline": {
                                    "destination": [ "obj-102", 0 ],
                                    "source": [ "obj-108", 0 ]
                                }
                            }
                        ]
                    },
                    "patching_rect": [ 90.0, 481.0, 49.0, 22.0 ],
                    "text": "jit.gl.pix"
                }
            },
            {
                "box": {
                    "id": "obj-22",
                    "maxclass": "gswitch",
                    "numinlets": 3,
                    "numoutlets": 1,
                    "outlettype": [ "" ],
                    "parameter_enable": 0,
                    "patching_rect": [ 44.0, 534.0, 65.0, 44.0 ]
                }
            },
            {
                "box": {
                    "id": "obj-23",
                    "maxclass": "toggle",
                    "numinlets": 1,
                    "numoutlets": 1,
                    "outlettype": [ "int" ],
                    "parameter_enable": 0,
                    "patching_rect": [ 124.0, 534.0, 24.0, 24.0 ]
                }
            },
            {
                "box": {
                    "id": "obj-205",
                    "linecount": 2,
                    "maxclass": "comment",
                    "numinlets": 1,
                    "numoutlets": 0,
                    "patching_rect": [ 154.0, 530.0, 113.0, 33.0 ],
                    "text": "0 = raw cube atlas\n1 = equirectangular"
                }
            },
            {
                "box": {
                    "id": "obj-24",
                    "maxclass": "newobj",
                    "numinlets": 1,
                    "numoutlets": 2,
                    "outlettype": [ "", "" ],
                    "patching_rect": [ 44.0, 606.0, 252.0, 22.0 ],
                    "text": "jit.gl.videoplane @transform_reset 2 @layer 0"
                }
            }
        ],
        "lines": [
            {
                "patchline": {
                    "destination": [ "obj-2", 0 ],
                    "source": [ "obj-1", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-11", 0 ],
                    "source": [ "obj-10", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-4", 0 ],
                    "source": [ "obj-11", 1 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-8", 0 ],
                    "source": [ "obj-11", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-11", 0 ],
                    "midpoints": [ 398.5, 446.3203125, 52.328125, 446.3203125, 52.328125, 337.0, 74.5, 337.0 ],
                    "source": [ "obj-13", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-11", 0 ],
                    "source": [ "obj-15", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-21", 0 ],
                    "source": [ "obj-16", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-11", 0 ],
                    "source": [ "obj-17", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-22", 2 ],
                    "order": 2,
                    "source": [ "obj-21", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-25", 0 ],
                    "order": 1,
                    "source": [ "obj-21", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-5", 0 ],
                    "order": 0,
                    "source": [ "obj-21", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-24", 0 ],
                    "source": [ "obj-22", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-22", 0 ],
                    "source": [ "obj-23", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-4", 0 ],
                    "source": [ "obj-3", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-13", 0 ],
                    "source": [ "obj-4", 1 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-11", 0 ],
                    "midpoints": [ 140.5, 425.0, 46.87109375, 425.0, 46.87109375, 337.0, 74.5, 337.0 ],
                    "source": [ "obj-8", 1 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-16", 0 ],
                    "order": 0,
                    "source": [ "obj-8", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-22", 1 ],
                    "order": 1,
                    "source": [ "obj-8", 0 ]
                }
            },
            {
                "patchline": {
                    "destination": [ "obj-4", 0 ],
                    "source": [ "obj-9", 0 ]
                }
            }
        ],
        "autosave": 0
    }
}