Skip to content

Nuxt module @tresjs/nuxt

TresJS Nuxt Module

npm package

A official Nuxt module for TresJS is here 🎉.

Repository is here

Installation

bash
pnpm add three @tresjs/nuxt
bash
npm install three @tresjs/nuxt
bash
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

js
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 🧙🏼‍♂️.

PackageVersion
Cientoscientos version
Post-processingpost-processing version
bash
# Using pnpm
pnpm add @tresjs/cientos @tresjs/post-processing