Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Nuxt 3 starter template with TresJS, GSAP, and Pinia for building 3D web experiences.
Nuxt 3 + TresJS starter is a Boilerplate template that gives you a pre-configured Nuxt 3 project for building Three.js scenes with TresJS, complete with GSAP animation support and Pinia state management.
This starter is a Nuxt 3 application scaffolded with TresJS, a Vue component library that wraps Three.js, so you can create 3D content with declarative components. It takes the project structure as input and produces a runnable Nuxt app featuring a demo GLTF model (Suzanne) with a custom ShaderMaterial, an interactive rotating/floating box, and pre-wired GSAP and Pinia integrations. It runs on the Nuxt 3 framework and is distributed as a GitHub repository.
/components/Suzanne component loads a custom GLTF model and applies a custom ShaderMaterial; it demonstrates how to bring external 3D assets into a TresJS scene.SampleBox component rotates and floats on every animation tick and includes click and hover handlers, serving as a template for interactive 3D objects./plugins/gsap.js and can be accessed in any component via const { $gsap } = useNuxtApp(); additional GSAP plugins can be added to this file globally./stores folder, so you can manage state without extra setup.--shamefully-hoist flag for pnpm.build and preview are ready, letting you create and locally preview a production bundle.ShaderMaterial to understand how Three.js meshes and materials map to Vue components.SampleBox click-and-hover pattern to make 3D objects respond to user input.After cloning, install dependencies with your preferred package manager, then run the dev command to start the development server at http://localhost:3000. To ship, use the build command to create a production bundle and the preview command to serve it locally before deployment.
Use const { $gsap } = useNuxtApp() inside any component. The GSAP plugin is registered globally in /plugins/gsap.js. To add more GSAP plugins, import and register them in that file; some plugins like SplitText must be registered only on the client with process.client to avoid errors.
The /components/Suzanne component shows a working GLTF loader with a custom ShaderMaterial. Replace the model path and material definitions inside that component to load your own .gltf files, or copy the pattern to a new component.
Place store files in the /stores folder. They are auto-included by Pinia, so they become available in components without needing manual import or registration steps.
