From the embers of Synapsids to the flourishing Cenozoic.
A 200-million-year epic of life, flowing at your fingertips.
δΈζ | English
|
|
| Specimen Card | Origin Easter Egg (Ghost View) |
|:---:|:---:|
|
|
|
## π οΈ Tech Stack
This project uses **Vanilla JavaScript (ES6+)** with no runtime build step. Third-party browser dependencies are version-locked and self-hosted.
* **Core**: HTML5, CSS3, JavaScript
* **Visualization**: [D3.js](https://d3js.org/) (v7) - Handles complex tree data structures and layout calculations.
* **3D Engine**: [Three.js](https://threejs.org/) (r128) - Handles WebGL particle backgrounds and CSS3D transformations.
* **Animation**: [Tween.js](https://github.com/tweenjs/tween.js/) - Handles smooth interpolation animations.
* **Fonts**: Self-hosted, unicode-range-split Noto Serif SC with no external font requests.
## π Structure
The project adopts a modular design for easy maintenance and extension. Images are independent, content-hashed WebP assets loaded on demand, requiring **no backend environment**.
```text
Mammalia-tree-main/
βββ assets/ # Static assets
β βββ images/ # 167 on-demand WebP images
β βββ logo.png # Project Logo
βββ data/ # Data files
β βββ data.js # Phylogenetic topology data (JSON Object)
β βββ images_manifest.js # Content-hashed image manifest
βββ examples/ # Screenshots for README
βββ src/ # Source code
β βββ css/
β β βββ style.css # Main stylesheet
β βββ js/
β βββ config.js # Global configuration (performance, layout, etc.)
β βββ i18n.js # Internationalization (Chinese/English)
β βββ utils.js # Utility functions
β βββ easter_egg_data.js # Easter egg data
β βββ gallery.js # WebGL and CSS3D gallery
β βββ tree.js # D3 evolution tree
β βββ app.js # Lifecycle and UI controller
βββ scripts/ # Validation, vendoring, and dev server
βββ tests/ # Node.js and Playwright regression tests
βββ vendor/ # Version-locked browser dependencies
βββ index.html # Entry point
βββ package.json # Development and test commands
βββ README.md # Chinese Documentation
βββ README_EN.md # English Documentation
```
## π How to Run
All runtime resources are local static files, so the project supports both direct preview and an included development server:
### Method 1: Direct Open (Recommended for Quick Preview)
1. **Download**: Clone or download the repository.
2. **Run**: Simply double-click `index.html` to run smoothly in your browser.
3. **Note**: No Node.js installation required, no local server configuration needed.
### Method 2: Local Server (Recommended for Development)
```bash
npm install
npm start
```
Then visit `http://127.0.0.1:4173`. Before committing, run `npm run check` and `npm run test:browser`.
## π§ Customization
The project supports customization through `src/js/config.js`:
```javascript
// Performance configuration
performance: {
particleCount: { desktop: 2000, mobile: 1000 }, // Particle count
cardCount: { base: 30, min: 35, max: 80 } // Card count
}
// 3D scene configuration
scene3D: {
helix: { radiusBase: 600, yStep: 30 }, // Helix radius and spacing
camera: { targetZDesktop: 2000 } // Camera position
}
// Tree configuration
tree: {
width: { desktop: 2000, mobile: 1200 }, // Tree width
nodeSpacing: 45, // Node spacing
zoom: { scaleExtent: [0.15, 3] } // Zoom range
}
```
## π€ Credits & Disclaimer
The birth of this project relied on collaboration between the open-source community and AI technology:
* **Data Basis**: Taxonomy based on **Mammal Diversity Database (MDD) v2.3** and **Paleobiology Database**.
* **AI Assistance**: Core code logic and Shader optimization assisted by **Google Gemini**.
* **AI Image Generation**: Specimen restoration images generated by the AI model **nanobanana**.
* *Note: AI-generated images are intended for artistic visual reference and may contain anatomical inaccuracies. Please do not use them for rigorous academic citations.*
## π License
This work is licensed under the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0)](LICENSE).
* β
You are free to share and adapt this project.
* β Commercial use is prohibited.
* π Please attribute the original author: **Sean Wong**.
## π Star History
[](https://star-history.com/#SeanWong17/Mammalia-tree&Date)
---