瀏覽代碼

video warn model etc

zhouenguang 3 年之前
父節點
當前提交
e5a8221b8a
共有 46 個文件被更改,包括 3199 次插入2422 次删除
  1. 二進制
      dist/assets/avatar/YXTN.zip
  2. 二進制
      dist/assets/avatar/YXTN/animations/Idle.glb
  3. 二進制
      dist/assets/avatar/YXTN/animations/Walking.glb
  4. 二進制
      dist/assets/avatar/YXTN/body.glb
  5. 二進制
      dist/assets/avatar/YXTN/body0.glb
  6. 24 0
      dist/assets/avatar/YXTN/component_list.json
  7. 二進制
      dist/assets/avatar/man_YXL.zip
  8. 二進制
      dist/assets/avatar/man_YXL/animations/Idle.glb
  9. 二進制
      dist/assets/avatar/man_YXL/animations/Running.glb
  10. 二進制
      dist/assets/avatar/man_YXL/animations/Walking.glb
  11. 29 0
      dist/assets/avatar/man_YXL/component_list.json
  12. 二進制
      dist/assets/avatar/man_YXL/man_YXL.glb
  13. 二進制
      dist/assets/avatar/man_YXL/man_YXL0.glb
  14. 18 2266
      dist/assets/config.json
  15. 218 0
      dist/assets/config_YXTN - 副本.json
  16. 2466 0
      dist/assets/config_body_man.json
  17. 218 0
      dist/assets/config_man_YXL.json
  18. 二進制
      dist/assets/xverse_tv_840x480_1K.mp4
  19. 二進制
      dist/assets/yqtgTV_xverse.glb
  20. 1 1
      src/ActionsHandler.js
  21. 1 1
      src/Broadcast.js
  22. 3 2
      src/EngineProxy.js
  23. 1 1
      src/Logger.js
  24. 1 1
      src/Signal.js
  25. 16 11
      src/TV.js
  26. 13 9
      src/XAnimationController.js
  27. 1 1
      src/XAvatarBillboardComponent.js
  28. 16 9
      src/XAvatarComopnent.js
  29. 1 1
      src/XAvatarLoader.js
  30. 5 4
      src/XAvatarManager.js
  31. 1 1
      src/XBreathPointManager.js
  32. 1 1
      src/XDecal.js
  33. 1 1
      src/XLightManager.js
  34. 1 1
      src/XMaterialComponent.js
  35. 1 1
      src/XSceneManager.js
  36. 1 1
      src/XStateMachine.js
  37. 1 1
      src/XStaticMesh.js
  38. 1 1
      src/XStaticMeshComponent.js
  39. 1 1
      src/XStaticMeshFromOneGltf.js
  40. 130 101
      src/XTelevision.js
  41. 1 1
      src/Xverse.js
  42. 1 1
      src/XverseAvatar.js
  43. 1 1
      src/XverseAvatarManager.js
  44. 1 1
      src/XverseEffectManager.js
  45. 1 1
      src/Xverse_Room.js
  46. 23 0
      src/main.js

二進制
dist/assets/avatar/YXTN.zip


二進制
dist/assets/avatar/YXTN/animations/Idle.glb


二進制
dist/assets/avatar/YXTN/animations/Walking.glb


二進制
dist/assets/avatar/YXTN/body.glb


二進制
dist/assets/avatar/YXTN/body0.glb


+ 24 - 0
dist/assets/avatar/YXTN/component_list.json

@@ -0,0 +1,24 @@
+{
+    "components": {
+        "thumbnail": "",
+        "url": "body.glb",
+        "url_lod2": "body.glb",
+        "url_lod4": "body.glb"
+    },
+    "animations": [
+        {
+            "thumbnail": "",
+            "id": "1",
+            "name": "Idle",
+            "sex": "man",
+            "url": "animations/Idle.glb"
+        },
+        {
+            "thumbnail": "",
+            "id": "2",
+            "name": "Walking",
+            "sex": "man",
+            "url": "animations/Walking.glb"
+        }
+    ]
+}

二進制
dist/assets/avatar/man_YXL.zip


二進制
dist/assets/avatar/man_YXL/animations/Idle.glb


二進制
dist/assets/avatar/man_YXL/animations/Running.glb


二進制
dist/assets/avatar/man_YXL/animations/Walking.glb


+ 29 - 0
dist/assets/avatar/man_YXL/component_list.json

@@ -0,0 +1,29 @@
+{
+    "components": {
+        "thumbnail": "",
+        "url": "man_YXL.glb"
+    },
+    "animations": [
+        {
+            "thumbnail": "",
+            "id": "1",
+            "name": "Idle",
+            "sex": "man",
+            "url": "animations/Idle.glb"
+        },
+        {
+            "thumbnail": "",
+            "id": "2",
+            "name": "Walking",
+            "sex": "man",
+            "url": "animations/Walking.glb"
+        },
+        {
+            "thumbnail": "",
+            "id": "3",
+            "name": "Running",
+            "sex": "man",
+            "url": "animations/Running.glb"
+        }
+    ]
+}

二進制
dist/assets/avatar/man_YXL/man_YXL.glb


二進制
dist/assets/avatar/man_YXL/man_YXL0.glb


File diff suppressed because it is too large
+ 18 - 2266
dist/assets/config.json


+ 218 - 0
dist/assets/config_YXTN - 副本.json

