【问题标题】:In Rust WASM Game of Life tutorial, can't get the mouse click event to work在 Rust WASM Game of Life 教程中,无法让鼠标单击事件起作用
【发布时间】:2021-01-28 03:31:31
【问题描述】:

问题:似乎无法使鼠标单击切换事件起作用。点击时,一个活细胞应该会死去,而一个死细胞应该会活过来。

我已经在Github Repo 中上传了 Rust/WASM Game of Life 教程项目,供那些想要找到问题的人使用。欢迎 PR。

不了解教程的朋友,click here了解更多。

【问题讨论】:

    标签: node.js rust webassembly wasm-bindgen rust-wasm


    【解决方案1】:

    我的错。刚刚将www/index.js 中的变量名从CanvasRight 更改为CanvasTop,它现在可以工作了。

    【讨论】:

      猜你喜欢
      • 2021-09-29
      • 2020-12-02
      • 2022-12-26
      • 2012-04-15
      • 2021-02-12
      • 2023-04-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-14
      相关资源
      最近更新 更多