|
@@ -101,6 +101,9 @@ EditTools.prototype.active = function() {
|
|
|
case "panoVisible":
|
|
|
VisiSet.finishSetPanoVisible()
|
|
|
break;
|
|
|
+ case "panoLog":
|
|
|
+ VisiSet.finishSetPanoLog()
|
|
|
+ break;
|
|
|
case "screen":
|
|
|
confirmSnap.addClass("hide").removeClass("unable");
|
|
|
snapshotGui.hide();
|
|
@@ -119,6 +122,11 @@ EditTools.prototype.active = function() {
|
|
|
VisiSet.enterSet(VisiSet.beginSetPanoVisible.bind(VisiSet))
|
|
|
|
|
|
break;
|
|
|
+ case "panoLog":
|
|
|
+ $(".toolLeft").addClass("unable")
|
|
|
+ VisiSet.enterSet(VisiSet.beginSetPanoLog.bind(VisiSet))
|
|
|
+
|
|
|
+ break;
|
|
|
case "screen":
|
|
|
confirmSnap.removeClass("hide");
|
|
|
$('#camera-start').text("点此设置为初始画面")
|
|
@@ -527,6 +535,16 @@ function initColorElem(data, elem) {
|
|
|
if (data.showCad) {
|
|
|
$('input[name="show-cad"]').trigger('change')
|
|
|
}
|
|
|
+ $('#panoIdColor').on('change', function(e) {
|
|
|
+ $('#panoIdColorTex').val(e.target.value)
|
|
|
+ VisiSet.changePanoIdColor(e.target.value)
|
|
|
+ })
|
|
|
+ $('#panoIdColorTex').on('blur keydown', function(e) {
|
|
|
+ (e.type === 'blur' || e.type === 'keydown' && e.keyCode === 13) && setColor(e, $('#panoIdColor'), this);
|
|
|
+ VisiSet.changePanoIdColor(e.target.value)
|
|
|
+ })
|
|
|
+ $('#panoIdColor').val('#c13e3e')//初始颜色
|
|
|
+ $('#panoIdColorTex').val('#c13e3e')
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1502,7 +1520,7 @@ Hotpoint.prototype.inputList = function(text, val) {
|
|
|
}
|
|
|
//添加热点模型
|
|
|
Hotpoint.prototype.addModel = function() {
|
|
|
- var text = this.inputList("请填写模型链接");
|
|
|
+ var text = this.inputList("请填写模型链接(https开头)");
|
|
|
this.hotpointDetail.find(".model .add").on('click', function() {
|
|
|
$(this).closest(".model").find(".list").append(text)
|
|
|
});
|
|
@@ -3440,6 +3458,14 @@ var EditOverlay = {
|
|
|
//$('#overlayUpload .preview').css('background-image',"").append($(video));
|
|
|
|
|
|
this.useImgRatio()
|
|
|
+ this.updateGifPanel(this.editPlane)
|
|
|
+
|
|
|
+ if(this.editPlane.animateInfo){
|
|
|
+ GifTexDeal.remove(this.editPlane.animation)
|
|
|
+ this.editPlane.animation = GifTexDeal.addAnimation(this.editPlane.plane.material.map, this.editPlane, this.editPlane.animateInfo, this.editPlane.sid)
|
|
|
+ GifTexDeal.start(this.editPlane.animation)
|
|
|
+ }
|
|
|
+
|
|
|
//自适应比例
|
|
|
this.editPlane.file = photo.file;
|
|
|
plane.material.opacity = 1;
|
|
@@ -3460,11 +3486,190 @@ var EditOverlay = {
|
|
|
else {
|
|
|
this.getOverlayInfo(overlay)
|
|
|
}
|
|
|
-
|
|
|
this.addToList(overlay)
|
|
|
- }
|
|
|
- )
|
|
|
+ } )
|
|
|
|
|
|
+ $("#gifSwitch input").on("change", (e)=>{
|
|
|
+ var on = $("#gifSwitch input").is(':checked');
|
|
|
+ $("#gifInfoEdit").css({display: on ? 'block' : 'none'})
|
|
|
+ if(on){
|
|
|
+ EditOverlay.editPlane.animateInfo = {
|
|
|
+ cellXcount : parseInt($("#gifXCount").val()),
|
|
|
+ cellYcount : parseInt($("#gifYCount").val()),
|
|
|
+ loop : true,
|
|
|
+ duration : parseFloat($("#gifDuration").val()) * 1000
|
|
|
+ }
|
|
|
+ EditOverlay.editPlane.animation = GifTexDeal.addAnimation(EditOverlay.editPlane.plane.material.map, EditOverlay.editPlane, EditOverlay.editPlane.animateInfo, EditOverlay.editPlane.sid)
|
|
|
+ GifTexDeal.start(EditOverlay.editPlane.animation)
|
|
|
+ }else{
|
|
|
+ GifTexDeal.remove(EditOverlay.editPlane.animation)
|
|
|
+ EditOverlay.editPlane.animateInfo = null
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ {//gif动画 input
|
|
|
+
|
|
|
+ let strictInputNum = function(e, precision, min=0,max){//precision:保留小数位数
|
|
|
+ var value = e.target.value.trim();
|
|
|
+ var lastOne = value[value.length-1];
|
|
|
+ var preContent = value.substr(0,value.length-1)
|
|
|
+ var hasPoint = precision > 0 && lastOne == '.' ;
|
|
|
+
|
|
|
+ var a = Math.pow(10, precision)
|
|
|
+ value = parseFloat(value) || 0;
|
|
|
+ if(isNaN(value)){
|
|
|
+ e.target.value = preContent //还原
|
|
|
+ return
|
|
|
+ }
|
|
|
+ e.target.value = Math.max(min, parseInt(value * a) / a )
|
|
|
+
|
|
|
+ hasPoint && (e.target.value += '.')//补小数点
|
|
|
+ }
|
|
|
+ let changeAnimation = function(){
|
|
|
+ GifTexDeal.setRepeart(EditOverlay.editPlane.animation)
|
|
|
+
|
|
|
+ }
|
|
|
+ let restartAnimation = function(){
|
|
|
+ GifTexDeal.stop(EditOverlay.editPlane.animation)
|
|
|
+ GifTexDeal.start(EditOverlay.editPlane.animation)
|
|
|
+ }
|
|
|
+ let changeFrameCount = function(){
|
|
|
+ var a = EditOverlay.editPlane.animateInfo
|
|
|
+ var frameCount = a.cellXcount * a.cellYcount
|
|
|
+ $("#gifFrameCount").text(frameCount)
|
|
|
+ var fps = parseFloat($("#gifFps").val())
|
|
|
+ a.duration = frameCount / fps * 1000
|
|
|
+ $("#gifDuration").val(toPrecision(a.duration/1000, 2))
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ let gifXCountFun = function(value){
|
|
|
+ EditOverlay.editPlane.animateInfo.cellXcount = value
|
|
|
+ var gifImgWidth = parseFloat($("#gifImgWidth").text())
|
|
|
+ var gifCellWidth = toPrecision(gifImgWidth / EditOverlay.editPlane.animateInfo.cellXcount,1);
|
|
|
+ $("#gifCellWidth").val(gifCellWidth)
|
|
|
+ changeFrameCount()
|
|
|
+ changeAnimation()
|
|
|
+ }
|
|
|
+
|
|
|
+ $("#gifXCount").on('input',(e)=>{
|
|
|
+ strictInputNum(e, 0)
|
|
|
+ gifXCountFun(parseFloat(e.target.value))
|
|
|
+
|
|
|
+ })
|
|
|
+ $("#gifXCount").on('change',(e)=>{
|
|
|
+ strictInputNum(e, 0, 1)
|
|
|
+ gifXCountFun(parseFloat(e.target.value))
|
|
|
+ restartAnimation()
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ let gifYCountFun = function(value){
|
|
|
+ EditOverlay.editPlane.animateInfo.cellYcount = value
|
|
|
+ var gifImgHeight = parseFloat($("#gifImgHeight").text())
|
|
|
+ var gifCellHeight = toPrecision(gifImgHeight / EditOverlay.editPlane.animateInfo.cellYcount,1);
|
|
|
+ $("#gifCellHeight").val(gifCellHeight)
|
|
|
+ changeFrameCount()
|
|
|
+ changeAnimation()
|
|
|
+ }
|
|
|
+ $("#gifYCount").on('input',(e)=>{
|
|
|
+ strictInputNum(e, 0)
|
|
|
+ gifYCountFun(parseFloat(e.target.value))
|
|
|
+ })
|
|
|
+ $("#gifYCount").on('change',(e)=>{
|
|
|
+ strictInputNum(e, 0, 1)
|
|
|
+ gifYCountFun(parseFloat(e.target.value))
|
|
|
+ changeAnimation()
|
|
|
+ restartAnimation()
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ let gifCellWidthFun = function(value){
|
|
|
+ var gifCellWidth = value;
|
|
|
+ var gifImgWidth = parseFloat($("#gifImgWidth").text())
|
|
|
+ var cellXcount = toPrecision(gifImgWidth / gifCellWidth,2);
|
|
|
+ $("#gifXCount").val(cellXcount)
|
|
|
+ changeAnimation()
|
|
|
+ }
|
|
|
+ $("#gifCellWidth").on('input',(e)=>{
|
|
|
+ strictInputNum(e, 0)
|
|
|
+ gifCellWidthFun(parseFloat(e.target.value))
|
|
|
+
|
|
|
+ })
|
|
|
+ $("#gifCellWidth").on('change',(e)=>{
|
|
|
+ strictInputNum(e, 0, 1)
|
|
|
+ gifCellWidthFun(parseFloat(e.target.value))
|
|
|
+ var cellXcount = $("#gifXCount").val();
|
|
|
+ var cellXcountInt = Math.round(cellXcount)
|
|
|
+ if(cellXcountInt != cellXcount){
|
|
|
+ $("#gifXCount").val(cellXcountInt)
|
|
|
+ gifXCountFun(cellXcountInt)
|
|
|
+ changeAnimation()
|
|
|
+ }
|
|
|
+ restartAnimation()
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ let gifCellHeightFun = function(value){
|
|
|
+ var gifCellHeight = parseFloat(e.target.value);
|
|
|
+ var gifImgHeight = parseFloat($("#gifImgHeight").text())
|
|
|
+ var cellYcount = toPrecision(gifImgHeight / gifCellHeight,2);
|
|
|
+ $("#gifYCount").val(cellYcount)
|
|
|
+
|
|
|
+ }
|
|
|
+ $("#gifCellHeight").on('input',(e)=>{
|
|
|
+ strictInputNum(e, 0)
|
|
|
+ gifCellHeightFun(parseFloat(e.target.value))
|
|
|
+
|
|
|
+ })
|
|
|
+ $("#gifCellHeight").on('change',(e)=>{
|
|
|
+ strictInputNum(e, 0, 1)
|
|
|
+ gifCellHeightFun(parseFloat(e.target.value))
|
|
|
+ var cellYcount = $("#gifYCount").val();
|
|
|
+ var cellYcountInt = Math.round(cellYcount)
|
|
|
+ if(cellYcountInt != cellYcount){
|
|
|
+ $("#gifYCount").val(cellYcountInt)
|
|
|
+ gifYCountFun(cellYcountInt)
|
|
|
+ changeAnimation()
|
|
|
+ }
|
|
|
+ restartAnimation()
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ let gifDurationFun = function(value){
|
|
|
+ var a = EditOverlay.editPlane.animateInfo
|
|
|
+ let frameCount = a.cellXcount * a.cellYcount
|
|
|
+ a.duration = value
|
|
|
+ $("#gifFps").val(toPrecision(frameCount / a.duration * 1000, 1))
|
|
|
+ }
|
|
|
+ $("#gifDuration").on('input',(e)=>{
|
|
|
+ strictInputNum(e, 1);
|
|
|
+ gifDurationFun(parseFloat(e.target.value) * 1000)
|
|
|
+ })
|
|
|
+ $("#gifDuration").on('change',(e)=>{
|
|
|
+ strictInputNum(e, 1, 0.01);
|
|
|
+ gifDurationFun(parseFloat(e.target.value) * 1000)
|
|
|
+ restartAnimation()
|
|
|
+ })
|
|
|
+
|
|
|
+ var gifFpsFun = function(e){
|
|
|
+ strictInputNum(e, 0, 1);
|
|
|
+ var fps = parseFloat(e.target.value)
|
|
|
+ var a = EditOverlay.editPlane.animateInfo
|
|
|
+ let frameCount = a.cellXcount * a.cellYcount
|
|
|
+ a.duration = frameCount / fps * 1000
|
|
|
+ $("#gifDuration").val(toPrecision(a.duration / 1000, 2))
|
|
|
+ }
|
|
|
+ $("#gifFps").on('input',(e)=>{
|
|
|
+ gifFpsFun(e)
|
|
|
+
|
|
|
+ })
|
|
|
+ $("#gifFps").on('change',(e)=>{
|
|
|
+ gifFpsFun(e)
|
|
|
+ restartAnimation()
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
|
|
|
},
|
|
@@ -3483,7 +3688,9 @@ var EditOverlay = {
|
|
|
switchEditType : function(type){
|
|
|
this.editType = type;
|
|
|
$('#overlayUpload [name="upload"] button').text(type == 'video' ? "上传视频" : "上传图片")
|
|
|
- $('#overlayUpload .preview span').text(type == 'video' ? "支持MP4、MOV等,<20M" : "支持jpg、png等,<20M");
|
|
|
+ $('#overlayUpload .preview span').eq(0).text(type == 'video' ? "支持MP4、MOV等,<20M" : "支持jpg、png等,<20M");
|
|
|
+ if(type != 'photo' || !this.editPlane) $('#overlayProp #gifEdit').css({display: 'none'})
|
|
|
+
|
|
|
},
|
|
|
beginToAddPlane: function(event) {
|
|
|
this.switchEditType($(event.target).attr("data-type"))
|
|
@@ -3548,26 +3755,17 @@ var EditOverlay = {
|
|
|
});
|
|
|
$('#overlayUpload .preview [attr-type="width"]').text(toPrecision(overlay.width, 2))
|
|
|
$('#overlayUpload .preview [attr-type="height"]').text(toPrecision(overlay.height, 2))
|
|
|
-
|
|
|
+ $("#gifSwitch input").prop('checked', !!overlay.animateInfo);
|
|
|
+ $("#gifInfoEdit").css({display: !!overlay.animateInfo ? 'block' : 'none'})
|
|
|
},
|
|
|
- updateOverlayPanel: function(overlay) {
|
|
|
- this.editPlane = overlay;
|
|
|
- overlay.requestDownload()
|
|
|
-
|
|
|
- if(overlay._loadDones){
|
|
|
- $('.waiting').addClass('showloading');
|
|
|
- overlay._loadDones.push(()=>{
|
|
|
- $('.waiting').removeClass('showloading');
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ updateOverlayPreview : function(overlay){
|
|
|
var plane = overlay.plane
|
|
|
var src = plane.material.map && (plane.material.map.image ? plane.material.map.image.src : overlay.fileSrc );
|
|
|
$('#overlayUpload .preview video').remove();
|
|
|
|
|
|
- overlay.overlayType && this.switchEditType(overlay.overlayType)
|
|
|
+
|
|
|
|
|
|
|
|
|
if (overlay.overlayType == "video") {
|
|
@@ -3577,7 +3775,7 @@ var EditOverlay = {
|
|
|
} else if(overlay.overlayType == "photo" || overlay.overlayType == "text"){
|
|
|
$('#overlayUpload .preview').css({
|
|
|
'background-image': src ? ("url(" + src + ")") : "",
|
|
|
- 'background-size': "contain"
|
|
|
+ 'background-size': "100% 100%"
|
|
|
})
|
|
|
}else{
|
|
|
$('#overlayUpload .preview').css({
|
|
@@ -3594,8 +3792,18 @@ var EditOverlay = {
|
|
|
$('#overlayUpload [name="useImgRatio"]').addClass("hide")
|
|
|
$('#overlayUpload .preview').removeClass('uploaded')
|
|
|
}
|
|
|
-
|
|
|
- this.updateOverlayScaleDisplay()
|
|
|
+ }
|
|
|
+ ,
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ updateOverlayPanel: function(overlay) {
|
|
|
+ overlay.overlayType && this.switchEditType(overlay.overlayType)
|
|
|
+ this.updateOverlayPreview(overlay)
|
|
|
+ this.updateOverlayScaleDisplay()
|
|
|
+ this.updateGifPanel(overlay)
|
|
|
+
|
|
|
+
|
|
|
|
|
|
if (overlay.hasBox) {
|
|
|
this.scroller.videoDepth.setValue(overlay.scale.z * settings.overlay.depth * 100, true)
|
|
@@ -3612,10 +3820,58 @@ var EditOverlay = {
|
|
|
},
|
|
|
|
|
|
//----------------------------
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ updateGifPanel : function(overlay){
|
|
|
+ if(this.editType == 'photo'){
|
|
|
+ if(!overlay.plane.material.map)return;
|
|
|
+ $('#overlayProp #gifEdit').css({display: 'block'})
|
|
|
+
|
|
|
+ let w = overlay.plane.material.map.image.width
|
|
|
+ let h = overlay.plane.material.map.image.height
|
|
|
+ if(overlay.animateInfo){
|
|
|
+ let a = overlay.animateInfo
|
|
|
+ $("#gifXCount").val(a.cellXcount);
|
|
|
+ $("#gifYCount").val(a.cellYcount);
|
|
|
+ $("#gifImgWidth").text(w)
|
|
|
+ $("#gifImgHeight").text(h)
|
|
|
+ $("#gifCellWidth").val(toPrecision(w / a.cellXcount, 2));
|
|
|
+ $("#gifCellHeight").val(toPrecision(h / a.cellYcount, 2));
|
|
|
+ let frameCount = a.cellXcount * a.cellYcount
|
|
|
+ $("#gifFrameCount").text(frameCount)
|
|
|
+ $("#gifDuration").val(toPrecision(a.duration / 1000, 2));
|
|
|
+ $("#gifFps").val(toPrecision(frameCount / a.duration * 1000, 1) );
|
|
|
+ }else{
|
|
|
+ $("#gifXCount").val(1);
|
|
|
+ $("#gifYCount").val(1);
|
|
|
+ $("#gifImgWidth").text(w)
|
|
|
+ $("#gifImgHeight").text(h)
|
|
|
+ $("#gifCellWidth").val(w);
|
|
|
+ $("#gifCellHeight").val(h)
|
|
|
+ $("#gifFrameCount").text(1)
|
|
|
+ $("#gifDuration").val(1);
|
|
|
+ $("#gifFps").val(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ ,
|
|
|
+ beginEdit : function(overlay){
|
|
|
+ $('#overlayProp').removeClass('atRight').removeClass('hide')
|
|
|
+ this.endAddPlane();
|
|
|
+ this.editPlane = overlay;
|
|
|
+
|
|
|
+
|
|
|
+ overlay.requestDownload()
|
|
|
+ if(overlay._loadDones){
|
|
|
+ $('.waiting').addClass('showloading');
|
|
|
+ overlay._loadDones.push(()=>{
|
|
|
+ $('.waiting').removeClass('showloading');
|
|
|
+ })
|
|
|
+ }
|
|
|
+ overlay.visible = true
|
|
|
+ this.updateOverlayPanel(overlay)
|
|
|
+ transformControls.attach(overlay)
|
|
|
+ }
|
|
|
+ ,
|
|
|
panoPosSwitchOnChange : function(){
|
|
|
var on = this.panoPosSwitch.is(':checked')
|
|
|
|
|
@@ -3695,7 +3951,7 @@ var EditOverlay = {
|
|
|
if (type == 'cancel') {
|
|
|
if (!this.editPlane.isNew && !this.editPlane.needDelete)
|
|
|
this.editPlane.setFromInfo(this.editPlane.info)
|
|
|
- //this.setOverlayFromInfo(this.editPlane, this.editPlane.info);//恢复
|
|
|
+
|
|
|
else
|
|
|
this.disposeOverlay(this.editPlane);
|
|
|
//删除
|
|
@@ -3741,7 +3997,7 @@ var EditOverlay = {
|
|
|
|
|
|
this.updateScale()
|
|
|
|
|
|
- this.updateOverlayPanel(this.editPlane)
|
|
|
+ this.updateOverlayPreview(this.editPlane)
|
|
|
},
|
|
|
|
|
|
getOverlayInfo: function(overlay) {
|
|
@@ -3769,6 +4025,9 @@ var EditOverlay = {
|
|
|
hasBox: overlay.hasBox,
|
|
|
transformAtPanos: transformAtPanos
|
|
|
}
|
|
|
+ if(overlay.animateInfo ){
|
|
|
+ overlay.info.animateInfo = CloneObject(overlay.animateInfo)
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
getSavingInfo: function(overlay) {
|
|
@@ -3795,8 +4054,13 @@ var EditOverlay = {
|
|
|
hasBox: overlay.hasBox ? 1 : 0,
|
|
|
media: [overlay.overlayType],
|
|
|
file: overlay.fileSrc || overlay.plane.material.map.image.src,
|
|
|
- transformAtPanos : transformAtPanos
|
|
|
+ transformAtPanos : transformAtPanos,
|
|
|
+
|
|
|
}
|
|
|
+ if(overlay.animateInfo && overlay.animateInfo.cellXcount * overlay.animateInfo.cellYcount > 1){
|
|
|
+ info.animateInfo = overlay.animateInfo
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
return info
|
|
|
|
|
@@ -3849,7 +4113,9 @@ var EditOverlay = {
|
|
|
plane.material.dispose();
|
|
|
overlay.parent.remove(overlay);
|
|
|
this.removeFromList(overlay)
|
|
|
-
|
|
|
+ if(this.animation){
|
|
|
+ GifTexDeal.remove(this.animation)
|
|
|
+ }
|
|
|
//this.beginToAddPlane()
|
|
|
|
|
|
},
|
|
@@ -3913,6 +4179,7 @@ var VisiSet = {
|
|
|
green: "#00c8ae"
|
|
|
},
|
|
|
init: function() {
|
|
|
+ this.footIconSizeRatio = Math.max(player.model.size.x, player.model.size.z) / 30;
|
|
|
this.meshGroup = new THREE.Object3D;
|
|
|
this.meshGroup.name = "setVisible-group"
|
|
|
player.model.add(this.meshGroup)
|
|
@@ -4003,6 +4270,79 @@ var VisiSet = {
|
|
|
enter()
|
|
|
|
|
|
},
|
|
|
+ beginSetPanoLog: function() {
|
|
|
+ player.flying || $(".toolLeft").removeClass("unable")
|
|
|
+ if (this.setPanoLog)
|
|
|
+ return;
|
|
|
+ this.setPanoLog = true
|
|
|
+ this.panosSelect = []
|
|
|
+ this.updateFootIconSize()
|
|
|
+ this.showFootIcons(null, true);
|
|
|
+
|
|
|
+ for(let i in player.model.hots){
|
|
|
+ player.model.hots[i].visi_ = player.model.hots[i].mesh.visible;
|
|
|
+ player.model.hots[i].mesh.visible = false
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ player.model.panos.forEach(e=>{
|
|
|
+ e.addTextSprite(e.id, $('#panoIdColorTex').val())
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ finishSetPanoLog: function() {
|
|
|
+ //结束 退出这个设置
|
|
|
+ if (!this.setPanoLog)
|
|
|
+ return;
|
|
|
+ //否则会加多个侦听
|
|
|
+ this.setPanoLog = false;
|
|
|
+
|
|
|
+ this.hideFootIcons();
|
|
|
+
|
|
|
+ this.recoverAllState2();
|
|
|
+ this.panosSelect = null
|
|
|
+ player.flyoutType = null
|
|
|
+
|
|
|
+ permitTranMode(true)
|
|
|
+
|
|
|
+
|
|
|
+ for(let i in player.model.hots){
|
|
|
+ player.model.hots[i].mesh.visible = player.model.hots[i].visi_
|
|
|
+ }
|
|
|
+
|
|
|
+ $("#panosIdShow").val('')
|
|
|
+
|
|
|
+ player.model.panos.forEach(e=>{
|
|
|
+ e.removeTextSprite()
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ dealPanoLogClick: function(id) {
|
|
|
+ var panos = player.model.panos;
|
|
|
+
|
|
|
+ var index = this.panosSelect.indexOf(id)
|
|
|
+ if (index==-1) {
|
|
|
+ this.changeFIconState(panos.index[id].footIcon, "linked" )
|
|
|
+ this.panosSelect.push(id)
|
|
|
+ }else{
|
|
|
+ this.changeFIconState(panos.index[id].footIcon, false)
|
|
|
+ this.panosSelect.splice(index,1)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ $("#panosIdShow").val(this.panosSelect.join(', '));
|
|
|
+
|
|
|
+ }
|
|
|
+ ,
|
|
|
+ changePanoIdColor:function(color){
|
|
|
+ player.model.panos.forEach(e=>{
|
|
|
+ e.removeTextSprite();
|
|
|
+ e.addTextSprite(e.id,color)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ ,
|
|
|
beginSetPanoVisible: function() {
|
|
|
player.flying || $(".toolLeft").removeClass("unable")
|
|
|
if (this.setPanoVisible)
|
|
@@ -4602,8 +4942,8 @@ var VisiSet = {
|
|
|
//根据相机位置 改变footIcon大小,使在范围内看到的热点大小一致,防止太小点击不到
|
|
|
if (!this.footIcons)
|
|
|
return;
|
|
|
- var s = player.cameraControls.controls.floorplan.absoluteScale * 2.8;
|
|
|
- s = THREE.Math.clamp(s, 0.5, 1.4);
|
|
|
+ var s = player.cameraControls.controls.floorplan.absoluteScale * 2.8
|
|
|
+ s = THREE.Math.clamp(s, 0.5 * this.footIconSizeRatio, 1.4 * this.footIconSizeRatio);
|
|
|
this.footIcons.forEach(function(f) {
|
|
|
try {
|
|
|
|
|
@@ -4805,29 +5145,7 @@ function permitTranMode(state) {
|
|
|
state ? $(".pinBottom.left").removeClass('hide') : $(".pinBottom.left").addClass('hide');
|
|
|
}
|
|
|
|
|
|
-CloneObject = function(copyObj, result, isSimpleCopy) {
|
|
|
- //isSimpleCopy只复制最外层
|
|
|
- //复制json result的可能:普通数字或字符串、普通数组、复杂对象
|
|
|
- result = result || {};
|
|
|
- if (copyObj instanceof Array) {
|
|
|
- if (copyObj[0]instanceof Object) {
|
|
|
- //不支持含有 [[Object]] 这样二级数组里面还是复杂数据的,普通和复杂的数据混合可能也不支持
|
|
|
- console.error("不支持含有 [[Object]] 这样二级数组里面还是复杂数据的...")
|
|
|
- }
|
|
|
- return copyObj.slice(0);
|
|
|
- //如果是数组,直接复制返回(排除数组内是object
|
|
|
- }
|
|
|
- for (var key in copyObj) {
|
|
|
- if (copyObj[key]instanceof Object && !isSimpleCopy)
|
|
|
- result[key] = CloneObject(copyObj[key]);
|
|
|
- else
|
|
|
- result[key] = copyObj[key];
|
|
|
- //如果是函数类同基本数据,即复制引用
|
|
|
- }
|
|
|
- return result;
|
|
|
-}
|
|
|
-;
|
|
|
-
|
|
|
+
|
|
|
function randomWord(randomFlag, min, max) {
|
|
|
//随机字符串
|
|
|
var str = ""
|