PolylinePipeline-896735cc.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. define(['exports', './Matrix3-41c58dde', './defaultValue-fe22d8c0', './Check-6ede7e26', './EllipsoidGeodesic-5b3623dc', './EllipsoidRhumbLine-ef872433', './IntersectionTests-88c49b2e', './Math-0a2ac845', './Matrix2-e1298525', './Plane-4c3d403b'], (function (exports, Matrix3, defaultValue, Check, EllipsoidGeodesic, EllipsoidRhumbLine, IntersectionTests, Math$1, Matrix2, Plane) { 'use strict';
  2. /**
  3. * @private
  4. */
  5. const PolylinePipeline = {};
  6. PolylinePipeline.numberOfPoints = function (p0, p1, minDistance) {
  7. const distance = Matrix3.Cartesian3.distance(p0, p1);
  8. return Math.ceil(distance / minDistance);
  9. };
  10. PolylinePipeline.numberOfPointsRhumbLine = function (p0, p1, granularity) {
  11. const radiansDistanceSquared =
  12. Math.pow(p0.longitude - p1.longitude, 2) +
  13. Math.pow(p0.latitude - p1.latitude, 2);
  14. return Math.max(
  15. 1,
  16. Math.ceil(Math.sqrt(radiansDistanceSquared / (granularity * granularity)))
  17. );
  18. };
  19. const cartoScratch = new Matrix3.Cartographic();
  20. PolylinePipeline.extractHeights = function (positions, ellipsoid) {
  21. const length = positions.length;
  22. const heights = new Array(length);
  23. for (let i = 0; i < length; i++) {
  24. const p = positions[i];
  25. heights[i] = ellipsoid.cartesianToCartographic(p, cartoScratch).height;
  26. }
  27. return heights;
  28. };
  29. const wrapLongitudeInversMatrix = new Matrix2.Matrix4();
  30. const wrapLongitudeOrigin = new Matrix3.Cartesian3();
  31. const wrapLongitudeXZNormal = new Matrix3.Cartesian3();
  32. const wrapLongitudeXZPlane = new Plane.Plane(Matrix3.Cartesian3.UNIT_X, 0.0);
  33. const wrapLongitudeYZNormal = new Matrix3.Cartesian3();
  34. const wrapLongitudeYZPlane = new Plane.Plane(Matrix3.Cartesian3.UNIT_X, 0.0);
  35. const wrapLongitudeIntersection = new Matrix3.Cartesian3();
  36. const wrapLongitudeOffset = new Matrix3.Cartesian3();
  37. const subdivideHeightsScratchArray = [];
  38. function subdivideHeights(numPoints, h0, h1) {
  39. const heights = subdivideHeightsScratchArray;
  40. heights.length = numPoints;
  41. let i;
  42. if (h0 === h1) {
  43. for (i = 0; i < numPoints; i++) {
  44. heights[i] = h0;
  45. }
  46. return heights;
  47. }
  48. const dHeight = h1 - h0;
  49. const heightPerVertex = dHeight / numPoints;
  50. for (i = 0; i < numPoints; i++) {
  51. const h = h0 + i * heightPerVertex;
  52. heights[i] = h;
  53. }
  54. return heights;
  55. }
  56. const carto1 = new Matrix3.Cartographic();
  57. const carto2 = new Matrix3.Cartographic();
  58. const cartesian = new Matrix3.Cartesian3();
  59. const scaleFirst = new Matrix3.Cartesian3();
  60. const scaleLast = new Matrix3.Cartesian3();
  61. const ellipsoidGeodesic = new EllipsoidGeodesic.EllipsoidGeodesic();
  62. let ellipsoidRhumb = new EllipsoidRhumbLine.EllipsoidRhumbLine();
  63. //Returns subdivided line scaled to ellipsoid surface starting at p1 and ending at p2.
  64. //Result includes p1, but not include p2. This function is called for a sequence of line segments,
  65. //and this prevents duplication of end point.
  66. function generateCartesianArc(
  67. p0,
  68. p1,
  69. minDistance,
  70. ellipsoid,
  71. h0,
  72. h1,
  73. array,
  74. offset
  75. ) {
  76. const first = ellipsoid.scaleToGeodeticSurface(p0, scaleFirst);
  77. const last = ellipsoid.scaleToGeodeticSurface(p1, scaleLast);
  78. const numPoints = PolylinePipeline.numberOfPoints(p0, p1, minDistance);
  79. const start = ellipsoid.cartesianToCartographic(first, carto1);
  80. const end = ellipsoid.cartesianToCartographic(last, carto2);
  81. const heights = subdivideHeights(numPoints, h0, h1);
  82. ellipsoidGeodesic.setEndPoints(start, end);
  83. const surfaceDistanceBetweenPoints =
  84. ellipsoidGeodesic.surfaceDistance / numPoints;
  85. let index = offset;
  86. start.height = h0;
  87. let cart = ellipsoid.cartographicToCartesian(start, cartesian);
  88. Matrix3.Cartesian3.pack(cart, array, index);
  89. index += 3;
  90. for (let i = 1; i < numPoints; i++) {
  91. const carto = ellipsoidGeodesic.interpolateUsingSurfaceDistance(
  92. i * surfaceDistanceBetweenPoints,
  93. carto2
  94. );
  95. carto.height = heights[i];
  96. cart = ellipsoid.cartographicToCartesian(carto, cartesian);
  97. Matrix3.Cartesian3.pack(cart, array, index);
  98. index += 3;
  99. }
  100. return index;
  101. }
  102. //Returns subdivided line scaled to ellipsoid surface starting at p1 and ending at p2.
  103. //Result includes p1, but not include p2. This function is called for a sequence of line segments,
  104. //and this prevents duplication of end point.
  105. function generateCartesianRhumbArc(
  106. p0,
  107. p1,
  108. granularity,
  109. ellipsoid,
  110. h0,
  111. h1,
  112. array,
  113. offset
  114. ) {
  115. const start = ellipsoid.cartesianToCartographic(p0, carto1);
  116. const end = ellipsoid.cartesianToCartographic(p1, carto2);
  117. const numPoints = PolylinePipeline.numberOfPointsRhumbLine(
  118. start,
  119. end,
  120. granularity
  121. );
  122. start.height = 0.0;
  123. end.height = 0.0;
  124. const heights = subdivideHeights(numPoints, h0, h1);
  125. if (!ellipsoidRhumb.ellipsoid.equals(ellipsoid)) {
  126. ellipsoidRhumb = new EllipsoidRhumbLine.EllipsoidRhumbLine(undefined, undefined, ellipsoid);
  127. }
  128. ellipsoidRhumb.setEndPoints(start, end);
  129. const surfaceDistanceBetweenPoints =
  130. ellipsoidRhumb.surfaceDistance / numPoints;
  131. let index = offset;
  132. start.height = h0;
  133. let cart = ellipsoid.cartographicToCartesian(start, cartesian);
  134. Matrix3.Cartesian3.pack(cart, array, index);
  135. index += 3;
  136. for (let i = 1; i < numPoints; i++) {
  137. const carto = ellipsoidRhumb.interpolateUsingSurfaceDistance(
  138. i * surfaceDistanceBetweenPoints,
  139. carto2
  140. );
  141. carto.height = heights[i];
  142. cart = ellipsoid.cartographicToCartesian(carto, cartesian);
  143. Matrix3.Cartesian3.pack(cart, array, index);
  144. index += 3;
  145. }
  146. return index;
  147. }
  148. /**
  149. * Breaks a {@link Polyline} into segments such that it does not cross the &plusmn;180 degree meridian of an ellipsoid.
  150. *
  151. * @param {Cartesian3[]} positions The polyline's Cartesian positions.
  152. * @param {Matrix4} [modelMatrix=Matrix4.IDENTITY] The polyline's model matrix. Assumed to be an affine
  153. * transformation matrix, where the upper left 3x3 elements are a rotation matrix, and
  154. * the upper three elements in the fourth column are the translation. The bottom row is assumed to be [0, 0, 0, 1].
  155. * The matrix is not verified to be in the proper form.
  156. * @returns {object} An object with a <code>positions</code> property that is an array of positions and a
  157. * <code>segments</code> property.
  158. *
  159. *
  160. * @example
  161. * const polylines = new Cesium.PolylineCollection();
  162. * const polyline = polylines.add(...);
  163. * const positions = polyline.positions;
  164. * const modelMatrix = polylines.modelMatrix;
  165. * const segments = Cesium.PolylinePipeline.wrapLongitude(positions, modelMatrix);
  166. *
  167. * @see PolygonPipeline.wrapLongitude
  168. * @see Polyline
  169. * @see PolylineCollection
  170. */
  171. PolylinePipeline.wrapLongitude = function (positions, modelMatrix) {
  172. const cartesians = [];
  173. const segments = [];
  174. if (defaultValue.defined(positions) && positions.length > 0) {
  175. modelMatrix = defaultValue.defaultValue(modelMatrix, Matrix2.Matrix4.IDENTITY);
  176. const inverseModelMatrix = Matrix2.Matrix4.inverseTransformation(
  177. modelMatrix,
  178. wrapLongitudeInversMatrix
  179. );
  180. const origin = Matrix2.Matrix4.multiplyByPoint(
  181. inverseModelMatrix,
  182. Matrix3.Cartesian3.ZERO,
  183. wrapLongitudeOrigin
  184. );
  185. const xzNormal = Matrix3.Cartesian3.normalize(
  186. Matrix2.Matrix4.multiplyByPointAsVector(
  187. inverseModelMatrix,
  188. Matrix3.Cartesian3.UNIT_Y,
  189. wrapLongitudeXZNormal
  190. ),
  191. wrapLongitudeXZNormal
  192. );
  193. const xzPlane = Plane.Plane.fromPointNormal(
  194. origin,
  195. xzNormal,
  196. wrapLongitudeXZPlane
  197. );
  198. const yzNormal = Matrix3.Cartesian3.normalize(
  199. Matrix2.Matrix4.multiplyByPointAsVector(
  200. inverseModelMatrix,
  201. Matrix3.Cartesian3.UNIT_X,
  202. wrapLongitudeYZNormal
  203. ),
  204. wrapLongitudeYZNormal
  205. );
  206. const yzPlane = Plane.Plane.fromPointNormal(
  207. origin,
  208. yzNormal,
  209. wrapLongitudeYZPlane
  210. );
  211. let count = 1;
  212. cartesians.push(Matrix3.Cartesian3.clone(positions[0]));
  213. let prev = cartesians[0];
  214. const length = positions.length;
  215. for (let i = 1; i < length; ++i) {
  216. const cur = positions[i];
  217. // intersects the IDL if either endpoint is on the negative side of the yz-plane
  218. if (
  219. Plane.Plane.getPointDistance(yzPlane, prev) < 0.0 ||
  220. Plane.Plane.getPointDistance(yzPlane, cur) < 0.0
  221. ) {
  222. // and intersects the xz-plane
  223. const intersection = IntersectionTests.IntersectionTests.lineSegmentPlane(
  224. prev,
  225. cur,
  226. xzPlane,
  227. wrapLongitudeIntersection
  228. );
  229. if (defaultValue.defined(intersection)) {
  230. // move point on the xz-plane slightly away from the plane
  231. const offset = Matrix3.Cartesian3.multiplyByScalar(
  232. xzNormal,
  233. 5.0e-9,
  234. wrapLongitudeOffset
  235. );
  236. if (Plane.Plane.getPointDistance(xzPlane, prev) < 0.0) {
  237. Matrix3.Cartesian3.negate(offset, offset);
  238. }
  239. cartesians.push(
  240. Matrix3.Cartesian3.add(intersection, offset, new Matrix3.Cartesian3())
  241. );
  242. segments.push(count + 1);
  243. Matrix3.Cartesian3.negate(offset, offset);
  244. cartesians.push(
  245. Matrix3.Cartesian3.add(intersection, offset, new Matrix3.Cartesian3())
  246. );
  247. count = 1;
  248. }
  249. }
  250. cartesians.push(Matrix3.Cartesian3.clone(positions[i]));
  251. count++;
  252. prev = cur;
  253. }
  254. segments.push(count);
  255. }
  256. return {
  257. positions: cartesians,
  258. lengths: segments,
  259. };
  260. };
  261. /**
  262. * Subdivides polyline and raises all points to the specified height. Returns an array of numbers to represent the positions.
  263. * @param {object} options Object with the following properties:
  264. * @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
  265. * @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
  266. * @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
  267. * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
  268. * @returns {number[]} A new array of positions of type {number} that have been subdivided and raised to the surface of the ellipsoid.
  269. *
  270. * @example
  271. * const positions = Cesium.Cartesian3.fromDegreesArray([
  272. * -105.0, 40.0,
  273. * -100.0, 38.0,
  274. * -105.0, 35.0,
  275. * -100.0, 32.0
  276. * ]);
  277. * const surfacePositions = Cesium.PolylinePipeline.generateArc({
  278. * positons: positions
  279. * });
  280. */
  281. PolylinePipeline.generateArc = function (options) {
  282. if (!defaultValue.defined(options)) {
  283. options = {};
  284. }
  285. const positions = options.positions;
  286. //>>includeStart('debug', pragmas.debug);
  287. if (!defaultValue.defined(positions)) {
  288. throw new Check.DeveloperError("options.positions is required.");
  289. }
  290. //>>includeEnd('debug');
  291. const length = positions.length;
  292. const ellipsoid = defaultValue.defaultValue(options.ellipsoid, Matrix3.Ellipsoid.WGS84);
  293. let height = defaultValue.defaultValue(options.height, 0);
  294. const hasHeightArray = Array.isArray(height);
  295. if (length < 1) {
  296. return [];
  297. } else if (length === 1) {
  298. const p = ellipsoid.scaleToGeodeticSurface(positions[0], scaleFirst);
  299. height = hasHeightArray ? height[0] : height;
  300. if (height !== 0) {
  301. const n = ellipsoid.geodeticSurfaceNormal(p, cartesian);
  302. Matrix3.Cartesian3.multiplyByScalar(n, height, n);
  303. Matrix3.Cartesian3.add(p, n, p);
  304. }
  305. return [p.x, p.y, p.z];
  306. }
  307. let minDistance = options.minDistance;
  308. if (!defaultValue.defined(minDistance)) {
  309. const granularity = defaultValue.defaultValue(
  310. options.granularity,
  311. Math$1.CesiumMath.RADIANS_PER_DEGREE
  312. );
  313. minDistance = Math$1.CesiumMath.chordLength(granularity, ellipsoid.maximumRadius);
  314. }
  315. let numPoints = 0;
  316. let i;
  317. for (i = 0; i < length - 1; i++) {
  318. numPoints += PolylinePipeline.numberOfPoints(
  319. positions[i],
  320. positions[i + 1],
  321. minDistance
  322. );
  323. }
  324. const arrayLength = (numPoints + 1) * 3;
  325. const newPositions = new Array(arrayLength);
  326. let offset = 0;
  327. for (i = 0; i < length - 1; i++) {
  328. const p0 = positions[i];
  329. const p1 = positions[i + 1];
  330. const h0 = hasHeightArray ? height[i] : height;
  331. const h1 = hasHeightArray ? height[i + 1] : height;
  332. offset = generateCartesianArc(
  333. p0,
  334. p1,
  335. minDistance,
  336. ellipsoid,
  337. h0,
  338. h1,
  339. newPositions,
  340. offset
  341. );
  342. }
  343. subdivideHeightsScratchArray.length = 0;
  344. const lastPoint = positions[length - 1];
  345. const carto = ellipsoid.cartesianToCartographic(lastPoint, carto1);
  346. carto.height = hasHeightArray ? height[length - 1] : height;
  347. const cart = ellipsoid.cartographicToCartesian(carto, cartesian);
  348. Matrix3.Cartesian3.pack(cart, newPositions, arrayLength - 3);
  349. return newPositions;
  350. };
  351. const scratchCartographic0 = new Matrix3.Cartographic();
  352. const scratchCartographic1 = new Matrix3.Cartographic();
  353. /**
  354. * Subdivides polyline and raises all points to the specified height using Rhumb lines. Returns an array of numbers to represent the positions.
  355. * @param {object} options Object with the following properties:
  356. * @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
  357. * @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
  358. * @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
  359. * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
  360. * @returns {number[]} A new array of positions of type {number} that have been subdivided and raised to the surface of the ellipsoid.
  361. *
  362. * @example
  363. * const positions = Cesium.Cartesian3.fromDegreesArray([
  364. * -105.0, 40.0,
  365. * -100.0, 38.0,
  366. * -105.0, 35.0,
  367. * -100.0, 32.0
  368. * ]);
  369. * const surfacePositions = Cesium.PolylinePipeline.generateRhumbArc({
  370. * positons: positions
  371. * });
  372. */
  373. PolylinePipeline.generateRhumbArc = function (options) {
  374. if (!defaultValue.defined(options)) {
  375. options = {};
  376. }
  377. const positions = options.positions;
  378. //>>includeStart('debug', pragmas.debug);
  379. if (!defaultValue.defined(positions)) {
  380. throw new Check.DeveloperError("options.positions is required.");
  381. }
  382. //>>includeEnd('debug');
  383. const length = positions.length;
  384. const ellipsoid = defaultValue.defaultValue(options.ellipsoid, Matrix3.Ellipsoid.WGS84);
  385. let height = defaultValue.defaultValue(options.height, 0);
  386. const hasHeightArray = Array.isArray(height);
  387. if (length < 1) {
  388. return [];
  389. } else if (length === 1) {
  390. const p = ellipsoid.scaleToGeodeticSurface(positions[0], scaleFirst);
  391. height = hasHeightArray ? height[0] : height;
  392. if (height !== 0) {
  393. const n = ellipsoid.geodeticSurfaceNormal(p, cartesian);
  394. Matrix3.Cartesian3.multiplyByScalar(n, height, n);
  395. Matrix3.Cartesian3.add(p, n, p);
  396. }
  397. return [p.x, p.y, p.z];
  398. }
  399. const granularity = defaultValue.defaultValue(
  400. options.granularity,
  401. Math$1.CesiumMath.RADIANS_PER_DEGREE
  402. );
  403. let numPoints = 0;
  404. let i;
  405. let c0 = ellipsoid.cartesianToCartographic(
  406. positions[0],
  407. scratchCartographic0
  408. );
  409. let c1;
  410. for (i = 0; i < length - 1; i++) {
  411. c1 = ellipsoid.cartesianToCartographic(
  412. positions[i + 1],
  413. scratchCartographic1
  414. );
  415. numPoints += PolylinePipeline.numberOfPointsRhumbLine(c0, c1, granularity);
  416. c0 = Matrix3.Cartographic.clone(c1, scratchCartographic0);
  417. }
  418. const arrayLength = (numPoints + 1) * 3;
  419. const newPositions = new Array(arrayLength);
  420. let offset = 0;
  421. for (i = 0; i < length - 1; i++) {
  422. const p0 = positions[i];
  423. const p1 = positions[i + 1];
  424. const h0 = hasHeightArray ? height[i] : height;
  425. const h1 = hasHeightArray ? height[i + 1] : height;
  426. offset = generateCartesianRhumbArc(
  427. p0,
  428. p1,
  429. granularity,
  430. ellipsoid,
  431. h0,
  432. h1,
  433. newPositions,
  434. offset
  435. );
  436. }
  437. subdivideHeightsScratchArray.length = 0;
  438. const lastPoint = positions[length - 1];
  439. const carto = ellipsoid.cartesianToCartographic(lastPoint, carto1);
  440. carto.height = hasHeightArray ? height[length - 1] : height;
  441. const cart = ellipsoid.cartographicToCartesian(carto, cartesian);
  442. Matrix3.Cartesian3.pack(cart, newPositions, arrayLength - 3);
  443. return newPositions;
  444. };
  445. /**
  446. * Subdivides polyline and raises all points to the specified height. Returns an array of new {Cartesian3} positions.
  447. * @param {object} options Object with the following properties:
  448. * @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
  449. * @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
  450. * @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
  451. * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
  452. * @returns {Cartesian3[]} A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
  453. *
  454. * @example
  455. * const positions = Cesium.Cartesian3.fromDegreesArray([
  456. * -105.0, 40.0,
  457. * -100.0, 38.0,
  458. * -105.0, 35.0,
  459. * -100.0, 32.0
  460. * ]);
  461. * const surfacePositions = Cesium.PolylinePipeline.generateCartesianArc({
  462. * positons: positions
  463. * });
  464. */
  465. PolylinePipeline.generateCartesianArc = function (options) {
  466. const numberArray = PolylinePipeline.generateArc(options);
  467. const size = numberArray.length / 3;
  468. const newPositions = new Array(size);
  469. for (let i = 0; i < size; i++) {
  470. newPositions[i] = Matrix3.Cartesian3.unpack(numberArray, i * 3);
  471. }
  472. return newPositions;
  473. };
  474. /**
  475. * Subdivides polyline and raises all points to the specified height using Rhumb Lines. Returns an array of new {Cartesian3} positions.
  476. * @param {object} options Object with the following properties:
  477. * @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
  478. * @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
  479. * @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
  480. * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
  481. * @returns {Cartesian3[]} A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
  482. *
  483. * @example
  484. * const positions = Cesium.Cartesian3.fromDegreesArray([
  485. * -105.0, 40.0,
  486. * -100.0, 38.0,
  487. * -105.0, 35.0,
  488. * -100.0, 32.0
  489. * ]);
  490. * const surfacePositions = Cesium.PolylinePipeline.generateCartesianRhumbArc({
  491. * positons: positions
  492. * });
  493. */
  494. PolylinePipeline.generateCartesianRhumbArc = function (options) {
  495. const numberArray = PolylinePipeline.generateRhumbArc(options);
  496. const size = numberArray.length / 3;
  497. const newPositions = new Array(size);
  498. for (let i = 0; i < size; i++) {
  499. newPositions[i] = Matrix3.Cartesian3.unpack(numberArray, i * 3);
  500. }
  501. return newPositions;
  502. };
  503. var PolylinePipeline$1 = PolylinePipeline;
  504. exports.PolylinePipeline = PolylinePipeline$1;
  505. }));