lanxin vor 3 Tagen
Ursprung
Commit
e673a25208

+ 2 - 0
scene/public/index.html

@@ -55,6 +55,8 @@
 
   <!-- 大场景相关 -->
   <script>
+    window.TourRotTime = 2 // 点位停留时间
+    window.stepAcc = 1 // 导览速度倍率(0.1=>10倍速)
     var changeLog = () => {
       let logLevel = 1
 

Datei-Diff unterdrückt, da er zu groß ist
+ 3152 - 13616
scene/public/js/main_2020_show.js


+ 31 - 156
scene/public/js/manage.js

@@ -1,7 +1,4 @@
-var g_ProjectName = window.location.pathname.substring(
-  window.location.pathname.indexOf('/') + 1,
-  window.location.pathname.lastIndexOf('/')
-)
+var g_ProjectName = window.location.pathname.substring(window.location.pathname.indexOf('/') + 1, window.location.pathname.lastIndexOf('/'))
 var g_Prefix = 'https://super.4dage.com/'
 // var g_Prefix=window.location.href.substring(0,window.location.href.indexOf("/index.html")+1);
 var s = window.location.href.split('/')
@@ -76,24 +73,14 @@ window.browser = {
     )
   },
   isFullscreen: function () {
-    return (
-      document.fullscreenElement ||
-      document.mozFullscreenElement ||
-      document.mozFullScreenElement ||
-      document.webkitFullscreenElement ||
-      document.msFullscreenElement
-    )
+    return document.fullscreenElement || document.mozFullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement
   },
   valueFromHash: function (e, t) {
     var i = new RegExp('[#&?]' + e + '=([^#&?]*)'),
       n = i.exec(window.location.href)
     if (!n) return t
     var r = n[1]
-    return 'boolean' == typeof t
-      ? 'true' === r || '1' === r
-      : 'number' == typeof t
-      ? parseFloat(r)
-      : window.decodeURIComponent(r)
+    return 'boolean' == typeof t ? 'true' === r || '1' === r : 'number' == typeof t ? parseFloat(r) : window.decodeURIComponent(r)
   },
   urlHasValue: function (key, isGetValue) {
     let querys = window.location.search.substr(1).split('&')
@@ -140,7 +127,7 @@ var settings = {
   teleportTime: 1500, //瞬间过渡的时间
   /* flytimeDistanceMultiplier:150,
     flyTime:750,  */
-  tourRotTime: 2, //默认停留2秒
+  tourRotTime: window.TourRotTime || 2, //默认停留2秒
   //dontExamHot:true,
   hotFastTran: false,
   transparentBg: false,
@@ -207,11 +194,7 @@ var toPrecision = function (e, t) {
 var dealMap = (map, o = {}) => {
   //使不resize  when   image is not power of two  ,但缩小时会有锯齿
   if (!o.ignoreResize) {
-    if (
-      !map.image ||
-      !THREE.Math.isPowerOfTwo(map.image.width) ||
-      !THREE.Math.isPowerOfTwo(map.image.height)
-    ) {
+    if (!map.image || !THREE.Math.isPowerOfTwo(map.image.width) || !THREE.Math.isPowerOfTwo(map.image.height)) {
       map.wrapS = map.wrapT = THREE.ClampToEdgeWrapping
       map.minFilter = THREE.LinearFilter
       //map.generateMipmaps = true;
@@ -354,10 +337,7 @@ var convertTool = {
     /* if(config.isEdit && publicObjectSet.editor.mainDesign.editing){
 			var o = ray.intersectObjects(publicObjectSet.editor.mainDesign.wallMeshes);
 		}else{ */
-    let colliders = player.model.allFloorsVisible
-      ? player.model.colliders
-      : (floorIndex != void 0 ? player.model.floors.index[floorIndex] : player.model.currentFloor)
-          .collider.children
+    let colliders = player.model.allFloorsVisible ? player.model.colliders : (floorIndex != void 0 ? player.model.floors.index[floorIndex] : player.model.currentFloor).collider.children
     //let colliders = (floorIndex == void 0 ) ? player.model.colliders : player.model.floors.index[floorIndex].collider.children
     var o = ray.intersectObjects(colliders)
     //}
@@ -387,19 +367,12 @@ var convertTool = {
 
       var y = info.y
 
-      if (
-        player.mode ==
-        'floorplan' /*  ||  Math.abs(O.x-pos.x)<0.0001 && Math.abs(O.z-pos.z)<0.0001) */
-      ) {
+      if (player.mode == 'floorplan' /*  ||  Math.abs(O.x-pos.x)<0.0001 && Math.abs(O.z-pos.z)<0.0001) */) {
         //intersectPlane和地面平行,无交点
         var x = pos.x,
           z = pos.z
       } else {
-        if (
-          y < player.camera.position.y &&
-          O.y <= A.y /* || y>player.camera.position.y && O.y >= A.y  */
-        )
-          return null //鼠标射线向上。因为相机一定位于地面以上(地面不会抬高到相机上吧?),所以无交点。
+        if (y < player.camera.position.y && O.y <= A.y /* || y>player.camera.position.y && O.y >= A.y  */) return null //鼠标射线向上。因为相机一定位于地面以上(地面不会抬高到相机上吧?),所以无交点。
         if (O.y == A.y) {
           console.log('一样??')
           return
@@ -550,9 +523,7 @@ var convertTool = {
       op.resolution = { x: renderSize.width, y: renderSize.height }
     }
     if (!op.camera) {
-      let camera = player.cameraControls.activeControl
-        ? player.cameraControls.activeControl.camera
-        : player.camera
+      let camera = player.cameraControls.activeControl ? player.cameraControls.activeControl.camera : player.camera
       let camera2 = camera.clone()
       camera2.matrixWorld.copy(player.camera.matrixWorld) //因为其他原因该camera的matrixWorld被还原了,而player.camera的是正确的
       op.camera = camera2
@@ -567,9 +538,7 @@ var convertTool = {
       } else {
         currentDis = op.position.distanceTo(op.camera.position)
       }
-      w =
-        op.maxSize -
-        (op.maxSize - op.minSize) * THREE.Math.smoothstep(currentDis, op.nearBound, op.farBound)
+      w = op.maxSize - (op.maxSize - op.minSize) * THREE.Math.smoothstep(currentDis, op.nearBound, op.farBound)
       //maxSize : mesh要表现的最大像素宽度;   nearBound: 最近距离,若比nearBound近,则使用maxSize
     }
     i.copy(op.position).project(op.camera), //tag中心在屏幕上的二维坐标
@@ -710,12 +679,7 @@ window.expandCommon = function (common) {
 
         for (let i = 0; i < posLength; i++) {
           var B = posB[i]
-          var ray = new THREE.Raycaster(
-            A.clone(),
-            B.clone().sub(A).normalize(),
-            0,
-            A.distanceTo(B) - (options.tolerance || 0)
-          )
+          var ray = new THREE.Raycaster(A.clone(), B.clone().sub(A).normalize(), 0, A.distanceTo(B) - (options.tolerance || 0))
           var o = ray.intersectObjects(options.model || player.model.colliders, true)
 
           if (!o || !o.length) {
@@ -783,8 +747,7 @@ window.expandMath = function (math) {
 //管理js文件 获取modeldata.js 判断是否有特殊的字段,如果有就先加载SpecialScene.js 里面有对特殊场景处理的代码 否则就直接加载main
 
 var Manage = function () {
-  ;(this.weixinURL = 'https://res.wx.qq.com/open/js/jweixin-1.2.0.js'),
-    (this.time = '?' + new Date().getTime())
+  ;(this.weixinURL = 'https://res.wx.qq.com/open/js/jweixin-1.2.0.js'), (this.time = '?' + new Date().getTime())
   this.loadAudio()
   this.loadWeixin()
 }
@@ -820,8 +783,7 @@ Manage.prototype.LoadJs = function (_files, succes) {
   function loadFile(url, success) {
     if (!FileIsExt(classcodes, url)) {
       var _ThisType = GetFileType(url)
-      var ThisType =
-        _ThisType.indexOf('?') == -1 ? _ThisType : _ThisType.substring(0, _ThisType.indexOf('?'))
+      var ThisType = _ThisType.indexOf('?') == -1 ? _ThisType : _ThisType.substring(0, _ThisType.indexOf('?'))
       var fileObj = null
       if (ThisType == '.js') {
         fileObj = document.createElement('script')
@@ -1404,12 +1366,7 @@ function initByTHREE(THREE) {
       this.enabled = true
       //draw coverTex
       this.quad.material.uniforms.progress.value = 1
-      sceneRenderer.renderer.render(
-        sceneRenderer.scene,
-        sceneRenderer.camera,
-        this.coverRenderTarget,
-        true
-      )
+      sceneRenderer.renderer.render(sceneRenderer.scene, sceneRenderer.camera, this.coverRenderTarget, true)
       console.log('start111')
     },
     stop: function () {
@@ -1542,12 +1499,7 @@ function initByTHREE(THREE) {
     update(currentFloor) {
       if (!this.position) return
 
-      if (
-        !this.visible &&
-        this.unvisibleReasons.some(e => e.level == 1) &&
-        !this.unvisibleReasons.some(e => e.level > 1)
-      )
-        return
+      if (!this.visible && this.unvisibleReasons.some(e => e.level == 1) && !this.unvisibleReasons.some(e => e.level > 1)) return
       /*
                 规定一下level共四层
                 level3 是notTrueSide层,权重最高。
@@ -1570,20 +1522,13 @@ function initByTHREE(THREE) {
       //判断label是否被模型遮挡,遮挡则消失(如果是漫游模式最好提前计算visiblePanos)
       if (player.mode != 'panorama') {
         currentFloor = currentFloor || player.model.currentFloor
-        if (
-          !player.model.allFloorsVisible &&
-          this.floorIndex != void 0 &&
-          this.floorIndex != currentFloor.floorIndex
-        ) {
+        if (!player.model.allFloorsVisible && this.floorIndex != void 0 && this.floorIndex != currentFloor.floorIndex) {
           this.setVisible(false, 'shelter', 0, null, true)
           //this.elem.css('display','none');	return;
           if (!this.visible) return
         }
 
-        if (
-          this.shelterByModel &&
-          convertTool.ifShelter(this.position, p.vector, player.camera, this.floorIndex)
-        ) {
+        if (this.shelterByModel && convertTool.ifShelter(this.position, p.vector, player.camera, this.floorIndex)) {
           //this.elem.css('display','none');	return;
           this.setVisible(false, 'shelter', 0, null, true)
           if (!this.visible) return
@@ -1852,8 +1797,7 @@ function initByTHREE(THREE) {
 
       //this.needsUpdate = false
 
-      let camera =
-        player.mode == 'floorplan' ? player.cameraControls.activeControl.camera : player.camera //floorplan 时要用到OrthographicCamera
+      let camera = player.mode == 'floorplan' ? player.cameraControls.activeControl.camera : player.camera //floorplan 时要用到OrthographicCamera
 
       if (!this.fixOrient) {
         let parentQua = this.root.parent.getWorldQuaternion(new THREE.Quaternion())
@@ -1863,10 +1807,7 @@ function initByTHREE(THREE) {
       if (this.sizeInfo) {
         var s = convertTool.getScaleForConstantSize(
           Object.assign({}, this.sizeInfo, {
-            farBound:
-              player.mode == 'floorplan'
-                ? this.sizeInfo.farBoundPlan || this.sizeInfo.farBound
-                : this.sizeInfo.farBound,
+            farBound: player.mode == 'floorplan' ? this.sizeInfo.farBoundPlan || this.sizeInfo.farBound : this.sizeInfo.farBound,
             position: this.root.getWorldPosition(new THREE.Vector3())
           })
         )
@@ -1929,16 +1870,11 @@ function initByTHREE(THREE) {
         textMaxWidth = Math.max(textMaxWidth, textWidth)
       }
 
-      let margin =
-        this.margin || new THREE.Vector2(this.fontsize, Math.max(this.fontsize * 0.4, 10))
+      let margin = this.margin || new THREE.Vector2(this.fontsize, Math.max(this.fontsize * 0.4, 10))
       const lineSpace = (this.fontsize + margin.y) * 0.5
 
       let spriteWidth = 2 * margin.x + textMaxWidth + 2 * this.rectBorderThick
-      let spriteHeight =
-        2 * margin.y +
-        this.fontsize * this.text.length +
-        2 * this.rectBorderThick +
-        lineSpace * (this.text.length - 1)
+      let spriteHeight = 2 * margin.y + this.fontsize * this.text.length + 2 * this.rectBorderThick + lineSpace * (this.text.length - 1)
       context.canvas.width = spriteWidth
       context.canvas.height = spriteHeight
       context.font = this.fontWeight + ' ' + this.fontsize + 'px ' + this.fontface
@@ -1946,58 +1882,21 @@ function initByTHREE(THREE) {
       //canvas原点在左上角
       context.textBaseline = 'alphabetic' //  "middle"  //设置文字基线。当起点y设置为0时,只有该线以下的部分被绘制出来。middle时文字显示一半(但是对该字体所有字的一半,有的字是不一定显示一半的,尤其汉字),alphabetic时是英文字母的那条基线。
       // border color
-      context.strokeStyle =
-        'rgba(' +
-        this.borderColor.r +
-        ',' +
-        this.borderColor.g +
-        ',' +
-        this.borderColor.b +
-        ',' +
-        this.borderColor.a +
-        ')'
+      context.strokeStyle = 'rgba(' + this.borderColor.r + ',' + this.borderColor.g + ',' + this.borderColor.b + ',' + this.borderColor.a + ')'
 
       context.lineWidth = this.rectBorderThick
       // background color
-      context.fillStyle =
-        'rgba(' +
-        this.backgroundColor.r +
-        ',' +
-        this.backgroundColor.g +
-        ',' +
-        this.backgroundColor.b +
-        ',' +
-        this.backgroundColor.a +
-        ')'
-      this.roundRect(
-        context,
-        this.rectBorderThick / 2,
-        this.rectBorderThick / 2,
-        spriteWidth - this.rectBorderThick,
-        spriteHeight - this.rectBorderThick,
-        this.borderRadius
-      )
+      context.fillStyle = 'rgba(' + this.backgroundColor.r + ',' + this.backgroundColor.g + ',' + this.backgroundColor.b + ',' + this.backgroundColor.a + ')'
+      this.roundRect(context, this.rectBorderThick / 2, this.rectBorderThick / 2, spriteWidth - this.rectBorderThick, spriteHeight - this.rectBorderThick, this.borderRadius)
 
-      context.fillStyle =
-        'rgba(' +
-        this.textColor.r +
-        ',' +
-        this.textColor.g +
-        ',' +
-        this.textColor.b +
-        ',' +
-        this.textColor.a +
-        ')'
+      context.fillStyle = 'rgba(' + this.textColor.r + ',' + this.textColor.g + ',' + this.textColor.b + ',' + this.textColor.a + ')'
 
       let y = margin.y
       for (let i = 0; i < this.text.length; i++) {
         //let actualHeight = metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent // 当前文本字符串在这个字体下用的实际高度
 
         //文字y向距离从textBaseline向上算
-        let actualBoundingBoxAscent =
-          infos[i].actualBoundingBoxAscent == void 0
-            ? this.fontsize * 0.8
-            : infos[i].actualBoundingBoxAscent //有的流览器没有。只能大概给一个
+        let actualBoundingBoxAscent = infos[i].actualBoundingBoxAscent == void 0 ? this.fontsize * 0.8 : infos[i].actualBoundingBoxAscent //有的流览器没有。只能大概给一个
         y += actualBoundingBoxAscent + expand
         //console.log(actualBoundingBoxAscent)
 
@@ -2006,16 +1905,7 @@ function initByTHREE(THREE) {
         let x = this.rectBorderThick + margin.x + textLeftSpace
         // text color
         if (this.textBorderThick) {
-          context.strokeStyle =
-            'rgba(' +
-            this.textBorderColor.r +
-            ',' +
-            this.textBorderColor.g +
-            ',' +
-            this.textBorderColor.b +
-            ',' +
-            this.textBorderColor.a +
-            ')'
+          context.strokeStyle = 'rgba(' + this.textBorderColor.r + ',' + this.textBorderColor.g + ',' + this.textBorderColor.b + ',' + this.textBorderColor.a + ')'
           context.lineWidth = this.textBorderThick
           context.strokeText(this.text[i], x, y)
         }
@@ -2227,9 +2117,7 @@ function initByTHREE(THREE) {
       let i = arrowCount
 
       while (i > 0) {
-        let pos = from.floorPosition
-          .clone()
-          .add(dir.clone().multiplyScalar(margin / 2 + i * sliceLen))
+        let pos = from.floorPosition.clone().add(dir.clone().multiplyScalar(margin / 2 + i * sliceLen))
         pos.y += settings.markerHeight
         let arrow = createArrow(mat)
         arrow.name = 'arrow:' + from.id + '-' + to.id + '|' + i
@@ -2250,14 +2138,7 @@ function initByTHREE(THREE) {
         mats.default.opacity = opa
         mats.fadeIn.opacity = opa * mats.fadeIn.opacity2
       }
-      transitions.start(
-        transition,
-        arrowInfo.animateDur,
-        updateArrowOpacity,
-        0,
-        easing.easeInOutCubic,
-        'updateArrowOpacity'
-      )
+      transitions.start(transition, arrowInfo.animateDur, updateArrowOpacity, 0, easing.easeInOutCubic, 'updateArrowOpacity')
     }
 
     var fadeInArrow = function () {
@@ -2554,8 +2435,7 @@ var SoundManager = {
       if (object.audio) {
         object.audio.pause()
         object.callback && object.callback(false)
-        object.audio.src &&
-          Log(name + ' 中断音频 ' + '(' + common.getFileNameFromUrl(object.audio.src) + ')')
+        object.audio.src && Log(name + ' 中断音频 ' + '(' + common.getFileNameFromUrl(object.audio.src) + ')')
       }
 
       if (isInterrupt) {
@@ -2612,12 +2492,7 @@ var SoundManager = {
     //处理设备自动播放限制
 
     let play = function () {
-      if (
-        this.currentAudio &&
-        this.currentAudio.audio &&
-        this.currentAudio.src &&
-        this.currentAudio.audio.paused
-      ) {
+      if (this.currentAudio && this.currentAudio.audio && this.currentAudio.src && this.currentAudio.audio.paused) {
         this.currentAudio.audio.play() //一般触屏了都会播放成功,就不识别paused了
 
         this.currentAudio.callback && this.currentAudio.callback(true)

BIN
scene/src/assets/img/beisuBg.png


+ 40 - 0
scene/src/pages/A2main/index.module.scss

@@ -198,9 +198,49 @@
       }
     }
 
+    .beisu {
+      position: absolute;
+      bottom: 100px;
+      left: 45px;
+      display: flex;
+      flex-direction: column;
+      width: 32px;
+      height: 120px;
+      gap: 8px;
+      justify-content: center;
+      align-items: center;
+      cursor: pointer;
+      .bei {
+        width: 32px;
+        height: 32px;
+        line-height: 32px;
+        color: #fff;
+        font-size: 12px;
+        text-align: center;
+        background-image: url(../../assets/img/beisuBg.png);
+        background-size: 100% 100%;
+      }
+      .beiAc {
+        color: rgba(255, 210, 79, 1);
+      }
+    }
+
+    .beisu-hide {
+      transition: transform 0.3s;
+      transform: translateX(-150%);
+    }
+
     // 移动端
 
     @media screen and (max-width: 1000px) {
+      .beisu {
+        width: 120px;
+        height: 32px;
+        gap: 8px;
+        flex-direction: row;
+        bottom: 295px;
+        left: 60px;
+      }
       .hoveImg {
         height: 20px;
         top: 30px;

+ 101 - 2
scene/src/pages/A2main/index.tsx

@@ -1,4 +1,4 @@
-import React, { useCallback, useEffect, useState } from 'react'
+import React, { useCallback, useEffect, useRef, useState } from 'react'
 import styles from './index.module.scss'
 import A21vrOff from './components/A21vrOff'
 import A22hotListWrap from './components/A22hotListWrap'
@@ -51,6 +51,97 @@ function A2main() {
     }
   }
 
+  const [beisuIndex, setBeisuIndex] = useState(0)
+  const [beisuShow, setBeisuShow] = useState(false)
+  const [beisuAutoHidden, setBeisuAutoHidden] = useState(false)
+  const beisuTimerRef = useRef<number | null>(null)
+
+  const isMobile = () => {
+    if (typeof window === 'undefined') return false
+    return window.innerWidth <= 1000
+  }
+
+  const clearBeisuTimer = () => {
+    if (beisuTimerRef.current) {
+      clearTimeout(beisuTimerRef.current)
+      beisuTimerRef.current = null
+    }
+  }
+
+  const resetBeisuTimer = useCallback(() => {
+    if (!isMobile()) return
+    if (!beisuShow) return
+    clearBeisuTimer()
+    setBeisuAutoHidden(false)
+    beisuTimerRef.current = window.setTimeout(() => {
+      setBeisuAutoHidden(true)
+    }, 3000)
+  }, [beisuShow])
+
+  window.setBeisuShow = setBeisuShow
+  const handleBeisuClick = (index: number, TourRotTime: number, stepAcc: number) => {
+    window.TourRotTime = TourRotTime
+    window.stepAcc = stepAcc
+    setBeisuIndex(index)
+    resetBeisuTimer()
+  }
+
+  useEffect(() => {
+    const playDom = document.getElementById('pullTab')
+    const beisuDom = document.getElementById('beisu')
+    if (playDom) {
+      if (playDom.style.display === 'none' && beisuDom) {
+        setBeisuShow(false)
+        beisuDom.style.display = 'none'
+        return
+      }
+    }
+    let timer: any = null
+    timer = setTimeout(() => {
+      if (state3d === 'panorama' && beisuIndex === 0) {
+        setBeisuShow(true)
+        setBeisuIndex(1)
+      }
+    }, 500)
+    return () => {
+      clearTimeout(timer)
+    }
+  }, [beisuIndex, beisuShow, state3d])
+
+  // beisu 显示变化时,重置移动端自动隐藏计时
+  useEffect(() => {
+    resetBeisuTimer()
+  }, [beisuShow, resetBeisuTimer])
+
+  // 监听“开始漫游”按钮点击:点击后重新显示 beisu,并重新开始 3s 计时(仅移动端)
+  useEffect(() => {
+    if (!isMobile()) return
+    const playDom = document.getElementById('play')
+    if (!playDom) return
+
+    const handlePlayClick = () => {
+      // 只有在移动端才控制“点击导览列表后重新显示并计时”
+      setBeisuShow(true)
+      setBeisuAutoHidden(false)
+      resetBeisuTimer()
+    }
+
+    playDom.addEventListener('click', handlePlayClick)
+
+    return () => {
+      playDom.removeEventListener('click', handlePlayClick)
+    }
+  }, [resetBeisuTimer])
+
+  // 组件卸载时清理定时器
+  useEffect(() => {
+    return () => {
+      clearBeisuTimer()
+    }
+  }, [])
+
+  console.log(beisuIndex, '-------------------------')
+
   return (
     <div className={styles.A2main} id='gui' style={{ display: 'none' }}>
       <A21vrOff />
@@ -170,7 +261,7 @@ function A2main() {
               </div>
               <div className='container'></div>
             </div>
-            <div id='volume' className='ui-icon wide'>
+            <div id='volume' className='ui-icon wide' >
               {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
               <a>
                 <img src='images/Volume btn_on.png' alt='' />
@@ -180,6 +271,8 @@ function A2main() {
             </div>
 
             <div id='back' onClick={() => {
+              window.TourRotTime = 0.5
+              window.stepAcc = 0.6
               window.parent.postMessage({ type: 'GO_BACK' }, 'https://houseoss.4dkankan.com')
             }} className='ui-icon wide'>
               {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
@@ -226,6 +319,12 @@ function A2main() {
         </div>
       </div>
 
+      <div className={`beisu ${beisuAutoHidden ? 'beisu-hide' : ''}`} id="beisu" style={{ display: beisuShow ? 'flex' : 'none' }}>
+        <div className={`bei ${beisuIndex === 1 ? 'beiAc' : ''}`} onClick={() => handleBeisuClick(1, 2, 1)}>1x</div>
+        <div className={`bei ${beisuIndex === 2 ? 'beiAc' : ''}`} onClick={() => handleBeisuClick(2, 0.5, 0.76)}>1.5x</div>
+        <div className={`bei ${beisuIndex === 3 ? 'beiAc' : ''}`} onClick={() => handleBeisuClick(3, 0.5, 0.6)}>2x</div>
+      </div>
+
       {/* 底部导览列表 */}
       <A24drawerList />
 

+ 1 - 0
scene/src/types/declaration.d.ts

@@ -6,3 +6,4 @@ declare module '*.gif'
 declare module '*.svg'
 declare module 'js-export-excel'
 declare module 'braft-utils'
+

+ 10 - 0
scene/src/types/function.d.ts

@@ -0,0 +1,10 @@
+// 全局方法
+declare global {
+  interface Window {
+    setBeisuShow: (b: boolean) => void
+    TourRotTime: number
+    stepAcc: number
+  }
+}
+
+export {}