Class: PathAnimationManager
路径动画管理类
Details
添加路径动画、获取路径动画对象、获取所有的路径动画对象、删除路径动画、设置路径动画的移动路径
Examples
js
const pathAnimationManager = await cloud.getPathAnimationManager() // 在CreateApp时调用
const pathAnimationManager = await cloud.getPathAnimationManager() // 在CreateApp时调用
Hierarchy
Callable
↳
PathAnimationManager
Methods
addPathAnimation
▸ addPathAnimation(Params
, isNeedLocate?
): Promise
<PathAnimation
>
Details
添加路径动画
Examples
js
const pathAnimationManager = await cloud.getPathAnimationManager()
const param = {
Modelactions: [ //设置路径中每段路模型的姿态动作
"Walk",
"Walk",
"Run"
],
animationModel: "avatar_woman.wlkx", //模型文件
bindCamera: true, //是否绑定相机(选填)
contentStyle: { //样式设置
color: "0XFF000000", //字体颜色(选填)
fontFace: "宋体", //字体类型(选填)
outLineColor: "0XFFFF0000", //轮廓线颜色(选填)
outLineWidth: 3, //轮廓线宽度(选填)
rectBorderColor: "0xFFFF0000", //背景框颜色(选填)
rectBorderShow: false,//是否显示背景框(选填)
backGroundColor: '0xFF0000FF', //背景颜色(选填)
size: 10, //文字大小(选填)
titleTextPortrait: false //文字排列方式(横向或纵向)(选填)
},
loop: false, //是否循环播放(选填)
pathid: "E24FAB463E5746FE98F100918D4B32E3", //路径对象Guid值
play: false,//加载完后是否立即播放(选填)
reverse: false, //是否倒播(选填)
speed: 4, //播放速度(选填)
titleText: "路径动画LH" //铭牌标题(选填)
}
await pathAnimationManager.addPathAnimation(param);
const pathAnimationManager = await cloud.getPathAnimationManager()
const param = {
Modelactions: [ //设置路径中每段路模型的姿态动作
"Walk",
"Walk",
"Run"
],
animationModel: "avatar_woman.wlkx", //模型文件
bindCamera: true, //是否绑定相机(选填)
contentStyle: { //样式设置
color: "0XFF000000", //字体颜色(选填)
fontFace: "宋体", //字体类型(选填)
outLineColor: "0XFFFF0000", //轮廓线颜色(选填)
outLineWidth: 3, //轮廓线宽度(选填)
rectBorderColor: "0xFFFF0000", //背景框颜色(选填)
rectBorderShow: false,//是否显示背景框(选填)
backGroundColor: '0xFF0000FF', //背景颜色(选填)
size: 10, //文字大小(选填)
titleTextPortrait: false //文字排列方式(横向或纵向)(选填)
},
loop: false, //是否循环播放(选填)
pathid: "E24FAB463E5746FE98F100918D4B32E3", //路径对象Guid值
play: false,//加载完后是否立即播放(选填)
reverse: false, //是否倒播(选填)
speed: 4, //播放速度(选填)
titleText: "路径动画LH" //铭牌标题(选填)
}
await pathAnimationManager.addPathAnimation(param);
Parameters
Name | Type | Default value | Description |
---|---|---|---|
Params | any | undefined | json格式 格式为:{ Modelactions: [ //设置路径中每段路模型的姿态动作 "Walk", "Walk", "Run" ], animationModel: "avatar_woman.wlkx", //模型文件 bindCamera: true, //是否绑定相机(选填) contentStyle: { //样式设置 color: "0XFF000000", //字体颜色(选填) fontFace: "宋体", //字体类型(选填) outLineColor: "0XFFFF0000", //轮廓线颜色(选填) outLineWidth: 3, //轮廓线宽度(选填) rectBorderColor: "0xFFFF0000", //背景框颜色(选填) rectBorderShow: false,//是否显示背景框(选填) backGroundColor: '0xFF0000FF', //背景颜色(选填) size: 10, //文字大小(选填) titleTextPortrait: false //文字排列方式(横向或纵向)(选填) }, loop: false, //是否循环播放(选填) pathid: "E24FAB463E5746FE98F100918D4B32E3", //路径对象Guid值 play: false,//加载完后是否立即播放(选填) reverse: false, //是否倒播(选填) speed: 4, //播放速度(选填) titleText: "路径动画LH" //铭牌标题(选填) } |
isNeedLocate | boolean | true | 是否需要定位 |
Returns
Promise
<PathAnimation
>
路径动画对象
getPathAnimation
▸ getPathAnimation(guid
): Promise
<PathAnimation
>
Details
获取路径动画对象
Examples
js
const pathAnimationManager = await cloud.getPathAnimationManager();
await pathAnimationManager.getPathAnimation("E24FAB463E5746FE98F100918D4B32E3");
const pathAnimationManager = await cloud.getPathAnimationManager();
await pathAnimationManager.getPathAnimation("E24FAB463E5746FE98F100918D4B32E3");
Parameters
Name | Type | Description |
---|---|---|
guid | string | 对象guid值 |
Returns
Promise
<PathAnimation
>
路径动画对象
getAllPathAnimation
▸ getAllPathAnimation(): Promise
<PathAnimation
[]>
Details
获取所有的路径动画对象
Examples
js
const pathAnimationManager = await cloud.getPathAnimationManager();
await pathAnimationManager.getAllPathAnimation();
const pathAnimationManager = await cloud.getPathAnimationManager();
await pathAnimationManager.getAllPathAnimation();
Returns
Promise
<PathAnimation
[]>
路径动画对象数组
removePathAnimation
▸ removePathAnimation(guid
): Promise
<any
>
Details
删除路径动画对象
Examples
js
const pathAnimationManager = await cloud.getPathAnimationManager();
await pathAnimationManager.removePathAnimation("E24FAB463E5746FE98F100918D4B32E3");
const pathAnimationManager = await cloud.getPathAnimationManager();
await pathAnimationManager.removePathAnimation("E24FAB463E5746FE98F100918D4B32E3");
Parameters
Name | Type | Description |
---|---|---|
guid | string | 对象guid值 |
Returns
Promise
<any
>
无
bindPathWithPathAnima
▸ bindPathWithPathAnima(pathAnimGuid
, pathGuid
, isNeedChangeCamera?
): Promise
<PathAnimation
>
Details
设置路径动画的移动路径
Examples
js
const pathAnimationManager = await cloud.getPathAnimationManager();
await pathAnimationManager.bindPathWithPathAnima("E24FAB463E5746FE98F100918D4B32E3", "E24FAB463E5746FE98F100918D4B32E2");
const pathAnimationManager = await cloud.getPathAnimationManager();
await pathAnimationManager.bindPathWithPathAnima("E24FAB463E5746FE98F100918D4B32E3", "E24FAB463E5746FE98F100918D4B32E2");
Parameters
Name | Type | Default value | Description |
---|---|---|---|
pathAnimGuid | string | undefined | 路径动画对象guid值 |
pathGuid | string | undefined | 路径对象guid值 |
isNeedChangeCamera | boolean | true | 是否需要改变相机位置; |
Returns
Promise
<PathAnimation
>
路径动画对象