From 00164f905043a5f4d64238d72d7309b537aa2e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E5=BC=80=E5=8D=8A=E4=BA=A9=E5=9C=B0?= <2572468699@qq.com> Date: Fri, 16 Dec 2022 20:02:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20mapvThree=20cdn=20?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/utils/pluginLoader.ts | 10 +++++----- pnpm-lock.yaml | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/packages/utils/pluginLoader.ts b/packages/utils/pluginLoader.ts index 662933be..cbd3c8d8 100644 --- a/packages/utils/pluginLoader.ts +++ b/packages/utils/pluginLoader.ts @@ -2,7 +2,7 @@ import getScriptAsync from './getScriptAsync' -export type PluginsList = ['TrackAnimation', 'Mapvgl', 'Mapv', 'MapvglThree'] +export type PluginsList = ['TrackAnimation', 'Mapvgl', 'Mapv', 'MapvThree'] export type PluginsUnion = PluginsList[number] export type PluginsSourceLink = Record export type PluginsLoader = (...args: any[]) => Promise @@ -12,7 +12,7 @@ export const DEFAULT_PLUGINS_SOURCE_LINK: PluginsSourceLink = { TrackAnimation: '//mapopen.bj.bcebos.com/github/BMapGLLib/TrackAnimation/src/TrackAnimation.min.js', Mapvgl: 'https://code.bdstatic.com/npm/mapvgl@1.0.0-beta.159/dist/mapvgl.min.js', Mapv: 'https://mapv.baidu.com/build/mapv.min.js', - MapvglThree: 'https://code.bdstatic.com/npm/mapvgl@1.0.0-beta.159/dist/mapvgl.threelayers.min.js' + MapvThree: 'https://unpkg.com/mapv-three@1.0.1/dist/mapvthree.umd.js' } as const export const pluginLoaderMap: Record Promise> = { @@ -34,11 +34,11 @@ export const pluginLoaderMap: Record + MapvThree: (customSourceLink?: string) => getScriptAsync({ - src: customSourceLink || DEFAULT_PLUGINS_SOURCE_LINK['MapvglThree'], + src: customSourceLink || DEFAULT_PLUGINS_SOURCE_LINK['MapvThree'], addCalToWindow: false, - key: 'MapvglThree' + key: 'MapvThree' }) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b8fd2856..ba8db7fc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -74,15 +74,19 @@ importers: consola: ^2.15.3 escape-html: ^1.0.3 less: ^4.1.3 + mapv-three: ^1.0.7 markdown-it: ^13.0.1 markdown-it-container: ^3.0.0 prism-theme-vars: ^0.2.4 prismjs: ^1.29.0 + three: ^0.147.0 vanilla-tilt: ^1.7.3 vitepress: 1.0.0-alpha.27 vue3-baidu-map-gl: workspace:* dependencies: + mapv-three: 1.0.7 prism-theme-vars: 0.2.4 + three: 0.147.0 vitepress: 1.0.0-alpha.27_less@4.1.3 devDependencies: consola: 2.15.3 @@ -1428,6 +1432,10 @@ packages: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true + /bmap-three/0.140.2: + resolution: {integrity: sha512-bVpjIWQK3sRSJb8gOUNJOTLLlFuFrslVj8irgvbEtOkOW5gdGtdXKILvLNQ7sudNmkwjVDnfJoeN0e9+QZB5FA==} + dev: false + /body-scroll-lock/4.0.0-beta.0: resolution: {integrity: sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ==} dev: false @@ -3039,6 +3047,12 @@ packages: engines: {node: '>=8'} dev: true + /mapv-three/1.0.7: + resolution: {integrity: sha512-RXd6w7BmN803swRoQqEcLKVeySWT+Dw1O4r/Hgh/dhIn9QGkOleXKG6i4tjLWQl693xuZkLRx9ngBQSInsma5A==} + dependencies: + bmap-three: 0.140.2 + dev: false + /markdown-it-container/3.0.0: resolution: {integrity: sha512-y6oKTq4BB9OQuY/KLfk/O3ysFhB3IMYoIWhGJEidXt1NQFocFK2sA2t0NYZAMyMShAGL6x5OPIbrmXPIqaN9rw==} dev: true @@ -3929,6 +3943,10 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /three/0.147.0: + resolution: {integrity: sha512-LPTOslYQXFkmvceQjFTNnVVli2LaVF6C99Pv34fJypp8NbQLbTlu3KinZ0zURghS5zEehK+VQyvWuPZ/Sm8fzw==} + dev: false + /through/2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true