Skip to content
On this page

快速上手

安装引入

通过 npm 引入

> npm install --save mapo.js

通过 CDN 引入

你可以借助 script 标签直接通过 CDN 来使用 Mapo.js:

html
// 引入 mapo.js 前需要引入 three
<script src="https://unpkg.com/three"></script>
<script src="https://unpkg.com/mapo.js"></script>

这里我们使用了 unpkg,但你也可以使用任何提供 npm 包服务的 CDN,例如 jsdelivr 。当然,你也可以下载此文件并自行提供服务。

基础教程

js
import { Map } from 'mapo.js'

new Map({
  container: '#map',
})