@whykusanagi/corrupted-theme 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -443,7 +443,7 @@ See `examples/basic/` for SFW examples and `examples/advanced/nsfw-corruption.ht
443
443
 
444
444
  ## Interactive Components
445
445
 
446
- v0.1.7 adds JS-driven interactive components that self-initialize via `data-ct-*` attributes. Import the components module and everything wires up automatically on `DOMContentLoaded`.
446
+ v0.1.8 adds JS-driven interactive components that self-initialize via `data-ct-*` attributes. Import the components module and everything wires up automatically on `DOMContentLoaded`.
447
447
 
448
448
  ```html
449
449
  <script type="module">
@@ -104,7 +104,7 @@ Increment when you make **backward-compatible bug fixes**:
104
104
  - **Public API**: Not stable yet
105
105
  - **Use case**: Early adopters, experimentation
106
106
 
107
- **Current Celeste version**: `0.1.7` (pre-1.0.0)
107
+ **Current Celeste version**: `0.1.8` (pre-1.0.0)
108
108
 
109
109
  ### Post-1.0.0 (Stable)
110
110
 
@@ -441,7 +441,7 @@ npm view @whykusanagi/corrupted-theme version
441
441
 
442
442
  **Last Updated**: 2025-12-13
443
443
  **Version**: 1.0.0
444
- **Current Celeste Version**: 0.1.7
444
+ **Current Celeste Version**: 0.1.8
445
445
  **Versioning Spec**: Semantic Versioning 2.0.0
446
446
  **Maintainer**: Celeste Brand System
447
447
  **Status**: ✅ Active Policy
@@ -1,227 +1,86 @@
1
1
  # Version References - Update Checklist
2
2
 
3
- **Purpose**: Complete list of all files containing version numbers that must be updated when releasing a new version.
3
+ **Purpose**: Canonical list of every file containing a version number. Update all of these when releasing a new version.
4
4
 
5
- **Current Version**: 0.1.7
5
+ **Current Version**: 0.1.8
6
6
 
7
7
  ---
8
8
 
9
- ## Critical Files (MUST UPDATE)
10
-
11
- ### 1. package.json
12
- **Location**: `/package.json`
13
- **Line**: 3
14
- ```json
15
- "version": "0.1.7"
16
- ```
17
-
18
- ### 2. CHANGELOG.md
19
- **Location**: `/CHANGELOG.md`
20
- **Lines**: 24 (header), 116-117 (references)
21
- - Add new version header: `## [0.1.X] - YYYY-MM-DD`
22
- - Update component counts if applicable
23
- - List all changes under new version
24
-
25
- ---
26
-
27
- ## Documentation Files (SHOULD UPDATE)
28
-
29
- ### 3. NPM_PACKAGE.md
30
- **Location**: `/docs/platforms/NPM_PACKAGE.md`
31
- **Lines to update**:
32
- - Line 34: Example package.json version
33
- - Line 83: CDN link with version (`@whykusanagi/corrupted-theme@0.1.X`)
34
- - Line 667: Version example
35
- - Line 677: Version history table (current stable release)
36
- - Line 694: Install command example
37
- - Line 852: Package version footer
38
-
39
- ### 4. VERSION_MANAGEMENT.md
40
- **Location**: `/docs/governance/VERSION_MANAGEMENT.md`
41
- **Lines to update**:
42
- - Line 107: Current Celeste version
43
- - Line 183: Example changelog header
44
- - Line 444: Current Celeste version footer
45
-
46
- ### 5. DESIGN_SYSTEM_GOVERNANCE.md
47
- **Location**: `/docs/governance/DESIGN_SYSTEM_GOVERNANCE.md`
48
- **Lines**: 223-224, 305
49
- - Version increment examples in tables
50
- - Update "current" version reference
9
+ ## Files That MUST Be Updated on Every Release
10
+
11
+ | # | File | Location(s) | What to change |
12
+ |---|------|-------------|----------------|
13
+ | 1 | `package.json` | line 3 | `"version": "0.1.8"` |
14
+ | 2 | `package-lock.json` | lines 3 and 9 | `"version": "0.1.8"` (both occurrences) |
15
+ | 3 | `CHANGELOG.md` | top of file | Add new `## [0.1.X] - YYYY-MM-DD` section |
16
+ | 4 | `README.md` | search for old ver | Any install/usage examples with pinned version |
17
+ | 5 | `index.html` *(root)* | lines 476, 725 | Hero badge `v0.1.X` and footer `Corrupted Theme v0.1.X` |
18
+ | 6 | `examples/index.html` | lines 496, 779 | Hero badge and footer |
19
+ | 7 | `examples/showcase-complete.html` | lines 1700, 1923 | Footer + toast `Welcome to Corrupted Theme v0.1.X!` |
20
+ | 8 | `examples/showcase.html` | line 468 | Footer |
21
+ | 9 | `examples/button.html` | line 444 | Footer |
22
+ | 10 | `examples/card.html` | line 687 | Footer |
23
+ | 11 | `examples/form.html` | line 556 | Footer |
24
+ | 12 | `examples/layout.html` | line 517 | Footer |
25
+ | 13 | `examples/nikke-team-builder.html` | line 569 | Footer |
26
+
27
+ ## Files That SHOULD Be Updated (docs/governance)
28
+
29
+ | # | File | Location(s) | What to change |
30
+ |---|------|-------------|----------------|
31
+ | 14 | `docs/governance/VERSION_REFERENCES.md` *(this file)* | line 5 | `**Current Version**: X.Y.Z` |
32
+ | 15 | `docs/governance/VERSION_MANAGEMENT.md` | lines 107, 444 | `Current Celeste version: X.Y.Z` |
33
+ | 16 | `docs/platforms/NPM_PACKAGE.md` | lines 34, 83, 667, 675–676 (table), 695, 853 | CDN link, install example, semver example, version table (add new row at top), footer |
51
34
 
