Pipeline
megane-viewer / Pipeline
Class: Pipeline
Defined in: pipeline/builder.ts:1032
Pipeline graph builder.
Build a DAG of processing nodes and serialize to the SerializedPipeline v3 JSON format understood by the TypeScript pipeline engine.
A Viewport node must be explicitly added and connected for data to be rendered.
Example:
const pipe = new Pipeline() const s = pipe.addNode(new LoadStructure('protein.pdb')) const v = pipe.addNode(new Viewport()) pipe.addEdge(s.out.particle, v.inp.particle) const json = pipe.toJSON()
Constructors
Constructor
new Pipeline():
Pipeline
Returns
Pipeline
Methods
addEdge()
addEdge(
source,target):void
Defined in: pipeline/builder.ts:1071
Connect a source port to a target port.
Both ports must belong to nodes already added to this pipeline:
pipe.addEdge(s.out.particle, f.inp.particle) pipe.addEdge(f.out.particle, v.inp.particle)
Parameters
source
NodePort
target
NodePort
Returns
void