Skip to content

Flow Route

anidivr edited this page Nov 28, 2023 · 1 revision

FlowRoute is a specialized version of FlowNode designed for representing routing points in a flow diagram.

Constructors

  • FlowRoute(diagram: FlowDiagram, route: FlowRouteParameters)
    • Description: Constructs a new FlowRoute instance with a reference to the flow diagram and specific route parameters.
    • Parameters:
      • diagram (FlowDiagram): The flow diagram to which this route belongs.
      • route (FlowRouteParameters): Configuration parameters for the route.
    • Example:
      const flowDiagram = new FlowDiagram();
      const routeParams = { id: 'route1', radius: 0.2 };
      const flowRoute = new FlowRoute(flowDiagram, routeParams);

Properties

  • radius
    • Type: number
    • Description: The radius of the route.

Override Methods

  • createGeometry()
    • Description: Overrides the createGeometry method from FlowNode to create a circular geometry based on the route's radius.
    • Returns: BufferGeometry
    • Usage:
      class CustomFlowRoute extends FlowRoute {
        override createGeometry(): BufferGeometry {
          return new CustomGeometry(this.radius)
        }
      }
      // or
      node.createGeometry = (): BufferGeometry => {
        return new CustomGeometry(this.radius)
      }
Clone this wiki locally