52
35
  ---
53
36
 
54
- ## Example/Showcase Files (SHOULD UPDATE)
55
-
56
- ### 6. index.html (Main Landing)
57
- **Location**: `/examples/index.html`
58
- **Lines to update**:
59
- - Line 476: Hero version badge `v0.1.X — Production Ready`
60
- - Line 725: Footer version `Corrupted Theme v0.1.X`
61
-
62
- ### 7. showcase-complete.html
63
- **Location**: `/examples/showcase-complete.html`
64
- **Lines to update**:
65
- - Line 1135: "NEW v0.1.7" badge (keep for current release, change to version number after)
66
- - Line 1317: "NEW v0.1.7" badge (keep for current release, change to version number after)
67
- - Line 1697: Footer version `v0.1.X`
68
- - Line 1835: Comment `<!-- NEW v0.1.7: ... -->`
69
- - Line 1922: Toast message `Welcome to Corrupted Theme v0.1.X!`
70
-
71
- ### 8. Other Example Pages
72
- **Location**: `/examples/*.html`
73
- **Files**: showcase.html, form.html, layout.html, card.html, button.html, nikke-team-builder.html
74
-
75
- All have footer version references like:
76
- ```html
77
- <p>... • Corrupted Theme v0.1.0</p>
78
- ```
79
-
80
- **Update these to current version** (updated to v0.1.7 as of 2026-02-09)
81
-
82
- ---
83
-
84
- ## Version Bump Procedure
85
-
86
- When releasing a new version (e.g., 0.1.7 → 0.1.7):
87
-
88
- ### Step 1: Core Files
89
- ```bash
90
- # 1. Update package.json
91
- npm version patch # or minor, or major
92
-
93
- # 2. Update CHANGELOG.md
94
- # - Add new version header
95
- # - List all changes
96
- ```
97
-
98
- ### Step 2: Documentation
99
- ```bash
100
- # 3. Update NPM_PACKAGE.md
101
- # - Search and replace version numbers
102
- # - Update version history table
103
-
104
- # 4. Update VERSION_MANAGEMENT.md
105
- # - Update "Current Celeste version"
106
-
107
- # 5. Update DESIGN_SYSTEM_GOVERNANCE.md
108
- # - Update version examples if needed
109
- ```
110
-
111
- ### Step 3: Examples
112
- ```bash
113
- # 6. Update index.html
114
- # - Hero badge
115
- # - Footer
116
-
117
- # 7. Update showcase-complete.html
118
- # - Change "NEW v0.1.7" badges to just version number
119
- # - Update footer
120
- # - Update toast message
37
+ ## What to Leave Alone
121
38
 
122
- # 8. Update all other example pages
123
- # - Bulk find/replace footer versions
124
- ```
125
-
126
- ### Step 4: Search & Verify
127
- ```bash
128
- # Search for old version references
129
- grep -rn "v0\.1\.[0-9]" . --include="*.html" --include="*.md" --include="*.json"
130
-
131
- # Verify package.json
132
- cat package.json | grep version
133
-
134
- # Verify CHANGELOG.md has new entry
135
- head -30 CHANGELOG.md
136
- ```
39
+ - **`CHANGELOG.md`** historical entries (0.1.7, 0.1.6, etc.) — these are release history, never change them
40
+ - **`docs/governance/DESIGN_SYSTEM_GOVERNANCE.md`** — uses version numbers as abstract examples in tables/diagrams, not live references
41
+ - **`docs/planning/*.md`** — archived planning docs with old version references, leave as historical record
42
+ - **`docs/platforms/NPM_PACKAGE.md`** version history table rows other than the current one
43
+ - **HTML comments** like `<!-- NEW v0.1.4 -->` in showcase pages — these record when a feature was added
137
44
 
