β¨ About the Project β
Three App
is a side project built to explore and experiment with different dev tools and tech stacks for learning purposes.
β οΈ Disclaimer
This project/package is experimental and not production-ready.
π Project Scope β
Main goals of this project:
β
Use fnm as the Node.js version manager.
β
Use PNPM as the package manager.
βΒ Β Set up a basic monorepo using PNPM Workspaces.
β
Create a TypeScript library with type declarations using tsup.
β
Publish on NPM under a personal scope.
β
Write tests with Vitest.
β
Build a documentation site with VitePress.
βΒ Β Auto-generate examples using StackBlitz or CodeSandbox APIs.
β
Implement linting with ESLint.
β
Use semantic commits and Semver.
βΒ Β Auto-generate changelogs.
π See the full TODO list for project progress.
π Three App
Library β
Three App
is a lightweight wrapper and set of utility functions that make building three.js
applications simpler and more efficient. It encapsulates common concepts and delivers a developer experience similar to React Three Fiber, while staying functional, declarative, and framework-agnostic.
π Main Features β
β
Pre-configured renderer and camera.
β
Built-in render loop with control methods.
β
Support for common events.
β
Simple lifecycle "hooks".
β
Handy utilities functions to compose 3D scenes.
π See Core Functionalities for more details.
π¨ Limitations β
Three App
includes a simple "hook system" inspired by React and Vue. It relies on global variables, which makes it easy to manage lifecycle events, but it limits you to running only one instance per page.
Since hooks are global, they can't tell which Three App
instance triggered a callback. If multiple instances exist on the same page, all their callbacks will run together.
This isn't an issue for most SSR
, SSG
, or MPA
setupsβor for standalone apps like games or interactive scenes.
π οΈ Workaround
If you need to run multiple Three App
instances on the same page, you can bundle each one separately (e.g., with tsup) and load them inside isolated iframes.
π See the Multiple Instances Demo
β οΈ Disclaimer
Three App
is meant for single-app experiences.
If your project needs multiple instances, communication between them, or stricter security requirements (where iframes aren't ideal), consider using tools like React Three Fiber, TresJS, Threlte, Three.EZ, or other recommended wrappers/frameworks.
π‘ Inspirations β
This project was heavily inspired by React Three Fiber and Bruno Simon's Three.js Journey.


π Resources β
πΊ Tutorials β
- Crea un monorepositorio multipaquete con npm workspaces y releases de paquetes
- π₯ Monorepo multipaquete con NPM Workspaces π¦ (FullStack Bootcamp JavaScript)
- Blazing Fast Tips: Publishing to NPM
- How to make your own NPM package (Step-by-Step) π¦
- Create a library using Vite lib mode
π Docs & Guides β
π¨ Logo β
The Three App
logo is a modern take on the impossible figures of Oscar ReutersvΓ€rd.
The Illustrator file is available: logo.ai
π Related Projects β
Following this project, I also created:
- vitepress-boilerplate β VitePress starter template.
- code-sandbox β Vanilla/TypeScript sandbox.