Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 含有随机数的逻辑节点未按流程顺序计算导致显示不正确 #216

Open
sheep-realms opened this issue Dec 29, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@sheep-realms
Copy link

sheep-realms commented Dec 29, 2024

发生了什么?

Image

如图所示,图中的与运算没有正确计算,原理不明。

另外,手动创建的计算节点在缩放画布时会变为原本设置的文本。

系统版本

Windows

附件

JSON
{
  "version": 11,
  "nodes": [
    {
      "location": [
        -456.6087898058356,
        -8.465857092582496
      ],
      "size": [
        60.95997619628906,
        60
      ],
      "text": "15",
      "uuid": "ff79c9c6-d1a6-4570-9514-d10a7444dcc8",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        -242.6087898058356,
        -9.465857092582496
      ],
      "size": [
        64.95999145507812,
        60
      ],
      "text": "32",
      "uuid": "31ddd1e8-df7a-4681-95de-3149cc78a927",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        -383.6087898058356,
        170.5341429074175
      ],
      "size": [
        143.8399658203125,
        60
      ],
      "text": "#ADD#",
      "uuid": "574f4ef0-3ef0-4794-90c9-8b26c6b2552a",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        -340.6087898058356,
        356.5341429074175
      ],
      "size": [
        52.6719970703125,
        60
      ],
      "text": "...",
      "uuid": "021c2830-76ec-42bf-9869-0c3f95236c62",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        939.4944129093204,
        136.7948899912023
      ],
      "size": [
        143.45596313476562,
        60
      ],
      "text": "#AND#",
      "uuid": "5aefe8b7-b044-4e68-a068-f2e825803c2f",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        983.2170862384896,
        331.98539592499367
      ],
      "size": [
        52.6719970703125,
        60
      ],
      "text": "...",
      "uuid": "11e83f0c-49b1-4414-b08c-7e465707964f",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        353.7709499559519,
        -1253.2010924963156
      ],
      "size": [
        217.9519500732422,
        60
      ],
      "text": "#RANDOM#",
      "uuid": "bb793226-7e8d-4c2c-aa3f-ad30641157fc",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        273.9123414472144,
        -1115.2198559429805
      ],
      "size": [
        325.56787109375,
        60
      ],
      "text": "0.271199874200736",
      "uuid": "1fed936c-d670-4a55-8c85-27ed6b7b7d6f",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        756.4861673540928,
        -1113.6732470520797
      ],
      "size": [
        75.32797241210938,
        60
      ],
      "text": "0.5",
      "uuid": "fec4deca-2745-4158-a11e-b2047f09e6e6",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        575.8540372615815,
        -946.6365996438349
      ],
      "size": [
        143.8399658203125,
        60
      ],
      "text": "#ADD#",
      "uuid": "148cb996-94b3-4112-8c7e-33a989810597",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        558.4717400848738,
        -663.4021161612474
      ],
      "size": [
        180.76795959472656,
        60
      ],
      "text": "#FLOOR#",
      "uuid": "deb36607-6865-44f5-8ede-245e8b70aeb8",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        477.7142537919178,
        -817.0306637709214
      ],
      "size": [
        323.6158752441406,
        60
      ],
      "text": "0.771199874200736",
      "uuid": "74b7859b-b98f-4ed4-841f-8d96d73550a6",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        623.0771301169668,
        -505.5781805995157
      ],
      "size": [
        48.511993408203125,
        60
      ],
      "text": "0",
      "uuid": "bf7e4844-2c60-49f1-ad69-a094b5ed8758",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        1102.2405160411095,
        -1257.461582862028
      ],
      "size": [
        217.9519500732422,
        60
      ],
      "text": "#RANDOM#",
      "uuid": "f320b00a-0d21-4f61-ad1d-d9b6b09a2580",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        1022.381907532372,
        -1119.4803463086928
      ],
      "size": [
        357.3438720703125,
        60
      ],
      "text": "0.4934925899295106",
      "uuid": "e8c4042a-2a4c-4647-82b0-08264e6a8b43",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        1504.9557334392503,
        -1117.9337374177921
      ],
      "size": [
        75.32797241210938,
        60
      ],
      "text": "0.5",
      "uuid": "e07cdde3-92a4-47bc-9992-067541fd7158",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        1324.3236033467392,
        -950.8970900095472
      ],
      "size": [
        143.8399658203125,
        60
      ],
      "text": "#ADD#",
      "uuid": "91375eb9-e32d-47aa-a146-c818e5c225be",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        1306.9413061700313,
        -667.6626065269597
      ],
      "size": [
        180.76795959472656,
        60
      ],
      "text": "#FLOOR#",
      "uuid": "b97f113c-5afb-4b45-86a9-34e40ec7003d",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        1226.1838198770754,
        -821.2911541366337
      ],
      "size": [
        356.4478759765625,
        60
      ],
      "text": "0.9934925899295106",
      "uuid": "41d50cf3-d997-4add-a16b-f7278ee91444",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        1371.5466962021244,
        -509.83867096522806
      ],
      "size": [
        48.511993408203125,
        60
      ],
      "text": "0",
      "uuid": "d3bcf620-894b-456c-888b-78f3b724df8d",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        11.125576690441903,
        15.160894657195058
      ],
      "size": [
        60.95997619628906,
        60
      ],
      "text": "15",
      "uuid": "3e729640-9793-48a1-81d7-b4c7b81435aa",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        225.1255766904419,
        14.160894657195058
      ],
      "size": [
        64.95999145507812,
        60
      ],
      "text": "32",
      "uuid": "f17e04a9-1116-4125-a19f-b86682493f4b",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        84.1255766904419,
        194.16089465719506
      ],
      "size": [
        143.8399658203125,
        60
      ],
      "text": "#ADD#",
      "uuid": "90cb9695-21c9-465b-8df2-a64e43aed0de",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        127.1255766904419,
        380.16089465719506
      ],
      "size": [
        63.48799133300781,
        60
      ],
      "text": "47",
      "uuid": "9a836e2b-cd3f-4421-8ade-b8690c941103",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        1674.9351949488034,
        -200.05788307602353
      ],
      "size": [
        41.43998718261719,
        60
      ],
      "text": "1",
      "uuid": "9233c803-75fc-4cf1-b6d2-04e15988bd88",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        1896.8150100490118,
        -196.9762189773555
      ],
      "size": [
        48.511993408203125,
        60
      ],
      "text": "0",
      "uuid": "62e25d98-c186-4b67-ac13-16262ee53571",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        1742.731805118382,
        51.00529103798752
      ],
      "size": [
        143.45596313476562,
        60
      ],
      "text": "#AND#",
      "uuid": "11d6ed20-0f58-4d2e-b949-cf011908e5d7",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    },
    {
      "location": [
        1788.9567665975837,
        206.47524481302926
      ],
      "size": [
        48.511993408203125,
        60
      ],
      "text": "0",
      "uuid": "76afa51d-24ec-4534-89f6-74382d0149e0",
      "details": "",
      "color": [
        0,
        0,
        0,
        0
      ],
      "type": "core:text_node"
    }
  ],
  "edges": [
    {
      "source": "ff79c9c6-d1a6-4570-9514-d10a7444dcc8",
      "target": "574f4ef0-3ef0-4794-90c9-8b26c6b2552a",
      "text": "",
      "uuid": "ed2a6b8d-56d8-471e-b0c7-e1b834153de5",
      "type": "core:edge"
    },
    {
      "source": "31ddd1e8-df7a-4681-95de-3149cc78a927",
      "target": "574f4ef0-3ef0-4794-90c9-8b26c6b2552a",
      "text": "",
      "uuid": "5c94bde7-a1d9-4538-9dcc-37ec7c83b039",
      "type": "core:edge"
    },
    {
      "source": "574f4ef0-3ef0-4794-90c9-8b26c6b2552a",
      "target": "021c2830-76ec-42bf-9869-0c3f95236c62",
      "text": "",
      "uuid": "13ae1cda-57db-4270-945b-308ec8748369",
      "type": "core:edge"
    },
    {
      "source": "5aefe8b7-b044-4e68-a068-f2e825803c2f",
      "target": "11e83f0c-49b1-4414-b08c-7e465707964f",
      "text": "",
      "uuid": "0a2f5f35-af8b-4fba-9bf3-8ca19436c6c9",
      "type": "core:edge"
    },
    {
      "source": "bb793226-7e8d-4c2c-aa3f-ad30641157fc",
      "target": "1fed936c-d670-4a55-8c85-27ed6b7b7d6f",
      "text": "",
      "uuid": "16e88cdf-91cf-40c8-bc2d-fc1e476b016f",
      "type": "core:edge"
    },
    {
      "source": "1fed936c-d670-4a55-8c85-27ed6b7b7d6f",
      "target": "148cb996-94b3-4112-8c7e-33a989810597",
      "text": "",
      "uuid": "852db60f-a2a0-4cef-8c84-2259a4c14951",
      "type": "core:edge"
    },
    {
      "source": "fec4deca-2745-4158-a11e-b2047f09e6e6",
      "target": "148cb996-94b3-4112-8c7e-33a989810597",
      "text": "",
      "uuid": "14b30cdf-d426-442b-8465-650719fd038f",
      "type": "core:edge"
    },
    {
      "source": "148cb996-94b3-4112-8c7e-33a989810597",
      "target": "74b7859b-b98f-4ed4-841f-8d96d73550a6",
      "text": "",
      "uuid": "a930e52f-18b1-47bd-aa35-c04b40ad9158",
      "type": "core:edge"
    },
    {
      "source": "74b7859b-b98f-4ed4-841f-8d96d73550a6",
      "target": "deb36607-6865-44f5-8ede-245e8b70aeb8",
      "text": "",
      "uuid": "0635b71e-603c-42de-af5d-9e6c7ad36504",
      "type": "core:edge"
    },
    {
      "source": "deb36607-6865-44f5-8ede-245e8b70aeb8",
      "target": "bf7e4844-2c60-49f1-ad69-a094b5ed8758",
      "text": "",
      "uuid": "c99ab82f-8c09-48fc-baad-c3316ea43afe",
      "type": "core:edge"
    },
    {
      "source": "f320b00a-0d21-4f61-ad1d-d9b6b09a2580",
      "target": "e8c4042a-2a4c-4647-82b0-08264e6a8b43",
      "text": "",
      "uuid": "92fd50e9-8b15-447a-9e3c-4999e65a04c2",
      "type": "core:edge"
    },
    {
      "source": "e8c4042a-2a4c-4647-82b0-08264e6a8b43",
      "target": "91375eb9-e32d-47aa-a146-c818e5c225be",
      "text": "",
      "uuid": "b428de27-19a2-49ef-81e5-b5e4d402438e",
      "type": "core:edge"
    },
    {
      "source": "e07cdde3-92a4-47bc-9992-067541fd7158",
      "target": "91375eb9-e32d-47aa-a146-c818e5c225be",
      "text": "",
      "uuid": "a06d90c1-7638-464f-8144-839c246f1e08",
      "type": "core:edge"
    },
    {
      "source": "91375eb9-e32d-47aa-a146-c818e5c225be",
      "target": "41d50cf3-d997-4add-a16b-f7278ee91444",
      "text": "",
      "uuid": "5fe0c21f-3a37-4bee-a32f-269ed1e1d0f1",
      "type": "core:edge"
    },
    {
      "source": "41d50cf3-d997-4add-a16b-f7278ee91444",
      "target": "b97f113c-5afb-4b45-86a9-34e40ec7003d",
      "text": "",
      "uuid": "da347f16-7178-43ef-8c91-854bd4aa7974",
      "type": "core:edge"
    },
    {
      "source": "b97f113c-5afb-4b45-86a9-34e40ec7003d",
      "target": "d3bcf620-894b-456c-888b-78f3b724df8d",
      "text": "",
      "uuid": "807e1178-9958-437c-98cb-71924a6a0724",
      "type": "core:edge"
    },
    {
      "source": "bf7e4844-2c60-49f1-ad69-a094b5ed8758",
      "target": "5aefe8b7-b044-4e68-a068-f2e825803c2f",
      "text": "",
      "uuid": "6cb650d3-44f2-42ca-abde-b7d5c7c81541",
      "type": "core:edge"
    },
    {
      "source": "d3bcf620-894b-456c-888b-78f3b724df8d",
      "target": "5aefe8b7-b044-4e68-a068-f2e825803c2f",
      "text": "",
      "uuid": "a8a154b4-0441-490e-9b4f-fe734d2ad7aa",
      "type": "core:edge"
    },
    {
      "source": "3e729640-9793-48a1-81d7-b4c7b81435aa",
      "target": "90cb9695-21c9-465b-8df2-a64e43aed0de",
      "text": "",
      "uuid": "054bab9c-ff72-4cbc-9d51-1a972564d475",
      "type": "core:edge"
    },
    {
      "source": "f17e04a9-1116-4125-a19f-b86682493f4b",
      "target": "90cb9695-21c9-465b-8df2-a64e43aed0de",
      "text": "",
      "uuid": "8e27bf5a-1d37-47cb-8043-e624fbef111e",
      "type": "core:edge"
    },
    {
      "source": "90cb9695-21c9-465b-8df2-a64e43aed0de",
      "target": "9a836e2b-cd3f-4421-8ade-b8690c941103",
      "text": "",
      "uuid": "0221772a-03e6-4413-97b0-6173d352b27d",
      "type": "core:edge"
    },
    {
      "source": "9233c803-75fc-4cf1-b6d2-04e15988bd88",
      "target": "11d6ed20-0f58-4d2e-b949-cf011908e5d7",
      "text": "",
      "uuid": "43b3f709-365b-406c-9554-8e8f525ecb99",
      "type": "core:edge"
    },
    {
      "source": "62e25d98-c186-4b67-ac13-16262ee53571",
      "target": "11d6ed20-0f58-4d2e-b949-cf011908e5d7",
      "text": "",
      "uuid": "490827aa-4165-49fa-a067-23627137056a",
      "type": "core:edge"
    },
    {
      "source": "11d6ed20-0f58-4d2e-b949-cf011908e5d7",
      "target": "76afa51d-24ec-4534-89f6-74382d0149e0",
      "text": "",
      "uuid": "6101252b-f9e4-40dd-a3c9-3a2ca3518d59",
      "type": "core:edge"
    }
  ],
  "tags": []
}
@sheep-realms sheep-realms added the bug Something isn't working label Dec 29, 2024
@github-project-automation github-project-automation bot moved this to 待讨论 in Project Graph Dec 29, 2024
@Littlefean
Copy link
Contributor