138
45
  ---
139
46
 
140
- ## Automated Version Bump Script (Future)
141
-
142
- Create `/scripts/bump-version.sh`:
47
+ ## One-Command Version Bump
143
48
 
144
49
  ```bash
145
- #!/bin/bash
146
- # Usage: ./scripts/bump-version.sh 0.1.7
147
-
148
- NEW_VERSION=$1
149
- OLD_VERSION=$(node -p "require('./package.json').version")
50
+ NEW=0.1.9
51
+ OLD=0.1.8
150
52
 
151
- echo "Bumping version: $OLD_VERSION $NEW_VERSION"
53
+ # 1. Core package files (auto-syncs both package.json and package-lock.json)
54
+ npm version patch --no-git-tag-version # or minor / major
152
55
 
153
- # Update package.json
154
- npm version $NEW_VERSION --no-git-tag-version
56
+ # 2. All HTML example footers + badges
57
+ find . -name "*.html" ! -path "*/node_modules/*" \
58
+ -exec sed -i '' "s/v${OLD}/v${NEW}/g" {} +
155
59
 
156
- # Update all HTML files
157
- find examples -name "*.html" -exec sed -i '' "s/v$OLD_VERSION/v$NEW_VERSION/g" {} +
60
+ # 3. Docs
61
+ sed -i '' "s/${OLD}/${NEW}/g" \
62
+ docs/governance/VERSION_REFERENCES.md \
63
+ docs/governance/VERSION_MANAGEMENT.md \
64
+ docs/platforms/NPM_PACKAGE.md
158
65
 
159
- # Update documentation
160
- find docs -name "*.md" -exec sed -i '' "s/$OLD_VERSION/$NEW_VERSION/g" {} +
66
+ # 4. Add 0.1.9 row to NPM_PACKAGE.md version table manually
161
67
 
162
- echo "✓ Version bumped to $NEW_VERSION"
163
- echo " Don't forget to update CHANGELOG.md manually!"
68
+ # 5. Verify nothing left
69
+ grep -rn "${OLD}" . --include="*.html" --include="*.md" --include="*.json" \
70
+ | grep -v node_modules | grep -v ".git" | grep -v CHANGELOG.md
164
71
  ```
165
72
 
166
73
  ---
167
74
 
168
- ## Version Number Patterns to Search For
169
-
170
- When updating, search for these patterns:
75
+ ## Verify Current State
171
76
 
172
77
  ```bash
173
- # Version with v prefix
174
- "v0.1.7"
175
- "v0\.1\.3"
176
-
177
- # Version without v prefix
178
- "0.1.7"
179
- "0\.1\.3"
180
-
181
- # NPM package version
182
- "@whykusanagi/corrupted-theme@0.1.7"
183
-
184
- # NEW badge references
185
- "NEW v0.1.7"
186
- "NEW in v0.1.7"
78
+ # Quick check should only show 0.1.8 in live files, old versions only in CHANGELOG
79
+ grep -rn "0\.1\.[0-9]" . --include="*.html" --include="*.json" \
80
+ | grep -v node_modules | grep -v ".git"
187
81
  ```
188
82
 
189
83
  ---
190
84
 
