zhouenguang 3 年之前
父節點
當前提交
0cf2b3239f
共有 3 個文件被更改,包括 12 次插入10 次删除
  1. 8 8
      dist/index.html
  2. 3 2
      src/Debug.js
  3. 1 0
      src/XAvatarManager.js

+ 8 - 8
dist/index.html

@@ -753,12 +753,12 @@
     <script type="module">
         document.querySelector('.debugger1').onclick = ()=>{
             var y, b;
-                  (y = room.stats) != null && y.isShow
-                    ? room.stats.hide()
-                    : (b = room.stats) == null || b.show();
+                  (y = window.room.stats) != null && y.isShow
+                    ? window.room.stats.hide()
+                    : (b = window.room.stats) == null || b.show();
         }
         document.querySelector('.debugger2').onclick = ()=>{
-            room.debug.toggleSceneshading() //, r(room.debug.isSceneShading);
+            window.room.debug.toggleSceneshading() //, r(room.debug.isSceneShading);
         }
         document.querySelector('.debugger3').onclick = ()=>{
             let y = "average";
@@ -770,16 +770,16 @@
                     ? (y = "high")
                     : (y = "average"),
                     o(y),
-                    room.setPictureQualityLevel(y);
+                    window.room.setPictureQualityLevel(y);
         }
         document.querySelector('.debugger4').onclick = ()=>{
-            room.debug.toggleNearbyBreathPoint();
+            window.room.debug.toggleNearbyBreathPoint();
         }
         document.querySelector('.debugger5').onclick = ()=>{
-            room.debug.toggleTapBreathPoint();
+            window.room.debug.toggleTapBreathPoint();
         }
         document.querySelector('.debugger6').onclick = ()=>{
-            room.debug.dumpStream(() => {
+            window.room.debug.dumpStream(() => {
                     //   toast("\u5F55\u5236\u5B8C\u6210");
                     });
             // toast("\u5F00\u59CB\u5F55\u5236");

+ 3 - 2
src/Debug.js

@@ -91,15 +91,16 @@ export default class Debug {
             containSelf: !0,
             searchRange: e
         }) || [];
+        console.error(t)
         this.room.breathPointManager.breathPoints.forEach(o=>{
             !!t.find(s=>JSON.stringify(s) === o._id) || this.room.breathPointManager.clearBreathPoints(o._id)
         }
         ),
         t.forEach(o=>{
-            const a = JSON.stringify(o);
+            const a = o.breakPointId + "" // JSON.stringify(o);
             this.room.breathPointManager.breathPoints.get(a) || this.room.breathPointManager.addBreathPoint({
                 id: a,
-                position: o,
+                position: o.position,
                 type: BREATH_POINT_TYPE,
                 rotation: {
                     pitch: 90,

+ 1 - 0
src/XAvatarManager.js

@@ -596,6 +596,7 @@ export default class XAvatarManager {
                 }
                 // zeg 装饰模型scale矫正
                 s.scaling = new BABYLON.Vector3(-0.01, 0.01, -0.01)
+                // 改变头发和衣服的贴图
                 s.name != "head" && s.material.albedoTexture.updateURL("./assets/111.jpeg")
                 s.name.indexOf("hair") > -1 && s.material.albedoTexture.updateURL("./assets/000.jpeg")
                 const l = {