mars3d&cesium library plugin for Vite
https://www.npmjs.com/package/vite-plugin-earth
小冰cc 474c937d22 | ||
---|---|---|
demo | ||
src | ||
.gitignore | ||
.prettierrc | ||
LICENSE | ||
README.md | ||
package.json | ||
pnpm-lock.yaml | ||
tsconfig.json |
README.md
⚡ vite-plugin-ice-mars3d
Easily set up a Cesium
project in [Vite
].
Install
npm i cesium vite-plugin-ice-mars3d vite -D
# yarn add cesium vite-plugin-ice-mars3d vite -D
Usage
add this plugin to vite.config.js
import { defineConfig } from 'vite';
import mars3dPlugin from 'vite-plugin-ice-mars3d';
export default defineConfig({
plugins: [mars3dPlugin()]
});
add dev command to package.json
"scripts": {
"dev": "vite",
"build": "vite build"
}
run:
yarn dev
Options
rebuildCesium
- Type :
boolean
- Default :
false
Default copy min cesium file to dist. if true
will rebuild cesium from source.
import { defineConfig } from 'vite';
import mars3dPlugin from 'vite-plugin-ice-mars3d';
export default defineConfig({
plugins: [
mars3dPlugin({
rebuildCesium: true
})
]
});