ThreeJs but functional and declarative.
Warning
This project/package is a Work In Progress and was created for learning purposes. Do not use in production.
ThreeApp
is simply a set of functions and helpers designed to speed up your ThreeJs
development
- 🍦 Vanilla and framework agnostic
- 🔑 Type Safe
- ⚡ Batteries included (Default Camera and Renderer, render loop and common event handling)
- 📦 Lightweight
- 🔌
ESM
&CommonJs
compatible
The way all hooks were written limit the amount of instances that can be created to one by page.
- 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
-
TABLEROS DE PROYECTOS | GITHUB BÁSICO | GITHUB PROJECTS | EPPR CLASE 205
-
GitHub Projects: finding clarity in the chaos - Universe 2022
The Three App
logo design was heavily inspired by Oscar Reutersvärd work.
Install NodeJs LTS
version using fnm (RECOMMENDED)
fnm use --resolve-engines --install-if-missing
npm run dev # Start `core` and `docs` packages dev server
npm run dev:core # Start `core` package dev server
npm run dev:docs # Start `docs` package dev server
npm run publish # Build and publish to npm core package
npm install three @slzr/three-app
npm install -D @types/three
<div id="three-app"></div>
import { createThreeApp } from '@slzr/three-app'
import { BoxGeometry, Mesh, MeshBasicMaterial } from 'three'
// It can be composed into `components`
const geometry = new BoxGeometry(1, 1, 1)
const material = new MeshBasicMaterial({ color: 0x00FF00 })
const cube = new Mesh(geometry, material)
const app = await createThreeApp({
container: '#container',
onInit({ scene }) {
scene.add(cube)
},
onRender({ time, }) {
cube.rotation.x += 0.01
cube.rotation.y += 0.01
}
})
app.start()
To learn more about Three App
, check the documentation.