@@ -0,0 +1,218 @@
+{
+    "code": 0,
+    "msg": "",
+    "data": {
+        "config": {
+            "avatars": [
+                {
+                    "id": "KGe_Boy",
+                    "name": "KGe_Boy",
+                    "url": "./assets/avatar/YXTN.zip",
+                    "gender": "man",
+                    "components": [],
+                    "animations": [
+                        {
+                            "name": "Walking",
+                            "url": "./assets/avatar/YXTN/animations/Walking.glb"
+                        },
+                        {
+                            "name": "Idle",
+                            "url": "./assets/avatar/YXTN/animations/Idle.glb"
+                        }
+                    ]
+                }
+            ],
+            "skins": [
+                {
+                    "id": "10089",
+                    "name": "梁启超_Cookonlymaps",
+                    "versionId": "00008",
+                    "isEnable": false,
+                    "fov": "90",
+                    "resolution": {
+                        "width": 1728,
+                        "height": 720
+                    },
+                    "assetList": [
+                        {
+                            "typeName": "MODEL",
+                            "className": "粗模",
+                            "assetId": "",
+                            "name": "ground_LQC_xverse.glb",
+                            "url": "./assets/level_L01.glb",
+                            "thumbnailUrl": ""
+                        },
+                        {
+                          "typeName": "MODEL",
+                          "className": "TV",
+                          "assetId": "",
+                          "name": "yqtgTV_xverse.glb",
+                          "url": "https://app-mgt-resource-1258211750.file.myqcloud.com/model/fefa5e668b634bc283feb5d6769f95ad/yqtgTV_xverse.glb",
+                          "thumbnailUrl": ""
+                        },
+                        {
+                            "typeName": "CONFIG",
+                            "className": "环境光",
+                            "assetId": "",
+                            "name": "environment_musicfesti.env",
+                            "url": "./assets/environment_musicfesti.env",
+                            "thumbnailUrl": ""
+                        }
+                    ],
+                    "pointList": [],
+                    "routeList": [
+                        {
+                            "id": "thirdwalk",
+                            "birthPointList": [
+                                {
+                                    "player": {
+                                        "position": {
+                                            "x": "-727.49",
+                                            "y": "-1441.18",
+                                            "z": "-32.25"
+                                        },
+                                        "rotation": {
+                                            "pitch": "0.00",
+                                            "yaw": "0.00",
+                                            "roll": "0.00"
+                                        }
+                                    },
+                                    "camera": {
+                                        "position": {
+                                            "x": "-1047.49",
+                                            "y": "-1441.18",
+                                            "z": "87.75"
+                                        },
+                                        "rotation": {
+                                            "pitch": "0.00",
+                                            "yaw": "0.00",
+                                            "roll": "0.00"
+                                        }
+                                    }
+                                }
+                            ],
+                            "areaName": "LQC",
+                            "pathName": "thirdwalk",
+                            "attitude": "walk",
+                            "step": 5
+                        }
+                    ],
+                    "visibleRules": [],
+                    "animationList": [
+                        {
+                            "avatarId": "KGe_Boy",
+                            "animations": [
+                                "Walking",
+                                "Idle"
+                            ]
+                        }
+                    ]
+                }
+            ]
+        },
+        "preload": {
+            "version": "20220318183823",
+            "assetTotalSize": 24248947,
+            "assetUrls": [
+                {
+                    "url": "./assets/avatar/YXTN/component_list.json",
+                    "packName": "",
+                    "typeName": "avatar",
+                    "className": "",
+                    "skinId": "",
+                    "size": 14294
+                },
+                {
+                    "url": "./assets/avatar/YXTN/body.glb",
+                    "packName": "",
+                    "typeName": "avatar",
+                    "className": "",
+                    "skinId": "",
+                    "size": 137548
+                },
+                {
+                    "url": "./assets/avatar/YXTN/animations/Walking.glb",
+                    "packName": "",
+                    "typeName": "avatar",
+                    "className": "",
+                    "skinId": "",
+                    "size": 99844
+                },
+                {
+                    "url": "./assets/avatar/YXTN/animations/Idle.glb",
+                    "packName": "",
+                    "typeName": "avatar",
+                    "className": "",
+                    "skinId": "",
+                    "size": 208772
+                },
+                {
+                    "url": "./assets/level_L01.glb",
+                    "packName": "",
+                    "typeName": "MODEL",
+                    "className": "粗模",
+                    "skinId": "10089",
+                    "size": 3638904
+                },
+                {
+                    "url": "./assets/environment_musicfesti.env",
+                    "packName": "",
+                    "typeName": "CONFIG",
+                    "className": "环境光",
+                    "skinId": "10089",
+                    "size": 2723658
+                },
+                {
+                    "url": "./assets/textures/Point_Light.png",
+                    "packName": "",
+                    "typeName": "TEXTURES",
+                    "className": "贴图",
+                    "skinId": "",
+                    "size": 8463
+                },
+                {
+                    "url": "./assets/textures/Light_tex0.png",
+                    "packName": "",
+                    "typeName": "TEXTURES",
+                    "className": "贴图",
+                    "skinId": "",
+                    "size": 7478
+                },
+                {
+                    "url": "./assets/textures/Light_tex1.png",
+                    "packName": "",
+                    "typeName": "TEXTURES",
+                    "className": "贴图",
+                    "skinId": "",
+                    "size": 26724
+                },
+                {
+                    "url": "./assets/textures/Light_tex2.png",
+                    "packName": "",
+                    "typeName": "TEXTURES",
+                    "className": "贴图",
+                    "skinId": "",
+                    "size": 28517
+                },
+                {
+                    "url": "./assets/textures/VS_Disco.png",
+                    "packName": "",
+                    "typeName": "TEXTURES",
+                    "className": "贴图",
+                    "skinId": "",
+                    "size": 8842
+                },
+                {
+                    "url": "./assets/textures/NM_Door.png",
+                    "packName": "",
+                    "typeName": "TEXTURES",
+                    "className": "贴图",
+                    "skinId": "",
+                    "size": 271090
+                }
+            ],
+            "baseUrls": [],
+            "observeUrls": []
+        }
+    }
+}

File diff suppressed because it is too large
+ 2466 - 0
dist/assets/config_body_man.json


+ 218 - 0
dist/assets/config_man_YXL.json

