23 lines
1.0 KiB
JavaScript
23 lines
1.0 KiB
JavaScript
shadow$provide.module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$buildCommands$buildPixelLine = function(global, require, module, exports) {
|
|
var _const = require("module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$const");
|
|
"use strict";
|
|
exports.buildPixelLine = function(points, closed, vertices, indices) {
|
|
var eps = _const.closePointEps;
|
|
if (0 !== points.length) {
|
|
var fx = points[0], fy = points[1], lx = points[points.length - 2], ly = points[points.length - 1];
|
|
closed = closed || Math.abs(fx - lx) < eps && Math.abs(fy - ly) < eps;
|
|
eps = points.length / 2;
|
|
fx = vertices.length / 2;
|
|
for (fy = 0; fy < eps; fy++) {
|
|
vertices.push(points[2 * fy]), vertices.push(points[2 * fy + 1]);
|
|
}
|
|
for (points = 0; points < eps - 1; points++) {
|
|
indices.push(fx + points, fx + points + 1);
|
|
}
|
|
closed && indices.push(fx + eps - 1, fx);
|
|
}
|
|
};
|
|
};
|
|
|
|
//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$buildCommands$buildPixelLine.js.map
|