xzw 1 năm trước cách đây
mục cha
commit
b960eb3c30
1 tập tin đã thay đổi với 7 bổ sung9 xóa
  1. 7 9
      service/PanoBoxFrame.js

+ 7 - 9
service/PanoBoxFrame.js

@@ -15,7 +15,7 @@ const convertTool = {
 }
 
 //----------------------复制以下内容--------------------------------- 
-
+ 
 let player,
     skyBoxTight,
     meshGroup,
@@ -32,9 +32,6 @@ let player,
 
 const MinBoxInitialScore = 0.68 //找不到匹配时,若box分数低于该值,不createSinglePano
 
-
-
-
 let standards = {
     cabinet: {
         widthNormal: { min: 0.55, max: 1.05 /* max: 0.65  */ }, //widthNormal是不计宽还是厚度的平均宽度  //个别场景如S9yepREK8Jl 宽0.8米
@@ -516,8 +513,8 @@ let getUVs = (box, imageWidth, imageHeight) => {
     if (box.bbox2) return
     let uvs = []
     if (!imageWidth) {
-        imageWidth = boxFrame.datas[box.pano.id].imageWidth
-        imageHeight = boxFrame.datas[box.pano.id].imageHeight
+        imageWidth = global.boxFrame.datas[box.pano.id].imageWidth
+        imageHeight = global.boxFrame.datas[box.pano.id].imageHeight
     }
     if (imageWidth != imageWidth || imageHeight != imageHeight) {
         console.log(imageWidth, imageHeight)
@@ -1289,7 +1286,7 @@ let searchPair = (beginItem, group0_, group1_, parentPairs, resultPairs, evaluat
             group1_ = t
         }
         beginItem = group0_[0]
-        let complex = Object.keys(boxFrame.datas).length
+        let complex = Object.keys(global.boxFrame.datas).length
         if (complex < 10) evaluateFun = null
         else minScore = math.linearClamp(complex, 10, 80, -4000, -500)
 
@@ -1361,7 +1358,8 @@ export default class PanoBoxFrame extends THREE.Group {
         this.datasMixed = {}
         this.boxesSolid = boxesSolid
 
-        
+        /* let metadata = player.$app.store.getValue('metadata') //await player.$app.resource.metadata()
+        isLaser = metadata.sceneFrom == 'laser' */
 
         let compu = 0
         let beginCompute = () => {
@@ -4146,4 +4144,4 @@ export default class PanoBoxFrame extends THREE.Group {
         //清除上一次的结果
         ;(skyBoxTight = null), (meshGroup = null), (modelBound = new THREE.Box3()), (groundY = null), (safeBound = null), (boundConfirmed = null), (hue = 0), (boxesSolid = [])
     }
-}
+}