191
- ## Current Version Discrepancies (As of 2026-02-09)
192
-
193
- **All version references have been synchronized to v0.1.7.**
194
-
195
- No outstanding discrepancies. All example footers, documentation files, and package files
196
- are consistent.
197
-
198
- ### Note: package-lock.json
199
-
200
- `package-lock.json` is listed in `.gitignore` and is not tracked by git. This is
201
- intentional — npm recommends not committing lockfiles for library packages (only for
202
- applications). CLAUDE.md section 5 references syncing `package-lock.json`, but since
203
- it's local-only, version sync is handled automatically by `npm version` and does not
204
- require manual updates.
205
-
206
- ---
207
-
208
- ## Next Version Release Checklist
209
-
210
- When preparing the next version:
211
-
212
- - [ ] Update `package.json` version
213
- - [ ] Add CHANGELOG.md entry with release date
214
- - [ ] Update NPM_PACKAGE.md (6 locations)
215
- - [ ] Update VERSION_MANAGEMENT.md (3 locations)
216
- - [ ] Update index.html hero and footer
217
- - [ ] Update showcase-complete.html (footer, toast, badges)
218
- - [ ] Update all example page footers (8 files)
219
- - [ ] Run version search to verify no old references remain
220
- - [ ] Build and test Docker container
221
- - [ ] Git tag release
222
- - [ ] Publish to npm: `npm publish`
223
-
224
- ---
225
-
226
- **Last Updated**: 2026-02-09
227
- **Maintained By**: whykusanagi team
85
+ **Last Updated**: 2026-03-01
86
+ **Maintained By**: whykusanagi
@@ -31,7 +31,7 @@
31
31
  ```json
32
32
  {
33
33
  "name": "@whykusanagi/corrupted-theme",
34
- "version": "0.1.7",
34
+ "version": "0.1.8",
35
35
  "description": "Premium corrupted AI aesthetic with glassmorphism and translation-failure linguistics",
36
36
  "author": "Kusanagi <you@example.com>",
37
37
  "license": "MIT",
@@ -80,7 +80,7 @@ pnpm add @whykusanagi/corrupted-theme
80
80
 
81
81
  ```html
82
82
  <!-- Full theme (8.2KB gzipped) -->
83
- <link rel="stylesheet" href="https://unpkg.com/@whykusanagi/corrupted-theme@0.1.7/dist/theme.css">
83
+ <link rel="stylesheet" href="https://unpkg.com/@whykusanagi/corrupted-theme@0.1.8/dist/theme.css">
84
84
  ```
85
85
 
86
86
  ### Local Development
@@ -664,7 +664,7 @@ The package follows [Semantic Versioning 2.0.0](https://semver.org/):
664
664
  ```
665
665
  MAJOR.MINOR.PATCH
666
666
 
667
- Example: 0.1.7
667
+ Example: 0.1.8
668
668
  │ │ └─ Patch: Bug fixes (backward compatible)
669
669
  │ └─── Minor: New features (backward compatible)
670
670
  └───── Major: Breaking changes
@@ -674,7 +674,8 @@ Example: 0.1.7
674
674
 
675
675
  | Version | Date | Changes | Migration |
676
676
  |---------|------|---------|-----------|
677
- | **0.1.7** | 2026-02-07 | Security, lifecycle, new components | N/A |
677
+ | **0.1.8** | 2026-03-01 | GLSL vortex, Canvas particles, new JS components | N/A |
678
+ | 0.1.7 | 2026-02-07 | Security, lifecycle, new components | N/A |
678
679
  | 0.1.6 | 2026-01-15 | Package cleanup | N/A |
679
680
  | 0.1.4 | 2025-12-10 | Character corruption, components | N/A |
680
681
  | 0.1.0 | 2025-10-01 | Initial public release | N/A |
@@ -692,7 +693,7 @@ npm update @whykusanagi/corrupted-theme
692
693
  npm install @whykusanagi/corrupted-theme@^0.2.0
693
694
 
694
695
  # Update to specific version
695
- npm install @whykusanagi/corrupted-theme@0.1.7
696
+ npm install @whykusanagi/corrupted-theme@0.1.8
696
697
 
697
698
  # Update to latest (including major - may have breaking changes)
698
699
  npm install @whykusanagi/corrupted-theme@latest
@@ -850,6 +851,6 @@ import '@whykusanagi/corrupted-theme/src/css/components.css';
850
851
 
851
852
  **Last Updated**: 2025-12-13
852
853
  **Version**: 1.0.0
