48 lines
1.0 KiB
JavaScript
48 lines
1.0 KiB
JavaScript
|
"use strict";
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
exports["default"] = exports.process = exports.TYPE = void 0;
|
||
|
|
||
|
var _common = _interopRequireDefault(require("./common"));
|
||
|
|
||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
|
||
|
var TYPE = 'POLYLINE';
|
||
|
exports.TYPE = TYPE;
|
||
|
|
||
|
var process = function process(tuples) {
|
||
|
return tuples.reduce(function (entity, tuple) {
|
||
|
var type = tuple[0];
|
||
|
var value = tuple[1];
|
||
|
|
||
|
switch (type) {
|
||
|
case 70:
|
||
|
entity.closed = (value & 1) === 1;
|
||
|
entity.polygonMesh = (value & 16) === 16;
|
||
|
entity.polyfaceMesh = (value & 64) === 64;
|
||
|
break;
|
||
|
|
||
|
case 39:
|
||
|
entity.thickness = value;
|
||
|
break;
|
||
|
|
||
|
default:
|
||
|
Object.assign(entity, (0, _common["default"])(type, value));
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
return entity;
|
||
|
}, {
|
||
|
type: TYPE,
|
||
|
vertices: []
|
||
|
});
|
||
|
};
|
||
|
|
||
|
exports.process = process;
|
||
|
var _default = {
|
||
|
TYPE: TYPE,
|
||
|
process: process
|
||
|
};
|
||
|
exports["default"] = _default;
|