@@ -0,0 +1,218 @@
+{
+    "code": 0,
+    "msg": "",
+    "data": {
+        "config": {
+            "avatars": [
+                {
+                    "id": "KGe_Boy",
+                    "name": "KGe_Boy",
+                    "url": "./assets/avatar/man_YXL.zip",
+                    "gender": "man",
+                    "components": [],
+                    "animations": [
+                        {
+                            "name": "Walking",
+                            "url": "./assets/avatar/man_YXL/animations/Walking.glb"
+                        },
+                        {
+                            "name": "Idle",
+                            "url": "./assets/avatar/man_YXL/animations/Idle.glb"
+                        }
+                    ]
+                }
+            ],
+            "skins": [
+                {
+                    "id": "10089",
+                    "name": "梁启超_Cookonlymaps",
+                    "versionId": "00008",
+                    "isEnable": false,
+                    "fov": "90",
+                    "resolution": {
+                        "width": 1728,
+                        "height": 720
+                    },
+                    "assetList": [
+                        {
+                            "typeName": "MODEL",
+                            "className": "粗模",
+                            "assetId": "",
+                            "name": "ground_LQC_xverse.glb",
+                            "url": "./assets/level_L01.glb",
+                            "thumbnailUrl": ""
+                        },
+                        {
+                          "typeName": "MODEL",
+                          "className": "TV",
+                          "assetId": "",
+                          "name": "yqtgTV_xverse.glb",
+                          "url": "https://app-mgt-resource-1258211750.file.myqcloud.com/model/fefa5e668b634bc283feb5d6769f95ad/yqtgTV_xverse.glb",
+                          "thumbnailUrl": ""
+                        },
+                        {
+                            "typeName": "CONFIG",
+                            "className": "环境光",
+                            "assetId": "",
+                            "name": "environment_musicfesti.env",
+                            "url": "./assets/environment_musicfesti.env",
+                            "thumbnailUrl": ""
+                        }
+                    ],
+                    "pointList": [],
+                    "routeList": [
+                        {
+                            "id": "thirdwalk",
+                            "birthPointList": [
+                                {
+                                    "player": {
+                                        "position": {
+                                            "x": "-727.49",
+                                            "y": "-1441.18",
+                                            "z": "-32.25"
+                                        },
+                                        "rotation": {
+                                            "pitch": "0.00",
+                                            "yaw": "0.00",
+                                            "roll": "0.00"
+                                        }
+                                    },
+                                    "camera": {
+                                        "position": {
+                                            "x": "-1047.49",
+                                            "y": "-1441.18",
+                                            "z": "87.75"
+                                        },
+                                        "rotation": {
+                                            "pitch": "0.00",
+                                            "yaw": "0.00",
+                                            "roll": "0.00"
+                                        }
+                                    }
+                                }
+                            ],
+                            "areaName": "LQC",
+                            "pathName": "thirdwalk",
+                            "attitude": "walk",
+                            "step": 5
+                        }
+                    ],
+                    "visibleRules": [],
+                    "animationList": [
+                        {
+                            "avatarId": "KGe_Boy",
+                            "animations": [
+                                "Walking",
+                                "Idle"
+                            ]
+                        }
+                    ]
+                }
+            ]
+        },
+        "preload": {
+            "version": "20220318183823",
+            "assetTotalSize": 24248947,
+            "assetUrls": [
+                {
+                    "url": "./assets/avatar/man_YXL/component_list.json",
+                    "packName": "",
+                    "typeName": "avatar",
+                    "className": "",
+                    "skinId": "",
+                    "size": 14294
+                },
+                {
+                    "url": "./assets/avatar/man_YXL/man_YXL.glb",
+                    "packName": "",
+                    "typeName": "avatar",
+                    "className": "",
+                    "skinId": "",
+                    "size": 137548
+                },
+                {
+                    "url": "./assets/avatar/man_YXL/animations/Walking.glb",
+                    "packName": "",
+                    "typeName": "avatar",
+                    "className": "",
+                    "skinId": "",
+                    "size": 99844
+                },
+                {
+                    "url": "./assets/avatar/man_YXL/animations/Idle.glb",
+                    "packName": "",
+                    "typeName": "avatar",
+                    "className": "",
+                    "skinId": "",
+                    "size": 208772
+                },
+                {
+                    "url": "./assets/level_L01.glb",
+                    "packName": "",
+                    "typeName": "MODEL",
+                    "className": "粗模",
+                    "skinId": "10089",
+                    "size": 3638904
+                },
+                {
+                    "url": "./assets/environment_musicfesti.env",
+                    "packName": "",
+                    "typeName": "CONFIG",
+                    "className": "环境光",
+                    "skinId": "10089",
+                    "size": 2723658
+                },
+                {
+                    "url": "./assets/textures/Point_Light.png",
+                    "packName": "",
+                    "typeName": "TEXTURES",
+                    "className": "贴图",
+                    "skinId": "",
+                    "size": 8463
+                },
+                {
+                    "url": "./assets/textures/Light_tex0.png",
+                    "packName": "",
+                    "typeName": "TEXTURES",
+                    "className": "贴图",
+                    "skinId": "",
+                    "size": 7478
+                },
+                {
+                    "url": "./assets/textures/Light_tex1.png",
+                    "packName": "",
+                    "typeName": "TEXTURES",
+                    "className": "贴图",
+                    "skinId": "",
+                    "size": 26724
+                },
+                {
+                    "url": "./assets/textures/Light_tex2.png",
+                    "packName": "",
+                    "typeName": "TEXTURES",
+                    "className": "贴图",
+                    "skinId": "",
+                    "size": 28517
+                },
+                {
+                    "url": "./assets/textures/VS_Disco.png",
+                    "packName": "",
+                    "typeName": "TEXTURES",
+                    "className": "贴图",
+                    "skinId": "",
+                    "size": 8842
+                },
+                {
+                    "url": "./assets/textures/NM_Door.png",
+                    "packName": "",
+                    "typeName": "TEXTURES",
+                    "className": "贴图",
+                    "skinId": "",
+                    "size": 271090
+                }
+            ],
+            "baseUrls": [],
+            "observeUrls": []
+        }
+    }
+}

二進制
dist/assets/xverse_tv_840x480_1K.mp4


二進制
dist/assets/yqtgTV_xverse.glb


+ 1 - 1
src/ActionsHandler.js

@@ -8,7 +8,7 @@ import MessageHandleType from "./enum/MessageHandleType.js"
 import FrequencyLimitError from "./error/FrequencyLimitError.js"
 import ParamError from "./error/ParamError.js"
 
