Skip to content

Commit

Permalink
update eol
Browse files Browse the repository at this point in the history
  • Loading branch information
cavencj committed Oct 21, 2024
1 parent 49bd743 commit bfe1f05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/modules/overlay/primitive/GroundPolylinePrimitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

class GroundPolylinePrimitive {
constructor(postions) {}
constructor(positions) {}
}

export default GroundPolylinePrimitive
16 changes: 8 additions & 8 deletions src/modules/overlay/primitive/LightCylinderPrimitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class LightCylinderPrimitive extends Overlay {
* @return {Cesium.GeometryInstance}
*/
_createCylinderInstance(topPts, bottomPts, height) {
let newpts = bottomPts.slice()
let new_pts = bottomPts.slice()
let length = bottomPts.length
let len_2 = 2 * length
let sts = []
Expand All @@ -121,13 +121,13 @@ class LightCylinderPrimitive extends Overlay {
}

for (let i in ep) {
newpts.push(ep[length - i - 1])
new_pts.push(ep[length - i - 1])
sts.push(1 - i * st_interval, 1)
}

let polygon = Cesium.PolygonGeometry.createGeometry(
new Cesium.PolygonGeometry({
polygonHierarchy: new Cesium.PolygonHierarchy(newpts),
polygonHierarchy: new Cesium.PolygonHierarchy(new_pts),
perPositionHeight: true,
})
)
Expand Down Expand Up @@ -183,7 +183,7 @@ class LightCylinderPrimitive extends Overlay {
_updatePrimitives() {
this._delegate.removeAll()

const isGroud = this._center.alt === 0
const isGround = this._center.alt === 0

let topPositions = this._computeEllipsePositions(
this._center,
Expand All @@ -205,14 +205,14 @@ class LightCylinderPrimitive extends Overlay {
polygonHierarchy: new Cesium.PolygonHierarchy(
this._computeEllipsePositions(this._center, this._bottomRadius * 2)
),
perPositionHeight: !isGroud,
perPositionHeight: !isGround,
}),
asynchronous: false,
}),
}

// ring
let ring = isGroud
let ring = isGround
? new Cesium.GroundPrimitive(circleOpt)
: new Cesium.Primitive(circleOpt)

Expand All @@ -223,7 +223,7 @@ class LightCylinderPrimitive extends Overlay {
})

// circle
let circle = isGroud
let circle = isGround
? new Cesium.GroundPrimitive(circleOpt)
: new Cesium.Primitive(circleOpt)

Expand All @@ -249,7 +249,7 @@ class LightCylinderPrimitive extends Overlay {
asynchronous: false,
})

if (isGroud) {
if (isGround) {
Cesium.GroundPrimitive.initializeTerrainHeights().then(() => {
this._delegate.add(ring)
this._delegate.add(circle)
Expand Down

0 comments on commit bfe1f05

Please sign in to comment.