@tresjs/nuxt
这里是 TresJS 的官方 Nuxt 模块🎉。
仓库在这里
::: code-group
pnpm add three @tresjs/nuxt
npm install three @tresjs/nuxt
yarn add three @tresjs/nuxt
:::
TresCanvas
仅在客户端渲染,您无需为组件文件名添加 .client
或是使用 <ClientOnly />
将 @tresjs/nuxt
添加到 nuxt.config.ts
的 module
部分
export default defineNuxtConfig({
modules: ['@tresjs/nuxt'],
})
就这样!你现在可以在你的 Nuxt 应用中开始使用 @tresjs/nuxt
✨
如果你想使用TresJS生态系统中的任何包,你可以安装你想使用的包,它们将由模块自动导入🧙🏼。
包名 | 版本 |
---|---|
Cientos | |
Post-processing |
# 使用 pnpm
pnpm add @tresjs/cientos @tresjs/post-processing