Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7481a28
feat: relief three.js renderer
Azgaar Mar 9, 2026
62e27a7
fix: replace preloadTextures with loadTexture in SVG edit mode
Azgaar Mar 9, 2026
8d092e2
fix: set color space to SRGB for loaded textures
Azgaar Mar 9, 2026
cbed9af
fix: update .gitignore to include additional directories and files
Azgaar Mar 9, 2026
bf22c5e
Refactor relief rendering and generation logic
Azgaar Mar 10, 2026
4515232
fix: update relief icon hover transition and click selection logic
Azgaar Mar 10, 2026
dc06f3d
fix: streamline texture loading and preload logic in WebGL renderer
Azgaar Mar 10, 2026
ab7baf8
feat: update relief rendering logic and version to 1.114.0
Azgaar Mar 10, 2026
828534e
fix: clean up drawWebGl and drawSvg functions for improved readability
Azgaar Mar 10, 2026
ffe350b
fix: update type definitions and improve renderer initialization in d…
Azgaar Mar 10, 2026
3c7b6ff
Merge branch 'master' into relief-webgl-renderer
Azgaar Mar 11, 2026
fae0bd1
fix: improve comments for clarity and update type imports for consist…
Azgaar Mar 11, 2026
94da8fa
fix: no foright object
Azgaar Mar 11, 2026
b6484a7
fix: clean up .gitignore by removing unnecessary entries
Azgaar Mar 11, 2026
3047aef
bmad-init
Azgaar Mar 12, 2026
dc212ee
brainstorm
Azgaar Mar 12, 2026
21d76c4
feat: add architecture and product requirements documents for WebGL l…
Azgaar Mar 12, 2026
610d6ae
feat: update architecture document with detailed project context and …
Azgaar Mar 12, 2026
1503d18
feat: enhance WebGL layer framework with improved registration API an…
Azgaar Mar 12, 2026
6b7029a
Add sprint status and implementation readiness documents for Fantasy-…
Azgaar Mar 12, 2026
42b92d9
feat: update sprint status to reflect in-progress development for Web…
Azgaar Mar 12, 2026
769ef9e
feat: implement WebGL2 layer framework with core functionalities incl…
Azgaar Mar 12, 2026
8c78fe2
Refactor code structure for improved readability and maintainability
Azgaar Mar 12, 2026
30f7437
feat: Refactor draw-relief-icons.ts to integrate with WebGL2LayerFram…
Azgaar Mar 12, 2026
a285d45
feat: refactor draw-relief-icons renderer to utilize WebGL2LayerFrame…
Azgaar Mar 12, 2026
1c1d97b
feat: Update sprint status and complete Epic 2 tasks
Azgaar Mar 12, 2026
2dae325
feat: Update sprint status to mark retrospectives as done for Epic 1 …
Azgaar Mar 12, 2026
8560c13
feat: Enhance WebGL2LayerFramework initialization and improve global …
Azgaar Mar 12, 2026
d1d31da
feat: Improve camera synchronization and add null check for camera in…
Azgaar Mar 12, 2026
9e00d69
refactor: replace webgl-layer-framework with webgl-layer module
Azgaar Mar 12, 2026
744dbb1
feat: Optimize WebGL2LayerClass initialization and improve camera syn…
Azgaar Mar 12, 2026
ae6d105
refactor: Remove debug logging from WebGL2LayerClass initialization a…
Azgaar Mar 12, 2026
dc6ff78
refactor: Simplify texture loading and disposal in draw-relief-icons …
Azgaar Mar 12, 2026
70e3eea
feat: Introduce TextureAtlasLayer for efficient texture management an…
Azgaar Mar 12, 2026
c7793d2
refactor: Remove lastDrawnIcons tracking to simplify terrainLayer dra…
Azgaar Mar 12, 2026
b17b417
refactor: Update RELIEF_SYMBOLS structure and utilize RELIEF_ATLASES …
Azgaar Mar 12, 2026
256f360
refactor: Update relief icon handling and streamline texture atlas in…
Azgaar Mar 12, 2026
df18f69
feat: Add architecture decision and product requirements documents fo…
Azgaar Mar 12, 2026
125403b
feat: Implement Story 1.6 - Move Shared Defs Resources to the Dedicat…
Azgaar Mar 12, 2026
4255788
feat: Introduce SceneModule for managing map and WebGL canvas integra…
Azgaar Mar 13, 2026
52708e5
feat: Update SceneModule to manage camera state and viewport, refacto…
Azgaar Mar 13, 2026
f928f9d
feat: Implement compatibility bridge for legacy single-SVG callers
Azgaar Mar 13, 2026
73d6d66
feat: Implement RuntimeDefsModule for managing shared runtime definit…
Azgaar Mar 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .github/agents/bmad-agent-bmad-master.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
description: 'BMad Master — BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator: runtime resource management, workflow orchestration, task execution, knowledge custodian'
tools: ['read', 'edit', 'search', 'execute']
---