手动创建的计算节点在缩放画布时会变为原本设置的文本 一直是一个没有解决的诡异bug。

@Littlefean Littlefean changed the title 🐛 自动计算引擎有时不能正确计算 🐛 计算节点未按流程顺序导致显示不正确 Dec 29, 2024
@Littlefean Littlefean changed the title 🐛 计算节点未按流程顺序导致显示不正确 🐛 含有随机数的逻辑节点未按流程顺序计算导致显示不正确 Dec 29, 2024
@Littlefean Littlefean self-assigned this Dec 29, 2024
@Littlefean
Copy link
Contributor

实际上是我偷懒了,计算所有逻辑节点的时候没有按照箭头拓扑顺序走。所以才导致的这个问题。

实际上多按x键几毫秒是可以弥补这个问题的。比如计算总和等等一些具体的数据。但问题就出在了随机数生成上,每一帧都在生成随机数。导致整个体系永远没办法安定下来。

我在想要不降低一下随机数节点的生成频率,或许可以暂时解决一下这个问题。

@sheep-realms
Copy link
Author

sheep-realms commented Dec 29, 2024

实际上是我偷懒了,计算所有逻辑节点的时候没有按照箭头拓扑顺序走。所以才导致的这个问题。

实际上多按x键几毫秒是可以弥补这个问题的。比如计算总和等等一些具体的数据。但问题就出在了随机数生成上,每一帧都在生成随机数。导致整个体系永远没办法安定下来。

我在想要不降低一下随机数节点的生成频率,或许可以暂时解决一下这个问题。

其实有问题的不止随机数,比如这个时钟电路(

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 待讨论
Development

No branches or pull requests

2 participants