|
@@ -3303,7 +3303,9 @@ function o(a, s, l) {
|
|
|
|
|
|
if(_settings.floorPlanAngle){//指定了角度的话,就和browser.aspectRatio()无关,总使用纵向
|
|
|
var angle = parseFloat(_settings.floorPlanAngle)
|
|
|
-
|
|
|
+ /* if(_settings.angleShift2d){ //怎么算都会超出,仔细想了下是无法算准的
|
|
|
+ angle += THREE.Math.degToRad(_settings.angleShift2d)
|
|
|
+ } */
|
|
|
|
|
|
modelSize = modelSize.clone().applyEuler(new THREE.Euler(0, angle, 0))
|
|
|
|
|
@@ -3314,7 +3316,8 @@ function o(a, s, l) {
|
|
|
ratio = ratio != void 0 ? ratio : Math.max(screenSize * defaultRatio / maxSize, defaultRatio) ;
|
|
|
|
|
|
absoluteScale = n / 2 / l.orthoBase * ratio; //根据模型所占最大视口尺寸调整缩放
|
|
|
- }else{
|
|
|
+ }else{
|
|
|
+
|
|
|
var t = Math.max(modelSize.x, modelSize.z)
|
|
|
, i = Math.min(modelSize.x, modelSize.z)
|
|
|
, n = Math.max(t, i * this.camera.aspect)
|
|
@@ -3326,7 +3329,7 @@ function o(a, s, l) {
|
|
|
|
|
|
|
|
|
|
|
|
- n.prototype.rotateToView = function(modelSize, direction) {
|
|
|
+ n.prototype.rotateToView = function(modelSize, direction, type) {
|
|
|
let i = 0, n = p.aspectRatio() < 1 //是否模型尺寸显“细长”
|
|
|
|
|
|
if(_settings.floorPlanAngle ){//规定了cadImage旋转值的话 (0是无效的,将不设置)
|
|
@@ -3355,6 +3358,13 @@ function o(a, s, l) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if(_settings.angleShift2d){
|
|
|
+ i += THREE.Math.degToRad(_settings.angleShift2d)
|
|
|
+ }
|
|
|
+
|
|
|
+ if(type == 'update'){//若不是update,只能是从其他模式刚转到floorplan
|
|
|
+ i += this.lon
|
|
|
+ }
|
|
|
|
|
|
this.rotateLeft(i);
|
|
|
this.update(0);
|
|
@@ -3362,11 +3372,16 @@ function o(a, s, l) {
|
|
|
|
|
|
}
|
|
|
,
|
|
|
- n.prototype.rotateToAngle = function(angle){//add 旋转到特定角度
|
|
|
+
|
|
|
+ n.prototype.updateRotate = function(angle){//add 在floorplan模式直接旋转
|
|
|
+ this.rotateToView(player.model.size, player.getDirection(),'update');
|
|
|
+
|
|
|
+ }
|
|
|
+ /* n.prototype.rotateToAngle = function(angle){//add 旋转到特定角度
|
|
|
this.rotateLeft(angle + this.lon);
|
|
|
this.update(0);
|
|
|
|
|
|
- }
|
|
|
+ } */
|
|
|
,
|
|
|
|
|
|
|
|
@@ -4755,6 +4770,61 @@ function o(a, s, l) {
|
|
|
}
|
|
|
.bind(this), this.goNext.bind(this))
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ ,
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ t.prototype.findNearestItem = function(endToStart=true){//找到离currentPano最近的导览
|
|
|
+ /* if(this.atDestinationPano(this.player.currentPano)){//在终点直接从头。但有的场景可能不希望如此,就想跳到所属的展区开始。
|
|
|
+ return [0,0] //2023.7.7发现在点击item后播放会从头开始
|
|
|
+ } */
|
|
|
+ //注:没有判断此刻是否在panorama模式,就使用currentPano
|
|
|
+
|
|
|
+ var result = {item:[0,0], dis:Infinity};
|
|
|
+
|
|
|
+ var compare = (location, item)=>{
|
|
|
+ if(location.panoId != void 0 && location.panoId!= "outside"){
|
|
|
+ var pano = this.model.panos.index[location.panoId];
|
|
|
+ var dis = pano.position.distanceTo(this.player.currentPano.position)
|
|
|
+ if(dis<result.dis){
|
|
|
+ result.item = item, result.dis = dis
|
|
|
+ }else if(dis == result.dis){//如果两个位置相同,优先播放在导览条上离激活的最近的那段导览
|
|
|
+ /* if(this.itemCompare(item, this.currentItem, 'equal')){
|
|
|
+ result.item = item, result.dis = dis
|
|
|
+ } */
|
|
|
+ if(this.currentItem && Math.abs(item[0]-this.currentItem[0]) < Math.abs(result.item[0]-this.currentItem[0])){
|
|
|
+ result.item = item, result.dis = dis
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.model.heroLocations.forEach((e,i)=>{
|
|
|
+ if(e.heroLocations){
|
|
|
+ /* e.heroLocations.forEach((a,j)=>{
|
|
|
+ compare(a, [i,j])
|
|
|
+ }) */
|
|
|
+ var location = e.heroLocations.find(e=>e.panoId != void 0)
|
|
|
+ location && compare(location, [i,0]) //跳到此区域开头
|
|
|
+
|
|
|
+ }else{
|
|
|
+ compare(e, [i,0])
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if(endToStart && this.atEndOfTour(result.item)){ //如果是最后一个点,直接跳到开头,否则导览开始就在终点的话不会从头开始
|
|
|
+ return [0,0] //但注意最后是区域的话result.item是区域开头,除非站在最末最末尾的位置,上面的atDestinationPano直接返回
|
|
|
+ }
|
|
|
+
|
|
|
+ return result.item
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
,
|
|
|
t.prototype.playTour = function() {
|
|
|
if (!this.bounceable())
|
|
@@ -4775,6 +4845,30 @@ function o(a, s, l) {
|
|
|
}
|
|
|
,
|
|
|
|
|
|
+ t.prototype.playTourNearBy = function() {//就近导览
|
|
|
+
|
|
|
+ if (!this.bounceable()){
|
|
|
+ return this.tourIsPlaying ? void m.info("tour is already playing") : void (this.wouldInterrupt() || (this.player.emit("tour_auto", this.defaultWarpStyle),
|
|
|
+ this.tourInProgress = !0,
|
|
|
+ this.reachSource = "play",
|
|
|
+ this.tourIsPlaying = !0,
|
|
|
+ this.wasZoomEnabled = this.player.zoomEnabled,
|
|
|
+ this.player.zoomEnabled = !1,
|
|
|
+ this.resetSpecialTransition(),
|
|
|
+ this.emit("update.controls"),
|
|
|
+ this.emit(p.TourStart),
|
|
|
+ this.player.enablePreRendering(),
|
|
|
+
|
|
|
+ /* this.walkingSectionPaused ? (this.clearWalkingSectionPaused(),
|
|
|
+ this.goToDestination()) : this.goNext())) */
|
|
|
+
|
|
|
+
|
|
|
+ this.setDestinationItem(this.findNearestItem()) , this.goToDestination()) )
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
t.prototype.stopTour = function(isAutoStop) {//停止导览 isAutoStop 希望仅在飞完结束自动停止时的stopTour不停止tourSound, 这样才能完整播放tourSound. 不过似乎会在倒数第二个片段点击按钮停止导览时也视作自动结束的(执行this.interrupt() )。
|
|
|
this.isInterrupted() || this.transitionStage === v.Moving && this.checkAndHandleWalkingtourInterruption(this.nextWarpStyle) || (this.tourIsPlaying && (this.player.zoomEnabled = this.wasZoomEnabled),
|
|
|
this.tourIsPlaying = !1,
|
|
@@ -8579,8 +8673,8 @@ function o(a, s, l) {
|
|
|
84: [function(e, t, i) {
|
|
|
"use strict";
|
|
|
function n() {
|
|
|
- //v.playTourNearBy(),
|
|
|
- v.playTour(),
|
|
|
+ settings.playTourNearBy ? v.playTourNearBy() : v.playTour()
|
|
|
+
|
|
|
y && clearTimeout(y),
|
|
|
c(),
|
|
|
E.removeClass("fadeIn")
|
|
@@ -14011,7 +14105,7 @@ function o(a, s, l) {
|
|
|
|
|
|
t.hotIconScale = parseFloat(t.hotIconScale || 1)
|
|
|
window.DATA = t
|
|
|
-
|
|
|
+ settings.playTourNearBy = !DATA.tourFromStart
|
|
|
|
|
|
t.model.summary = t.summary
|
|
|
t.model.name = t.name
|
|
@@ -14054,19 +14148,19 @@ function o(a, s, l) {
|
|
|
|
|
|
|
|
|
|
|
|
- if (window.DATA.backgroundMusic) {
|
|
|
- if(window.isLocal){
|
|
|
- SoundManager.setSrc('bgm', manage.dealURL(window.DATA.backgroundMusic))
|
|
|
- }else{
|
|
|
- SoundManager.setSrc('bgm', window.DATA.backgroundMusic )
|
|
|
- }
|
|
|
- $("#volume").show();
|
|
|
+ if (window.DATA.backgroundMusic && window.isLocal) {
|
|
|
+ window.DATA.backgroundMusic = manage.dealURL(window.DATA.backgroundMusic)
|
|
|
}else if (g_version === "one"){
|
|
|
- SoundManager.setSrc('bgm', manage.dealURL( g_Prefix+"/audio/"+"audio"+window.number + "/background.mp3"))
|
|
|
+ window.DATA.backgroundMusic = manage.dealURL( g_Prefix+"/audio/"+"audio"+window.number + "/background.mp3")
|
|
|
+ }
|
|
|
|
|
|
|
|
|
+ if (window.DATA.backgroundMusic) {
|
|
|
+ SoundManager.setSrc('bgm', window.DATA.backgroundMusic )
|
|
|
$("#volume").show();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
//隐藏公司logo
|
|
|
window.DATA.loadlogo && showLogo();
|
|
@@ -14251,7 +14345,12 @@ function o(a, s, l) {
|
|
|
}
|
|
|
|
|
|
{//其他
|
|
|
- _settings.floorPlanAngle = DATA.floorPlanAngle || 0
|
|
|
+ _settings.floorPlanAngle = DATA.floorPlanAngle || 0
|
|
|
+ _settings.angleShift2d = DATA.angleShift2d || 0
|
|
|
+ if(DATA.insideLookLimit){
|
|
|
+ _settings.insideLookLimitDown = DATA.insideLookLimit[0]
|
|
|
+ _settings.insideLookLimitUp = DATA.insideLookLimit[1]
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -16842,70 +16941,57 @@ function o(a, s, l) {
|
|
|
}).done(function(e) {
|
|
|
window.data2 = e;
|
|
|
this.roomLabels = []
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- editTool.loadDone('data2', e)
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
if(!e){
|
|
|
console.error("data2 is null")
|
|
|
}else{
|
|
|
g_data2 = hotMatcher(e)
|
|
|
this.hotsCount = 0;
|
|
|
//因为热点保存后在hots里的顺序会被修改,所以使用order来记录顺序,这里要重排序:
|
|
|
- //window.hotData = {}
|
|
|
+
|
|
|
+ let create = ()=>{
|
|
|
+ //alertInfo('开始计算',{dontAutoClose:true, hideCloseBtn:true, name:'getPanoVisibles'}); //暂时没找到很多热点要计算的场景
|
|
|
|
|
|
- /* if(e.hots){
|
|
|
- var sids = Object.keys(e.hots).sort((a,b)=>{return e.hots[a].order - e.hots[b].order});
|
|
|
+ if(e.hots){
|
|
|
+ var sids = Object.keys(e.hots).sort((a,b)=>{return e.hots[a].order - e.hots[b].order});
|
|
|
+ sids.forEach((sid)=>{
|
|
|
+ e.hots[sid].sid = sid
|
|
|
+ if(e.hots[sid].texType == 'photo' && !e.hots[sid].texSrc)return console.error('有photo热点无texSrc',e.hots[sid])
|
|
|
+
|
|
|
+ new Hot(e.hots[sid], e.hots[sid].version != 'multi' && "byHot" )
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
- sids.forEach((sid)=>{
|
|
|
- this.hotsCount++,
|
|
|
- this.hots[sid] = new M(sid,e.hots[sid] ,this);
|
|
|
- //e.hots[sid].infoAttribute || (e.hots[sid].infoAttribute = {})
|
|
|
- //this.hots[sid].initStyleImg(e.hots[sid].infoAttribute);
|
|
|
- window.hotData[sid] = e.hots[sid];
|
|
|
- })
|
|
|
- }*/
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- if(e.hots){
|
|
|
- var sids = Object.keys(e.hots).sort((a,b)=>{return e.hots[a].order - e.hots[b].order});
|
|
|
- sids.forEach((sid)=>{
|
|
|
- e.hots[sid].sid = sid
|
|
|
- new Hot(e.hots[sid], e.hots[sid].version != 'multi' && "byHot" )
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- if(e.overlays){
|
|
|
- e.overlays.forEach((info)=>{
|
|
|
- new Hot(info, 'byOverlay')
|
|
|
- })
|
|
|
+ if(e.overlays){
|
|
|
+ e.overlays.forEach((info)=>{
|
|
|
+ new Hot(info, 'byOverlay')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ Hot.createHotList();
|
|
|
+
|
|
|
+
|
|
|
+ if(DATA.roomLabels){
|
|
|
+ DATA.roomLabels.forEach((data)=>{
|
|
|
+ this.roomLabels.push(new RoomLabel(data))
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ //alertClose('getPanoVisibles');
|
|
|
+ Hot.startLoad()
|
|
|
+ editTool.loadDone('data2', e)
|
|
|
}
|
|
|
- Hot.createHotList();
|
|
|
|
|
|
-
|
|
|
- if(DATA.roomLabels){
|
|
|
- DATA.roomLabels.forEach((data)=>{
|
|
|
- this.roomLabels.push(new RoomLabel(data))
|
|
|
- })
|
|
|
+ if(player.currentPano){
|
|
|
+ create()
|
|
|
+ }else{
|
|
|
+ let f = ()=>{
|
|
|
+ window.bus.removeEventListener('playerAndModelReady',f)
|
|
|
+ create()
|
|
|
+ }
|
|
|
+ window.bus.addEventListener('playerAndModelReady',f)
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- /* if(e.multiOverlays){
|
|
|
- e.multiOverlays.forEach((info)=>{
|
|
|
- new Hot(info)
|
|
|
- })
|
|
|
-
|
|
|
- }) */
|
|
|
-
|
|
|
- Hot.startLoad()
|
|
|
|
|
|
e.weixinDesc && (g_weixinObj.desc = e.weixinDesc)
|
|
|
|
|
@@ -17146,21 +17232,27 @@ function o(a, s, l) {
|
|
|
this.skybox = new n(this.boundingBox),
|
|
|
this.skybox.matrixWorldNeedsUpdate = !0,
|
|
|
this.add(this.skybox)
|
|
|
- /* setTimeout(function() {
|
|
|
- //this.hotsCount && this.shineHots()
|
|
|
- Hot.beginShineHot()
|
|
|
-
|
|
|
+
|
|
|
+ //因为一部分漫游点在模型外
|
|
|
+ {
|
|
|
+
|
|
|
+ let bounding = new THREE.Box3 //不包含pano的bound
|
|
|
+ this.floors.list.forEach(floor=>{
|
|
|
+ bounding.union(floor.conservativeBoundingBox)
|
|
|
+ })
|
|
|
+ this.boundWithoutPanos = bounding
|
|
|
+ this.sizeWithoutPanos = bounding.size()
|
|
|
+ this.centerWithoutPanos = bounding.center()
|
|
|
+
|
|
|
+ /* 如果想居中模型, bound不加pano:
|
|
|
+ this.boundingBox = bounding
|
|
|
+ this.size = bounding.size()
|
|
|
+ this.center = bounding.center() */
|
|
|
}
|
|
|
- .bind(this), 1300), */
|
|
|
|
|
|
+
|
|
|
|
|
|
- //add-----
|
|
|
- console.log('计算visiblePanos开始,可能需要一段时间')
|
|
|
- for(let i in this.hots){
|
|
|
- this.hots[i].setVisiblePanos(this.hots[i].info.visiblePanos);
|
|
|
- }
|
|
|
- console.log('计算visiblePanos完毕')
|
|
|
- //---------
|
|
|
+
|
|
|
|
|
|
return R.debug("Done building model"),
|
|
|
0 < f.raycastsDone && (R.warn("raycasts: " + f.raycastsDone),
|
|
@@ -17393,7 +17485,7 @@ function o(a, s, l) {
|
|
|
throw new o("Tried to activate invalid model!");
|
|
|
var i = this.activeModel;
|
|
|
this.activeModel = t,
|
|
|
- this.tileDownloader.setPanoData(t.panos, t.listImagePanos(), t.sid),
|
|
|
+ this.tileDownloader.setpanoData(t.panos, t.listImagePanos(), t.sid),
|
|
|
this.tileDownloader.setUrls(t.urls),
|
|
|
t.panos.forEach(function(e) {
|
|
|
e.attachToPanoRenderer(this.panoRenderer),
|
|
@@ -18316,8 +18408,8 @@ function o(a, s, l) {
|
|
|
return this.position
|
|
|
}
|
|
|
,
|
|
|
- r.prototype.addTextSprite = function(e, color, parent) {
|
|
|
- this.removeTextSprite();
|
|
|
+ /*r.prototype.addTextSprite = function(text, color, parent, scale=1) {
|
|
|
+ this.removeTextSprite();
|
|
|
var ratio = 16;
|
|
|
var i = document.createElement("canvas")
|
|
|
, n = i.getContext("2d");
|
|
@@ -18326,6 +18418,7 @@ function o(a, s, l) {
|
|
|
n.font = " 30px Arial",
|
|
|
n.fillStyle = "white";
|
|
|
var r = n.measureText(e).width;
|
|
|
+
|
|
|
n.fillText(e, (i.width - r) / 2, (i.height + 60) / 2);
|
|
|
var o = new s.Texture(i);
|
|
|
o.needsUpdate = !0;
|
|
@@ -18343,18 +18436,57 @@ function o(a, s, l) {
|
|
|
this.text3d.position.copy(this.skyboxMesh.position)
|
|
|
this.floor.add(this.text3d)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
- var scale = 5
|
|
|
+
|
|
|
this.text3d.scale.y = scale/ratio
|
|
|
this.text3d.scale.x = scale
|
|
|
- }
|
|
|
- ,
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
r.prototype.removeTextSprite = function() {
|
|
|
this.text3d && (this.text3d.parent.remove(this.text3d),
|
|
|
this.text3d.material.map.dispose(),
|
|
|
this.text3d = null)
|
|
|
+ } */
|
|
|
+
|
|
|
+ r.prototype.addTextSprite = function(text = this.id, color, parent, scale=1) {
|
|
|
+ this.removeTextSprite()
|
|
|
+ this.label = new TextSprite({
|
|
|
+ /* sizeInfo: {
|
|
|
+ minSize: 50,
|
|
|
+ maxSize: 300,
|
|
|
+ nearBound: 0.2,
|
|
|
+ farBound: Math.max(20, this.model.size.length() / 3),
|
|
|
+ farBoundPlan: 250,
|
|
|
+ }, */
|
|
|
+ renderOrder: 8,
|
|
|
+ backgroundColor:{r: 255, g: 255, b: 255, a: 0 },
|
|
|
+ textColor: { r: 255, g: 255, b: 255, a: 1 },
|
|
|
+ textshadowColor: '#888',
|
|
|
+ text,
|
|
|
+ fontsize: 20*scale,
|
|
|
+
|
|
|
+ })
|
|
|
+ if(color){
|
|
|
+ this.label.children[0].material.color.set(color)
|
|
|
+ }
|
|
|
+ if(parent){
|
|
|
+ parent.add(this.label)
|
|
|
+ this.label.position.z = 0.1
|
|
|
+ }else{
|
|
|
+ let position = this.floorPosition.clone()
|
|
|
+ position.y += 0.4
|
|
|
+ this.label.position.copy(position)
|
|
|
+ this.floor.add(this.label2)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ ,
|
|
|
+ r.prototype.removeTextSprite = function() {
|
|
|
+ this.label && this.label.dispose()
|
|
|
+
|
|
|
}
|
|
|
,
|
|
|
r.prototype.isAligned = function() {
|
|
@@ -19003,7 +19135,7 @@ function o(a, s, l) {
|
|
|
H.debug('Brushing from "' + this.player.currentPano.id + '" to "' + this.warpDestPano.id + '" (' + (this.nodes ? this.nodes.length : 0) + ")"),
|
|
|
n ? (H.info('No "walkable" route, using fall-back warp style transition'),
|
|
|
e = t) : (this.setPathHulls(this.nodes),
|
|
|
- this.setFloorCurves(),
|
|
|
+ this.setFloorCurves(),
|
|
|
i && ("chevron" === D.path.style ? this.obj3d.add(this.drawPathPavement(this.floorCurvePoints)) : "ribbon" === D.path.style && this.obj3d.add(this.drawPathRibbon(this.floorCurvePoints, this.floorCurveColors)))),
|
|
|
this.player.currentPano.floor.add(this.obj3d);
|
|
|
var r = this.player.mode === O.DOLLHOUSE || this.player.mode === O.FLOORPLAN
|
|
@@ -19159,6 +19291,15 @@ function o(a, s, l) {
|
|
|
}
|
|
|
,
|
|
|
t.prototype.drawPathRibbon = function(e, t) {
|
|
|
+ /* let map = Texture.load('images/arrow.png')
|
|
|
+ map.anisotropy = 4
|
|
|
+ map.repeat.set(1, 6)
|
|
|
+ map.wrapS = THREE.RepeatWrapping
|
|
|
+ map.wrapT = THREE.RepeatWrapping
|
|
|
+ map.needsUpdate = true
|
|
|
+ */
|
|
|
+
|
|
|
+
|
|
|
this.bunnyObj.visible = D.warp.showBunny;
|
|
|
for (var i = .6 * D.path.ribbonWidth * .5, n = new P.Vector3, r = new P.Vector3(0,this.pathHeight(),0), o = new P.Geometry, a = new P.Vector3, s = 0; s < e.length; s += 1) {
|
|
|
a.copy(e[s]),
|
|
@@ -19204,7 +19345,10 @@ function o(a, s, l) {
|
|
|
color: 16777215,
|
|
|
side: P.DoubleSide,
|
|
|
name: "ribbonOut",
|
|
|
- vertexColors: P.VertexColors
|
|
|
+ vertexColors: P.VertexColors,
|
|
|
+
|
|
|
+ /* transparent:true,
|
|
|
+ map */
|
|
|
});
|
|
|
var y = new P.Mesh(o,h);
|
|
|
return y.name = "ribbon",
|
|
@@ -19819,11 +19963,15 @@ function o(a, s, l) {
|
|
|
,
|
|
|
t.prototype.warpTravel_BLACK = function(e, t, i, n) {
|
|
|
var r = e || 0;
|
|
|
- null != t || (t = D.warp.teleportTime)
|
|
|
+ null !=
|
|
|
+ t || (t = D.warp.teleportTime)
|
|
|
//add
|
|
|
- var done = ()=>{
|
|
|
- Hot.updateVisibles([this.player.currentPano]) //更新热点显示
|
|
|
- this.player.transitionPos({type:"beforeFlytopano", pano:this.player.currentPano, dur:100})//add
|
|
|
+ player.model.hotGroup.visible = false
|
|
|
+ var done = ()=>{
|
|
|
+ this.player.transitionPos({type:"beforeFlytopano", pano:this.player.currentPano, dur:0, callback:()=>{
|
|
|
+ player.model.hotGroup.visible = true
|
|
|
+ Hot.updateVisibles([this.player.currentPano]) //更新热点显示
|
|
|
+ }})
|
|
|
|
|
|
}
|
|
|
if(window.DATA.momentTourBlackNewType){
|
|
@@ -20945,7 +21093,7 @@ function o(a, s, l) {
|
|
|
return;
|
|
|
}
|
|
|
if (window.VisiSet && VisiSet.setTagVisible ) {
|
|
|
- VisiSet.tagVsetting && this.intersect && this.intersect.object.visible && VisiSet.dealTagVisible(VisiSet.tagVsetting, this.intersect.object.name);
|
|
|
+ VisiSet.tagVsetting && this.intersect && this.intersect.object.visible && VisiSet.dealTagVisible(this.intersect.object.name);
|
|
|
return;
|
|
|
}
|
|
|
if (window.VisiSet && VisiSet.setPanoLog ) {
|
|
@@ -20956,6 +21104,10 @@ function o(a, s, l) {
|
|
|
this.intersect && this.intersect.object.visible && VisiSet.dealRouteClick(this.intersect.object);
|
|
|
return;
|
|
|
}
|
|
|
+ if (window.VisiSet && VisiSet.setPanoArea ) {
|
|
|
+ this.intersect && this.intersect.object.visible && VisiSet.dealPanoAreaClick( this.intersect.object);
|
|
|
+ return;
|
|
|
+ }
|
|
|
if(this.hoveringPlane){
|
|
|
this.clickOverlay(this.hoveringPlane)
|
|
|
return;
|
|
@@ -21217,12 +21369,21 @@ function o(a, s, l) {
|
|
|
if (position) {
|
|
|
camera.position.copy(position)
|
|
|
}
|
|
|
- if(mode == V.DOLLHOUSE){
|
|
|
-
|
|
|
- var o = this.position.clone();
|
|
|
- this.mode === V.PANORAMA ? o.add(new B.Vector3(0,6,0)).add(this.getDirection().multiplyScalar(-10)) : o.add(T.DOWN.clone().applyQuaternion(this.quaternion).multiplyScalar(6)).setY(6),
|
|
|
- camera.position.copy(o),
|
|
|
- control.target.copy(this.target.clone().setY(this.model.center.y));
|
|
|
+ if(mode == V.DOLLHOUSE){
|
|
|
+ var pos = this.position.clone();
|
|
|
+ if(this.mode === V.PANORAMA){
|
|
|
+ let vec = new B.Vector3(0,6,0).add(this.getDirection().multiplyScalar(-10))
|
|
|
+ if(target)vec.multiplyScalar(0.15) //编辑热点时飞出不要飞太远,只是飞出来就近观察一下热点
|
|
|
+ pos.add(vec)
|
|
|
+ }else{
|
|
|
+ pos.add(T.DOWN.clone().applyQuaternion(this.quaternion).multiplyScalar(6)).setY(6)
|
|
|
+ }
|
|
|
+
|
|
|
+ camera.position.copy(pos)
|
|
|
+ if(!target) target = this.target.clone().setY(this.model.center.y)
|
|
|
+ control.target.copy(target);
|
|
|
+
|
|
|
+
|
|
|
|
|
|
//for多楼层 且 让模型刚好适应屏幕
|
|
|
|
|
@@ -21483,12 +21644,12 @@ function o(a, s, l) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (window.VisiSet && (VisiSet.setPanoVisible || VisiSet.setTagVisible || VisiSet.setPanoLog || VisiSet.setRoute )) {
|
|
|
+ if (window.VisiSet && (VisiSet.setPanoVisible || VisiSet.setTagVisible || VisiSet.setPanoLog || VisiSet.setPanoArea && VisiSet.editPanoArea || VisiSet.setRoute )) {
|
|
|
let meshes = this.model.hotGroup.children.slice()
|
|
|
if(VisiSet.routeInfo?.operation == 'removeLink'){
|
|
|
meshes.push(...VisiSet.meshGroup.children.filter(e=>e.name.includes('routeLine:')))
|
|
|
}else{
|
|
|
- meshes.push(...VisiSet.footIcons)
|
|
|
+ VisiSet.footIcons && meshes.push(...VisiSet.footIcons)
|
|
|
}
|
|
|
|
|
|
|
|
@@ -21982,7 +22143,7 @@ function o(a, s, l) {
|
|
|
window._transitionPosId = 9999
|
|
|
|
|
|
t.prototype.transitionPos = function(o={}) {//渐变overlay和热点的位置
|
|
|
-
|
|
|
+
|
|
|
G.cancelById(_transitionPosId)
|
|
|
|
|
|
var begin = function(object, pos, qua, scale){
|
|
@@ -21990,7 +22151,7 @@ function o(a, s, l) {
|
|
|
if(!same(object.position, pos, 0.01)){
|
|
|
|
|
|
G.start(H.vector(object.position, pos), o.dur, (e)=>{
|
|
|
-
|
|
|
+ object.updateScale()
|
|
|
},0, z[k.transition.movementEasing], "transitionPos", _transitionPosId)
|
|
|
}
|
|
|
|
|
@@ -22016,20 +22177,7 @@ function o(a, s, l) {
|
|
|
return s
|
|
|
}
|
|
|
var sid = o.pano != void 0 ? o.pano.id : "outside";
|
|
|
- /* this.model.hotGroup.children.forEach(overlay=>{
|
|
|
- var panoData = overlay.transformAtPanos[sid]
|
|
|
- var useCustom = !panoData
|
|
|
- //if(overlay.usingTransformData || !useCustom){
|
|
|
- var pos = useCustom ? overlay.posCustom : panoData.pos;
|
|
|
- var qua = useCustom ? overlay.quaCustom : panoData.qua;
|
|
|
- var scale = useCustom ? overlay.getScaleBySize(overlay.widthCustom, overlay.heightCustom) :
|
|
|
- overlay.getScaleBySize(panoData.width , panoData.height)
|
|
|
- scale = new THREE.Vector3(scale.x, scale.y, overlay.scale.z)
|
|
|
- begin(overlay, pos, qua, scale )
|
|
|
- //}
|
|
|
- overlay.usingTransformData = !useCustom
|
|
|
- }) */
|
|
|
-
|
|
|
+
|
|
|
|
|
|
for(let i in this.model.hots){//是否判断visible?
|
|
|
var hot = this.model.hots[i];
|
|
@@ -22045,6 +22193,12 @@ function o(a, s, l) {
|
|
|
//hot.usingTransformData = !useCustom;
|
|
|
}
|
|
|
|
|
|
+ if(o.callback){
|
|
|
+ setTimeout(()=>{
|
|
|
+ o.callback()
|
|
|
+ },o.dur + 16) ;//姑且这么写
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -22054,15 +22208,16 @@ function o(a, s, l) {
|
|
|
t.prototype.focusPoint = function(o={}){//当在外时,聚焦相机到这一点
|
|
|
//console.log("focusPoint")
|
|
|
if(this.mode == "floorplan"){
|
|
|
- var modelSize = o.modelSize || new THREE.Vector3(8,8,8);//可视范围
|
|
|
var control = player.cameraControls.controls.floorplan;
|
|
|
- var absoluteScale = control.getDefaultAbsoluteScale(modelSize)
|
|
|
- var currentScale = control.absoluteScale;
|
|
|
var currentTarget = control.target.clone()
|
|
|
-
|
|
|
+ if(!o.dontChangeScale){
|
|
|
+ var modelSize = o.modelSize || new THREE.Vector3(8,8,8);//可视范围
|
|
|
+ var absoluteScale = control.getDefaultAbsoluteScale(modelSize)
|
|
|
+ var currentScale = control.absoluteScale;
|
|
|
+ }
|
|
|
G.cancelById(window._tranOutsideFocus, true);
|
|
|
G.start(function(progress){
|
|
|
- control.absoluteScale = absoluteScale*progress + currentScale*(1-progress);
|
|
|
+ o.dontChangeScale || (control.absoluteScale = absoluteScale*progress + currentScale*(1-progress))
|
|
|
control.target = o.aim.clone().multiplyScalar(progress).add(currentTarget.clone().multiplyScalar(1-progress))
|
|
|
control.camera.position.copy(control.target.clone().add(control.offset)) //维持角度
|
|
|
}.bind(this) , o.dur || 600, null/* cancelFuc */, 0, z[k.transition.movementEasing], "outsideFocus", window._tranOutsideFocus, null/* cancelFuc */);
|
|
@@ -22736,10 +22891,10 @@ function o(a, s, l) {
|
|
|
rotTime = defaultRotTime
|
|
|
}
|
|
|
rotTime = Math.max(0, rotTime)
|
|
|
- console.log("rotTime "+rotTime +" at item "+this.director.currentItem + (hasMusic ? (",musicCurrentTime:"+current+'音乐总长:'+currentLocation0.musicInfo.time) : ''))
|
|
|
+ //console.log("rotTime "+rotTime +" at item "+this.director.currentItem + (hasMusic ? (",musicCurrentTime:"+current+'音乐总长:'+currentLocation0.musicInfo.time) : ''))
|
|
|
}else{
|
|
|
rotTime = currentLocation.rotTime * 1000
|
|
|
- console.log("rotTime "+rotTime +" at item "+this.director.currentItem)
|
|
|
+ //console.log("rotTime "+rotTime +" at item "+this.director.currentItem)
|
|
|
}
|
|
|
|
|
|
this.path.waitNextStep(e, function() {//等待音乐播放一段时间再下一步,此时镜头会缓慢旋转
|
|
@@ -26741,6 +26896,7 @@ function o(a, s, l) {
|
|
|
this.useHighResolutionPanos = !0,
|
|
|
this.useUltraHighResolutionPanos = !1,
|
|
|
this.modelHasUltraHighPanos = !1
|
|
|
+ this.maxRenderTargetSize = Math.min( common.getMaxCubemapSize(), this.maxRenderTargetSize)//add
|
|
|
}
|
|
|
var r = e("../enum/PanoSizeClass")
|
|
|
, o = e("../settings")
|
|
@@ -26887,7 +27043,7 @@ function o(a, s, l) {
|
|
|
this.urls = e
|
|
|
}
|
|
|
,
|
|
|
- i.prototype.setPanoData = function(e, t, i) {
|
|
|
+ i.prototype.setpanoData = function(e, t, i) {
|
|
|
this.panos = e,
|
|
|
this.imagePanos = t,
|
|
|
this.panoGroupId = i
|
|
@@ -29575,7 +29731,7 @@ function o(a, s, l) {
|
|
|
}],
|
|
|
188: [function(e, t, i) {
|
|
|
"use strict";
|
|
|
- t.exports = {
|
|
|
+ window.lerp = t.exports = {
|
|
|
vector: function(t, i) {
|
|
|
var n = t.clone();
|
|
|
return i = i.clone(),
|