{
  "Name": "Trail",
  "_id": "27afc3a2-7297-4670-8081-5788f56924b3",
  "Namespace": "lib.3d.generate",
  "Description": "",
  "Inputs": [
    {
      "Name": "Position.X",
      "MetaInstanceID": "800977b2-aab7-43a0-9bc1-e1ec106dc5c7",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Relevant",
      "Description": "",
      "Min": "-10000",
      "Max": "10000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Position.Y",
      "MetaInstanceID": "9766d0d7-3354-426e-b2e4-05b77a884e45",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Relevant",
      "Description": "",
      "Min": "-10000",
      "Max": "10000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Position.Z",
      "MetaInstanceID": "10bba6e9-7ce6-4a73-ac4e-6630cf334126",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-10000",
      "Max": "10000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ResetTrigger",
      "MetaInstanceID": "db4b46e7-48f0-45be-8d77-208650ac7089",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "MaxSteps",
      "MetaInstanceID": "b9fc0cb6-405d-48e4-bc68-b069279c93de",
      "DefaultValue": {
        "Type": "Float",
        "Value": "100"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "2",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "UVMode",
      "MetaInstanceID": "cb37a0b6-ad03-4023-aab6-d28fa1c60425",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": [
        {
          "Name": "Time",
          "Value": "0"
        },
        {
          "Name": "Length",
          "Value": "1"
        },
        {
          "Name": "External",
          "Value": "2"
        }
      ]
    },
    {
      "Name": "Width",
      "MetaInstanceID": "98befeea-f027-4787-ab9d-6811657a877a",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "MinDistance",
      "MetaInstanceID": "c6919c2e-f7e9-45da-9d5d-79c5b2905b39",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0.1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "TextureScale",
      "MetaInstanceID": "61139a74-b4b8-47e7-9700-47d76e17d572",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0.5000002"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "UpVector.X",
      "MetaInstanceID": "cddb02cc-a9b1-490f-8973-d651eed1e89f",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-10000",
      "Max": "10000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "UpVector.Y",
      "MetaInstanceID": "da1c1945-7a26-4a52-8bf3-0eeb6daddb36",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-10000",
      "Max": "10000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "UpVector.Z",
      "MetaInstanceID": "a062d786-1b6d-4ae7-924c-96812eb6d70c",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-10000",
      "Max": "10000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Color.R",
      "MetaInstanceID": "19e16b1b-9bdd-4ecf-af4f-d841a10e327f",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Color.G",
      "MetaInstanceID": "d808d934-bbd8-4b6f-a167-c1f3aaa20b14",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Color.B",
      "MetaInstanceID": "ee367834-9e97-44a9-8fbf-72fb3831ca16",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Color.A",
      "MetaInstanceID": "caf07299-9b6e-4889-b2fd-a9c67f8784fd",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Twist",
      "MetaInstanceID": "cbfb4b74-d4ee-4127-87bc-7bc80a19c1f4",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    }
  ],
  "Outputs": [
    {
      "Name": "Out",
      "MetaInstanceID": "c1fc0728-a6ce-4d51-923e-76bfeab34cfc",
      "MetaID": "79122951-7bc4-4c68-b085-866eab828248"
    }
  ],
  "OperatorParts": [
    {
      "MetaInstanceID": "578456e1-7f03-4bed-a447-e4f7c70aa19e",
      "MetaID": "e1757897-3b7c-408d-89a8-cdb892d6749b",
      "Name": "TrailFunc",
      "Version": "c147a3a5-4af2-4f0d-bc0e-e8a3a7cc5a4a",
      "Type": "Scene",
      "IsMultiInput": "True",
      "Script": [
        "using System;",
        "using System.Collections.Generic;",
        "using SharpDX;",
        "using SharpDX.Direct3D11;",
        "using Buffer = SharpDX.Direct3D11.Buffer;",
        "",
        "namespace Framefield.Core.IDe1757897_3b7c_408d_89a8_cdb892d6749b",
        "{",
        "    public class Class_Trail : OperatorPart.Function",
        "    {",
        "        //>>> _inputids",
        "        private enum InputId",
        "        {",
        "            PositionX = 0,",
        "            PositionY = 1,",
        "            PositionZ = 2,",
        "            ResetTrigger = 3,",
        "            MaxSteps = 4,",
        "            UVMode = 5,",
        "            Width = 6,",
        "            MinDistance = 7,",
        "            TextureScale = 8,",
        "            UpVectorX = 9,",
        "            UpVectorY = 10,",
        "            UpVectorZ = 11,",
        "            ColorR = 12,",
        "            ColorG = 13,",
        "            ColorB = 14,",
        "            ColorA = 15,",
        "            Twist = 16",
        "        }",
        "        //<<< _inputids",
        "",
        "        public override void Dispose() {",
        "            Utilities.DisposeObj(ref _planeMesh);",
        "        }",
        "",
        "",
        "        void Reset()",
        "        {",
        "        \t_steps = 0;",
        "        \t_lastTextureU = 0;",
        "        \tRebuildVertexLists(0);",
        "        \t//_previousStepIndex= -1;",
        "        \t//paintedUpdates.setValue(0);",
        "        }",
        "        ",
        "        void positionChangedCB()",
        "        {",
        "        \t//Trail* trail = (Trail*)data;",
        "        \t",
        "        \tSetupVertices();",
        "        \t//paintedUpdates.setValue( trail->paintedUpdates.getValue() + 1 );",
        "        }",
        "        ",
        "        Vector3 _position;        ",
        "        Vector3 _lastPosition;",
        "        Vector3 _up;",
        "        Vector3 _previousExtendVector;",
        "        Vector3 _slagPosition;  // moving behind position to stabilize rotation axis",
        "",
        "        float _width;",
        "        int _steps = 0;",
        "        //int _previousStepIndex = -1;",
        "        int _maxSteps;",
        "        //int _maxStepsCached;",
        "        int _uvMode;",
        "        int _paintedUpdates = 0;",
        "        float _textureScale;",
        "        float _lastTextureU;",
        "        float _minDistance;",
        "        float _paintedLength;",
        "        float _twist;",
        "",
        "        const int TIME=0, LENGTH=1, EXTERNAL=2;        ",
        "",
        "        void SetupVertices()",
        "        {        \t",
        "        \tif(_steps == 0) {        ",
        "        \t\t_lastPosition = _position;",
        "        \t\t++_steps;",
        "                _vertices.Add(_position);",
        "                _vertices.Add(_position);",
        "                _texUs.Add(0);",
        "        \t\treturn;",
        "        \t}",
        "        ",
        "        \t// Calculate last two vertices ",
        "        \tVector3 diff = _position - _lastPosition;",
        "        \t",
        "        \tfloat friction= 0.99f;",
        "        \t_slagPosition =  friction * _position + (1-friction) * _slagPosition;",
        "        \tVector3 axis = _position - _slagPosition;",
        "        \t",
        "        \tvar m = Matrix.Identity;",
        "        \tMatrix.RotationAxis(ref axis, _twist/180.0f*3.141578f, out m);",
        "            //Matrix.RotationAxis(ref diff, 20f, out m);",
        "",
        "            Vector3 extendVec = Vector3.Cross(diff,_up);",
        "            var rotatedVec= Vector3.Transform( extendVec, m);",
        "            extendVec = new Vector3( rotatedVec.X, rotatedVec.Y, rotatedVec.Z);",
        "        \textendVec.Normalize();",
        "        \textendVec *= _width/2;",
        "",
        "            // Handle different time modes",
        "        \tfloat textureU = 0;",
        "        \tswitch (_uvMode)",
        "        \t{",
        "                case TIME:",
        "        \t\t\ttextureU = _paintedUpdates / _textureScale/_steps;",
        "        \t\t\tbreak;",
        "        \t\tcase LENGTH:",
        "        \t\t\ttextureU = _lastTextureU + diff.Length() / _textureScale;",
        "        \t\t\tbreak;",
        "        \t\tcase EXTERNAL:",
        "        \t\t\t//_textureU = _textureU;    // Set externally",
        "                    break;",
        "        \t\tdefault:",
        "        \t\t\ttextureU = _lastTextureU + diff.Length() * _textureScale;",
        "        \t\t\tbreak;",
        "        \t}",
        "        \t",
        "",
        "        ",
        "        \t// Change angle of previous line",
        "            //Vector3 averageExtendVec = (_previousExtendVector + _extendVector) * 0.5f;\t\t",
        "        \t//averageExtendVec.Normalize();",
        "        \t//averageExtendVec *= _width * 0.5f;",
        "        \t//_vertices[stepIndex- 2  ] = _lastPosition + averageExtendVec;",
        "        \t//_vertices[stepIndex- 2+1] = _lastPosition - averageExtendVec;",
        "",
        "            int stepIndex = Math.Min( _texUs.Count, Math.Min(_steps, _maxSteps));",
        "",
        "            // Make a Step        \t",
        "        \tif(diff.Length() > _minDistance) {",
        "",
        "                // Shift oldest vertex to make room for a new entry",
        "                if (stepIndex == _maxSteps) {",
        "                    _vertices.RemoveAt(0);",
        "                    _vertices.RemoveAt(0);",
        "                    _texUs.RemoveAt(0);",
        "                }",
        "",
        "        \t\t_previousExtendVector = extendVec;",
        "        ",
        "        \t\t_vertices.Add(_position + extendVec);",
        "        \t\t_vertices.Add(_position - extendVec);        \t\t",
        "        \t\t_texUs.Add(textureU);",
        "        \t\t\t\t\t\t\t\t\t ",
        "        \t\t++_steps;",
        "        \t\t_lastPosition = _position;",
        "        \t\t_lastTextureU = textureU;",
        "        \t}",
        "        \telse {",
        "        \t\t_vertices[stepIndex*2-2  ] = _position + extendVec;",
        "        \t\t_vertices[stepIndex*2-1] = _position - extendVec;",
        "        \t\t\t",
        "        \t\t_texUs[stepIndex-1] = textureU;        \t\t",
        "        \t}",
        "        \t_paintedLength= textureU;",
        "        }",
        "        ",
        "",
        "        public override OperatorPartContext Eval(OperatorPartContext context, List<OperatorPart> inputs, int outputIdx) {",
        "",
        "            var PositionX = inputs[(int)InputId.PositionX].Eval(context).Value;",
        "            var PositionY = inputs[(int)InputId.PositionY].Eval(context).Value;",
        "            var PositionZ = inputs[(int)InputId.PositionZ].Eval(context).Value;",
        "            _position = new Vector3(PositionX, PositionY, PositionZ);",
        "            var ResetTrigger = inputs[(int)InputId.ResetTrigger].Eval(context).Value;",
        "            _maxSteps = (int)inputs[(int)InputId.MaxSteps].Eval(context).Value;",
        "            _uvMode = (int) inputs[(int)InputId.UVMode].Eval(context).Value;",
        "            _width = inputs[(int)InputId.Width].Eval(context).Value;",
        "            _minDistance = inputs[(int)InputId.MinDistance].Eval(context).Value;",
        "            _textureScale = inputs[(int)InputId.TextureScale].Eval(context).Value;",
        "            var UpVectorX = inputs[(int)InputId.UpVectorX].Eval(context).Value;",
        "            var UpVectorY = inputs[(int)InputId.UpVectorY].Eval(context).Value;",
        "            var UpVectorZ = inputs[(int)InputId.UpVectorZ].Eval(context).Value;",
        "            _up = new Vector3(UpVectorX, UpVectorY, UpVectorZ);",
        "            var ColorR = inputs[(int)InputId.ColorR].Eval(context).Value;",
        "            var ColorG = inputs[(int)InputId.ColorG].Eval(context).Value;",
        "            var ColorB = inputs[(int)InputId.ColorB].Eval(context).Value;",
        "            var ColorA = inputs[(int)InputId.ColorA].Eval(context).Value;",
        "            var Color = new Color4(ColorR, ColorG, ColorB, ColorA);",
        "            _twist = inputs[(int)InputId.Twist].Eval(context).Value;",
        "",
        "            //int verticeCount = (_maxSteps+1)*2;",
        "            //if (_vertices.Count != verticeCount) {",
        "                //RebuildVertexLists(verticeCount);",
        "            //}",
        "",
        "            if (_planeMesh == null || Changed) {",
        "                // Function>>> ",
        "                var normal = new Vector3(0.0f, 0.0f, -1.0f);",
        "                var color = Color;",
        "                var tangent = new Vector3(1.0f, 0.0f, 0.0f);",
        "                var binormal = new Vector3(0.0f, -1.0f, 0.0f);",
        "                    ",
        "                var inputElements = new InputElement[] {",
        "                    new InputElement(\"POSITION\", 0, SharpDX.DXGI.Format.R32G32B32A32_Float, 0, 0),",
        "                    new InputElement(\"NORMAL\", 0, SharpDX.DXGI.Format.R32G32B32_Float, 16, 0),",
        "                    new InputElement(\"COLOR\", 0, SharpDX.DXGI.Format.R32G32B32A32_Float, 28, 0),",
        "                    new InputElement(\"TEXCOORD\", 0, SharpDX.DXGI.Format.R32G32_Float, 44, 0),",
        "                    new InputElement(\"TANGENT\", 0, SharpDX.DXGI.Format.R32G32B32_Float, 52, 0),",
        "                    new InputElement(\"BINORMAL\", 0, SharpDX.DXGI.Format.R32G32B32_Float, 64, 0)",
        "                };",
        "",
        "        \t   if(ResetTrigger > 0.5f) {",
        "        \t       Reset();",
        "        \t   }                    ",
        "",
        "                if (_position != _lastPosition) {",
        "                    SetupVertices();",
        "                }",
        "",
        "                if (_steps < 2)",
        "                    return context;",
        "                    ",
        "                ",
        "                // Setup vertex-structure",
        "                const int attributesSize = 76;",
        "                int numVertexBufferElements = (_maxSteps + 1) * 2;",
        "                int numTriangles = _vertices.Count < 4 ? 0 : _vertices.Count - 2;",
        "                int streamSize = numVertexBufferElements * 3 * attributesSize;",
        "",
        "                if (_planeMesh == null || streamSize != _planeMesh.Vertices.Description.SizeInBytes) ",
        "                {",
        "                    Utilities.DisposeObj(ref _planeMesh);",
        "                    using (var stream = new DataStream(streamSize, true, true))",
        "                    {",
        "                        var vertices = new Buffer(context.D3DDevice, stream, new BufferDescription",
        "                                           {",
        "                                               BindFlags = BindFlags.VertexBuffer,",
        "                                               CpuAccessFlags = CpuAccessFlags.Write,",
        "                                               OptionFlags = ResourceOptionFlags.None,",
        "                                               SizeInBytes = streamSize,",
        "                                               Usage = ResourceUsage.Dynamic",
        "                                           });",
        "                        _planeMesh = new Mesh { InputElements = inputElements, Vertices = vertices, NumTriangles = numTriangles, AttributesSize = attributesSize };",
        "                    }",
        "                }",
        "                if (_planeMesh.NumTriangles != numTriangles)",
        "                {",
        "                    _planeMesh.NumTriangles = numTriangles;",
        "                }",
        "",
        "                DataStream vertexStream;",
        "                DataBox box = context.D3DDevice.ImmediateContext.MapSubresource(_planeMesh.Vertices, MapMode.WriteDiscard, MapFlags.None, out vertexStream);",
        "                using (vertexStream)",
        "                {",
        "                    vertexStream.Position = 0;",
        "    ",
        "                    float uShift = _paintedLength;",
        "    ",
        "                    for (int i = 0; i < _vertices.Count/2 - 1; i += 1) {",
        "                        // tri 1 vert 1",
        "                        vertexStream.Write(new Vector4(_vertices[i*2], 1));",
        "                        vertexStream.Write(normal);",
        "                        vertexStream.Write(color);",
        "                        vertexStream.Write( new Vector2(_texUs[i]-uShift,0));",
        "                        vertexStream.Write(tangent);",
        "                        vertexStream.Write(binormal);",
        "    ",
        "                        // tri 1 vert 2",
        "                        vertexStream.Write(new Vector4(_vertices[i*2 + 1], 1));",
        "                        vertexStream.Write(normal);",
        "                        vertexStream.Write(color);",
        "                        vertexStream.Write(new Vector2(_texUs[i]-uShift, 1));",
        "                        vertexStream.Write(tangent);",
        "                        vertexStream.Write(binormal);",
        "    ",
        "                        // tri 1 vert 3",
        "                        vertexStream.Write(new Vector4(_vertices[i*2 + 2], 1));",
        "                        vertexStream.Write(normal);",
        "                        vertexStream.Write(color);",
        "                        vertexStream.Write(new Vector2(_texUs[i+1]-uShift, 0));",
        "                        vertexStream.Write(tangent);",
        "                        vertexStream.Write(binormal);",
        "    ",
        "                        // tri 2 vert 1",
        "                        vertexStream.Write(new Vector4(_vertices[i*2 + 1], 1));",
        "                        vertexStream.Write(normal);",
        "                        vertexStream.Write(color);",
        "                        vertexStream.Write(new Vector2(_texUs[i]-uShift, 1));",
        "                        vertexStream.Write(tangent);",
        "                        vertexStream.Write(binormal);",
        "    ",
        "                        // tri 2 vert 2",
        "                        vertexStream.Write(new Vector4(_vertices[i*2 + 3], 1));",
        "                        vertexStream.Write(normal);",
        "                        vertexStream.Write(color);",
        "                        vertexStream.Write(new Vector2(_texUs[i+1]-uShift, 1));",
        "                        vertexStream.Write(tangent);",
        "                        vertexStream.Write(binormal);",
        "    ",
        "                        // tri 2 vert 3",
        "                        vertexStream.Write(new Vector4(_vertices[i*2 + 2], 1));",
        "                        vertexStream.Write(normal);",
        "                        vertexStream.Write(color);",
        "                        vertexStream.Write(new Vector2(_texUs[i+1]-uShift, 0));",
        "                        vertexStream.Write(tangent);",
        "                        vertexStream.Write(binormal);",
        "                    }",
        "    ",
        "    ",
        "                    context.D3DDevice.ImmediateContext.UnmapSubresource(_planeMesh.Vertices, 0);",
        "                }",
        "",
        "                Changed = false;",
        "            }",
        "",
        "            context.Renderer.SetupEffect(context);",
        "            context.Renderer.Render(_planeMesh, context);",
        "",
        "            return context;",
        "        }",
        "",
        "        private void RebuildVertexLists(int verticeCount) {",
        "            _vertices.Clear();",
        "            _texUs.Clear();",
        "        }",
        "",
        "        private List<Vector3> _vertices = new List<Vector3>(100);",
        "        private List<float> _texUs = new List<float>(100);",
        "        ",
        "",
        "        private Mesh _planeMesh;",
        "    }",
        "}"
      ],
      "AdditionalAssemblies": []
    }
  ],
  "Operators": [],
  "Connections": [
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "c1fc0728-a6ce-4d51-923e-76bfeab34cfc"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "800977b2-aab7-43a0-9bc1-e1ec106dc5c7",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "9766d0d7-3354-426e-b2e4-05b77a884e45",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "10bba6e9-7ce6-4a73-ac4e-6630cf334126",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "db4b46e7-48f0-45be-8d77-208650ac7089",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "b9fc0cb6-405d-48e4-bc68-b069279c93de",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "cb37a0b6-ad03-4023-aab6-d28fa1c60425",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "98befeea-f027-4787-ab9d-6811657a877a",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "c6919c2e-f7e9-45da-9d5d-79c5b2905b39",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "61139a74-b4b8-47e7-9700-47d76e17d572",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "cddb02cc-a9b1-490f-8973-d651eed1e89f",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "da1c1945-7a26-4a52-8bf3-0eeb6daddb36",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "a062d786-1b6d-4ae7-924c-96812eb6d70c",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "19e16b1b-9bdd-4ecf-af4f-d841a10e327f",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "d808d934-bbd8-4b6f-a167-c1f3aaa20b14",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "ee367834-9e97-44a9-8fbf-72fb3831ca16",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "caf07299-9b6e-4889-b2fd-a9c67f8784fd",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "cbfb4b74-d4ee-4127-87bc-7bc80a19c1f4",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "578456e1-7f03-4bed-a447-e4f7c70aa19e"
    }
  ]
}