Cultivate attention.
A unified collection of procedurally generated trees for Trease Focus
Compiling all tree artwork into cacheable images and videos 🌲
🌳 Tree Collection Hub — Compiles all tree artwork from various sources into one place
🎨 Procedurally Generated Flora — Every plant is unique, grown from seeds
📦 Cache Generation — Pre-generates images, videos, and entity data for efficient distribution
🎬 Video Generation — Watch your trees grow with animated growth videos
Every focus session grows something beautiful. (More to be added)
![]() 🌳 Tree |
![]() 🌸 Sakura |
![]() 🍁 Maple |
![]() 🌲 Cedar |
![]() 💜 Wisteria |
![]() 🌿 Weeping Willow |
![]() 🌻 Sunflower |
![]() 💐 Lavender |
![]() 🩷 Pink Balls Tree |
- Bun runtime installed
- FFmpeg (for video generation)
# Clone the repository
git clone https://github.com/trease-focus/trease-backend.git
cd trease-backend
# Install dependencies
bun installThe primary purpose of this repository is to generate cached assets for all tree entities.
Outputs metadata for all available tree types to cache/entity_data.json:
bun run cache-gen/generate_entity_data.tsPre-renders all tree variants as PNG images to cache/images/:
bun run cache-gen/generate_image_cache.tsrender only a specific tree id
bun run cache-gen/generate_image_cache.ts mapleCreates growth animation videos for all tree variants to cache/video/.
Always ensure to generate image cache first as the images generated by it are used to calculate the tree anchors:
bun run cache-gen/generate_video_cache.tsbun run cache-gen/generate_video_cache.ts mapleFor local testing, you can run the development server:
bun run src/server.ts
🌱 Server listening on http://localhost:3000
| Endpoint | Description |
|---|---|
GET /image?type={plant}&seed={seed} |
Generate a plant image |
GET /video?type={plant}&seed={seed} |
Generate a growth video |
GET /treeInfo?seed={seed} |
Get tree positioning data |
- Runtime: Bun — Fast JavaScript runtime
- Canvas: @napi-rs/canvas — High-performance canvas rendering
- Video: FFmpeg — Video encoding and generation
Contributions are what make the open-source community amazing! Any contributions you make are greatly appreciated.
NOTE: This repo only accepts tree generation done via pure code. If you are an artist and wish to contribute without prior knowledge of code, please follow this link: How to submit a artwork
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingPlant) - Commit your Changes (
git commit -m 'Add some AmazingPlant') - Push to the Branch (
git push origin feature/AmazingPlant) - Open a Pull Request
- Add new plant species (open an issue with an image to your art if you dont know how to code but would like to contribute)
- Improve animation smoothness
- Add seasonal variations
- Add weather effects (rain, snow, wind)
Distributed under the GNU GENERAL PUBLIC LICENSE Version 3. See LICENSE for more information.
Built with 💚 for focused minds everywhere
Stay focused. Grow forests. Change the world. 🌍










