界面
动画
new Animation()
实例化
返回:
- 实例化 Animation 对象
详情:
实例化
Animation
对象,可以调用动画模块中的方法示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const animation = new kapi.Animation()
console.log(animation)
openLiftAnimation()
打开电梯动画
返回:
- 打开电梯动画功能后的回调
详情:
打开电梯动画
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const animation = new kapi.Animation()
let status = await animation.openLiftAnimation()
console.log(status)
closeLiftAnimation()
关闭电梯动画
返回:
- 关闭电梯动画功能后的回调
详情:
关闭电梯动画
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' })
const animation = new kapi.Animation()
let status = await animation.closeLiftAnimation()
console.log(status)