Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 | 1x 1x 1x 1x 1x 10x 10x 10x 10x 17x 17x 17x 17x 17x 17x 17x 17x 17x 17x 17x 15878x 15x 15x 15x 15x 15878x 7x 7x 7x 15878x 15861x 21x 21x 21x 21x 20x 20x 20x 20x 15861x 15840x 15840x 15840x 38x 38x 38x 17x 17x 17x 17x 1x 1x 1x 1x 1x 4x 1x 1x 1x 1x 1x 4x 4x 4x 4x 4x 4x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 6x 1x 1x 1x 1x 1x 6x 6x 6x 6x 6x 6x 1x 1x 1x 1x 1x 6x 6x 6x 6x 6x 16x 16x 10x 10x 2x 2x 10x 10x 10x 10x 6x 8x 8x 8x 8x 2x 2x 2x 2x 2x 10x 10x 10x 10x 10x 10x 8x 10x 10x 8x 10x 2x 35x 4x 35x 17x 17x 18x 1x 17x 2x 15x 6x 9x 8x 1x 35x 25x 2x 25x 25x 25x 1x 9x 9x 9x 9x 9x 1x 15x 2x 2x 1x 14x 14x 14x 14x 14x 14x 14x 11x 11x 11x 11x 11x 11x 11x 11x 11x 11x 11x 11x 11x 11x 14x 3x 2x 2x 2x 2x 3x 11x 10x 10x 10x 1x 1x 1x 9x 9x 10x 10x 11x 11x 11x 11x 11x 11x 1x 3x 3x 3x 3x 3x 3x 3x 1x 9x 9x 194x 1x 193x 193x 193x 193x 193x 193x 193x 1x 777x 1x 776x 776x 6x 6x 776x 776x 1x 1x 1x 1x 776x 14x 14x 14x 14x 14x 14x 9x 14x 14x 4x 4x 10x 1x 10x 9x 9x 9x 10x 10x 10x 776x 1x 1x 1x 187x 187x 187x 8x 8x 187x 1x 284x 284x 34x 34x 1x 284x 65x 65x 48x 9x 17x 17x 284x 4x 4x 4x 3x 2x 3x 1x | import AssociativeArray from "../Core/AssociativeArray.js";
import Cartesian3 from "../Core/Cartesian3.js";
import defined from "../Core/defined.js";
import destroyObject from "../Core/destroyObject.js";
import DeveloperError from "../Core/DeveloperError.js";
import JulianDate from "../Core/JulianDate.js";
import Matrix3 from "../Core/Matrix3.js";
import Matrix4 from "../Core/Matrix4.js";
import ReferenceFrame from "../Core/ReferenceFrame.js";
import TimeInterval from "../Core/TimeInterval.js";
import Transforms from "../Core/Transforms.js";
import PolylineCollection from "../Scene/PolylineCollection.js";
import SceneMode from "../Scene/SceneMode.js";
import CallbackPositionProperty from "./CallbackPositionProperty.js";
import CompositePositionProperty from "./CompositePositionProperty.js";
import ConstantPositionProperty from "./ConstantPositionProperty.js";
import MaterialProperty from "./MaterialProperty.js";
import Property from "./Property.js";
import ReferenceProperty from "./ReferenceProperty.js";
import SampledPositionProperty from "./SampledPositionProperty.js";
import ScaledPositionProperty from "./ScaledPositionProperty.js";
import TimeIntervalCollectionPositionProperty from "./TimeIntervalCollectionPositionProperty.js";
const defaultResolution = 60.0;
const defaultWidth = 1.0;
const scratchTimeInterval = new TimeInterval();
const subSampleCompositePropertyScratch = new TimeInterval();
const subSampleIntervalPropertyScratch = new TimeInterval();
function EntityData(entity) {
this.entity = entity;
this.polyline = undefined;
this.index = undefined;
this.updater = undefined;
}
function subSampleSampledProperty(
property,
start,
stop,
times,
updateTime,
referenceFrame,
maximumStep,
startingIndex,
result,
) {
let r = startingIndex;
//Always step exactly on start (but only use it if it exists.)
let tmp;
tmp = property.getValueInReferenceFrame(start, referenceFrame, result[r]);
Eif (defined(tmp)) {
result[r++] = tmp;
}
let steppedOnNow =
!defined(updateTime) ||
JulianDate.lessThanOrEquals(updateTime, start) ||
JulianDate.greaterThanOrEquals(updateTime, stop);
//Iterate over all interval times and add the ones that fall in our
//time range. Note that times can contain data outside of
//the intervals range. This is by design for use with interpolation.
let t = 0;
const len = times.length;
let current = times[t];
const loopStop = stop;
let sampling = false;
let sampleStepsToTake;
let sampleStepsTaken;
let sampleStepSize;
while (t < len) {
if (!steppedOnNow && JulianDate.greaterThanOrEquals(current, updateTime)) {
tmp = property.getValueInReferenceFrame(
updateTime,
referenceFrame,
result[r],
);
Eif (defined(tmp)) {
result[r++] = tmp;
}
steppedOnNow = true;
}
if (
JulianDate.greaterThan(current, start) &&
JulianDate.lessThan(current, loopStop) &&
!current.equals(updateTime)
) {
tmp = property.getValueInReferenceFrame(
current,
referenceFrame,
result[r],
);
Eif (defined(tmp)) {
result[r++] = tmp;
}
}
if (t < len - 1) {
if (maximumStep > 0 && !sampling) {
const next = times[t + 1];
const secondsUntilNext = JulianDate.secondsDifference(next, current);
sampling = secondsUntilNext > maximumStep;
if (sampling) {
sampleStepsToTake = Math.ceil(secondsUntilNext / maximumStep);
sampleStepsTaken = 0;
sampleStepSize = secondsUntilNext / Math.max(sampleStepsToTake, 2);
sampleStepsToTake = Math.max(sampleStepsToTake - 1, 1);
}
}
if (sampling && sampleStepsTaken < sampleStepsToTake) {
current = JulianDate.addSeconds(
current,
sampleStepSize,
new JulianDate(),
);
sampleStepsTaken++;
continue;
}
}
sampling = false;
t++;
current = times[t];
}
//Always step exactly on stop (but only use it if it exists.)
tmp = property.getValueInReferenceFrame(stop, referenceFrame, result[r]);
Eif (defined(tmp)) {
result[r++] = tmp;
}
return r;
}
function subSampleCallbackPositionProperty(
property,
start,
stop,
updateTime,
referenceFrame,
maximumStep,
startingIndex,
result,
) {
let tmp;
let i = 0;
let index = startingIndex;
let time = start;
let steppedOnNow =
!defined(updateTime) ||
JulianDate.lessThanOrEquals(updateTime, start) ||
JulianDate.greaterThanOrEquals(updateTime, stop);
while (JulianDate.lessThan(time, stop)) {
if (!steppedOnNow && JulianDate.greaterThanOrEquals(time, updateTime)) {
steppedOnNow = true;
tmp = property.getValueInReferenceFrame(
updateTime,
referenceFrame,
result[index],
);
Eif (defined(tmp)) {
result[index] = tmp;
index++;
}
}
tmp = property.getValueInReferenceFrame(
time,
referenceFrame,
result[index],
);
Eif (defined(tmp)) {
result[index] = tmp;
index++;
}
i++;
time = JulianDate.addSeconds(start, maximumStep * i, new JulianDate());
}
//Always sample stop.
tmp = property.getValueInReferenceFrame(stop, referenceFrame, result[index]);
Eif (defined(tmp)) {
result[index] = tmp;
index++;
}
return index;
}
function subSampleGenericProperty(
property,
start,
stop,
updateTime,
referenceFrame,
maximumStep,
startingIndex,
result,
) {
let tmp;
let i = 0;
let index = startingIndex;
let time = start;
const stepSize = Math.max(maximumStep, 60);
let steppedOnNow =
!defined(updateTime) ||
JulianDate.lessThanOrEquals(updateTime, start) ||
JulianDate.greaterThanOrEquals(updateTime, stop);
while (JulianDate.lessThan(time, stop)) {
if (!steppedOnNow && JulianDate.greaterThanOrEquals(time, updateTime)) {
steppedOnNow = true;
tmp = property.getValueInReferenceFrame(
updateTime,
referenceFrame,
result[index],
);
Eif (defined(tmp)) {
result[index] = tmp;
index++;
}
}
tmp = property.getValueInReferenceFrame(
time,
referenceFrame,
result[index],
);
Eif (defined(tmp)) {
result[index] = tmp;
index++;
}
i++;
time = JulianDate.addSeconds(start, stepSize * i, new JulianDate());
}
//Always sample stop.
tmp = property.getValueInReferenceFrame(stop, referenceFrame, result[index]);
Eif (defined(tmp)) {
result[index] = tmp;
index++;
}
return index;
}
function subSampleIntervalProperty(
property,
start,
stop,
updateTime,
referenceFrame,
maximumStep,
startingIndex,
result,
) {
subSampleIntervalPropertyScratch.start = start;
subSampleIntervalPropertyScratch.stop = stop;
let index = startingIndex;
const intervals = property.intervals;
for (let i = 0; i < intervals.length; i++) {
const interval = intervals.get(i);
if (
!TimeInterval.intersect(
interval,
subSampleIntervalPropertyScratch,
scratchTimeInterval,
).isEmpty
) {
let time = interval.start;
if (!interval.isStartIncluded) {
Iif (interval.isStopIncluded) {
time = interval.stop;
} else {
time = JulianDate.addSeconds(
interval.start,
JulianDate.secondsDifference(interval.stop, interval.start) / 2,
new JulianDate(),
);
}
}
const tmp = property.getValueInReferenceFrame(
time,
referenceFrame,
result[index],
);
Eif (defined(tmp)) {
result[index] = tmp;
index++;
}
}
}
return index;
}
function subSampleConstantProperty(
property,
start,
stop,
updateTime,
referenceFrame,
maximumStep,
startingIndex,
result,
) {
const tmp = property.getValueInReferenceFrame(
start,
referenceFrame,
result[startingIndex],
);
Eif (defined(tmp)) {
result[startingIndex++] = tmp;
}
return startingIndex;
}
function subSampleCompositeProperty(
property,
start,
stop,
updateTime,
referenceFrame,
maximumStep,
startingIndex,
result,
) {
subSampleCompositePropertyScratch.start = start;
subSampleCompositePropertyScratch.stop = stop;
let index = startingIndex;
const intervals = property.intervals;
for (let i = 0; i < intervals.length; i++) {
const interval = intervals.get(i);
Eif (
!TimeInterval.intersect(
interval,
subSampleCompositePropertyScratch,
scratchTimeInterval,
).isEmpty
) {
const intervalStart = interval.start;
const intervalStop = interval.stop;
let sampleStart = start;
if (JulianDate.greaterThan(intervalStart, sampleStart)) {
sampleStart = intervalStart;
}
let sampleStop = stop;
if (JulianDate.lessThan(intervalStop, sampleStop)) {
sampleStop = intervalStop;
}
index = reallySubSample(
interval.data,
sampleStart,
sampleStop,
updateTime,
referenceFrame,
maximumStep,
index,
result,
);
}
}
return index;
}
function reallySubSample(
property,
start,
stop,
updateTime,
referenceFrame,
maximumStep,
index,
result,
) {
//Unwrap any references until we have the actual property.
while (property instanceof ReferenceProperty) {
property = property.resolvedProperty;
}
if (property instanceof SampledPositionProperty) {
const times = property._property._times;
index = subSampleSampledProperty(
property,
start,
stop,
times,
updateTime,
referenceFrame,
maximumStep,
index,
result,
);
} else if (property instanceof CallbackPositionProperty) {
index = subSampleCallbackPositionProperty(
property,
start,
stop,
updateTime,
referenceFrame,
maximumStep,
index,
result,
);
} else if (property instanceof CompositePositionProperty) {
index = subSampleCompositeProperty(
property,
start,
stop,
updateTime,
referenceFrame,
maximumStep,
index,
result,
);
} else if (property instanceof TimeIntervalCollectionPositionProperty) {
index = subSampleIntervalProperty(
property,
start,
stop,
updateTime,
referenceFrame,
maximumStep,
index,
result,
);
} else if (
property instanceof ConstantPositionProperty ||
(property instanceof ScaledPositionProperty &&
Property.isConstant(property))
) {
index = subSampleConstantProperty(
property,
start,
stop,
updateTime,
referenceFrame,
maximumStep,
index,
result,
);
} else {
//Fallback to generic sampling.
index = subSampleGenericProperty(
property,
start,
stop,
updateTime,
referenceFrame,
maximumStep,
index,
result,
);
}
return index;
}
function subSample(
property,
start,
stop,
updateTime,
referenceFrame,
maximumStep,
result,
) {
if (!defined(result)) {
result = [];
}
const length = reallySubSample(
property,
start,
stop,
updateTime,
referenceFrame,
maximumStep,
0,
result,
);
result.length = length;
return result;
}
const toFixedScratch = new Matrix3();
function PolylineUpdater(scene, referenceFrame) {
this._unusedIndexes = [];
this._polylineCollection = new PolylineCollection();
this._scene = scene;
this._referenceFrame = referenceFrame;
scene.primitives.add(this._polylineCollection);
}
PolylineUpdater.prototype.update = function (time) {
if (this._referenceFrame === ReferenceFrame.INERTIAL) {
const toFixed = Transforms.computeIcrfToCentralBodyFixedMatrix(
time,
toFixedScratch,
);
Matrix4.fromRotationTranslation(
toFixed,
Cartesian3.ZERO,
this._polylineCollection.modelMatrix,
);
}
};
PolylineUpdater.prototype.updateObject = function (time, item) {
const entity = item.entity;
const pathGraphics = entity._path;
const positionProperty = entity._position;
let sampleStart;
let sampleStop;
const showProperty = pathGraphics._show;
let polyline = item.polyline;
let show =
entity.isShowing &&
entity.isAvailable(time) &&
(!defined(showProperty) || showProperty.getValue(time));
//While we want to show the path, there may not actually be anything to show
//depending on lead/trail settings. Compute the interval of the path to
//show and check against actual availability.
if (show) {
const leadTime = Property.getValueOrUndefined(pathGraphics._leadTime, time);
const trailTime = Property.getValueOrUndefined(
pathGraphics._trailTime,
time,
);
const availability = entity._availability;
const hasAvailability = defined(availability);
const hasLeadTime = defined(leadTime);
const hasTrailTime = defined(trailTime);
//Objects need to have either defined availability or both a lead and trail time in order to
//draw a path (since we can't draw "infinite" paths.
show = hasAvailability || (hasLeadTime && hasTrailTime);
//The final step is to compute the actual start/stop times of the path to show.
//If current time is outside of the availability interval, there's a chance that
//we won't have to draw anything anyway.
Eif (show) {
Eif (hasTrailTime) {
sampleStart = JulianDate.addSeconds(time, -trailTime, new JulianDate());
}
Eif (hasLeadTime) {
sampleStop = JulianDate.addSeconds(time, leadTime, new JulianDate());
}
Iif (hasAvailability) {
const start = availability.start;
const stop = availability.stop;
if (!hasTrailTime || JulianDate.greaterThan(start, sampleStart)) {
sampleStart = start;
}
if (!hasLeadTime || JulianDate.lessThan(stop, sampleStop)) {
sampleStop = stop;
}
}
show = JulianDate.lessThan(sampleStart, sampleStop);
}
}
if (!show) {
//don't bother creating or updating anything else
if (defined(polyline)) {
this._unusedIndexes.push(item.index);
item.polyline = undefined;
polyline.show = false;
item.index = undefined;
}
return;
}
if (!defined(polyline)) {
const unusedIndexes = this._unusedIndexes;
const length = unusedIndexes.length;
if (length > 0) {
const index = unusedIndexes.pop();
polyline = this._polylineCollection.get(index);
item.index = index;
} else {
item.index = this._polylineCollection.length;
polyline = this._polylineCollection.add();
}
polyline.id = entity;
item.polyline = polyline;
}
const resolution = Property.getValueOrDefault(
pathGraphics._resolution,
time,
defaultResolution,
);
polyline.show = true;
polyline.positions = subSample(
positionProperty,
sampleStart,
sampleStop,
time,
this._referenceFrame,
resolution,
polyline.positions.slice(),
);
polyline.material = MaterialProperty.getValue(
time,
pathGraphics._material,
polyline.material,
);
polyline.width = Property.getValueOrDefault(
pathGraphics._width,
time,
defaultWidth,
);
polyline.distanceDisplayCondition = Property.getValueOrUndefined(
pathGraphics._distanceDisplayCondition,
time,
polyline.distanceDisplayCondition,
);
};
PolylineUpdater.prototype.removeObject = function (item) {
const polyline = item.polyline;
Eif (defined(polyline)) {
this._unusedIndexes.push(item.index);
item.polyline = undefined;
polyline.show = false;
polyline.id = undefined;
item.index = undefined;
}
};
PolylineUpdater.prototype.destroy = function () {
this._scene.primitives.remove(this._polylineCollection);
return destroyObject(this);
};
/**
* A {@link Visualizer} which maps {@link Entity#path} to a {@link Polyline}.
* @alias PathVisualizer
* @constructor
*
* @param {Scene} scene The scene the primitives will be rendered in.
* @param {EntityCollection} entityCollection The entityCollection to visualize.
*/
function PathVisualizer(scene, entityCollection) {
//>>includeStart('debug', pragmas.debug);
if (!defined(scene)) {
throw new DeveloperError("scene is required.");
}
Iif (!defined(entityCollection)) {
throw new DeveloperError("entityCollection is required.");
}
//>>includeEnd('debug');
entityCollection.collectionChanged.addEventListener(
PathVisualizer.prototype._onCollectionChanged,
this,
);
this._scene = scene;
this._updaters = {};
this._entityCollection = entityCollection;
this._items = new AssociativeArray();
this._onCollectionChanged(entityCollection, entityCollection.values, [], []);
}
/**
* Updates all of the primitives created by this visualizer to match their
* Entity counterpart at the given time.
*
* @param {JulianDate} time The time to update to.
* @returns {boolean} This function always returns true.
*/
PathVisualizer.prototype.update = function (time) {
//>>includeStart('debug', pragmas.debug);
if (!defined(time)) {
throw new DeveloperError("time is required.");
}
//>>includeEnd('debug');
const updaters = this._updaters;
for (const key in updaters) {
Eif (updaters.hasOwnProperty(key)) {
updaters[key].update(time);
}
}
const items = this._items.values;
if (
items.length === 0 &&
defined(this._updaters) &&
Object.keys(this._updaters).length > 0
) {
for (const u in updaters) {
Eif (updaters.hasOwnProperty(u)) {
updaters[u].destroy();
}
}
this._updaters = {};
}
for (let i = 0, len = items.length; i < len; i++) {
const item = items[i];
const entity = item.entity;
const positionProperty = entity._position;
const lastUpdater = item.updater;
let frameToVisualize = ReferenceFrame.FIXED;
if (this._scene.mode === SceneMode.SCENE3D) {
frameToVisualize = positionProperty.referenceFrame;
}
let currentUpdater = this._updaters[frameToVisualize];
if (lastUpdater === currentUpdater && defined(currentUpdater)) {
currentUpdater.updateObject(time, item);
continue;
}
if (defined(lastUpdater)) {
lastUpdater.removeObject(item);
}
if (!defined(currentUpdater)) {
currentUpdater = new PolylineUpdater(this._scene, frameToVisualize);
currentUpdater.update(time);
this._updaters[frameToVisualize] = currentUpdater;
}
item.updater = currentUpdater;
Eif (defined(currentUpdater)) {
currentUpdater.updateObject(time, item);
}
}
return true;
};
/**
* Returns true if this object was destroyed; otherwise, false.
*
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
PathVisualizer.prototype.isDestroyed = function () {
return false;
};
/**
* Removes and destroys all primitives created by this instance.
*/
PathVisualizer.prototype.destroy = function () {
this._entityCollection.collectionChanged.removeEventListener(
PathVisualizer.prototype._onCollectionChanged,
this,
);
const updaters = this._updaters;
for (const key in updaters) {
Eif (updaters.hasOwnProperty(key)) {
updaters[key].destroy();
}
}
return destroyObject(this);
};
PathVisualizer.prototype._onCollectionChanged = function (
entityCollection,
added,
removed,
changed,
) {
let i;
let entity;
let item;
const items = this._items;
for (i = added.length - 1; i > -1; i--) {
entity = added[i];
if (defined(entity._path) && defined(entity._position)) {
items.set(entity.id, new EntityData(entity));
}
}
for (i = changed.length - 1; i > -1; i--) {
entity = changed[i];
if (defined(entity._path) && defined(entity._position)) {
if (!items.contains(entity.id)) {
items.set(entity.id, new EntityData(entity));
}
} else {
item = items.get(entity.id);
Iif (defined(item)) {
if (defined(item.updater)) {
item.updater.removeObject(item);
}
items.remove(entity.id);
}
}
}
for (i = removed.length - 1; i > -1; i--) {
entity = removed[i];
item = items.get(entity.id);
if (defined(item)) {
if (defined(item.updater)) {
item.updater.removeObject(item);
}
items.remove(entity.id);
}
}
};
//for testing
PathVisualizer._subSample = subSample;
export default PathVisualizer;
|