UNPKG

@visx/vendor

Version:

vendored packages for visx

42 lines (41 loc) 872 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; exports.transformer = transformer; function _default(methods) { return { stream: transformer(methods) }; } function transformer(methods) { return function (stream) { var s = new TransformStream(); for (var key in methods) s[key] = methods[key]; s.stream = stream; return s; }; } function TransformStream() {} TransformStream.prototype = { constructor: TransformStream, point: function (x, y) { this.stream.point(x, y); }, sphere: function () { this.stream.sphere(); }, lineStart: function () { this.stream.lineStart(); }, lineEnd: function () { this.stream.lineEnd(); }, polygonStart: function () { this.stream.polygonStart(); }, polygonEnd: function () { this.stream.polygonEnd(); } };