|
@@ -48,6 +48,17 @@ onMounted(async () => {
|
|
|
},1000);
|
|
|
});
|
|
|
|
|
|
+(globalThis as any).getMeta2dData =async (id:string) => {
|
|
|
+ const res: Response = await fetch(`/json/${id}.json`, {
|
|
|
+ method:'GET',
|
|
|
+ });
|
|
|
+ if (res.ok) {
|
|
|
+ let data: any = await res.text();
|
|
|
+ // meta2d.open(JSON.parse(data));
|
|
|
+ return JSON.parse(data);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
const opened = () =>{
|
|
|
if(route.query.id&&(route.query.id as string).startsWith('2d')){
|
|
|
meta2d.fitView(true, 0); //充满屏幕
|