Skip to content

Commit

Permalink
refactor: improve types
Browse files Browse the repository at this point in the history
  • Loading branch information
zouyaoji committed Feb 12, 2023
1 parent f317b53 commit a84ec8c
Show file tree
Hide file tree
Showing 3 changed files with 1,577 additions and 454 deletions.
4 changes: 2 additions & 2 deletions packages/components/viewer/src/useViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ export default function (props: VcViewerProps, ctx, vcInstance: VcComponentInter
let viewer: Cesium.Viewer

if (props.viewerCreator) {
viewer = props.viewerCreator(vcInstance, $(viewerRef), options)
viewer = props.viewerCreator(vcInstance, $(viewerRef) as HTMLElement, options)
} else {
if (globalThis.mars3d) {
vcInstance.map = new mars3d.Map($(viewerRef).id, {
Expand All @@ -647,7 +647,7 @@ export default function (props: VcViewerProps, ctx, vcInstance: VcComponentInter
vcInstance.earth = new globalThis.XE.Earth($(viewerRef), options)
viewer = vcInstance.earth?.czm.viewer
} else {
viewer = new Viewer($(viewerRef), options)
viewer = new Viewer($(viewerRef) as HTMLElement, options)
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/shared/analyses/Viewshed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Viewshed {
context: (this._scene as any).context,
lightCamera: this._spotLightCamera,
cascadesEnabled: !1
} as any)
})
options = options || {}
this._scene.globe.shadows = ShadowMode.ENABLED
;(this._viewshedShadowMap as any)._terrainBias.depthBias = 0
Expand Down
Loading

0 comments on commit a84ec8c

Please sign in to comment.