@ibrucekong/kapi
v0.4.1
Published
kapi的Release包
Downloads
10
Maintainers
Readme
KAPI
kapi的Release包
Installation
1、NPM安装
npm install @ibrucekong/kapi --save-dev
2、CDN引用
<!-- unpkg -->
<script src='https://unpkg.com/@ibrucekong/kapi' type='application/javascript'></script>
<!-- jsdelivr -->
<script src='https://cdn.jsdelivr.net/npm/@ibrucekong/kapi' type='application/javascript'></script>
3、官网下载
最新版本下载
https://kapi.brucekong.com/release/kapi.js
指定版本下载
https://kapi.brucekong.com/release/<your want to download version>/kapi.js
Usage
1 安装
npm install @ibrucekong/kapi --save
2 引用
1.browser引用
<script src="[js_path]/kapi.js"</script>
2.import 引用
import "@ibrucekong/kapi"
或
import KAPI from "@ibrucekong/kapi"
3.require引用
require(["[js_path]/kapi.js"], (KAPI) => { [your code] })
3 定义DOM
<div id='kapi-container'></div>
4 初始化
// 1.初始化接口,配合 async
let kapi = await KAPI.build("<Your Auth Token>")
// 2.配置参数
let options = {
server: '127.0.0.1:8080' // 场景服务器地址
}
// 3.初始化场景【下一步调用scene.ready()等待场景初始化好】
let scene = new kapi.Scene("kapi-container", options)
// 4.等待场景渲染好
let ready = await scene.ready()
Update Logs
- v0.0.1 实现创建web、vue
- v0.0.2 增加unpkg和jsdelivr引用
- v0.0.3 增加官网文件下载
- v0.3.1 与组件版本同步
- v0.4.0 增加动画模块,增强接口文档和稳定性