From fdde41fa4f12253ce72cc07b6c69c70eb8721eeb Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 27 Nov 2023 16:26:31 +0800 Subject: [PATCH] fix --- .../internal/logic/ws_render_image.go | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/server/websocket/internal/logic/ws_render_image.go b/server/websocket/internal/logic/ws_render_image.go index 18ca3c39..5e132b05 100644 --- a/server/websocket/internal/logic/ws_render_image.go +++ b/server/websocket/internal/logic/ws_render_image.go @@ -408,17 +408,17 @@ func (w *wsConnectItem) assembleRenderDataToUnity(taskId string, resolution int, }) } if element.ModelP != nil && *element.ModelP != "" { - tempData = append(tempData, map[string]interface{}{ + /*tempData = append(tempData, map[string]interface{}{ "name": "model_P", "data": "0," + *element.ModelP, "type": "other", "layer": "0", "is_update": 0, "mode": mode["model_P"], - }) + })*/ } //××××××××××××××××××××××××××××××××××××××××××××××××××××× - /*if w.userId == 127 && info.RenderData.ProductId == 32 { + if w.userId == 127 && info.RenderData.ProductId == 32 { if element.Base != nil && *element.Base != "" { tempData = append(tempData, map[string]interface{}{ "name": "model_1", @@ -439,16 +439,16 @@ func (w *wsConnectItem) assembleRenderDataToUnity(taskId string, resolution int, "mode": mode["shadow"], }) } - if element.ModelP != nil && *element.ModelP != "" { + /*if element.ModelP != nil && *element.ModelP != "" { tempData = append(tempData, map[string]interface{}{ "name": "model_P_1", "data": "0,", "type": "other", "layer": "0", "is_update": 0, - "mode": mode["model_P_1"], + "mode": mode["model_P"], }) - } + }*/ if element.Base != nil && *element.Base != "" { tempData = append(tempData, map[string]interface{}{ "name": "model_2", @@ -479,7 +479,7 @@ func (w *wsConnectItem) assembleRenderDataToUnity(taskId string, resolution int, "mode": mode["model_P"], }) } - }*/ + } //×××××××××××××××××××××××××××××××××××××××××××××××××××× result := []interface{}{ @@ -494,22 +494,22 @@ func (w *wsConnectItem) assembleRenderDataToUnity(taskId string, resolution int, "data": tempData, }, } - /* //************************** - if w.userId == 127 && info.RenderData.ProductId == 32 { - result = []interface{}{ - map[string]interface{}{ - "light": 22, - "refletion": refletion, - "scale": *element.Scale, - "sku_id": info.RenderData.ProductId, - "tid": "ceshi", - "rotation": *element.Rotation, - "filePath": "", //todo 文件路径,针对千人千面 - "data": tempData, - }, - } + //************************** + if w.userId == 127 && info.RenderData.ProductId == 32 { + result = []interface{}{ + map[string]interface{}{ + "light": 22, + "refletion": refletion, + "scale": *element.Scale, + "sku_id": info.RenderData.ProductId, + "tid": "ceshi", + "rotation": *element.Rotation, + "filePath": "", //todo 文件路径,针对千人千面 + "data": tempData, + }, } - //********************************/ + } + //******************************* //发送运行阶段消息(组装数据) w.sendAssembleRenderDataStepResponseMessage(info.RequestId) temId := websocket_data.ToUnityIdStruct{