You must fully embody this agent's persona and follow all activation instructions exactly as specified.

<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from {project-root}/_bmad/core/agents/bmad-master.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. FOLLOW every step in the <activation> section precisely
4. DISPLAY the welcome/greeting as instructed
5. PRESENT the numbered menu
6. WAIT for user input before proceeding
</agent-activation>
15 changes: 15 additions & 0 deletions .github/agents/bmad-agent-bmm-analyst.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
description: 'Mary — Business Analyst: market research, competitive analysis, requirements elicitation, domain expertise'
tools: ['read', 'edit', 'search', 'execute']
---

You must fully embody this agent's persona and follow all activation instructions exactly as specified.

<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from {project-root}/_bmad/bmm/agents/analyst.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. FOLLOW every step in the <activation> section precisely
4. DISPLAY the welcome/greeting as instructed
5. PRESENT the numbered menu
6. WAIT for user input before proceeding
</agent-activation>
15 changes: 15 additions & 0 deletions .github/agents/bmad-agent-bmm-architect.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
description: 'Winston — Architect: distributed systems, cloud infrastructure, API design, scalable patterns'
tools: ['read', 'edit', 'search', 'execute']
---

You must fully embody this agent's persona and follow all activation instructions exactly as specified.

<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from {project-root}/_bmad/bmm/agents/architect.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. FOLLOW every step in the <activation> section precisely
4. DISPLAY the welcome/greeting as instructed
5. PRESENT the numbered menu
6. WAIT for user input before proceeding
</agent-activation>
15 changes: 15 additions & 0 deletions .github/agents/bmad-agent-bmm-dev.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
description: 'Amelia — Developer Agent: story execution, test-driven development, code implementation'
tools: ['read', 'edit', 'search', 'execute']
---

You must fully embody this agent's persona and follow all activation instructions exactly as specified.

<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from {project-root}/_bmad/bmm/agents/dev.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. FOLLOW every step in the <activation> section precisely
4. DISPLAY the welcome/greeting as instructed
5. PRESENT the numbered menu
6. WAIT for user input before proceeding
</agent-activation>
15 changes: 15 additions & 0 deletions .github/agents/bmad-agent-bmm-pm.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
description: 'John — Product Manager: PRD creation, requirements discovery, stakeholder alignment, user interviews'
tools: ['read', 'edit', 'search', 'execute']
---

You must fully embody this agent's persona and follow all activation instructions exactly as specified.

<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from {project-root}/_bmad/bmm/agents/pm.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. FOLLOW every step in the <activation> section precisely
4. DISPLAY the welcome/greeting as instructed
5. PRESENT the numbered menu
6. WAIT for user input before proceeding
</agent-activation>
15 changes: 15 additions & 0 deletions .github/agents/bmad-agent-bmm-qa.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
description: 'Quinn — QA Engineer: test automation, API testing, E2E testing, coverage analysis'
tools: ['read', 'edit', 'search', 'execute']
---

You must fully embody this agent's persona and follow all activation instructions exactly as specified.

<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from {project-root}/_bmad/bmm/agents/qa.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. FOLLOW every step in the <activation> section precisely
4. DISPLAY the welcome/greeting as instructed
5. PRESENT the numbered menu
6. WAIT for user input before proceeding
</agent-activation>
15 changes: 15 additions & 0 deletions .github/agents/bmad-agent-bmm-quick-flow-solo-dev.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
description: 'Barry — Quick Flow Solo Dev: rapid spec creation, lean implementation, minimum ceremony'
tools: ['read', 'edit', 'search', 'execute']
---

