Compare commits

...

4 Commits
v0.0.6 ... dev

Author SHA1 Message Date
ethan
a8b7f2b46d
Merge pull request #15 from Code-World-9/dev-fix
fix: createGeometryFromData
2024-05-29 10:56:07 +08:00
liqikun
4ec2260835 fix: createGeometryFromData 2024-05-29 10:34:24 +08:00
ethan
13cf991d8e
Merge pull request #13 from qjh999/main
校准曲线箭头的箭头角度
2024-05-27 18:16:08 +08:00
Bernard
5cbf6d8992 校准曲线箭头的箭头角度 2024-05-27 16:58:51 +08:00
2 changed files with 3 additions and 3 deletions

View File

@ -86,8 +86,8 @@ export default class CurvedArrow extends Base {
const distance = Utils.wholeDistance(lnglatPoints);
let len = distance / this.arrowLengthScale;
len = len > this.maxArrowLength ? this.maxArrowLength : len;
const leftPnt = Utils.getThirdPoint(pnt1, pnt2, Math.PI / 6, len / 2, false);
const rightPnt = Utils.getThirdPoint(pnt1, pnt2, Math.PI / 6, len / 2, true);
const leftPnt = Utils.getThirdPoint(curvePoints[curvePoints.length - 2], curvePoints[curvePoints.length - 1], Math.PI / 6, len / 2, false);
const rightPnt = Utils.getThirdPoint(curvePoints[curvePoints.length - 2], curvePoints[curvePoints.length - 1], Math.PI / 6, len / 2, true);
const temp = [].concat(...curvePoints);
const points = [...temp, ...leftPnt, ...pnt2, ...rightPnt];
const cartesianPoints = this.cesium.Cartesian3.fromDegreesArray(points);

View File

@ -870,6 +870,6 @@ export default class Base {
createGraphic(points: CesiumTypeOnly.Cartesian3[]): CesiumTypeOnly.Cartesian3[] {
//Abstract method that must be implemented by subclasses.
return [new this.cesium.Cartesian3()];
return points;
}
}