feat:部署前配置
This commit is contained in:
@@ -126,7 +126,7 @@ self.onmessage = async (event) => {
|
||||
const { type, code, unity_data, requestId} = event.data;
|
||||
if (type === "response") {
|
||||
self.unitydata = unity_data
|
||||
console.log("get new response", self.unitydata.externalDatas[0].position)
|
||||
console.log("get new response", self.unitydata && self.unitydata.externalDatas && self.unitydata.externalDatas[0] && self.unitydata.externalDatas[0].position)
|
||||
const pending = pendingRequests.get(requestId);
|
||||
if (pending) {
|
||||
pending.resolve();
|
||||
@@ -152,7 +152,7 @@ self.onmessage = async (event) => {
|
||||
|
||||
// 发送执行完成的消息
|
||||
self.postMessage({ type: "executionComplete" });
|
||||
console.log("Python 执行完成",window.isPythonRun);
|
||||
console.log("Python 执行完成");
|
||||
self.postMessage({ type: "result", result });
|
||||
} catch (error) {
|
||||
self.postMessage({ type: "error", error: error.message });
|
||||
|
||||
Reference in New Issue
Block a user