{"behavior_tree":{"parameters":[{"type":"Float","name":"segmentCount","value":[5.0,0.0,0.0,0.0]},{"type":"Float","name":"segmentI","value":[0.0,0.0,0.0,0.0]},{"type":"Float","name":"tipI","value":[-1.0,0.0,0.0,0.0]},{"type":"Float","name":"baseAngle","value":[70.0,0.0,0.0,0.0]},{"type":"Float","name":"targetDistance","value":[200.0,0.0,0.0,0.0]},{"type":"Float","name":"distancePerSecond","value":[40.0,0.0,0.0,0.0]}],"rootNode":{"name":"Start","position":[0.0,0.0],"type":"Decorator","childTreePath":"","children":[{"name":"Create Root","position":[0.0,0.0],"type":"Decorator","childTreePath":"","children":[{"name":"For Loop","position":[0.0,0.0],"type":"Decorator","childTreePath":"","children":[{"name":"Create Tip","position":[0.0,0.0],"type":"Decorator","childTreePath":"","children":[{"name":"Grow Segment","position":[0.0,0.0],"type":"ChildProcess","childTreePath":"grow_segment.json","onStart":"progress = segmentI / (segmentCount - 1)\nangle = -sin((progress + 0.35) * 6) * 10\nif (baseAngle < 0) {\n    angle = -angle\n}\n\nstartAngle = angle * 1.5\nif (segmentI == 0) {\n    angle += baseAngle\n    startAngle = 0\n}\nchild.nodeI = tipI\nchild.targetDistance = targetDistance / segmentCount\nchild.startAngle = startAngle\nchild.endAngle = angle\nchild.distancePerSecond = distancePerSecond / segmentCount","onUpdate":"","onDone":""}],"onStart":"\ntipI = Stem.createNode(tipI, 0)\nStem.setNodeType(tipI, 1)","onUpdate":"","onDone":""}],"onStart":"","onUpdate":"","onDone":"if (segmentI < (segmentCount - 1)) {\n    result = Running\n    segmentI += 1\n}"}],"onStart":"if (tipI == -1) {\n    tipI = Stem.createNode(-1, 0)\n}","onUpdate":"","onDone":""}],"onStart":"","onUpdate":"","onDone":""}}}