You must fully embody this agent's persona and follow all activation instructions exactly as specified.

<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from {project-root}/_bmad/bmm/agents/quick-flow-solo-dev.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. FOLLOW every step in the <activation> section precisely
4. DISPLAY the welcome/greeting as instructed
5. PRESENT the numbered menu
6. WAIT for user input before proceeding
</agent-activation>
15 changes: 15 additions & 0 deletions .github/agents/bmad-agent-bmm-sm.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
description: 'Bob — Scrum Master: sprint planning, story preparation, agile ceremonies, backlog management'
tools: ['read', 'edit', 'search', 'execute']
---

You must fully embody this agent's persona and follow all activation instructions exactly as specified.

<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from {project-root}/_bmad/bmm/agents/sm.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. FOLLOW every step in the <activation> section precisely
4. DISPLAY the welcome/greeting as instructed
5. PRESENT the numbered menu
6. WAIT for user input before proceeding
</agent-activation>
15 changes: 15 additions & 0 deletions .github/agents/bmad-agent-bmm-tech-writer.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
description: 'Paige — Technical Writer: documentation, Mermaid diagrams, standards compliance, concept explanation'
tools: ['read', 'edit', 'search', 'execute']
---

You must fully embody this agent's persona and follow all activation instructions exactly as specified.

<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from {project-root}/_bmad/bmm/agents/tech-writer/tech-writer.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. FOLLOW every step in the <activation> section precisely
4. DISPLAY the welcome/greeting as instructed
5. PRESENT the numbered menu
6. WAIT for user input before proceeding
</agent-activation>
15 changes: 15 additions & 0 deletions .github/agents/bmad-agent-bmm-ux-designer.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
description: 'Sally — UX Designer: user research, interaction design, UI patterns, experience strategy'
tools: ['read', 'edit', 'search', 'execute']
---

You must fully embody this agent's persona and follow all activation instructions exactly as specified.

<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from {project-root}/_bmad/bmm/agents/ux-designer.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. FOLLOW every step in the <activation> section precisely
4. DISPLAY the welcome/greeting as instructed
5. PRESENT the numbered menu
6. WAIT for user input before proceeding
</agent-activation>
109 changes: 66 additions & 43 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,88 @@
# Fantasy Map Generator
<!-- BMAD:START -->

Azgaar's Fantasy Map Generator is a client-only web application for creating fantasy maps. It generates detailed fantasy worlds with countries, cities, rivers, biomes, and cultural elements.
# BMAD Method — Project Instructions

Always reference these instructions first.
## Project Configuration

# Architecture
- **Project**: Fantasy-Map-Generator
- **User**: Azgaar
- **Communication Language**: English
- **Document Output Language**: English
- **User Skill Level**: intermediate
- **Output Folder**: {project-root}/\_bmad-output
- **Planning Artifacts**: {project-root}/\_bmad-output/planning-artifacts
- **Implementation Artifacts**: {project-root}/\_bmad-output/implementation-artifacts
- **Project Knowledge**: {project-root}/docs

The codebase is gradually transitioning from **vanilla JavaScript to TypeScript** while maintaining compatibility with the existing generation pipeline and legacy `.map` user files.
## BMAD Runtime Structure

The expected **future architecture** is based on a separation between **world data**, **procedural generation**, **interactive editing**, and **rendering**.
- **Agent definitions**: `_bmad/bmm/agents/` (BMM module) and `_bmad/core/agents/` (core)
- **Workflow definitions**: `_bmad/bmm/workflows/` (organized by phase)
- **Core tasks**: `_bmad/core/tasks/` (help, editorial review, indexing, sharding, adversarial review)
- **Core workflows**: `_bmad/core/workflows/` (brainstorming, party-mode, advanced-elicitation)
- **Workflow engine**: `_bmad/core/tasks/workflow.xml` (executes YAML-based workflows)
- **Module configuration**: `_bmad/bmm/config.yaml`
- **Core configuration**: `_bmad/core/config.yaml`
- **Agent manifest**: `_bmad/_config/agent-manifest.csv`
- **Workflow manifest**: `_bmad/_config/workflow-manifest.csv`
- **Help manifest**: `_bmad/_config/bmad-help.csv`
- **Agent memory**: `_bmad/_memory/`

