new Cyberide(elementId, sourcePath)
构造视车三维云实例.
Parameters:
| Name | Type | Description |
|---|---|---|
elementId |
string | canvas场景挂载dom节点id. |
sourcePath |
string | 3d资源路径*(项目相对目录). |
Methods
changeCompot(index)
切换组件
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 换套件,共3个选择,1:车身同色;2:钢琴漆黑色运动组件;3:撞色车顶 |
changeSuspension(index)
切换悬架
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | } 悬架编号,共5个选择:1:200mm;2:180mm;3:165mm;4:150mm;5:130mm; |
init(foo)
初始化
Parameters:
| Name | Type | Description |
|---|---|---|
foo |
function | 初始化回调函数(比如回调结束loading动画). |
isShowHot(flag)
显示与影藏动画触发圆点
Parameters:
| Name | Type | Description |
|---|---|---|
flag |
Boolean | ,是否显示,显示:true;影藏:false |
loadInitCaiperOfFront(index)
切换卡钳
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 前卡钳,共2个选择,1:四活塞卡钳,2:双活塞卡钳 |
loadLgById(index)
切换轮毂
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 轮毂共5个 切换到轮毂1,默认轮胎为轮胎1 切换到轮毂2、3、4,默认轮胎为轮胎3 切换到轮毂5,默认轮胎为轮胎5 |
loadLtById(index)
切换轮胎
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 轮胎编号,轮胎共6个 轮毂1 的状态下只能切换 轮胎1、轮胎2 轮毂2、轮毂3、轮毂4的状态下只能切换轮胎3、轮胎4 轮毂5 的状态下只能切换轮胎5、轮胎6 |
resetCamera()
重置相机
重置摆放位置以及相机视角
setColor(index)
切换颜色
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 换颜色,共6个选择,1:电光蓝 2:极光紫,3:星尘红,4:镭射灰 ,5:极昼白,6:碳素黑 |