{"behavior_tree":{"result":"Running","relativeFilePath":"","parameters":[{"type":"Float","name":"segmentCount","value":[12.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":"endAngleDelta","value":[-0.05592,0.0,0.0,0.0]},{"type":"Float","name":"startAngle","value":[-19.86993,0.0,0.0,0.0]},{"type":"Float","name":"tiltAngle","value":[-17.46557,0.0,0.0,0.0]}],"rootNode":{"name":"Start","position":[0.0,0.0],"type":"Decorator","childTreePath":"","currentChildI":-1,"children":[{"name":"","position":[0.0,0.0],"type":"Sequence","childTreePath":"","currentChildI":-1,"children":[{"name":"Create Root","position":[0.0,0.0],"type":"Decorator","childTreePath":"","currentChildI":-1,"children":[{"name":"For Loop","position":[0.0,0.0],"type":"Decorator","childTreePath":"","currentChildI":-1,"children":[{"name":"Create Tip","position":[0.0,0.0],"type":"Decorator","childTreePath":"","currentChildI":-1,"children":[{"name":"","position":[0.0,0.0],"type":"Sequence","childTreePath":"","currentChildI":-1,"children":[{"name":"Grow Segment","position":[0.0,0.0],"type":"ChildProcess","childTreePath":"grow_segment.json","currentChildI":-1,"onStart":"child.nodeI = tipI\nchild.targetDistance = 80 - 4 * segmentI\nchild.targetDistance *= random(0.9, 1.1)\nchild.startAngle = startAngle - -startAngle * 0.75 * segmentI\nchild.endAngle = endAngleDelta * segmentI\nif (segmentI == 0) {\n    child.endAngle = tiltAngle\n}\nchild.distancePerSecond = 12 - 0.9 * segmentI\nchild.distancePerSecond *= 2","onUpdate":"","onDone":""},{"name":"Grow Leaves","position":[0.0,0.0],"type":"ChildProcess","childTreePath":"fern_leaf_branch.json","currentChildI":-1,"onStart":"child.tipI = tipI\nchild.targetDistance = (80 - 5 * segmentI) * 2.2\nchild.targetDistance *= random(0.8, 1.2)\nchild.segmentCount = ceil(child.targetDistance / 40)\nchild.baseAngle = 70 + random(-5, 5)\nchild.distancePerSecond = (12 - 0.85 * segmentI) * 1.5\nchild.distancePerSecond *= 2","onUpdate":"","onDone":""},{"name":"Grow Leaves","position":[0.0,0.0],"type":"ChildProcess","childTreePath":"fern_leaf_branch.json","currentChildI":-1,"onStart":"child.tipI = tipI\nchild.targetDistance = (80 - 5 * segmentI) * 2.2\nchild.targetDistance *= random(0.8, 1.2)\nchild.segmentCount = ceil(child.targetDistance / 40)\nchild.baseAngle = -70 + random(-5, 5)\nchild.distancePerSecond = (12 - 0.85 * segmentI) * 1.5\nchild.distancePerSecond *= 2","onUpdate":"","onDone":""}],"onStart":"","onUpdate":"","onDone":""}],"onStart":"tipI = Stem.createNode(tipI, 0)","onUpdate":"","onDone":""}],"onStart":"","onUpdate":"","onDone":"if (segmentI < (segmentCount - 1)) {\n    result = Running\n    segmentI += 1\n}"}],"onStart":"tipI = Stem.createNode(-1, 0)\nendAngleDelta = random(-1.2, 1.2)\nstartAngle = random(10, 20)\ntiltAngle = random(0, 20)\nif (random(0, 1) > 0.5) {\n    startAngle = -startAngle\n}\nif (endAngleDelta < 0) {\n    tiltAngle = -tiltAngle\n}","onUpdate":"","onDone":""},{"name":"","position":[0.0,0.0],"type":"Sequence","childTreePath":"","currentChildI":-1,"children":[{"name":"Grow Segment","position":[0.0,0.0],"type":"ChildProcess","childTreePath":"grow_segment.json","currentChildI":-1,"onStart":"tipI = Stem.createNode(tipI, 0)\nchild.nodeI = tipI\nStem.setNodeType(child.nodeI, 1)\nchild.targetDistance = 50 * 0.5\nchild.startAngle = 0\nchild.endAngle = 0\nchild.distancePerSecond = 3.5 * 0.5\nchild.distancePerSecond *= 2","onUpdate":"","onDone":""},{"name":"Grow Segment","position":[0.0,0.0],"type":"ChildProcess","childTreePath":"grow_segment.json","currentChildI":-1,"onStart":"tipI = Stem.createNode(tipI, 0)\nchild.nodeI = tipI\nStem.setNodeType(child.nodeI, 1)\nchild.targetDistance = 50 * 0.5\nchild.startAngle = 0\nchild.endAngle = 0\nchild.distancePerSecond = 3.5 * 0.5\nchild.distancePerSecond *= 2","onUpdate":"","onDone":""}],"onStart":"","onUpdate":"","onDone":""}],"onStart":"","onUpdate":"","onDone":""}],"onStart":"","onUpdate":"","onDone":""}}}