-
Notifications
You must be signed in to change notification settings - Fork 3
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.
-
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);
-
Description: Constructs a new
-
radius
-
Type:
number
- Description: The radius of the route.
-
Type:
-
createGeometry()
-
Description: Overrides the
createGeometry
method fromFlowNode
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) }
-
Description: Overrides the