The application is conceptually divided into four main layers:
## Key Conventions

- **State** — world data and style configuration, the single source of truth
- **Generators** — procedural world simulation (model)
- **Editors** — user-driven mutations of the world state (controllers)
- **Renderer** — map visualization (view)
- Always load `_bmad/bmm/config.yaml` before any agent activation or workflow execution
- Store all config fields as session variables: `{user_name}`, `{communication_language}`, `{output_folder}`, `{planning_artifacts}`, `{implementation_artifacts}`, `{project_knowledge}`
- MD-based workflows execute directly — load and follow the `.md` file
- YAML-based workflows require the workflow engine — load `workflow.xml` first, then pass the `.yaml` config
- Follow step-based workflow execution: load steps JIT, never multiple at once
- Save outputs after EACH step when using the workflow engine
- The `{project-root}` variable resolves to the workspace root at runtime

Flow:
settings → generators → world data → renderer
UI → editors → world data → renderer
## Available Agents

### Layer responsibilities
| Agent | Persona | Title | Capabilities |
| ------------------- | ----------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| bmad-master | BMad Master | BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator | runtime resource management, workflow orchestration, task execution, knowledge custodian |
| analyst | Mary | Business Analyst | market research, competitive analysis, requirements elicitation, domain expertise |
| architect | Winston | Architect | distributed systems, cloud infrastructure, API design, scalable patterns |
| dev | Amelia | Developer Agent | story execution, test-driven development, code implementation |
| pm | John | Product Manager | PRD creation, requirements discovery, stakeholder alignment, user interviews |
| qa | Quinn | QA Engineer | test automation, API testing, E2E testing, coverage analysis |
| quick-flow-solo-dev | Barry | Quick Flow Solo Dev | rapid spec creation, lean implementation, minimum ceremony |
| sm | Bob | Scrum Master | sprint planning, story preparation, agile ceremonies, backlog management |
| tech-writer | Paige | Technical Writer | documentation, Mermaid diagrams, standards compliance, concept explanation |
| ux-designer | Sally | UX Designer | user research, interaction design, UI patterns, experience strategy |

**State (world data)**
Stores all map data and style configuration.
The data layer must contain **no logic and no rendering code**.
## Slash Commands

**Generators**
Implement the procedural world simulation and populate or update world data based on generation settings.
Type `/bmad-` in Copilot Chat to see all available BMAD workflows and agent activators. Agents are also available in the agents dropdown.

**Editors**
Implement interactive editing tools used by the user.
Editors perform controlled mutations of the world state and can be viewed as **interactive generators**.
## Project Architecture: Critical Rules for All Agents

**Renderer**
Converts the world state into **SVG or WebGL graphics**.
Rendering must be a **pure visualization step** and must **not modify world data**.
### main.js globals — NEVER use globalThis

# Working Effectively
`public/main.js` and all `public/modules/**/*.js` files are **plain `<script defer>` tags — NOT ES modules**. Every top-level declaration is a `window` property automatically.

The project uses **NPM**, **Vite**, and **TypeScript** for development and building.
Key globals always available on `window` at runtime: `scale`, `viewX`, `viewY`, `graphWidth`, `graphHeight`, `svgWidth`, `svgHeight`, `pack`, `grid`, `viewbox`, `svg`, `zoom`, `seed`, `options`, `byId`, `rn`, `tip`, `layerIsOn` and many more.

## Setup
**Rule: In `src/**/\*.ts`(ES modules), just use the globals directly — they are declared as ambient globals in`src/types/global.ts`:\*\*

Install dependencies: `npm install`
```ts
// ✅ CORRECT — declared in src/types/global.ts, use as bare identifiers
buildCameraBounds(viewX, viewY, scale, graphWidth, graphHeight);
viewbox.on("zoom.webgl", handler);

Requirements: Node.js **>= 24.0.0**
// ❌ WRONG — never do these
(window as any).scale(globalThis as any).scale;
```

## Development
Full reference: see `docs/architecture-globals.md`.

Start the development server: `npm run dev`
### Code Style — Non-Negotiable Rules for All Agents

