|
@@ -1,7 +1,7 @@
|
|
|
import cover from './cover'
|
|
|
import { createLoadPack, loadLib } from '@/utils'
|
|
|
|
|
|
-import { FuseModelAttrs, FuseModel, GuidePath, MeasureType, Measure as StoreMeasure, MeasurePosition, SceneType, scenes } from '@/store'
|
|
|
+import { FuseModelAttrs, FuseModel, GuidePath, MeasureType, Measure as StoreMeasure, MeasurePosition, SceneType, scenes, Scene } from '@/store'
|
|
|
import type { Emitter } from 'mitt'
|
|
|
import { SettingResourceType } from '@/api/setting-resource'
|
|
|
|
|
@@ -128,7 +128,7 @@ export interface SDK {
|
|
|
|
|
|
|
|
|
export let sdk: SDK
|
|
|
-export type InialSDKProps = { layout: HTMLDivElement }
|
|
|
+export type InialSDKProps = { layout: HTMLDivElement, scenes: Scene[] }
|
|
|
export let initialed = false
|
|
|
export const initialSDK = async (props: InialSDKProps) => {
|
|
|
if (initialed) return sdk;
|
|
@@ -146,8 +146,12 @@ export const initialSDK = async (props: InialSDKProps) => {
|
|
|
await Promise.all(libs.map(loadLib))
|
|
|
await loadLib(`./lib/potree/potree.js`)
|
|
|
|
|
|
- const localSdk = cover(props.layout, false, {
|
|
|
- sceneList: scenes.value
|
|
|
+ const localSdk = cover({
|
|
|
+ dom: props.layout,
|
|
|
+ isLocal: false,
|
|
|
+ scenes: props.scenes,
|
|
|
+ lonlat: null,
|
|
|
+ mapDom: null
|
|
|
}) as unknown as SDK
|
|
|
|
|
|
console.log(scenes.value)
|