Fix marker lines can not update with more segments then before (BlueMap-Minecraft/BlueMap#221)

This commit is contained in:
Blue (Lukas Rieger) 2021-09-19 16:04:20 +02:00
parent f70745f82b
commit 730d726b37
No known key found for this signature in database
GPG Key ID: 904C4995F9E1F800
3 changed files with 3 additions and 0 deletions

View File

@ -415,6 +415,7 @@ class ExtrudeMarkerBorder extends Line2 {
* @param shape {Shape}
*/
updateGeometry(shape) {
this.geometry = new LineSegmentsGeometry();
this.geometry.setPositions(ExtrudeMarkerBorder.createLinePoints(shape));
this.computeLineDistances();
}

View File

@ -276,6 +276,7 @@ class LineMarkerLine extends Line2 {
* @param points {number[]}
*/
updateGeometry(points) {
this.geometry = new LineGeometry();
this.geometry.setPositions(points);
this.computeLineDistances();
}

View File

@ -408,6 +408,7 @@ class ShapeMarkerBorder extends Line2 {
* @param shape {Shape}
*/
updateGeometry(shape) {
this.geometry = new LineGeometry();
this.geometry.setPositions(ShapeMarkerBorder.createLinePoints(shape));
this.computeLineDistances();
}