kd-api-core
TypeScript icon, indicating that this package has built-in type declarations

1.5.0-beta.1 • Public • Published

KD-API-CORE 文档

安装方式

# 最新版本
yarn add kd-api-core@next
# 指定版本
yarn add kd-api-core@1.1.7
# 最新版本
npm install kd-api-core@next
# 指定版本
npm install kd-api-core@1.1.7

引入

import { InitClientSocket } from 'kd-api-core/lib'

// 内嵌浏览器,只需要传入renderId参数即可
InitClientSocket.init(renderId: string, path: string,resolution: string).then(() => {
    // 加载进度
    InitClientSocket.progress((val: number) => {
        // progress值为百分比,可以动态展示底座引擎加载的进度;便于做业务逻辑处理
        // 当progress进度为100时,则表示场景加载成功
    })
})

Readme

Keywords

Package Sidebar

Install

npm i kd-api-core

Weekly Downloads

5

Version

1.5.0-beta.1

License

MIT

Unpacked Size

3.19 MB

Total Files

19

Last publish

Collaborators

  • anson1992