默认墙材质
This commit is contained in:
@ -56,7 +56,7 @@ function html(that) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<span class="label">视野缩放</span>
|
<span class="label">固定大小</span>
|
||||||
<input class="btn-switch" type="checkbox" @model="scaleByDistance">
|
<input class="btn-switch" type="checkbox" @model="scaleByDistance">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,7 +41,7 @@ function html(that) {
|
|||||||
<div class="corner-type"></div>
|
<div class="corner-type"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col material-box">
|
<div class="col material-box">
|
||||||
<span class="label">材质样式</span>
|
<span class="label">墙体样式</span>
|
||||||
<div class="material"></div>
|
<div class="material"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,7 +32,7 @@ class WallRealStereoscopic extends Base {
|
|||||||
* @param options['nose-to-tail']=false {boolean} 首尾相连
|
* @param options['nose-to-tail']=false {boolean} 首尾相连
|
||||||
* @param options.extrudedHeight=2.4 {number} 拉伸高度
|
* @param options.extrudedHeight=2.4 {number} 拉伸高度
|
||||||
* @param options.cornerType=0 {string} 拐角类型;0:直角;1:斜角;2:圆角
|
* @param options.cornerType=0 {string} 拐角类型;0:直角;1:斜角;2:圆角
|
||||||
* @param options.material=0 {number} 材质,0:纯色墙;1:砖墙1;2:砖墙2;3:砖墙3
|
* @param options.material=0 {number} 材质,0:纯色墙;1:红砖;2:黄砖;3:灰瓷
|
||||||
* @param {Array.<object>} positions 经纬度和高度的列表,值交替 [{lon,lat,alt},...]
|
* @param {Array.<object>} positions 经纬度和高度的列表,值交替 [{lon,lat,alt},...]
|
||||||
* @param _Dialog {object} 弹框事件
|
* @param _Dialog {object} 弹框事件
|
||||||
* @param _Dialog.confirmCallBack {function} 弹框确认时的回调
|
* @param _Dialog.confirmCallBack {function} 弹框确认时的回调
|
||||||
@ -1368,20 +1368,20 @@ class WallRealStereoscopic extends Base {
|
|||||||
icon: 'icon-wall'
|
icon: 'icon-wall'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '<i class="icon icon-wall-brick1"></i>砖墙1',
|
name: '<i class="icon icon-wall-brick1"></i>红砖墙',
|
||||||
value: '砖墙1',
|
value: '红砖墙',
|
||||||
key: 1,
|
key: 1,
|
||||||
icon: 'icon-wall-brick1'
|
icon: 'icon-wall-brick1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '<i class="icon icon-wall-brick2"></i>砖墙2',
|
name: '<i class="icon icon-wall-brick2"></i>黄砖墙',
|
||||||
value: '砖墙2',
|
value: '黄砖墙',
|
||||||
key: 2,
|
key: 2,
|
||||||
icon: 'icon-wall-brick2'
|
icon: 'icon-wall-brick2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '<i class="icon icon-wall-brick3"></i>砖墙3',
|
name: '<i class="icon icon-wall-brick3"></i>灰瓷墙',
|
||||||
value: '砖墙3',
|
value: '灰瓷墙',
|
||||||
key: 3,
|
key: 3,
|
||||||
icon: 'icon-wall-brick3'
|
icon: 'icon-wall-brick3'
|
||||||
}
|
}
|
||||||
|
@ -32,10 +32,10 @@ class WallStereoscopic extends Base {
|
|||||||
* */
|
* */
|
||||||
constructor(sdk, options, _Dialog = {}) {
|
constructor(sdk, options, _Dialog = {}) {
|
||||||
super(sdk, options);
|
super(sdk, options);
|
||||||
this.options.color = options.color || "#00d9ff"
|
this.options.color = options.color || "#ff0000"
|
||||||
this.options.extrudedHeight = options.extrudedHeight || 2.4
|
this.options.extrudedHeight = options.extrudedHeight || 2.4
|
||||||
this.options.positions = options.positions
|
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.duration = (options.duration || options.duration === 0) ? options.duration : 1000
|
||||||
this.options.show = (options.show || options.show === false) ? options.show : true
|
this.options.show = (options.show || options.show === false) ? options.show : true
|
||||||
this.options['nose-to-tail'] = options['nose-to-tail'] || false
|
this.options['nose-to-tail'] = options['nose-to-tail'] || false
|
||||||
@ -113,7 +113,7 @@ class WallStereoscopic extends Base {
|
|||||||
return this.options.color
|
return this.options.color
|
||||||
}
|
}
|
||||||
set color(v) {
|
set color(v) {
|
||||||
this.options.color = v
|
this.options.color = v || '#ff0000'
|
||||||
this.entity.polylineVolume.material = this.getMaterial()
|
this.entity.polylineVolume.material = this.getMaterial()
|
||||||
if (this._elms.color) {
|
if (this._elms.color) {
|
||||||
this._elms.color.forEach((item, i) => {
|
this._elms.color.forEach((item, i) => {
|
||||||
@ -121,7 +121,7 @@ class WallStereoscopic extends Base {
|
|||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
@ -140,10 +140,10 @@ class WallStereoscopic extends Base {
|
|||||||
return this.options.material
|
return this.options.material
|
||||||
}
|
}
|
||||||
set material(v) {
|
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.entity.polylineVolume.material = this.getMaterial()
|
||||||
this._elms.material && this._elms.material.forEach((item) => {
|
this._elms.material && this._elms.material.forEach((item) => {
|
||||||
item.value = v
|
item.value = this.options.material
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user