用户在 React UI 层中单击影响较低的 WebGL 层

发布于 2025-01-16 22:26:39 字数 222 浏览 2 评论 0原文

我有一个包含 WebGl 体验的 React 应用程序。

WebGl 的接口位于父 React 组件中,它将 props 向下传递到 WebGl 中。

反应用户界面 | ---> WebGL

每当我在 React UI 中单击(例如某个按钮)时,单击也会在 WebGL 中注册并在 3D 环境中导致不需要的操作。

知道我该如何防止这种情况吗?

谢谢你!

I have a React app that contains a WebGl experience.

The interface for the WebGl is in the parent React component, which passes props down into the WebGl.

React UI
|
--- > WebGL

Whenever I click in the React UI ( such as some button ) the click also registers in the WebGL and causes unwanted actions in the 3D environment.

Any idea how I can prevent this?

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文