Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ Standard panel generations:
- G3: 32mm width, 8x8 pixels (circle LEDs)
- G4: 40.45mm width, 16x16 pixels (circle LEDs)
- G4.1: 40mm width, 16x16 pixels (rotated rectangle LEDs)
- G5: 40mm width, 20x20 pixels (rotated rectangle LEDs)
- G6: 45.4mm width, 20x20 pixels (rotated rectangle LEDs)

Arena radius formula: `cRadius = panelWidth / (tan(alpha/2)) / 2` where `alpha = 2*PI/numPanels`

### LED Specifications
- G4.1, G5, G6 use 0604 LED package: 0.6mm × 0.4mm = 1.5:1 aspect ratio
- G4.1, G6 use 0604 LED package: 0.6mm × 0.4mm = 1.5:1 aspect ratio
- LEDs are rectangles rotated 45° on the panel (not diamonds)
- G3, G4 use circular LED visualization

Expand All @@ -64,7 +63,7 @@ Arena radius formula: `cRadius = panelWidth / (tan(alpha/2)) / 2` where `alpha =
### State Object
```javascript
state = {
panelType: 'G6', // G3, G4, G4.1, G5, G6
panelType: 'G6', // G3, G4, G4.1, G6
numCols: 12, // panels around (from 2D editor URL params)
numRows: 3, // panels vertically
activePanels: null, // array of active column indices, null = all
Expand All @@ -85,7 +84,7 @@ Format: `arena_{gen}_{cols}c{rows}r_{pattern}[_stats]_{timestamp}.png`
Example: `arena_G6_12c3r_sine120_stats_2026-01-17T10-30-45.png`

### URL Parameters
- `gen`: Panel generation (G3, G4, G4.1, G5, G6) - defaults to G6
- `gen`: Panel generation (G3, G4, G4.1, G6) - defaults to G6
- `cols`: Number of columns (panels around) - defaults to 10
- `rows`: Number of rows (panels vertically) - defaults to 3
- `active`: Comma-separated 0-based indices of active panels (omitted if all active)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Create and edit 20×20 pixel patterns for G6 panels with:
### Arena Layout Editor ✅ Ready
Configure arena geometry and panel layout for G3-G6 display systems with:
- SVG-based visualization with labeled dimensions
- Support for all panel generations (G3, G4, G4.1, G5, G6, Custom)
- Support for all panel generations (G3, G4, G4.1, G6, Custom)
- Click-to-toggle panels for partial arena designs
- Angle offset control for arena rotation
- Export PDF for documentation
Expand All @@ -37,7 +37,7 @@ Configure arena geometry and panel layout for G3-G6 display systems with:
### Arena 3D Viewer ✅ Ready
Interactive 3D visualization of arena configurations with:
- Three.js-based 3D rendering with orbit controls
- Accurate LED visualization (rotated rectangles for G4.1/G5/G6, circles for G3/G4)
- Accurate LED visualization (rotated rectangles for G4.1/G6, circles for G3/G4)
- Pattern visualization: All On, Grating (square wave), Sine wave
- Animated pattern rotation with efficient color-only updates
- Standard view presets (top-down, cardinal directions, fly view from center)
Expand Down
15 changes: 4 additions & 11 deletions arena_3d_viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ <h1>Arena 3D Viewer</h1>
<button class="gen-tab" data-gen="G3">G3</button>
<button class="gen-tab" data-gen="G4">G4</button>
<button class="gen-tab" data-gen="G4.1">G4.1</button>
<button class="gen-tab" data-gen="G5">G5</button>
<button class="gen-tab active" data-gen="G6">G6</button>
</div>
</div>
Expand Down Expand Up @@ -607,13 +606,7 @@ <h3>View Controls</h3>
pixels_horizontal: 16,
pixels_vertical: 16
},
'G5': {
panel_width_mm: 40,
panel_height_mm: 40,
panel_depth_mm: 6.35,
pixels_horizontal: 20,
pixels_vertical: 20
},

'G6': {
panel_width_mm: 45.4,
panel_height_mm: 45.4,
Expand Down Expand Up @@ -1357,8 +1350,8 @@ <h3>View Controls</h3>
const ledSpacingY = height / totalPixelsV;
const ledSize = Math.min(ledSpacingX, ledSpacingY) * 0.35; // LED size relative to spacing

// Check if this panel type uses rotated rectangle LEDs (G4.1, G5, G6)
const useRotatedRectLEDs = ['G4.1', 'G5', 'G6'].includes(state.panelType);
// Check if this panel type uses rotated rectangle LEDs (G4.1, G6)
const useRotatedRectLEDs = ['G4.1', 'G6'].includes(state.panelType);

// 0604 LED package: 0.6mm x 0.4mm = 1.5:1 aspect ratio
// The LED is a rectangle rotated 45 degrees on the panel
Expand All @@ -1375,7 +1368,7 @@ <h3>View Controls</h3>
const localZ = panelThickness + 0.001; // just in front of border

if (useRotatedRectLEDs) {
// Create rectangle rotated 45 degrees for G4.1, G5, G6
// Create rectangle rotated 45 degrees for G4.1, G6
// 0604 package: 0.6mm x 0.4mm = 1.5:1 aspect ratio
const baseSize = ledSize * 0.5;
const rectW = baseSize; // half-width of rectangle
Expand Down
10 changes: 1 addition & 9 deletions arena_editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@ <h2>Configuration</h2>
<button class="gen-tab" data-gen="G3">G3</button>
<button class="gen-tab" data-gen="G4">G4</button>
<button class="gen-tab" data-gen="G4.1">G4.1</button>
<button class="gen-tab" data-gen="G5">G5</button>
<button class="gen-tab active" data-gen="G6">G6</button>
<button class="gen-tab" data-gen="Custom">Custom</button>
</div>
Expand Down Expand Up @@ -622,14 +621,7 @@ <h3>Custom Panel Configuration</h3>
pin_dist_mm: 4.57,
pin_config: 'single'
},
'G5': {
panel_width_mm: 40,
panel_depth_mm: 6.35,
pixels_per_panel: 20,
num_pins: 10,
pin_dist_mm: 4.57,
pin_config: 'single'
},

'G6': {
panel_width_mm: 45.4,
panel_depth_mm: 3.45,
Expand Down
23 changes: 0 additions & 23 deletions data/reference_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,6 @@
"panel_depth_mm":6.35,
"pixels_per_panel":16
},{
"panel_type":"G5",
"num_panels":8,
"panels_installed":[1,2,3,4,5,6,7,8],
"c_radius_inches":1.9009555609236968,
"c_radius_mm":48.284271247461895,
"back_c_radius_inches":2.1509555609236966,
"back_c_radius_mm":54.634271247461889,
"degs_per_pixel":2.25,
"azimuthal_pixels":160,
"azimuth_coverage":360,
"azimuth_gap":0,
"panel_width_mm":40,
"panel_depth_mm":6.35,
"pixels_per_panel":20
},{
"panel_type":"G6",
"num_panels":8,
"panels_installed":[1,2,3,4,5,6,7,8],
Expand Down Expand Up @@ -194,14 +179,6 @@
"pin_dist_mm":4.57,
"pin_config":"single"
},
"G5":{
"panel_width_mm":40,
"panel_depth_mm":6.35,
"pixels_per_panel":20,
"num_pins":10,
"pin_dist_mm":4.57,
"pin_config":"single"
},
"G6":{
"panel_width_mm":45.4,
"panel_depth_mm":3.45,
Expand Down
Loading