@openhps/core
Version:
Open Hybrid Positioning System - Core component
32 lines • 2.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const nodes_1 = require("../../nodes");
const FrameDebounceNode_1 = require("../../nodes/shapes/FrameDebounceNode");
const ObjectFilterNode_1 = require("../../nodes/shapes/ObjectFilterNode");
const GraphBuilder_1 = require("../builders/GraphBuilder");
/**
*
*/
function register() {
GraphBuilder_1.GraphShapeBuilder.registerShape('convertToSpace', (space) => new nodes_1.ReferenceSpaceConversionNode(space, {
inverse: false,
}));
GraphBuilder_1.GraphShapeBuilder.registerShape('convertFromSpace', (space) => new nodes_1.ReferenceSpaceConversionNode(space, {
inverse: true,
}));
GraphBuilder_1.GraphShapeBuilder.registerShape('chunk', (size, timeout, timeoutUnit) => new nodes_1.FrameChunkNode(size, timeout, timeoutUnit));
GraphBuilder_1.GraphShapeBuilder.registerShape('clone', () => new nodes_1.FrameCloneNode());
GraphBuilder_1.GraphShapeBuilder.registerShape('debounce', (timeout, timeoutUnit) => new FrameDebounceNode_1.FrameDebounceNode(timeout, timeoutUnit));
GraphBuilder_1.GraphShapeBuilder.registerShape('delay', (timeout, timeoutUnit) => new nodes_1.FrameDelayNode(timeout, timeoutUnit));
GraphBuilder_1.GraphShapeBuilder.registerShape('filter', (filterFn) => new nodes_1.FrameFilterNode(filterFn));
GraphBuilder_1.GraphShapeBuilder.registerShape('flatten', () => new nodes_1.FrameFlattenNode());
GraphBuilder_1.GraphShapeBuilder.registerShape('buffer', () => new nodes_1.MemoryBufferNode());
GraphBuilder_1.GraphShapeBuilder.registerShape('filterObjects', (filterFn) => new ObjectFilterNode_1.ObjectFilterNode(filterFn));
GraphBuilder_1.GraphShapeBuilder.registerShape('store', () => new nodes_1.CallbackSinkNode());
GraphBuilder_1.GraphShapeBuilder.registerShape('merge', (by, timeout, timeoutUnit) => new nodes_1.ObjectMergeNode(by, {
timeout,
timeoutUnit,
}));
}
exports.default = register;
//# sourceMappingURL=GraphShapeRegistration.js.map