1
0

nuxt.md 1.9 KB

Nuxt module @tresjs/nuxt

TresJS Nuxt Module

npm package

A official Nuxt module for TresJS is here 🎉.

Repository is here

Installation

::: code-group

pnpm add three @tresjs/nuxt
npm install three @tresjs/nuxt
yarn add three @tresjs/nuxt

:::

Features

  • 🤓 Auto-import components and composables from the TresJS ecosystem
  • TresCanvas client only, you don't need to add .client to the component name or <ClientOnly />
  • Automatically configures vue compiler to support TresJS components, see why
  • All the DX Magic that comes with Nuxt ✨

Usage

Add @tresjs/nuxt to the modules section of nuxt.config.ts

export default defineNuxtConfig({
  modules: ['@tresjs/nuxt'],
})

That's it! You can now use @tresjs/nuxt in your Nuxt app ✨

If you want to use the any package from the TresJS ecosystem, you can install the packages you want to use and they will be auto-imported by the module 🧙🏼‍♂️.

Package Version
Cientos cientos version
Post-processing post-processing version
# Using pnpm
pnpm add @tresjs/cientos @tresjs/post-processing