首页 时政热点 科技头条 智能AI 安全攻防 数码硬件 开发者生态 归档 标签 关于

GitHub 热门项目:uikit

2026-08-24 1 阅读 约4分钟阅读 GitHub Trending
分享:
字号:
GitHub 项目:uikit 仓库地址:https://github.com/pmndrs/uikit 星级:3235 | 作者:pmndrs 项目描述:🎨 React-Three-Fiber 的用户界面 =================================================== 自述文件内容:

uikit 为 Threejs 构建高性能 3D 用户界面。
NPM NPM Twitter Discord

> 非常适合游戏、XR (VR/AR) 和任何基于网络的空间计算应用程序。 ### 它看起来像什么? |一个简单的 UI,有 2 个水平对齐的容器,以全屏呈现。当用户将鼠标悬停在容器上时,容器的不透明度会发生变化。 | ![上述代码的渲染](./docs/getting-started/basic-example.gif) | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- | 使用`@react-two/uikit`时的源代码: ````jsx 从 'react-dom/client' 导入 { createRoot } 从“反应”导入反应 从“@react-三/纤维”导入{画布} 从“@react-two/uikit”导入{全屏,容器} createRoot(document.getElementById('root')).render( <画布> <全屏flexDirection =“行”填充= {10}间隙= {10}> <容器flexGrow={1}opacity={0.5}hover={{opacity:1}}backgroundColor="red"/> <容器flexGrow={1}opacity={0.5}hover={{opacity:1}}backgroundColor="blue"/> , ) ```` ## 如何开始 如果您使用的是 `@react- Three/Fiber`,请开始 **[构建您的第一个布局](https://docs.pmnd.rs/uikit/getting-started/first-layout)**,查看我们的 **[示例](https://docs.pmnd.rs/uikit/getting-started/examples)** 以了解 uikit 的实际应用。如果您想使用普通的 Three.js,请访问[本教程](https://pmndrs.github.io/uikit/docs/getting-started/vanilla)。或者,了解更多信息: - [所有组件及其属性](https://docs.pmnd.rs/uikit/getting-started/components-and-properties) - [交互性](https://docs.pmnd.rs/uikit/tutorials/interactivity) - [自定义材料](https://docs.pmnd.rs/uikit/tutorials/custom-materials) - [自定义字体](https://docs.pmnd.rs/uikit/tutorials/custom-fonts) - [响应式用户界面](https://docs
这篇文章对您有帮助吗?

订阅66必读

每日精选科技资讯,直达你的邮箱