mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/RoboCommander.git
synced 2026-06-15 21:56:02 +00:00
Initial commit
This commit is contained in:
24
node_modules/d3-geo/src/clip/buffer.js
generated
vendored
Normal file
24
node_modules/d3-geo/src/clip/buffer.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import noop from "../noop";
|
||||
|
||||
export default function() {
|
||||
var lines = [],
|
||||
line;
|
||||
return {
|
||||
point: function(x, y) {
|
||||
line.push([x, y]);
|
||||
},
|
||||
lineStart: function() {
|
||||
lines.push(line = []);
|
||||
},
|
||||
lineEnd: noop,
|
||||
rejoin: function() {
|
||||
if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));
|
||||
},
|
||||
result: function() {
|
||||
var result = lines;
|
||||
lines = [];
|
||||
line = null;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user