853
- **Package Version**: 0.1.7
854
+ **Package Version**: 0.1.8
854
855
  **Maintainer**: Celeste Brand System
855
856
  **Status**: ✅ Production Ready
@@ -0,0 +1,298 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>GLSL Vortex - Corrupted Theme</title>
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
8
+ <link rel="stylesheet" href="../../src/css/theme.css">
9
+ <style>
10
+ body { margin: 0; background: #000; overflow-x: hidden; }
11
+
12
+ .vortex-wrap {
13
+ position: relative;
14
+ width: 100%;
15
+ height: 100vh;
16
+ }
17
+
18
+ #vortex-canvas {
19
+ display: block;
20
+ width: 100%;
21
+ height: 100%;
22
+ }
23
+
24
+ .overlay {
25
+ position: absolute;
26
+ inset: 0;
27
+ display: flex;
28
+ flex-direction: column;
29
+ align-items: center;
30
+ justify-content: flex-end;
31
+ padding: var(--spacing-2xl);
32
+ pointer-events: none;
33
+ }
34
+
35
+ .controls-panel {
36
+ pointer-events: all;
37
+ background: var(--glass);
38
+ border: 1px solid var(--border);
39
+ border-radius: var(--radius-lg);
40
+ padding: var(--spacing-lg);
41
+ width: 100%;
42
+ max-width: 480px;
43
+ backdrop-filter: blur(12px);
44
+ }
45
+
46
+ .controls-panel h2 {
47
+ color: var(--accent);
48
+ margin: 0 0 var(--spacing-md);
49
+ font-size: 1rem;
50
+ text-transform: uppercase;
51
+ letter-spacing: 0.1em;
52
+ }
53
+
54
+ .control-row {
55
+ display: flex;
56
+ align-items: center;
57
+ gap: var(--spacing-md);
58
+ margin-bottom: var(--spacing-sm);
59
+ }
60
+
61
+ .control-row label {
62
+ color: var(--text-muted);
63
+ font-size: 0.8rem;
64
+ width: 120px;
65
+ flex-shrink: 0;
66
+ }
67
+
68
+ .control-row input[type="range"] {
69
+ flex: 1;
70
+ accent-color: var(--corrupted-magenta);
71
+ }
72
+
73
+ .control-row .val {
74
+ color: var(--corrupted-cyan);
75
+ font-size: 0.8rem;
76
+ width: 40px;
77
+ text-align: right;
78
+ }
79
+
80
+ .hue-row {
81
+ border-top: 1px solid var(--border);
82
+ margin-top: var(--spacing-sm);
83
+ padding-top: var(--spacing-sm);
84
+ }
85
+
86
+ .hue-toggle {
87
+ display: flex;
88
+ gap: var(--spacing-sm);
89
+ margin-bottom: var(--spacing-sm);
90
+ }
91
+
92
+ .hue-toggle button {
93
+ flex: 1;
94
+ padding: 4px 8px;
95
+ font-size: 0.75rem;
96
+ border-radius: var(--radius-sm);
97
+ cursor: pointer;
98
+ border: 1px solid var(--border);
99
+ background: transparent;
100
+ color: var(--text-muted);
101
+ transition: all 0.2s;
102
+ }
103
+
104
+ .hue-toggle button.active {
105
+ background: var(--corrupted-magenta);
106
+ border-color: var(--corrupted-magenta);
107
+ color: #000;
108
+ }
109
+
110
+ .code-block {
111
+ margin-top: var(--spacing-2xl);
112
+ max-width: 700px;
113
+ width: 100%;
114
+ background: var(--glass);
115
+ border: 1px solid var(--border);
116
+ border-radius: var(--radius-lg);
117
+ padding: var(--spacing-lg);
118
+ }
119
+
120
+ .code-block h3 {
121
+ color: var(--accent);
122
+ font-size: 0.85rem;
123
+ text-transform: uppercase;
124
+ letter-spacing: 0.1em;
125
+ margin: 0 0 var(--spacing-md);
126
+ }
127
+
128
+ .code-block pre {
129
+ margin: 0;
130
+ overflow-x: auto;
131
+ font-size: 0.78rem;
132
+ color: var(--corrupted-cyan);
133
+ line-height: 1.5;
134
+ }
135
+ </style>
136
+ </head>
137
+ <body>
138
+
139
+ <!-- Navigation -->
140
+ <nav class="navbar">
141
+ <div class="navbar-content">
142
+ <a href="../index.html" class="navbar-logo"><i class="fas fa-palette"></i> Corrupted Theme</a>
143
+ <ul class="navbar-links">
144
+ <li><a href="../index.html"><i class="fas fa-home"></i> Home</a></li>
145
+ <li class="has-submenu">
146
+ <a href="../showcase-complete.html">
147
+ <i class="fas fa-cube"></i> Components
148
+ <i class="fas fa-chevron-down" style="font-size: 0.7em; margin-left: 4px;"></i>
149
+ </a>
150
+ <div class="submenu">
151
+ <a href="../showcase-complete.html"><i class="fas fa-layer-group"></i> All Components</a>
152
+ <a href="../showcase-complete.html#glass"><i class="fas fa-square"></i> Glass</a>
153
+ <a href="../showcase-complete.html#components"><i class="fas fa-shapes"></i> Standard</a>
154
+ <a href="../showcase-complete.html#navigation"><i class="fas fa-bars"></i> Navigation</a>
155
+ <a href="../showcase-complete.html#api-docs"><i class="fas fa-code"></i> API Docs</a>
156
+ </div>
157
+ </li>
158
+ <li class="has-submenu">
159
+ <a href="../extensions-showcase.html" class="active">
160
+ <i class="fas fa-puzzle-piece"></i> Extensions
161
+ <i class="fas fa-chevron-down" style="font-size: 0.7em; margin-left: 4px;"></i>
162
+ </a>
163
+ <div class="submenu">
164
+ <a href="../extensions-showcase.html#gallery"><i class="fas fa-images"></i> Gallery</a>
165
+ <a href="../extensions-showcase.html#lightbox"><i class="fas fa-expand"></i> Lightbox</a>
166
+ <a href="../extensions-showcase.html#nsfw"><i class="fas fa-eye-slash"></i> NSFW Blur</a>
167
+ <a href="../extensions-showcase.html#social"><i class="fas fa-share-alt"></i> Social Links</a>
168
+ <a href="../extensions-showcase.html#countdown"><i class="fas fa-hourglass-half"></i> Countdown</a>
169
+ <a href="glsl-vortex.html" class="active"><i class="fas fa-hurricane"></i> GLSL Vortex</a>
170
+ <a href="particles-bg.html"><i class="fas fa-atom"></i> Particles BG</a>
171
+ </div>
172
+ </li>
173
+ <li class="has-submenu">
174
+ <a href="#">
175
+ <i class="fas fa-flask"></i> Examples
176
+ <i class="fas fa-chevron-down" style="font-size: 0.7em; margin-left: 4px;"></i>
177
+ </a>
178
+ <div class="submenu">
179
+ <a href="../nikke-team-builder.html"><i class="fas fa-users"></i> Nikke Team Builder</a>
180
+ <a href="../button.html"><i class="fas fa-hand-pointer"></i> Buttons</a>
181
+ <a href="../card.html"><i class="fas fa-square"></i> Cards</a>
182
+ <a href="../form.html"><i class="fas fa-edit"></i> Forms</a>
183
+ <a href="../layout.html"><i class="fas fa-columns"></i> Layouts</a>
184
+ <a href="../basic/corrupted-text.html"><i class="fas fa-terminal"></i> Character Corruption</a>
185
+ <a href="../basic/typing-animation.html"><i class="fas fa-keyboard"></i> Buffer Corruption</a>
186
+ <a href="nsfw-corruption.html"><i class="fas fa-exclamation-triangle"></i> NSFW (18+)</a>
187
+ </div>
188
+ </li>
189
+ <li><a href="../showcase-complete.html"><i class="fas fa-book"></i> Docs</a></li>
190
+ </ul>
191
+ </div>
192
+ </nav>
193
+
194
+ <!-- Full-screen vortex -->
195
+ <div class="vortex-wrap">
196
+ <canvas id="vortex-canvas"></canvas>
197
+ <div class="overlay">
198
+
199
+ <!-- Controls -->
200
+ <div class="controls-panel">
201
+ <h2><i class="fas fa-sliders-h"></i> Vortex Controls</h2>
202
+
203
+ <div class="control-row">
204
+ <label>Speed</label>
205
+ <input type="range" id="ctrl-speed" min="0.1" max="3.0" step="0.05" value="1.0">
206
+ <span class="val" id="val-speed">1.00</span>
207
+ </div>
208
+
209
+ <div class="control-row">
210
+ <label>Intensity</label>
211
+ <input type="range" id="ctrl-intensity" min="0.1" max="3.0" step="0.05" value="1.0">
212
+ <span class="val" id="val-intensity">1.00</span>
213
+ </div>
214
+
215
+ <div class="control-row">
216
+ <label>Rotation Rate</label>
217
+ <input type="range" id="ctrl-rotation" min="0.0" max="5.0" step="0.05" value="1.0">
218
+ <span class="val" id="val-rotation">1.00</span>
219
+ </div>
220
+
221
+ <div class="hue-row">
222
+ <div class="hue-toggle">
223
+ <button id="btn-quasar" class="active">Quasar (multi-color)</button>
224
+ <button id="btn-fixed">Fixed Hue</button>
225
+ </div>
226
+ <div class="control-row" id="hue-slider-row" style="display:none;">
227
+ <label>Hue</label>
228
+ <input type="range" id="ctrl-hue" min="0.0" max="1.0" step="0.01" value="0.6">
229
+ <span class="val" id="val-hue">0.60</span>
230
+ </div>
231
+ </div>
232
+ </div>
233
+
234
+ <!-- Code snippet -->
235
+ <div class="code-block">
236
+ <h3>Minimal Usage</h3>
237
+ <pre><code>&lt;canvas id="my-canvas" style="width:100%;height:400px;"&gt;&lt;/canvas&gt;
238
+ &lt;script src="src/lib/corrupted-vortex.js"&gt;&lt;/script&gt;
239
+ &lt;script&gt;
240
+ const vortex = new CorruptedVortex(
241
+ document.getElementById('my-canvas'),
242
+ {
243
+ speed: 1.0, // 0.1&#x2013;3.0
244
+ intensity: 1.0, // 0.1&#x2013;3.0
245
+ rotationRate: 1.0, // 0.0&#x2013;5.0
246
+ hue: null, // null = quasar; 0.0&#x2013;1.0 = fixed hue
247
+ }
248
+ );
249
+ // vortex.stop();
250
+ // vortex.start();
251
+ // vortex.destroy();
252
+ &lt;/script&gt;</code></pre>
253
+ </div>
254
+
255
+ </div><!-- /overlay -->
256
+ </div><!-- /vortex-wrap -->
257
+
258
+ <script src="../../src/lib/corrupted-vortex.js"></script>
259
+ <script>
260
+ const canvas = document.getElementById('vortex-canvas');
261
+ const vortex = new CorruptedVortex(canvas);
262
+
263
+ function bind(sliderId, valId, prop) {
264
+ const slider = document.getElementById(sliderId);
265
+ const display = document.getElementById(valId);
266
+ slider.addEventListener('input', () => {
267
+ const v = parseFloat(slider.value);
268
+ vortex.options[prop] = v;
269
+ display.textContent = v.toFixed(2);
270
+ });
271
+ }
272
+
273
+ bind('ctrl-speed', 'val-speed', 'speed');
274
+ bind('ctrl-intensity','val-intensity','intensity');
275
+ bind('ctrl-rotation', 'val-rotation', 'rotationRate');
276
+
277
+ document.getElementById('ctrl-hue').addEventListener('input', function() {
278
+ vortex.options.hue = parseFloat(this.value);
279
+ document.getElementById('val-hue').textContent = parseFloat(this.value).toFixed(2);
280
+ });
281
+
282
+ document.getElementById('btn-quasar').addEventListener('click', () => {
283
+ vortex.options.hue = null;
284
+ document.getElementById('btn-quasar').classList.add('active');
285
+ document.getElementById('btn-fixed').classList.remove('active');
286
+ document.getElementById('hue-slider-row').style.display = 'none';
287
+ });
288
+
289
+ document.getElementById('btn-fixed').addEventListener('click', () => {
290
+ const hue = parseFloat(document.getElementById('ctrl-hue').value);
291
+ vortex.options.hue = hue;
292
+ document.getElementById('btn-fixed').classList.add('active');
293
+ document.getElementById('btn-quasar').classList.remove('active');
294
+ document.getElementById('hue-slider-row').style.display = 'flex';
295
+ });
296
+ </script>
297
+ </body>
298
+ </html>