Initial commit: ComfyUI Camera Angle Selector node

This commit is contained in:
Nick Pittas
2026-01-10 11:34:32 +02:00
commit 08490b2051
25 changed files with 1942 additions and 0 deletions
@@ -0,0 +1,17 @@
---
description: "Activates the Agent Builder agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Agent Builder Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/bmb/agents/agent-builder.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Module Builder agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Module Builder Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/bmb/agents/module-builder.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Workflow Builder agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Workflow Builder Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/bmb/agents/workflow-builder.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Analyst agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Analyst Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/bmm/agents/analyst.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Architect agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Architect Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/bmm/agents/architect.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Dev agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Dev Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/bmm/agents/dev.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
+17
View File
@@ -0,0 +1,17 @@
---
description: "Activates the Pm agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Pm Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/bmm/agents/pm.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Quick Flow Solo Dev agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Quick Flow Solo Dev Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/bmm/agents/quick-flow-solo-dev.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
+17
View File
@@ -0,0 +1,17 @@
---
description: "Activates the Sm agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Sm Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/bmm/agents/sm.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Tea agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Tea Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/bmm/agents/tea.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Tech Writer agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Tech Writer Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/bmm/agents/tech-writer.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Ux Designer agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Ux Designer Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/bmm/agents/ux-designer.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Brainstorming Coach agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Brainstorming Coach Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/cis/agents/brainstorming-coach.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Creative Problem Solver agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Creative Problem Solver Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/cis/agents/creative-problem-solver.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Design Thinking Coach agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Design Thinking Coach Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/cis/agents/design-thinking-coach.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Innovation Strategist agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Innovation Strategist Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/cis/agents/innovation-strategist.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Presentation Master agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Presentation Master Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/cis/agents/presentation-master.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Storyteller agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Storyteller Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/cis/agents/storyteller/storyteller.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
@@ -0,0 +1,17 @@
---
description: "Activates the Bmad Master agent persona."
tools: ["changes","edit","fetch","githubRepo","problems","runCommands","runTasks","runTests","search","runSubagent","testFailure","todos","usages"]
---
# Bmad Master Agent
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
<agent-activation CRITICAL="TRUE">
1. LOAD the FULL agent file from @_bmad/core/agents/bmad-master.md
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
3. Execute ALL activation steps exactly as written in the agent file
4. Follow the agent's persona and menu system precisely
5. Stay in character throughout the session
</agent-activation>
+82
View File
@@ -0,0 +1,82 @@
# Copilot Instructions - Angles (ComfyUI Camera Angle Selector)
## Project Overview
This is a **ComfyUI custom node** that provides an interactive 3D interface for selecting camera angles. The main deliverable is in `ComfyUI_CameraAngleSelector/` - a Python + JavaScript node that renders a Three.js 3D viewport inline within ComfyUI.
The `_bmad/` folder contains BMad Method tooling for project planning and documentation - it's NOT part of the shipped product.
## Architecture
### ComfyUI Node Structure
```
ComfyUI_CameraAngleSelector/
├── __init__.py # Node registration (WEB_DIRECTORY, NODE_CLASS_MAPPINGS)
├── camera_angle_selector.py # Python backend - legacy ComfyUI API
└── web/js/camera_angle_extension.js # Three.js frontend widget (~740 lines)
```
### Key Patterns
**ComfyUI Extension Pattern** - The JavaScript uses `nodeCreated` callback to inject the 3D widget:
```javascript
app.registerExtension({
name: "Comfy.CameraAngleSelector",
async nodeCreated(node) {
if (node.comfyClass !== "CameraAngleSelector") return;
// Create and attach 3D widget via node.addDOMWidget()
}
});
```
**96 Camera Angle Combinations** - Generated from constants:
- `VIEW_DIRECTIONS` (8): front, front-right quarter, right, back-right quarter, back, back-left quarter, left, front-left quarter
- `HEIGHT_ANGLES` (4): low-angle shot, eye-level shot, elevated shot, high-angle shot
- `SHOT_SIZES` (3): close-up, medium shot, wide shot
**Output Format**: `<sks> {direction} {height} {size}` (e.g., `<sks> front view low-angle shot close-up`)
### Frontend Widget Pattern
The JavaScript extension in `web/js/camera_angle_extension.js`:
- Loads Three.js dynamically from CDN (`r128`)
- Uses `CameraAngleWidget` class with inline rendering
- Communicates via `selected_indices` JSON string parameter
- Color-coded cameras: height by body color, size by cone/indicator color
## Development Workflow
### Testing in ComfyUI
1. Copy/symlink `ComfyUI_CameraAngleSelector/` to ComfyUI's `custom_nodes/` directory
2. Restart ComfyUI server
3. Node appears as "Camera Angle Selector" in camera category
4. Browser DevTools console shows any JavaScript errors
### Key Files to Modify
| Task | File |
|------|------|
| Add new angle types | `camera_angle_selector.py` - modify constants |
| Change 3D visuals | `web/js/camera_angle_extension.js` - Three.js scene code |
| Modify output format | `camera_angle_selector.py` - `execute()` method |
| Add UI controls | `camera_angle_extension.js` - `CameraAngleWidget` class |
## Conventions
- **Prompt prefix**: All outputs use `<sks>` prefix (standard for camera angle prompts)
- **Color scheme**: Dark theme matching ComfyUI (`#1a1a2e` background, `#0f3460` accents)
- **Widget sizing**: Minimum 240px height for 3D viewport
- **JSON state**: Selection state stored as JSON array of indices `"[0, 5, 12]"`
## BMad Tooling (Non-Product)
The `_bmad/` directory contains planning framework - ignore when working on the node itself. Relevant outputs:
- `_bmad-output/planning-artifacts/prd.md` - Product requirements (reference only)
- `_bmad-output/planning-artifacts/product-brief-*.md` - Vision document
## Testing Notes
- No automated test suite currently exists
- Manual testing: verify 3D scene loads, click selection works, output connects to downstream nodes
- Check browser console for Three.js or ComfyUI extension errors
- Test both ComfyUI v1.0+ and legacy versions for API compatibility