1. getSnapshotByKey
作用: 获取当前快照列表指定快照信息。
1.1. 参数说明:
形式参数: 有
名称 | 说明 | 类型 | 是否必填 | 示例 |
---|---|---|---|---|
key | 快照key | 字符串 string | 是 | "35165165" |
返回值说明 | 类型 | 示例 |
---|---|---|
快照对象 | object | 见下方 |
var obj={
cameraState: cameraState,//{string} 对象,相机状态,包含position、target、
componentState: componentState, //{string} 对象数组,构件信息,
highlightComponentsKeys: highlightComponentsKeys,//{Array}数组,高亮的构件key集合
highlightModelsKeys: highlightModelsKeys,//{Array}数组,高亮的模型key集合
imageURL: imgURL, //{base64} 当前canvas的截图
width: w,//{int} 图片宽度,当前canvas图片的宽度
height: h,//{int} 图片高度,当前canvas图片的高度
num: num,//{int} 当前快照列表的序号
code: new Date().getTime().toString(),
name: "快照" + num,//快照名称
description: "无注释"//快照描述
}
1.2. 调用方式:
snapshot.getSnapshotByKey("35165165");