creatar3d
v0.0.3
Published
SDK基于Cesium,用于二次开发2,3D一体式WebGis应用程序框架
Downloads
140
Readme
Creatar3d
Creatar3d 3D开发 SDK 说明文档。
安装
NPM / YARN/ PNPM
(推荐使用)
NPM / YARN /PNPM 的方式安装,它能更好地和 webpack
打包工具配合使用。
yarn add creatar3d
-------------------------
npm install creatar3d
-------------------------
pnpm add creatar3d
import * as Creatar3d from "creatar3d";
import "creatar3d/dist/Creatar3d.css";
配置
配置主要用于
NPM / YARN/ PNPM
的方式
由于框架将Cesium静态资源默认路径设置为 ./sdk/cesium/
,这样需将 Cesium
相关的静态资源文件: Assets
、Workers
、ThirdParty
复制到工程的 sdk/cesium
目录下以保证三维场景能够正常呈现,也可通过全局函数进行 Cesium
相关的静态资源路基设置
Vue2.x
// vue.config.js
const path = require('path')
const CopywebpackPlugin = require('copy-webpack-plugin')
module.exports = {
chainWebpack: (config) => {
config.plugin("copy").use(CopyWebpackPlugin, [
{
patterns: [
{
from: path.join("./node_modules", "creatar3d/dist/cesium"),
to: "sdk/cesium",
},
],
},
]);
},
}