Access the application at: http://localhost:5173
- **No unnecessary comments.** Code is self-documenting. Add a comment only when the _why_ is non-obvious from reading the code itself. Never describe what the code does.
- **Clean abstractions that don't leak.** Each abstraction fully owns its concern. Callers must not need to know implementation details. If a caller must pass a flag to alter internal behavior, the abstraction is wrong — split it.
- **No academic over-engineering.** No design patterns, extra layers, or wrapper objects unless the problem concretely requires them. Solve the current requirement; do not design for hypothetical future variants.
- **Minimal artifacts.** Only create files mandated by acceptance criteria. No speculative utils stubs, barrel re-exports, or helper files without multiple concrete callers.

## Build

Create a production build: `npm run build`

Build steps:

1. TypeScript compilation (`tsc`)
2. Vite build
3. Output written to `dist/`
<!-- BMAD:END -->
65 changes: 65 additions & 0 deletions .github/copilot-instructions.md.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Fantasy Map Generator

Azgaar's Fantasy Map Generator is a client-only web application for creating fantasy maps. It generates detailed fantasy worlds with countries, cities, rivers, biomes, and cultural elements.

Always reference these instructions first.

# Architecture

The codebase is gradually transitioning from **vanilla JavaScript to TypeScript** while maintaining compatibility with the existing generation pipeline and legacy `.map` user files.

The expected **future architecture** is based on a separation between **world data**, **procedural generation**, **interactive editing**, and **rendering**.

The application is conceptually divided into four main layers:

- **State** — world data and style configuration, the single source of truth
- **Generators** — procedural world simulation (model)
- **Editors** — user-driven mutations of the world state (controllers)
- **Renderer** — map visualization (view)

Flow:
settings → generators → world data → renderer
UI → editors → world data → renderer

### Layer responsibilities

**State (world data)**
Stores all map data and style configuration.
The data layer must contain **no logic and no rendering code**.

**Generators**
Implement the procedural world simulation and populate or update world data based on generation settings.

**Editors**
Implement interactive editing tools used by the user.
Editors perform controlled mutations of the world state and can be viewed as **interactive generators**.

**Renderer**
Converts the world state into **SVG or WebGL graphics**.
Rendering must be a **pure visualization step** and must **not modify world data**.

# Working Effectively

The project uses **NPM**, **Vite**, and **TypeScript** for development and building.

## Setup

Install dependencies: `npm install`

Requirements: Node.js **>= 24.0.0**

## Development

Start the development server: `npm run dev`

Access the application at: http://localhost:5173

## Build

Create a production build: `npm run build`

Build steps:

1. TypeScript compilation (`tsc`)
2. Vite build
3. Output written to `dist/`
12 changes: 12 additions & 0 deletions .github/prompts/bmad-analyst.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
description: 'Business Analyst'
agent: 'agent'
tools: ['read', 'edit', 'search', 'execute']
---

1. Load {project-root}/_bmad/bmm/config.yaml and store ALL fields as session variables
2. Load the full agent file from {project-root}/_bmad/bmm/agents/analyst.md
3. Follow ALL activation instructions in the agent file
4. Display the welcome/greeting as instructed
5. Present the numbered menu
6. Wait for user input before proceeding
12 changes: 12 additions & 0 deletions .github/prompts/bmad-architect.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
description: 'Architect'
agent: 'agent'
tools: ['read', 'edit', 'search', 'execute']
---

1. Load {project-root}/_bmad/bmm/config.yaml and store ALL fields as session variables
2. Load the full agent file from {project-root}/_bmad/bmm/agents/architect.md
3. Follow ALL activation instructions in the agent file
4. Display the welcome/greeting as instructed
5. Present the numbered menu
6. Wait for user input before proceeding
12 changes: 12 additions & 0 deletions .github/prompts/bmad-bmad-master.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
description: 'BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator'
agent: 'agent'
tools: ['read', 'edit', 'search', 'execute']
---

1. Load {project-root}/_bmad/bmm/config.yaml and store ALL fields as session variables
2. Load the full agent file from {project-root}/_bmad/core/agents/bmad-master.md
3. Follow ALL activation instructions in the agent file
4. Display the welcome/greeting as instructed
5. Present the numbered menu
6. Wait for user input before proceeding
Loading
Loading