-const logger = new Logger('actions-handler')
+const logger = new Logger('Action')
 const QueueActions = [Actions.Transfer, Actions.ChangeSkin, Actions.GetOnVehicle, Actions.GetOffVehicle];
 
 export default class ActionsHandler {

+ 1 - 1
src/Broadcast.js

@@ -1,7 +1,7 @@
 import MessageHandleType from "./enum/MessageHandleType.js"
 import Logger from "./Logger.js"
 
-const logger = new Logger('xverse-broadcast')
+const logger = new Logger('Broadcast')
 
 export default class Broadcast{
     constructor(xverseRoom, t) {

+ 3 - 2
src/EngineProxy.js

@@ -10,8 +10,9 @@ import XBillboardManager from "./XBillboardManager.js"
 import ModelManager from "./ModelManager.js"
 import InitEngineTimeoutError from "./error/InitEngineTimeoutError.js"
 import Logger from "./Logger.js"
+import TV from "./TV.js"
 
-const logger = new Logger('xverse-bus')
+const logger = new Logger('bus')
 const http = new Http
 const blobToDataURI = async i=>new Promise((resolve,reject)=>{
     const fileReader = new FileReader;
@@ -459,7 +460,7 @@ export default class EngineProxy{
         let s = EFitMode.cover;
         skinId == "10048" && (s = EFitMode.contain)
         Array.isArray(n) && n.forEach((f,d)=>{
-            this._tvs.push(new TV("squareTv" + d,f.modelUrl,this.room,{
+            this._tvs.push(new TV("squareTv"+d, f.modelUrl, this.room, {
                 fitMode: s
             }))
         }

+ 1 - 1
src/Logger.js

@@ -78,6 +78,6 @@ export default class Logger{
         return this.print("error", 4, ...e)
     }
     prefix(e) {
-        return `[${this.module}][${e}] ${util.getFormattedDate(new Date)}:`
+        return `[${this.module}] ${util.getFormattedDate(new Date)}:`
     }
 };

+ 1 - 1
src/Signal.js

@@ -6,7 +6,7 @@ import PointType from "./enum/PointType.js"
 import Logger from "./Logger.js"
 import SecondArray from "./SecondArray.js"
 
-const logger = new Logger('xverse-signal')
+const logger = new Logger('signal')
 export default class Signal {
     constructor(e) {
         this.signalHandleActived = !0

+ 16 - 11
src/TV.js

@@ -1,17 +1,18 @@
 import XDecalManager from "./XDecalManager.js"
+import XTelevision from "./XTelevision.js";
 
 export default class TV extends XTelevision {
-    constructor(e, t, r, n) {
-        super(r.scene, t, r.sceneManager, n);
+    constructor(id, meshUrl, room, options) {
+        super(room.scene, meshUrl, room.sceneManager, options);
         E(this, "decal");
         E(this, "id");
         E(this, "imageUrl");
         E(this, "mode", "video");
         E(this, "room");
-        E(this, "setVideo", (e,t=!1,r=!0)=>super.setVideo(e, t, r).then(()=>this));
-        this.id = e,
-        this.room = r,
-        this.decal = new XDecalManager(r.sceneManager)
+        E(this, "setVideo", (e, t=!1, r=!0)=>super.setVideo(e, t, r).then(()=>this));
+        this.id = id,
+        this.room = room,
+        this.decal = new XDecalManager(room.sceneManager)
     }
     show() {
         this.mode === "video" ? this.toggle(!0) : this.mode === "poster" && this.showPoster()
@@ -63,11 +64,15 @@ export default class TV extends XTelevision {
             url: t,
             bLoop: r,
             bMuted: n
-        }).then(()=>(this.videoElement && (this.videoElement.crossOrigin = "anonymous",
-        this.videoElement.playsInline = !0,
-        this.videoElement.load()),
-        this.mode = "video",
-        this)) : Promise.reject("tv url is required")
+        }).then(()=>(
+            this.videoElement && (
+                this.videoElement.crossOrigin = "anonymous",
+                this.videoElement.playsInline = !0,
+                this.videoElement.load()
+            ),
+            this.mode = "video",
+            this
+        )) : Promise.reject("tv url is required")
     }
     mirrorFrom(e) {
         const t = e.getVideoMat();

+ 13 - 9
src/XAnimationController.js

@@ -270,16 +270,20 @@ export default class XAnimationController {
         )
     }
     _playAnimation(aniType=0) {
-        return aniType == 0 && this.iBodyAnim && this.iBodyAnim.animGroup ? (
+        if(aniType == 0 && this.iBodyAnim && this.iBodyAnim.animGroup) {
             // 身体动画
-            this.onPlayObservable.notifyObservers(this._scene),
-            this.iBodyAnim.animGroup.start(this.loop, this.iBodyAnim.playSpeed, this.iBodyAnim.startFrame, this.iBodyAnim.endFrame, !1),
-            !0
-        ) : aniType == 1 && this.iFaceAnim && this.iFaceAnim.animGroup ? (
-                // 脸部动画
-                this.iFaceAnim.animGroup.start(this.loop, this.iFaceAnim.playSpeed, this.iFaceAnim.startFrame, this.iFaceAnim.endFrame, !1),
-                !0
-            ) : !1
+            this.onPlayObservable.notifyObservers(this._scene)
+            // todo 这里报错
+            try {
+                this.iBodyAnim.animGroup.start(this.loop, this.iBodyAnim.playSpeed, this.iBodyAnim.startFrame, this.iBodyAnim.endFrame, !1)
+            } catch(e) {}
+            return true
+        } else if(aniType == 1 && this.iFaceAnim && this.iFaceAnim.animGroup) {
+            // 脸部动画
+            this.iFaceAnim.animGroup.start(this.loop, this.iFaceAnim.playSpeed, this.iFaceAnim.startFrame, this.iFaceAnim.endFrame, !1)
+            return true
+        } else 
+            return false
     }
     _postprocess(e) {
         var o, s;

+ 1 - 1
src/XAvatarBillboardComponent.js

@@ -2,7 +2,7 @@ import EMeshType from "./enum/EMeshType.js"
 import BillboardStatus from "./enum/BillboardStatus.js"
 import Logger from "./Logger.js"
 
-const logger = new Logger('XAvatarBillboardComponent')
+const logger = new Logger('CharacterBillboardComponent')
 
 export default class XAvatarBillboardComponent {
     constructor(e) {

+ 16 - 9
src/XAvatarComopnent.js

@@ -1,7 +1,7 @@
 import EMeshType from "./enum/EMeshType.js"
 import Logger from "./Logger.js"
 
-const logger = new Logger('XAvatarComopnent')
+const logger = new Logger('CharacterComopnent')
 
 export default class XAvatarComopnent {
     constructor() {
@@ -13,14 +13,21 @@ export default class XAvatarComopnent {
         this.accessories = new Map
     }
     addBodyComp(e, i) {
-        return !e.rootNode || i.root.getChildMeshes().length === 0 ? (i.isRender = !1,
-        !1) : (this.body = i,
-        this.body.root.parent = e.rootNode,
-        i.isRender = !0,
-        this.body.root.getChildMeshes()[0] && (this.body.root.getChildMeshes()[0].xtype = EMeshType.XAvatar,
-        this.body.root.getChildMeshes()[0].xid = e.id),
-        this.skeleton = i.skeleton,
-        !0)
+        return !e.rootNode || i.root.getChildMeshes().length === 0 
+        ? (
+            i.isRender = !1,
+            !1
+        ) : (
+            this.body = i,
+            this.body.root.parent = e.rootNode,
+            i.isRender = !0,
+            this.body.root.getChildMeshes()[0] && (
+                this.body.root.getChildMeshes()[0].xtype = EMeshType.XAvatar,
+                this.body.root.getChildMeshes()[0].xid = e.id
+            ),
+            this.skeleton = i.skeleton,
+            !0
+        )
     }
     addClothesComp(e, i) {
         return !e.rootNode || !this.skeleton || !i.root ? (i.isRender = !1,

+ 1 - 1
src/XAvatarLoader.js

@@ -1,6 +1,6 @@
 import Logger from "./Logger.js"
 
-const logger = new Logger('XAvatarLoader')
+const logger = new Logger('CharacterLoader')
 
 export default class XAvatarLoader {
     constructor() {

+ 5 - 4
src/XAvatarManager.js

@@ -9,7 +9,7 @@ import AvatarAssetLoadingError from "./Error/AvatarAssetLoadingError"
 import ContainerLoadingFailedError from "./Error/ContainerLoadingFailedError"
 import AvatarAnimationError from "./error/AvatarAnimationError"
 
-const logger = new Logger('AvatarManager')
+const logger = new Logger('CharacterManager')
 export default class XAvatarManager {
     constructor(sceneManager) {
         this.characterMap = new Map
@@ -543,6 +543,7 @@ export default class XAvatarManager {
             if (a) {
                 const s = a.instantiateModelsToScene();
                 // zeg 此时body_man缩放已经0.01
+                s.rootNodes[0]._children[0]._scaling.setAll(0.013)
                 console.log("body_man缩放", s.rootNodes[0]._children[0]._scaling)
                 a.xReferenceCount++;
                 const l = {
@@ -601,9 +602,9 @@ 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")
+                // // 改变头发和衣服的贴图
+                // s.name != "head" && s.material.albedoTexture.updateURL("./assets/111.jpeg")
+                // s.name.indexOf("hair") > -1 && s.material.albedoTexture.updateURL("./assets/000.jpeg")
                 const l = {
                     isRender: !1,
                     uId: Math.random(),

+ 1 - 1
src/XBreathPointManager.js

@@ -4,7 +4,7 @@ import BreathPoint from "./BreathPoint.js"
 import Logger from "./Logger.js"
 import XBreathPointError from "./Error/XBreathPointError.js"
 
-const logger = new Logger('XBreathPointManager')
+const logger = new Logger('BreathPointManager')
 export default class XBreathPointManager {
     constructor(e) {
         E(this, "_scene");

+ 1 - 1
src/XDecal.js

@@ -2,7 +2,7 @@ import EMeshType from "./enum/EMeshType.js"
 import XDecalTextureError from "./error/XDecalTextureError.js"
 import Logger from "./Logger.js"
 
-const logger = new Logger('XDecalManager')
+const logger = new Logger('DecalManager')
 
 export default class XDecal {
     constructor(e) {

+ 1 - 1
src/XLightManager.js

@@ -1,6 +1,6 @@
 import Logger from "./Logger.js"
 
-const logger = new Logger('XLightManager')
+const logger = new Logger('LightManager')
 
 export default class XLightManager {
     constructor(e) {

+ 1 - 1
src/XMaterialComponent.js

@@ -2,7 +2,7 @@ import XVideoRawYUV from "./XVideoRawYUV";
 import Logger from "./Logger.js";
 import XMaterialError from "./Error/XMaterialError";
 
-const logger = new Logger("XMaterial");
+const logger = new Logger("Material");
 export default class XMaterialComponent {
   constructor(sceneManager, t) {
     this.yuvInfo

+ 1 - 1
src/XSceneManager.js

@@ -12,7 +12,7 @@ import EShaderMode from "./enum/EShaderMode.js"
 import defaultLog from "./defaultLog.js"
 import Logger from "./Logger.js"
 
-const logger = new Logger('XSceneManager')
+const logger = new Logger('SceneManager')
 
 const getAlphaWidthMap = (i,e)=>{
     const t = new BABYLON.DynamicTexture("test",3,e)

+ 1 - 1
src/XStateMachine.js

@@ -1,6 +1,6 @@
 import Logger from "./Logger.js"
 
-const logger = new Logger('XStateMachine')
+const logger = new Logger('StateMachine')
 export default class XStateMachine {
     constructor(scene) {
         this.state

+ 1 - 1
src/XStaticMesh.js

@@ -1,7 +1,7 @@
 import EMeshType from "./enum/EMeshType.js"
 import Logger from "./Logger.js"
 
-const logger = new Logger('XStaticMesh')
+const logger = new Logger('StaticMesh')
 export default class XStaticMesh {
     constructor({id: e, mesh: t, group: r="default", lod: n=0, xtype: o=EMeshType.XStaticMesh, skinInfo: a="default", url: s=""}) {
         E(this, "_mesh");

+ 1 - 1
src/XStaticMeshComponent.js

@@ -5,7 +5,7 @@ import XLowpolyModelError from "./error/XLowpolyModelError.js"
 import Logger from "./Logger.js"
 import XLowpolyJsonError from "./Error/XLowpolyJsonError.js"
 
-const logger = new Logger('XStaticMeshComponent')
+const logger = new Logger('StaticMeshComponent')
 export default class XStaticMeshComponent{
     constructor(scenemanager) {
         this._CgPlane

+ 1 - 1
src/XStaticMeshFromOneGltf.js

@@ -4,7 +4,7 @@ import util from "./util.js"
 import EMeshType from "./enum/EMeshType.js"
 import Logger from "./Logger.js"
 
-const logger = new Logger('XStaticMeshComponent')
+const logger = new Logger('StaticMeshComponent')
 export default class XStaticMeshFromOneGltf {
     
     constructor(scene, options) {

+ 130 - 101
src/XTelevision.js

@@ -1,10 +1,11 @@
 import XStaticMesh from "./XStaticMesh.js"
 import EMeshType from "./enum/EMeshType.js"
 import Logger from "./Logger.js"
+import Stream from "./Stream.js";
 
-const logger = new Logger('XTelevision')
+const logger = new Logger('Television')
 export default class XTelevision {
-    constructor(e, t, r, n) {
+    constructor(scene, meshUrl, scenemanager, option) {
         E(this, "videoElement");
         E(this, "meshPath");
         E(this, "scene");
@@ -15,14 +16,15 @@ export default class XTelevision {
         E(this, "widthHeightScale");
         E(this, "fitMode");
         E(this, "_scenemanager");
-        if (this.scene = e,
-        this.meshPath = t,
-        this._scenemanager = r,
-        n != null) {
-            const {vAng: o=0, widthHeightScale: a=-1, fitMode: s="fill"} = n;
-            this.vAng = o,
-            this.widthHeightScale = a,
-            this.fitMode = s
+
+        this.scene = scene
+        this.meshPath = meshUrl
+        this._scenemanager = scenemanager
+        if (option != null) {
+            const {vAng=0, widthHeightScale=-1, fitMode="fill"} = option;
+            this.vAng = vAng,
+            this.widthHeightScale = widthHeightScale,
+            this.fitMode = fitMode
         }
     }
     set tvWidthHeightscale(e) {
@@ -44,46 +46,45 @@ export default class XTelevision {
         return this.tvMeshs
     }
     createElement(e, t=!1) {
-        const n = new Stream$1().el;
+        const n = new Stream().el;
         return n.loop = t,
         n.autoplay = !0,
         n.src = e,
         n
     }
     async setUrl(e) {
-        const {url: t, isLive: r=!1, poster: n=null, bLoop: o=!1, bMuted: a=!0} = e || {};
-        if (typeof t != "string")
-            return logger.error("[Engine] Tv setUrl Error, url must be string: ", t),
+        const {url, isLive: r=!1, poster: n=null, bLoop: o=!1, bMuted: a=!0} = e || {};
+
+        if (typeof url != "string")
+            return logger.error("[Engine] Tv setUrl Error, url must be string: ", url),
             Promise.reject(new XTvMediaUrlError("[Engine] url must be string"));
+
         if (this.videoElement) {
-            this.videoElement.src = t,
+            this.videoElement.src = url,
             n != null && n.length > 0 && (this.videoElement.poster = n);
             const l = this.play();
             return "bMuted"in e && l !== void 0 && l.then(()=>{
                 this.videoElement.muted = a
-            }
-            ),
+            }),
             this.videoElement.addEventListener("loadedmetadata", u=>{
-                this.videoElement.videoWidth > 0 ? this.videoMat.setFloat("mvWidthHeightScale", this.videoElement.videoWidth / this.videoElement.videoHeight) : this.videoMat.setFloat("mvWidthHeightScale", 16 / 9)
-            }
-            ),
+                this.videoElement.videoWidth > 0 
+                ? this.videoMat.setFloat("mvWidthHeightScale", this.videoElement.videoWidth / this.videoElement.videoHeight) 
+                : this.videoMat.setFloat("mvWidthHeightScale", 16 / 9)
+            }),
             Promise.resolve(this)
         }
-        const s = this.createElement(t, o);
-        return n != null && n.length > 0 && (s.poster = n),
-        this.setVideo(s, r).then(()=>{
-            var u;
-            const l = (u = this.videoElement) == null ? void 0 : u.play();
+
+        const s = this.createElement(url, o);
+        n != null && n.length > 0 && (s.poster = n)
+        return this.setVideo(s, r).then(()=>{
+            const l = this.videoElement && this.videoElement.play();
             "bMuted"in e && l !== void 0 && l.then(()=>{
                 this.videoElement.muted = a
-            }
-            )
-        }
-        ).catch(l=>{
+            })
+        }).catch(l=>{
             logger.error("[Engine] setUrl  error! " + l),
             new XTvMediaUrlError("[Engine] setUrl  error! " + l)
-        }
-        )
+        })
     }
     setCurrentTime(e) {
         if (!this.videoElement) {
@@ -136,76 +137,104 @@ export default class XTelevision {
         this.videoMat.setFloat("tvWidthHeightScale", this.widthHeightScale),
         this.videoMat.setFloat("bforceforceKeepContent", -1)) : this.videoMat.setFloat("tvWidthHeightScale", -1)
     }
-    async setVideo(e, t=!1, r=!0) {
-        return this.tvMeshs.length != 0 ? (logger.warn(`[Engine] Set Video. length!=0, mesh: ${this.meshPath}, src: ${e.src}`),
-        new Promise((n,o)=>{
-            if (!(e instanceof HTMLVideoElement))
-                return logger.error("[Engine] Error, param of setVideo must be a HTMLVideoElement"),
-                o(new XTvVideoElementError("[Engine] param of setVideo must be a HTMLVideoElement"));
-            this.videoElement = e,
-            r == !1 && (t == !1 || checkOS().isIOS) && e.crossOrigin !== "anonymous" && (e.crossOrigin = "anonymous",
-            e.load()),
-            this.videoElement.addEventListener("loadedmetadata", a=>{
-                this.videoElement.videoWidth > 0 ? this.videoMat.setFloat("mvWidthHeightScale", this.videoElement.videoWidth / this.videoElement.videoHeight) : this.videoMat.setFloat("mvWidthHeightScale", 16 / 9)
-            }
-            ),
-            this.videoTexture.updateURL(this.videoElement.src),
-            n(this)
-        }
-        )) : (logger.warn(`[Engine] Set Video. length==0, mesh: ${this.meshPath}, src: ${e.src}`),
-        this.meshPath == "" ? (logger.error("[Engine] Error, television meshPath is empty."),
-        Promise.reject(new XTvVideoElementError("[Engine] Error, television meshPath is empty."))) : this._scenemanager.urlTransformer(this.meshPath).then(n=>new Promise((o,a)=>e instanceof HTMLVideoElement ? (this.videoElement = e,
-        r == !1 && (t == !1 || checkOS().isIOS) && e.crossOrigin !== "anonymous" && (e.crossOrigin = "anonymous",
-        e.load()),
-        BABYLON.SceneLoader.LoadAssetContainerAsync("", n, this.scene, null, ".glb").then(s=>{
-            for (let u = s.materials.length - 1; u >= 0; --u)
-                s.materials[u].dispose();
-            const l = [];
-            this.videoTexture = new VideoTexture("videoTex_" + Date.now(),e,this.scene,!1,!0,void 0,{
-                autoPlay: !0,
-                autoUpdateTexture: !0,
-                muted: !0
-            }),
-            this.videoTexture.vAng = this.vAng,
-            this.videoMat = new ShaderMaterial("videoMat_" + Date.now(),this.scene,{
-                vertexSource: tvVertex,
-                fragmentSource: tvFragment
-            },{
-                attributes: ["uv", "position"],
-                uniforms: ["view", "projection", "worldViewProjection", "world"]
-            }),
-            this.videoMat.setTexture("texture_video", this.videoTexture),
-            this.videoMat.setFloat("tvWidthHeightScale", -1),
-            this.videoMat.setFloat("mvWidthHeightScale", 16 / 9),
-            this.videoMat.setFloat("bforceforceKeepContent", -1),
-            this.videoMat.backFaceCulling = !1,
-            this.videoMat.sideOrientation = BABYLON.Mesh.FRONTSIDE,
-            this.videoElement.addEventListener("loadedmetadata", u=>{
-                this.videoElement.videoWidth > 0 ? this.videoMat.setFloat("mvWidthHeightScale", this.videoElement.videoWidth / this.videoElement.videoHeight) : this.videoMat.setFloat("mvWidthHeightScale", 16 / 9)
-            }
-            );
-            for (let u = 0; u < s.meshes.length; ++u)
-                s.meshes[u].visibility = 1,
-                s.meshes[u].isPickable = !0,
-                s.meshes[u].checkCollisions = !1,
-                s.meshes[u].material = this.videoMat,
-                "hasVertexAlpha"in s.meshes[u] && (s.meshes[u].hasVertexAlpha = !1),
-                this.scene.addMesh(s.meshes[u]),
-                l.push(new XStaticMesh({
-                    id: s.meshes[u].id,
-                    mesh: s.meshes[u],
-                    xtype: EMeshType.Tv
-                }));
-            this.changeTvFitMode(),
-            this.tvMeshs = l,
-            this.toggle(!0),
-            o(this)
-        }
-        ).catch(s=>{
-            logger.error("[Engine] setVideo: create Tv by input mesh error! " + s),
-            a(new XTvModelError("[Engine] setVideo: create Tv by input mesh error! " + s))
-        }
-        )) : a(new XTvVideoElementError("[Engine] param of setVideo must be a HTMLVideoElement")))))
+    async setVideo(e, t=!1, r=!0) 
+    {
+        return this.tvMeshs.length != 0 ? (
+            logger.warn(`[Engine] Set Video. length!=0, mesh: ${this.meshPath}, src: ${e.src}`),
+
+            new Promise((n,o)=>
+            {
+                if (!(e instanceof HTMLVideoElement))
+                    return logger.error("[Engine] Error, param of setVideo must be a HTMLVideoElement"),
+                    o(new XTvVideoElementError("[Engine] param of setVideo must be a HTMLVideoElement"));
+
+                this.videoElement = e,
+                
+                r == !1 
+                && (t == !1 || checkOS().isIOS) 
+                && e.crossOrigin !== "anonymous" 
+                && (e.crossOrigin = "anonymous", e.load()),
+
+                this.videoElement.addEventListener("loadedmetadata", a=>{
+                    this.videoElement.videoWidth > 0 ? this.videoMat.setFloat("mvWidthHeightScale", this.videoElement.videoWidth / this.videoElement.videoHeight) : this.videoMat.setFloat("mvWidthHeightScale", 16 / 9)
+                }),
+                this.videoTexture.updateURL(this.videoElement.src),
+
+                n(this)
+            })
+        ) : (
+            logger.warn(`[Engine] Set Video. length==0, mesh: ${this.meshPath}, src: ${e.src}`),
+
+            this.meshPath == "" 
+            ? (
+                logger.error("[Engine] Error, television meshPath is empty."),
+                Promise.reject(new XTvVideoElementError("[Engine] Error, television meshPath is empty."))
+            ) 
+            : this._scenemanager.urlTransformer(this.meshPath).then(n => new Promise((o,a) =>
+                e instanceof HTMLVideoElement 
+                ? (
+                    this.videoElement = e,
+
+                    r == !1 
+                    && (t == !1 || checkOS().isIOS) 
+                    && e.crossOrigin !== "anonymous"
+                    && (e.crossOrigin = "anonymous", e.load()),
+
+                    BABYLON.SceneLoader.LoadAssetContainerAsync("", n, this.scene, null, ".glb").then(s=>{
+                        for (let u = s.materials.length - 1; u >= 0; --u) s.materials[u].dispose();
+
+                        this.videoTexture = new BABYLON.VideoTexture("videoTex_" + Date.now(),e,this.scene,!1,!0,void 0,{
+                            autoPlay: !0,
+                            autoUpdateTexture: !0,
+                            muted: !0
+                        }),
+                        this.videoTexture.vAng = this.vAng,
+                        this.videoMat = new BABYLON.ShaderMaterial("videoMat_" + Date.now(),this.scene,{
+                            vertexSource: tvVertex,
+                            fragmentSource: tvFragment
+                        },{
+                            attributes: ["uv", "position"],
+                            uniforms: ["view", "projection", "worldViewProjection", "world"]
+                        }),
+                        this.videoMat.setTexture("texture_video", this.videoTexture),
+                        this.videoMat.setFloat("tvWidthHeightScale", -1),
+                        this.videoMat.setFloat("mvWidthHeightScale", 16 / 9),
+                        this.videoMat.setFloat("bforceforceKeepContent", -1),
+                        this.videoMat.backFaceCulling = !1,
+                        this.videoMat.sideOrientation = BABYLON.Mesh.FRONTSIDE,
+
+                        this.videoElement.addEventListener("loadedmetadata", u=>{
+                            this.videoElement.videoWidth > 0 
+                            ? this.videoMat.setFloat("mvWidthHeightScale", this.videoElement.videoWidth / this.videoElement.videoHeight) 
+                            : this.videoMat.setFloat("mvWidthHeightScale", 16 / 9)
+                        });
+
+                        const tvMeshs = [];
+                        for (let u = 0; u < s.meshes.length; ++u)
+                            s.meshes[u].visibility = 1,
+                            s.meshes[u].isPickable = !0,
+                            s.meshes[u].checkCollisions = !1,
+                            s.meshes[u].material = this.videoMat,
+                            "hasVertexAlpha"in s.meshes[u] && (s.meshes[u].hasVertexAlpha = !1),
+                            this.scene.addMesh(s.meshes[u]),
+                            tvMeshs.push(new XStaticMesh({
+                                id: s.meshes[u].id,
+                                mesh: s.meshes[u],
+                                xtype: EMeshType.Tv
+                            }));
+
+                        this.changeTvFitMode(),
+                        this.tvMeshs = tvMeshs,
+                        this.toggle(!0),
+                        o(this)
+                    }).catch(s=>{
+                        logger.error("[Engine] setVideo: create Tv by input mesh error! " + s),
+                        a(new XTvModelError("[Engine] setVideo: create Tv by input mesh error! " + s))
+                    })
+                )
+                : a(new XTvVideoElementError("[Engine] param of setVideo must be a HTMLVideoElement"))
+            ))
+        )
     }
     async setSameVideo(e, t="") {
         return e == null || e == null ? (logger.error("[Engine] setSameVideo: input material is null or undefined "),

+ 1 - 1
src/Xverse.js

@@ -8,7 +8,7 @@ import Person from "./enum/Person.js"
 import LoggerLevels from "./enum/LoggerLevels.js"
 import Logger from "./Logger.js"
 
-const logger = new Logger('xverse')
+const logger = new Logger('4DMVS')
 export default class Xverse{
     constructor(e) {
         e || (e = {});

+ 1 - 1
src/XverseAvatar.js

@@ -7,7 +7,7 @@ import Queue from "./Queue.js"
 import Logger from "./Logger.js"
 import CoreBroadcastType from "./enum/CoreBroadcastType.js"
 
-const logger = new Logger('xverse-avatar')
+const logger = new Logger('4DMVS_Character')
 export default class XverseAvatar extends EventEmitter {
     constructor({userId, isHost, room, avatarId, isSelf, group=AvatarGroup.Npc}) {
         super();

+ 1 - 1
src/XverseAvatarManager.js

@@ -12,7 +12,7 @@ import TimeoutError from "./error/TimeoutError.js"
 import Logger from "./Logger.js"
 import QueueType from "./enum/QueueType.js"
 
-const logger = new Logger('xverse-avatar-manager')
+const logger = new Logger('4DMVS_CharacterManager')
 export default class XverseAvatarManager extends EventEmitter {
     constructor(room) {
         super();

+ 1 - 1
src/XverseEffectManager.js

@@ -1,6 +1,6 @@
 import Logger from "./Logger.js"
 
-const logger = new Logger('xverse-effect-manager')
+const logger = new Logger('4DMVS_EffectManager')
 export default class XverseEffectManager extends EventEmitter {
     constructor(e) {
         super();

+ 1 - 1
src/Xverse_Room.js

@@ -26,7 +26,7 @@ import Debug from "./Debug.js";
 import Logger from "./Logger.js";
 import NewUserStateType from "./enum/NewUserStateType.js";
 
-const logger = new Logger("xverse-room");
+const logger = new Logger("4DMVS_Room");
 export default class Xverse_Room extends EventEmitter {
   constructor(options) {
     super();

+ 23 - 0
src/main.js

@@ -57,6 +57,7 @@ const l = async()=>{
 
         u();
         c();
+        f();
         
         //e(!1);
     } catch (M) {
@@ -97,4 +98,26 @@ const c = ()=>{
         })
     })
 }
+
+const f = async ()=>{
+    // const T = (await room.modelManager.findAssetList(String(room.skinId))).filter(E=>E.typeName === "MEDIA").map(E=>E.url);
+    // // a(T),
+    // room.tv && room.tv.setUrl({
+    //     url: "./assets/xverse_tv_840x480_1K.mp4",
+    //     loop: !0
+    // }).then(async()=>{
+    //     try {
+    //         if(room.tv.videoElement) {
+    //             // room.tv.videoElement.muted = false
+    //             await room.tv.videoElement.play()
+    //             console.log("\u64AD\u653E\u6210\u529F")     // 播放成功
+    //         }
+    //     } catch (S) {
+    //         console.log("\u64AD\u653E\u5931\u8D25\uFF1A", S)    // 播放失败
+    //     }
+    // }).catch(E=>{
+    //     console.error(E)
+    // })
+}
+
 l();