默认墙材质

This commit is contained in:
zh
2025-07-09 17:40:13 +08:00
parent ff4f823a27
commit 574538e7bb
4 changed files with 15 additions and 15 deletions

View File

@ -56,7 +56,7 @@ function html(that) {
</div>
</div>
<div class="col">
<span class="label">视野缩放</span>
<span class="label">固定大小</span>
<input class="btn-switch" type="checkbox" @model="scaleByDistance">
</div>
</div>

View File

@ -41,7 +41,7 @@ function html(that) {
<div class="corner-type"></div>
</div>
<div class="col material-box">
<span class="label">材质样式</span>
<span class="label">墙体样式</span>
<div class="material"></div>
</div>
</div>

View File

@ -32,7 +32,7 @@ class WallRealStereoscopic extends Base {
* @param options['nose-to-tail']=false {boolean} 首尾相连
* @param options.extrudedHeight=2.4 {number} 拉伸高度
* @param options.cornerType=0 {string} 拐角类型;0直角1斜角2圆角
* @param options.material=0 {number} 材质0纯色墙1砖墙12砖墙23砖墙3
* @param options.material=0 {number} 材质0纯色墙1红砖2黄砖3灰瓷
* @param {Array.<object>} positions 经纬度和高度的列表,值交替 [{lon,lat,alt},...]
* @param _Dialog {object} 弹框事件
* @param _Dialog.confirmCallBack {function} 弹框确认时的回调
@ -1368,20 +1368,20 @@ class WallRealStereoscopic extends Base {
icon: 'icon-wall'
},
{
name: '<i class="icon icon-wall-brick1"></i>砖墙1',
value: '砖墙1',
name: '<i class="icon icon-wall-brick1"></i>砖墙',
value: '砖墙',
key: 1,
icon: 'icon-wall-brick1'
},
{
name: '<i class="icon icon-wall-brick2"></i>砖墙2',
value: '砖墙2',
name: '<i class="icon icon-wall-brick2"></i>砖墙',
value: '砖墙',
key: 2,
icon: 'icon-wall-brick2'
},
{
name: '<i class="icon icon-wall-brick3"></i>砖墙3',
value: '砖墙3',
name: '<i class="icon icon-wall-brick3"></i>灰瓷墙',
value: '灰瓷墙',
key: 3,
icon: 'icon-wall-brick3'
}

View File

@ -32,10 +32,10 @@ class WallStereoscopic extends Base {
* */
constructor(sdk, options, _Dialog = {}) {
super(sdk, options);
this.options.color = options.color || "#00d9ff"
this.options.color = options.color || "#ff0000"
this.options.extrudedHeight = options.extrudedHeight || 2.4
this.options.positions = options.positions
this.options.material = Number(options.material) || 0
this.options.material = (Number(options.material) || Number(options.material) === 0) ? Number(options.material) : 3
this.options.duration = (options.duration || options.duration === 0) ? options.duration : 1000
this.options.show = (options.show || options.show === false) ? options.show : true
this.options['nose-to-tail'] = options['nose-to-tail'] || false
@ -113,7 +113,7 @@ class WallStereoscopic extends Base {
return this.options.color
}
set color(v) {
this.options.color = v
this.options.color = v || '#ff0000'
this.entity.polylineVolume.material = this.getMaterial()
if (this._elms.color) {
this._elms.color.forEach((item, i) => {
@ -121,7 +121,7 @@ class WallStereoscopic extends Base {
el: item.el,
size: 'mini',//颜色box类型
alpha: true,//是否开启透明度
defaultColor: v,
defaultColor: this.options.color,
disabled: false,//是否禁止打开颜色选择器
openPickerAni: 'opacity',//打开颜色选择器动画
sure: (c) => {
@ -140,10 +140,10 @@ class WallStereoscopic extends Base {
return this.options.material
}
set material(v) {
this.options.material = Number(v)
this.options.material = (Number(v) || Number(v) === 0) ? Number(v) : 3
this.entity.polylineVolume.material = this.getMaterial()
this._elms.material && this._elms.material.forEach((item) => {
item.value = v
item.value = this.options.material
})
}