{
  "state": {},
  "graphs": [
    {
      "edges": {
        "4n3yk4e": { "as": "value", "from": "4n3yk4e", "to": "tkxqh5a" },
        "zlyzyjv": { "as": "args", "from": "zlyzyjv", "to": "tkxqh5a" },
        "a23wspb": { "as": "parent", "from": "a23wspb", "to": "4n3yk4e" },
        "twtvjxk": { "as": "argobjnames", "from": "twtvjxk", "to": "4n3yk4e" },
        "brxx2zn": { "as": "args", "from": "brxx2zn", "to": "twtvjxk" },
        "pnszphc": { "as": "value", "from": "pnszphc", "to": "twtvjxk" },
        "1kzsgi4": { "as": "array", "from": "1kzsgi4", "to": "pnszphc" },
        "grsb8qa": { "as": "fn", "from": "grsb8qa", "to": "pnszphc" },
        "49o12hh": { "as": "fn", "from": "49o12hh", "to": "grsb8qa" },
        "5ljysw7": { "as": "parameters", "from": "5ljysw7", "to": "grsb8qa" },
        "0zs05z2": { "as": "element", "from": "0zs05z2", "to": "5ljysw7" },
        "ad6qpuc": { "as": "parent", "from": "ad6qpuc", "to": "49o12hh" },
        "b3j4v9i": { "as": "obj", "from": "b3j4v9i", "to": "49o12hh" },
        "qjadhr5": { "as": "children", "from": "qjadhr5", "to": "1kzsgi4" },
        "man8k6c": { "as": "_parent", "from": "man8k6c", "to": "brxx2zn" }
      },
      "id": "@three.update_children",
      "name": "@three.update_children",
      "nodes": {
        "tkxqh5a": {
          "id": "tkxqh5a",
          "name": "@three.update_children",
          "ref": "return"
        },
        "zlyzyjv": { "id": "zlyzyjv" },
        "4n3yk4e": {
          "id": "4n3yk4e",
          "ref": "@js.script",
          "value": "parent.children.forEach(c => {\n  if(!argobjnames.includes(c.name)){\n    parent.remove(c);\n  }\n})\n\nreturn parent;"
        },
        "twtvjxk": { "id": "twtvjxk", "ref": "return" },
        "pnszphc": { "id": "pnszphc", "ref": "@data.map" },
        "grsb8qa": { "id": "grsb8qa", "ref": "@flow.runnable" },
        "5ljysw7": { "id": "5ljysw7" },
        "0zs05z2": { "id": "0zs05z2" },
        "49o12hh": {
          "id": "49o12hh",
          "name": "",
          "ref": "@js.script",
          "value": "const existingObj = parent.getObjectByName(obj.name);\nif(obj && existingObj !== obj){\n  if(existingObj) {\n    parent.remove(existingObj);\n    existingObj.geometry?.dispose();\n    existingObj.material?.dispose();\n  }\n  console.log(\"adding\", obj)\n  parent.add(obj); \n}\nreturn obj.name;"
        },
        "b3j4v9i": { "id": "b3j4v9i", "ref": "arg", "value": "element" },
        "ad6qpuc": { "id": "ad6qpuc", "ref": "arg", "value": "_parent" },
        "1kzsgi4": {
          "id": "1kzsgi4",
          "ref": "@js.script",
          "value": "return children.flat()"
        },
        "qjadhr5": { "id": "qjadhr5", "ref": "arg", "value": "children" },
        "brxx2zn": { "id": "brxx2zn" },
        "man8k6c": { "id": "man8k6c", "ref": "arg", "value": "parent" },
        "a23wspb": { "id": "a23wspb", "ref": "arg", "value": "parent" }
      },
      "out": "tkxqh5a"
    },
    {
      "edges": {
        "lihjkfp": { "as": "value", "from": "lihjkfp", "to": "main/out" },
        "x4zdk2w": { "as": "true", "from": "x4zdk2w", "to": "lihjkfp" },
        "xsjuu4i": { "as": "pred", "from": "xsjuu4i", "to": "lihjkfp" },
        "eyftv46": { "as": "canvas", "from": "eyftv46", "to": "xsjuu4i" },
        "cwl59lh": { "as": "canvas", "from": "cwl59lh", "to": "x4zdk2w" }
      },
      "id": "@three.renderer",
      "nodes": {
        "main/out": {
          "__isnodysseus": true,
          "id": "main/out",
          "name": "@three.renderer",
          "ref": "return"
        },
        "lihjkfp": { "id": "lihjkfp", "ref": "@flow.if" },
        "xsjuu4i": {
          "id": "xsjuu4i",
          "ref": "@js.script",
          "value": "console.log(\"three check lib\", _lib)\nreturn _lib.THREE && canvas;"
        },
        "eyftv46": { "id": "eyftv46", "ref": "arg", "value": "canvas" },
        "x4zdk2w": {
          "id": "x4zdk2w",
          "ref": "@js.script",
          "value": "const renderer = new _lib.THREE.WebGLRenderer({canvas});\nconsole.log(\"creating renderer\", renderer)\nreturn renderer"
        },
        "cwl59lh": {
          "id": "cwl59lh",
          "name": "",
          "ref": "arg",
          "value": "canvas"
        }
      },
      "out": "main/out"
    },
    {
      "edges": {
        "5eegbyt": { "as": "lib", "from": "5eegbyt", "to": "main/out" },
        "mau19q3": { "as": "value", "from": "mau19q3", "to": "main/out" },
        "x4zdk2w": { "as": "value", "from": "x4zdk2w", "to": "mau19q3" },
        "glh8wzi": { "as": "THREE", "from": "glh8wzi", "to": "5eegbyt" },
        "hqgwi6x": { "as": "value", "from": "hqgwi6x", "to": "glh8wzi" }
      },
      "id": "@three.scene",
      "nodes": {
        "main/out": {
          "__isnodysseus": true,
          "id": "main/out",
          "name": "@three.scene",
          "ref": "return"
        },
        "mau19q3": {
          "id": "mau19q3",
          "ref": "@debug.log",
          "value": "outscene"
        },
        "x4zdk2w": {
          "id": "x4zdk2w",
          "ref": "@js.script",
          "value": "return new _lib.THREE.Scene();"
        },
        "5eegbyt": { "id": "5eegbyt" },
        "glh8wzi": { "id": "glh8wzi", "ref": "@memory.cache" },
        "hqgwi6x": {
          "id": "hqgwi6x",
          "ref": "@js.import_module",
          "value": "https://cdn.jsdelivr.net/npm/three/build/three.module.js"
        }
      },
      "out": "main/out"
    },
    {
      "description": "A three.js [PerspectiveCamera](https://threejs.org/docs/?q=camera#api/en/cameras/PerspectiveCamera)",
      "edges": {
        "args": { "as": "args", "from": "args", "to": "main/out" },
        "on0gkah": { "as": "lib", "from": "on0gkah", "to": "main/out" },
        "x4zdk2w": { "as": "value", "from": "x4zdk2w", "to": "main/out" },
        "11u8kd6": { "as": "height", "from": "11u8kd6", "to": "x4zdk2w" },
        "qvf3y0y": { "as": "width", "from": "qvf3y0y", "to": "x4zdk2w" },
        "dln8uxf": { "as": "THREE", "from": "dln8uxf", "to": "on0gkah" },
        "h1x8bxs": { "as": "value", "from": "h1x8bxs", "to": "dln8uxf" },
        "n79e1ca": { "as": "THREE", "from": "n79e1ca", "to": "args" },
        "vjfgmrl": { "as": "value", "from": "vjfgmrl", "to": "n79e1ca" }
      },
      "id": "@three.camera",
      "nodes": {
        "main/out": {
          "__isnodysseus": true,
          "id": "main/out",
          "name": "@three.camera",
          "ref": "return"
        },
        "x4zdk2w": {
          "id": "x4zdk2w",
          "ref": "@js.script",
          "value": "return new _lib.THREE.PerspectiveCamera( 75, width / height, 0.1, 1000 );"
        },
        "qvf3y0y": { "id": "qvf3y0y", "ref": "arg", "value": "canvas.width" },
        "11u8kd6": { "id": "11u8kd6", "ref": "arg", "value": "canvas.height" },
        "on0gkah": { "id": "on0gkah", "ref": "extern", "value": "extern.data" },
        "dln8uxf": { "id": "dln8uxf", "ref": "@memory.cache" },
        "h1x8bxs": {
          "id": "h1x8bxs",
          "ref": "@js.import_module",
          "value": "https://cdn.jsdelivr.net/npm/three/build/three.module.js"
        },
        "args": { "id": "args", "ref": "extern", "value": "extern.data" },
        "n79e1ca": { "id": "n79e1ca", "ref": "@memory.cache" },
        "vjfgmrl": {
          "id": "vjfgmrl",
          "ref": "@js.import_module",
          "value": "https://cdn.jsdelivr.net/npm/three/build/three.module.js"
        }
      },
      "out": "main/out"
    },
    {
      "description": "Creates a basic three.js scene with a camera, renderer, and scene. The `objects` input has the objects of the scene, evaluated every frame - make sure to cache. The `onupdate` input is a runnable with parameters `objects`, `camera`, and `scene` which is run every frame - keep. The `fx` input has effects for an EffectComposer.",
      "edges": {
        "8m5muxn/39ivise": {
          "as": "args",
          "from": "8m5muxn/39ivise",
          "to": "8m5muxn/8m5muxn"
        },
        "8m5muxn/njzfcz8": {
          "as": "value",
          "from": "8m5muxn/njzfcz8",
          "to": "8m5muxn/8m5muxn"
        },
        "qioaglu": { "as": "lib", "from": "qioaglu", "to": "8m5muxn/8m5muxn" },
        "yg3wpau": {
          "as": "metadata",
          "from": "yg3wpau",
          "to": "8m5muxn/8m5muxn"
        },
        "0hdpvrw": { "as": "parameters", "from": "0hdpvrw", "to": "yg3wpau" },
        "t3nkm46": { "as": "onupdate", "from": "t3nkm46", "to": "0hdpvrw" },
        "y7wb70a": {
          "as": "runnableParameters",
          "from": "y7wb70a",
          "to": "t3nkm46"
        },
        "yb47doj": { "as": "type", "from": "yb47doj", "to": "t3nkm46" },
        "kipwn58": {
          "as": "EffectComposer",
          "from": "kipwn58",
          "to": "qioaglu"
        },
        "vl4foaa": { "as": "RenderPass", "from": "vl4foaa", "to": "qioaglu" },
        "yt5ewda": { "as": "nodeFrame", "from": "yt5ewda", "to": "qioaglu" },
        "dt9q1m5": { "as": "value", "from": "dt9q1m5", "to": "yt5ewda" },
        "bqpkucx": { "as": "target", "from": "bqpkucx", "to": "dt9q1m5" },
        "7peak26": { "as": "value", "from": "7peak26", "to": "vl4foaa" },
        "slle0cq": { "as": "target", "from": "slle0cq", "to": "7peak26" },
        "4a9zo9a": { "as": "value", "from": "4a9zo9a", "to": "kipwn58" },
        "i39y0i3": { "as": "target", "from": "i39y0i3", "to": "4a9zo9a" },
        "8m5muxn/hlqmo48": {
          "as": "args",
          "from": "8m5muxn/hlqmo48",
          "to": "8m5muxn/njzfcz8"
        },
        "8m5muxn/vyr07ts": {
          "as": "subscribe",
          "from": "8m5muxn/vyr07ts",
          "to": "8m5muxn/njzfcz8"
        },
        "jiobf52": {
          "as": "value",
          "from": "jiobf52",
          "to": "8m5muxn/njzfcz8"
        },
        "bolfyb6": { "as": "renderer", "from": "bolfyb6", "to": "jiobf52" },
        "vbytevd": { "as": "objects", "from": "vbytevd", "to": "jiobf52" },
        "5izf471": { "as": "arg0", "from": "5izf471", "to": "vbytevd" },
        "93zbauo": { "as": "arg1", "from": "93zbauo", "to": "vbytevd" },
        "jlt4j7w": { "as": "true", "from": "jlt4j7w", "to": "5izf471" },
        "vtg79yy": { "as": "pred", "from": "vtg79yy", "to": "5izf471" },
        "3azmpq8": { "as": "children", "from": "3azmpq8", "to": "jlt4j7w" },
        "gsjsnq6": { "as": "parent", "from": "gsjsnq6", "to": "jlt4j7w" },
        "4b08vk7": { "as": "fn", "from": "4b08vk7", "to": "3azmpq8" },
        "68gerc9": { "as": "array", "from": "68gerc9", "to": "3azmpq8" },
        "b10ohnk": { "as": "false", "from": "b10ohnk", "to": "68gerc9" },
        "nxy186l": { "as": "pred", "from": "nxy186l", "to": "68gerc9" },
        "vbr6bfa": { "as": "true", "from": "vbr6bfa", "to": "68gerc9" },
        "cuqczbo": { "as": "pred", "from": "cuqczbo", "to": "vbr6bfa" },
        "cvvim9o": { "as": "true", "from": "cvvim9o", "to": "vbr6bfa" },
        "r7h1ra6": { "as": "false", "from": "r7h1ra6", "to": "vbr6bfa" },
        "simk3kf": { "as": "entries", "from": "simk3kf", "to": "r7h1ra6" },
        "pem42eq": { "as": "object", "from": "pem42eq", "to": "simk3kf" },
        "fsculei": { "as": "otherwise", "from": "fsculei", "to": "pem42eq" },
        "v3dcfpc": { "as": "value", "from": "v3dcfpc", "to": "pem42eq" },
        "1iad2e6": { "as": "obj", "from": "1iad2e6", "to": "cvvim9o" },
        "1gxmhg0": { "as": "objs", "from": "1gxmhg0", "to": "cuqczbo" },
        "60subyt": { "as": "parameters", "from": "60subyt", "to": "4b08vk7" },
        "pv3ip30": { "as": "fn", "from": "pv3ip30", "to": "4b08vk7" },
        "dipv2w0": { "as": "value", "from": "dipv2w0", "to": "pv3ip30" },
        "ibgd3fg": { "as": "target", "from": "ibgd3fg", "to": "pv3ip30" },
        "z7toomi": { "as": "target", "from": "z7toomi", "to": "ibgd3fg" },
        "4j1cb5p": { "as": "target", "from": "4j1cb5p", "to": "dipv2w0" },
        "xxcz1u7": { "as": "element", "from": "xxcz1u7", "to": "60subyt" },
        "slwyovm": { "as": "reference", "from": "slwyovm", "to": "bolfyb6" },
        "ptak9t2": {
          "as": "animationframe",
          "from": "ptak9t2",
          "to": "8m5muxn/vyr07ts"
        },
        "c6eig78": { "as": "fn", "from": "c6eig78", "to": "ptak9t2" },
        "7c7zppx": { "as": "arg2", "from": "7c7zppx", "to": "c6eig78" },
        "rmqxb31": { "as": "arg4", "from": "rmqxb31", "to": "c6eig78" },
        "z552097": { "as": "arg5", "from": "z552097", "to": "c6eig78" },
        "dyst9ju": { "as": "fn", "from": "dyst9ju", "to": "z552097" },
        "1js087x": { "as": "camera", "from": "1js087x", "to": "dyst9ju" },
        "cha35wd": { "as": "scene", "from": "cha35wd", "to": "dyst9ju" },
        "cvop6x9": { "as": "renderer", "from": "cvop6x9", "to": "dyst9ju" },
        "3jbd385": { "as": "value", "from": "3jbd385", "to": "cvop6x9" },
        "e9d6mmx": { "as": "otherwise", "from": "e9d6mmx", "to": "cvop6x9" },
        "0wp18c9": { "as": "args", "from": "0wp18c9", "to": "e9d6mmx" },
        "cwrlosg": { "as": "run", "from": "cwrlosg", "to": "e9d6mmx" },
        "jjmvxjj": { "as": "fn", "from": "jjmvxjj", "to": "e9d6mmx" },
        "vc0quhz": { "as": "value", "from": "vc0quhz", "to": "0wp18c9" },
        "lugpx4o": { "as": "value", "from": "lugpx4o", "to": "vc0quhz" },
        "6s18wo7": { "as": "camera", "from": "6s18wo7", "to": "lugpx4o" },
        "eamyj81": { "as": "scene", "from": "eamyj81", "to": "lugpx4o" },
        "svcshll": { "as": "canvas", "from": "svcshll", "to": "lugpx4o" },
        "tgacxe5": { "as": "renderer", "from": "tgacxe5", "to": "lugpx4o" },
        "vwa13pj": { "as": "fx", "from": "vwa13pj", "to": "lugpx4o" },
        "vzmvbqh": { "as": "MotionBlur", "from": "vzmvbqh", "to": "lugpx4o" },
        "23ppkmp": { "as": "pred", "from": "23ppkmp", "to": "vzmvbqh" },
        "3876w2f": { "as": "true", "from": "3876w2f", "to": "vzmvbqh" },
        "ya36a1r": { "as": "module", "from": "ya36a1r", "to": "3876w2f" },
        "fzf3k5e": { "as": "RenderPass", "from": "fzf3k5e", "to": "vwa13pj" },
        "gap7au7": {
          "as": "EffectComposer",
          "from": "gap7au7",
          "to": "vwa13pj"
        },
        "hsytqp3": { "as": "value", "from": "hsytqp3", "to": "tgacxe5" },
        "1j95u16": { "as": "canvas", "from": "1j95u16", "to": "hsytqp3" },
        "zs7iowa": { "as": "reference", "from": "zs7iowa", "to": "3jbd385" },
        "b2z2580": { "as": "true", "from": "b2z2580", "to": "rmqxb31" },
        "mh5ikoc": { "as": "pred", "from": "mh5ikoc", "to": "rmqxb31" },
        "m291v0o": { "as": "args", "from": "m291v0o", "to": "b2z2580" },
        "wcnk2sw": { "as": "fn", "from": "wcnk2sw", "to": "b2z2580" },
        "2veqlq1": { "as": "scene", "from": "2veqlq1", "to": "m291v0o" },
        "y2f8gog": { "as": "camera", "from": "y2f8gog", "to": "m291v0o" },
        "aqfc51v": { "as": "fn", "from": "aqfc51v", "to": "7c7zppx" },
        "5m99dxg": { "as": "true", "from": "5m99dxg", "to": "aqfc51v" },
        "x638fhv": { "as": "pred", "from": "x638fhv", "to": "aqfc51v" },
        "tfl58nu": { "as": "arg0", "from": "tfl58nu", "to": "x638fhv" },
        "xmd2fqb": { "as": "arg1", "from": "xmd2fqb", "to": "x638fhv" },
        "xel6go6": { "as": "reference", "from": "xel6go6", "to": "tfl58nu" },
        "fznso76": { "as": "fx", "from": "fznso76", "to": "5m99dxg" },
        "t181hfh": { "as": "renderer", "from": "t181hfh", "to": "5m99dxg" },
        "4fxcgml": { "as": "reference", "from": "4fxcgml", "to": "t181hfh" },
        "8m5muxn/7in78pu": {
          "as": "_camera",
          "from": "8m5muxn/7in78pu",
          "to": "8m5muxn/hlqmo48"
        },
        "8m5muxn/inq87j9": {
          "as": "_scene",
          "from": "8m5muxn/inq87j9",
          "to": "8m5muxn/hlqmo48"
        },
        "8m5muxn/gwavfrm": {
          "as": "value",
          "from": "8m5muxn/gwavfrm",
          "to": "8m5muxn/inq87j9"
        },
        "8m5muxn/33kmaec": {
          "as": "target",
          "from": "8m5muxn/33kmaec",
          "to": "8m5muxn/7in78pu"
        },
        "8m5muxn/v1nqvl7": {
          "as": "value",
          "from": "8m5muxn/v1nqvl7",
          "to": "8m5muxn/7in78pu"
        },
        "8m5muxn/zci8apj": {
          "as": "value",
          "from": "8m5muxn/zci8apj",
          "to": "8m5muxn/33kmaec"
        },
        "t8adnxm": {
          "as": "canvas",
          "from": "t8adnxm",
          "to": "8m5muxn/zci8apj"
        },
        "40aw44l": {
          "as": "_renderer",
          "from": "40aw44l",
          "to": "8m5muxn/39ivise"
        }
      },
      "id": "@three.setup",
      "name": "three.setup",
      "nodes": {
        "8m5muxn/8m5muxn": {
          "id": "8m5muxn/8m5muxn",
          "name": "@three.setup",
          "ref": "return"
        },
        "yg3wpau": { "id": "yg3wpau" },
        "0hdpvrw": { "id": "0hdpvrw" },
        "t3nkm46": { "id": "t3nkm46" },
        "yb47doj": { "id": "yb47doj", "value": "@flow.runnable" },
        "y7wb70a": {
          "id": "y7wb70a",
          "ref": "@data.array",
          "value": "objects, camera"
        },
        "qioaglu": { "id": "qioaglu" },
        "yt5ewda": { "id": "yt5ewda", "ref": "@memory.cache" },
        "dt9q1m5": {
          "id": "dt9q1m5",
          "ref": "@data.get",
          "value": "nodeFrame"
        },
        "bqpkucx": {
          "id": "bqpkucx",
          "ref": "@js.import_module",
          "value": "https://cdn.jsdelivr.net/npm/three/examples/jsm/renderers/webgl/nodes/WebGLNodes.js"
        },
        "vl4foaa": { "id": "vl4foaa", "ref": "@memory.cache" },
        "7peak26": {
          "id": "7peak26",
          "ref": "@data.get",
          "value": "RenderPass"
        },
        "slle0cq": {
          "id": "slle0cq",
          "ref": "@js.import_module",
          "value": "https://cdn.jsdelivr.net/npm/three/examples/jsm/postprocessing/RenderPass.js"
        },
        "kipwn58": { "id": "kipwn58", "ref": "@memory.cache" },
        "4a9zo9a": {
          "id": "4a9zo9a",
          "ref": "@data.get",
          "value": "EffectComposer"
        },
        "i39y0i3": {
          "id": "i39y0i3",
          "ref": "@js.import_module",
          "value": "https://cdn.jsdelivr.net/npm/three/examples/jsm/postprocessing/EffectComposer.js"
        },
        "8m5muxn/njzfcz8": {
          "id": "8m5muxn/njzfcz8",
          "name": "",
          "ref": "return"
        },
        "jiobf52": { "id": "jiobf52" },
        "vbytevd": {
          "id": "vbytevd",
          "ref": "@js.script",
          "value": "return arg0;"
        },
        "93zbauo": { "id": "93zbauo", "ref": "arg", "value": "objects" },
        "5izf471": { "id": "5izf471", "ref": "@flow.if" },
        "vtg79yy": { "id": "vtg79yy", "ref": "arg", "value": "_scene" },
        "jlt4j7w": { "id": "jlt4j7w", "ref": "@three.update_children" },
        "gsjsnq6": { "id": "gsjsnq6", "ref": "arg", "value": "_scene" },
        "3azmpq8": { "id": "3azmpq8", "ref": "@data.map" },
        "68gerc9": { "id": "68gerc9", "ref": "@flow.if" },
        "vbr6bfa": { "id": "vbr6bfa", "ref": "@flow.if" },
        "r7h1ra6": {
          "id": "r7h1ra6",
          "ref": "@js.script",
          "value": "return entries.flatMap(e => e?.[1] && Array.isArray(e[1]) ? e[1].map((c, i) => [e[0] + i, c]) : [e]).filter(e => e[1]);"
        },
        "simk3kf": { "id": "simk3kf", "ref": "@data.object_entries" },
        "pem42eq": { "id": "pem42eq", "ref": "@flow.default" },
        "v3dcfpc": { "id": "v3dcfpc", "ref": "arg", "value": "objects" },
        "fsculei": { "id": "fsculei", "value": "{}" },
        "cvvim9o": {
          "id": "cvvim9o",
          "ref": "@js.script",
          "value": "// compensate for automatic passthrough\nreturn [[\"arg0\", obj]]"
        },
        "1iad2e6": { "id": "1iad2e6", "ref": "arg", "value": "objects" },
        "cuqczbo": {
          "id": "cuqczbo",
          "ref": "@js.script",
          "value": "return objs instanceof _lib.THREE.Object3D"
        },
        "1gxmhg0": { "id": "1gxmhg0", "ref": "arg", "value": "objects" },
        "nxy186l": { "id": "nxy186l", "ref": "arg", "value": "objects" },
        "b10ohnk": { "id": "b10ohnk", "ref": "@data.array" },
        "4b08vk7": { "id": "4b08vk7", "ref": "@flow.runnable" },
        "pv3ip30": {
          "id": "pv3ip30",
          "ref": "@data.set_mutable",
          "value": "name"
        },
        "ibgd3fg": { "id": "ibgd3fg", "ref": "@data.get", "value": "1" },
        "z7toomi": { "id": "z7toomi", "ref": "arg", "value": "element" },
        "dipv2w0": { "id": "dipv2w0", "ref": "@data.get", "value": "0" },
        "4j1cb5p": { "id": "4j1cb5p", "ref": "arg", "value": "element" },
        "60subyt": { "id": "60subyt" },
        "xxcz1u7": { "id": "xxcz1u7" },
        "bolfyb6": { "id": "bolfyb6", "ref": "@memory.readReference" },
        "slwyovm": { "id": "slwyovm", "ref": "arg", "value": "_renderer" },
        "8m5muxn/vyr07ts": { "id": "8m5muxn/vyr07ts", "name": "" },
        "ptak9t2": { "id": "ptak9t2", "name": "", "ref": "@flow.ap" },
        "c6eig78": { "id": "c6eig78", "ref": "@data.array" },
        "z552097": { "id": "z552097", "ref": "@flow.runnable" },
        "dyst9ju": {
          "id": "dyst9ju",
          "ref": "@js.script",
          "value": "if(renderer) {\n  //renderer.render(scene, camera);\n  _lib.nodeFrame.update();\n  renderer.render();\n}"
        },
        "cvop6x9": { "id": "cvop6x9", "ref": "@flow.default" },
        "e9d6mmx": { "id": "e9d6mmx", "ref": "@flow.ap" },
        "jjmvxjj": { "id": "jjmvxjj", "ref": "arg", "value": "_renderer.set" },
        "cwrlosg": { "id": "cwrlosg", "value": "true" },
        "0wp18c9": { "id": "0wp18c9" },
        "vc0quhz": { "id": "vc0quhz", "ref": "@memory.cache" },
        "lugpx4o": {
          "id": "lugpx4o",
          "ref": "@js.script",
          "value": "console.log(\"top renderer\", renderer, canvas)\nif(!renderer){\n  return;\n}\nconst fxcomposer = new fx.EffectComposer(renderer)\nconst renderpass = new fx.RenderPass(scene, camera);\nfxcomposer.setSize(canvas.width, canvas.height);\nfxcomposer.addPass(renderpass);\nif(MotionBlur) {\n  const pass = new MotionBlur(scene, camera, { samples: 32, expandgeometry: 0.4 });\n  fxcomposer.addPass(pass);\n  pass.renderToScreen = true;\n}\nreturn fxcomposer;"
        },
        "vzmvbqh": { "id": "vzmvbqh", "ref": "@flow.if" },
        "3876w2f": {
          "id": "3876w2f",
          "ref": "@js.script",
          "value": "return module.MotionBlurPass;"
        },
        "ya36a1r": {
          "id": "ya36a1r",
          "ref": "@js.import_module",
          "value": "https://cdn.jsdelivr.net/gh/ulyssesdotcodes/threejs-sandbox@94c68f4/motionBlurPass/src/MotionBlurPass.js"
        },
        "23ppkmp": { "id": "23ppkmp", "ref": "arg", "value": "motionBlur" },
        "vwa13pj": { "id": "vwa13pj" },
        "gap7au7": {
          "id": "gap7au7",
          "ref": "arg",
          "value": "_lib.EffectComposer"
        },
        "fzf3k5e": {
          "id": "fzf3k5e",
          "ref": "arg",
          "value": "_lib.RenderPass"
        },
        "tgacxe5": { "id": "tgacxe5", "ref": "@memory.cache" },
        "hsytqp3": { "id": "hsytqp3", "name": "", "ref": "@three.renderer" },
        "1j95u16": { "id": "1j95u16", "ref": "arg", "value": "canvas" },
        "svcshll": { "id": "svcshll", "ref": "arg", "value": "canvas" },
        "eamyj81": {
          "id": "eamyj81",
          "ref": "arg",
          "value": "_scene: internal"
        },
        "6s18wo7": {
          "id": "6s18wo7",
          "ref": "arg",
          "value": "_camera: internal"
        },
        "3jbd385": { "id": "3jbd385", "ref": "@memory.readReference" },
        "zs7iowa": { "id": "zs7iowa", "ref": "arg", "value": "_renderer" },
        "cha35wd": {
          "id": "cha35wd",
          "ref": "arg",
          "value": "_scene: internal"
        },
        "1js087x": {
          "id": "1js087x",
          "ref": "arg",
          "value": "_camera: internal"
        },
        "rmqxb31": { "id": "rmqxb31", "ref": "@flow.if" },
        "mh5ikoc": { "id": "mh5ikoc", "ref": "arg", "value": "onupdate" },
        "b2z2580": { "id": "b2z2580", "ref": "@flow.ap" },
        "wcnk2sw": { "id": "wcnk2sw", "ref": "arg", "value": "onupdate" },
        "m291v0o": { "id": "m291v0o" },
        "y2f8gog": {
          "id": "y2f8gog",
          "ref": "arg",
          "value": "_camera: internal"
        },
        "2veqlq1": { "id": "2veqlq1", "ref": "arg", "value": "_scene" },
        "7c7zppx": { "id": "7c7zppx", "ref": "@flow.runnable" },
        "aqfc51v": { "id": "aqfc51v", "ref": "@flow.if" },
        "x638fhv": {
          "id": "x638fhv",
          "ref": "@js.script",
          "value": "\nreturn arg1 && arg0"
        },
        "xmd2fqb": { "id": "xmd2fqb", "ref": "arg", "value": "fx" },
        "tfl58nu": { "id": "tfl58nu", "ref": "@memory.readReference" },
        "xel6go6": { "id": "xel6go6", "ref": "arg", "value": "_renderer" },
        "5m99dxg": {
          "id": "5m99dxg",
          "ref": "@js.script",
          "value": "fx?.forEach((pass, idx) => {\n  // +1 for renderpass\n  if(renderer.passes[idx + 1] !== pass) {\n    if(renderer.passes.length > idx + 1) {\n      console.log(\"removing\", idx)  \n      renderer.removePass(renderer.passes[idx + 1]);\n    }\n    console.log(\"adding fx \", pass)\n    renderer.insertPass(pass, idx + 1);\n  }\n});\n\nif(fx && renderer.passes.length > fx?.length + 1) {\n  renderer.passes.splice(fx.length, renderer.passes.length)\n}"
        },
        "t181hfh": { "id": "t181hfh", "ref": "@memory.readReference" },
        "4fxcgml": { "id": "4fxcgml", "ref": "arg", "value": "_renderer" },
        "fznso76": { "id": "fznso76", "ref": "arg", "value": "fx" },
        "8m5muxn/hlqmo48": { "id": "8m5muxn/hlqmo48" },
        "8m5muxn/inq87j9": {
          "id": "8m5muxn/inq87j9",
          "name": "",
          "ref": "@memory.cache"
        },
        "8m5muxn/gwavfrm": {
          "__isnodysseus": true,
          "id": "8m5muxn/gwavfrm",
          "ref": "@three.scene",
          "value": ""
        },
        "8m5muxn/7in78pu": {
          "id": "8m5muxn/7in78pu",
          "ref": "@data.set_mutable",
          "value": "position.z"
        },
        "8m5muxn/v1nqvl7": { "id": "8m5muxn/v1nqvl7", "value": "5" },
        "8m5muxn/33kmaec": { "id": "8m5muxn/33kmaec", "ref": "@memory.cache" },
        "8m5muxn/zci8apj": {
          "__isnodysseus": true,
          "id": "8m5muxn/zci8apj",
          "ref": "@three.camera",
          "value": ""
        },
        "t8adnxm": { "id": "t8adnxm", "ref": "arg", "value": "canvas" },
        "8m5muxn/39ivise": { "id": "8m5muxn/39ivise" },
        "40aw44l": { "id": "40aw44l", "ref": "@memory.reference" }
      },
      "out": "8m5muxn/8m5muxn"
    },
    {
      "description": "Create a [Light](https://threejs.org/docs/?q=light#api/en/lights/Light) of the type specified in the dropdown. The `intensity` input is the light's intensity",
      "edges": {
        "38zagsq": { "as": "metadata", "from": "38zagsq", "to": "out" },
        "output_val": { "as": "value", "from": "output_val", "to": "out" },
        "rgpu8gc": { "as": "lib", "from": "rgpu8gc", "to": "out" },
        "dn5axhu": { "as": "THREE", "from": "dn5axhu", "to": "rgpu8gc" },
        "6c3y90j": { "as": "args", "from": "6c3y90j", "to": "output_val" },
        "urjyf2e": { "as": "intensity", "from": "urjyf2e", "to": "output_val" },
        "vhuv19u": { "as": "selected", "from": "vhuv19u", "to": "output_val" },
        "vgloog2": { "as": "values", "from": "vgloog2", "to": "38zagsq" }
      },
      "id": "@three.light",
      "nodes": {
        "out": { "id": "out", "name": "@three.light", "ref": "return" },
        "rgpu8gc": { "id": "rgpu8gc" },
        "dn5axhu": {
          "id": "dn5axhu",
          "ref": "@js.import_module",
          "value": "https://cdn.jsdelivr.net/npm/three/build/three.module.js"
        },
        "output_val": {
          "id": "output_val",
          "ref": "@js.script",
          "value": "args = args ?? [];\nconst light = selected && new _lib.THREE[selected](...args);\nif(light) {\n  if(intensity) light.intensity = intensity;\n}\n\nreturn light"
        },
        "vhuv19u": { "id": "vhuv19u", "ref": "arg", "value": "__graph_value" },
        "urjyf2e": { "id": "urjyf2e", "ref": "arg", "value": "intensity" },
        "6c3y90j": { "id": "6c3y90j", "ref": "arg", "value": "args" },
        "38zagsq": { "id": "38zagsq" },
        "vgloog2": {
          "id": "vgloog2",
          "ref": "@js.script",
          "value": "return _lib.THREE ? Object.keys(_lib.THREE).filter(k => k.endsWith(\"Light\")) : []"
        }
      },
      "out": "out"
    },
    {
      "id": "threejs_example",
      "out": "out",
      "edges": {
        "0209mcq": { "as": "subscribe", "from": "0209mcq", "to": "out" },
        "3wnevku": { "as": "lib", "from": "3wnevku", "to": "out" },
        "j9ryrf2": { "as": "args", "from": "j9ryrf2", "to": "out" },
        "k30x2hp": { "as": "value", "from": "k30x2hp", "to": "out" },
        "mu0then": { "as": "display", "from": "mu0then", "to": "out" },
        "2fn7s1a": { "as": "background", "from": "2fn7s1a", "to": "mu0then" },
        "8dy573e": { "as": "resultPanel", "from": "8dy573e", "to": "mu0then" },
        "dvh66tl": { "as": "children", "from": "dvh66tl", "to": "8dy573e" },
        "72wzn5d": { "as": "true", "from": "72wzn5d", "to": "k30x2hp" },
        "efvhz2z": { "as": "pred", "from": "efvhz2z", "to": "k30x2hp" },
        "em7kgrn": { "as": "reference", "from": "em7kgrn", "to": "efvhz2z" },
        "dbxyytc": { "as": "objects", "from": "dbxyytc", "to": "72wzn5d" },
        "ulmar21": { "as": "canvas", "from": "ulmar21", "to": "72wzn5d" },
        "2acdour": { "as": "reference", "from": "2acdour", "to": "ulmar21" },
        "5oxzqna": { "as": "arg1", "from": "5oxzqna", "to": "dbxyytc" },
        "2t1bca9": { "as": "canvas", "from": "2t1bca9", "to": "j9ryrf2" },
        "4d0h7cj": { "as": "THREE", "from": "4d0h7cj", "to": "3wnevku" },
        "8ke4eq0": { "as": "domnodeadded", "from": "8ke4eq0", "to": "0209mcq" },
        "lzeqibk": { "as": "fn", "from": "lzeqibk", "to": "8ke4eq0" },
        "vf6901s": { "as": "args", "from": "vf6901s", "to": "8ke4eq0" },
        "vymi9dp": { "as": "value", "from": "vymi9dp", "to": "vf6901s" },
        "fp5dv7m": { "as": "canvas_id", "from": "fp5dv7m", "to": "vymi9dp" },
        "gtyz7bl": { "from": "gtyz7bl", "to": "dbxyytc", "as": "arg2" }
      },
      "nodes": {
        "out": {
          "id": "out",
          "name": "threejs_example",
          "ref": "return"
        },
        "mu0then": { "id": "mu0then" },
        "8dy573e": { "id": "8dy573e", "ref": "@html.html_element" },
        "dvh66tl": { "id": "dvh66tl", "ref": "@html.html_element" },
        "2fn7s1a": {
          "edges": {
            "1wil42w": { "as": "height", "from": "1wil42w", "to": "m9gy23g" },
            "4597zph": { "as": "id", "from": "4597zph", "to": "mj5a33h" },
            "7301d8k": { "as": "value", "from": "7301d8k", "to": "2fn7s1a" },
            "m9gy23g": { "as": "style", "from": "m9gy23g", "to": "mj5a33h" },
            "mj5a33h": { "as": "props", "from": "mj5a33h", "to": "7301d8k" },
            "rcodn7b": { "as": "height", "from": "rcodn7b", "to": "mj5a33h" },
            "sgmm2eq": { "as": "width", "from": "sgmm2eq", "to": "m9gy23g" },
            "w6r5m0k": { "as": "width", "from": "w6r5m0k", "to": "mj5a33h" }
          },
          "id": "2fn7s1a",
          "name": "canvas",
          "nodes": {
            "1wil42w": {
              "2fn7s1a": "zdgj2co",
              "id": "1wil42w",
              "value": "100vh"
            },
            "2fn7s1a": { "id": "2fn7s1a", "name": "canvas", "ref": "return" },
            "4597zph": { "id": "4597zph", "value": "threejsrender" },
            "7301d8k": {
              "id": "7301d8k",
              "ref": "@html.html_element",
              "value": "canvas"
            },
            "m9gy23g": { "id": "m9gy23g" },
            "mj5a33h": { "id": "mj5a33h" },
            "rcodn7b": {
              "id": "rcodn7b",
              "ref": "@js.script",
              "value": "return window.innerHeight"
            },
            "sgmm2eq": { "id": "sgmm2eq", "value": "100vw" },
            "w6r5m0k": {
              "id": "w6r5m0k",
              "ref": "@js.script",
              "value": "return window.innerWidth"
            }
          },
          "out": "2fn7s1a"
        },
        "k30x2hp": { "id": "k30x2hp", "ref": "@flow.if" },
        "efvhz2z": { "id": "efvhz2z", "ref": "@memory.readReference" },
        "em7kgrn": { "id": "em7kgrn", "ref": "arg", "value": "canvas" },
        "72wzn5d": { "id": "72wzn5d", "ref": "@three.setup" },
        "ulmar21": { "id": "ulmar21", "ref": "@memory.readReference" },
        "2acdour": { "id": "2acdour", "ref": "arg", "value": "canvas" },
        "dbxyytc": { "id": "dbxyytc" },
        "5oxzqna": {
          "id": "5oxzqna",
          "ref": "@three.light",
          "value": "HemisphereLight"
        },
        "j9ryrf2": { "id": "j9ryrf2" },
        "2t1bca9": { "id": "2t1bca9", "ref": "@memory.reference" },
        "3wnevku": { "id": "3wnevku" },
        "4d0h7cj": {
          "id": "4d0h7cj",
          "ref": "@js.import_module",
          "value": "https://cdn.jsdelivr.net/npm/three/build/three.module.js"
        },
        "0209mcq": { "id": "0209mcq" },
        "8ke4eq0": { "id": "8ke4eq0", "ref": "@flow.ap" },
        "vf6901s": { "id": "vf6901s" },
        "vymi9dp": {
          "id": "vymi9dp",
          "ref": "@js.script",
          "value": "const canvas = document.getElementById(canvas_id);\nreturn canvas"
        },
        "fp5dv7m": { "id": "fp5dv7m", "value": "threejsrender" },
        "lzeqibk": { "id": "lzeqibk", "ref": "arg", "value": "canvas.set" },
        "gtyz7bl": { "id": "gtyz7bl" }
      }
    }
  ]
}
