nova64 0.2.5 → 0.2.6
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 +25 -8
- package/bin/nova64.js +165 -0
- package/dist/assets/console-CY_kygm3.js +14 -0
- package/dist/assets/console-CY_kygm3.js.map +1 -0
- package/dist/assets/main-l0sNRNKZ.js.map +1 -0
- package/dist/assets/sky/studio/nx.png +0 -0
- package/dist/assets/sky/studio/ny.png +0 -0
- package/dist/assets/sky/studio/nz.png +0 -0
- package/dist/assets/sky/studio/px.png +0 -0
- package/dist/assets/sky/studio/py.png +0 -0
- package/dist/assets/sky/studio/pz.png +0 -0
- package/dist/assets/vanilla-Dcuy32gi.js +2 -0
- package/dist/assets/vanilla-Dcuy32gi.js.map +1 -0
- package/dist/console.html +899 -0
- package/dist/docs/BENCHMARK.md +77 -0
- package/dist/docs/CHEATSHEET.md +255 -0
- package/dist/docs/EFFECTS_API_GUIDE.md +577 -0
- package/dist/docs/EFFECTS_QUICK_REFERENCE.md +331 -0
- package/dist/docs/FONT_CHARACTER_REFERENCE.md +219 -0
- package/dist/docs/FREE_GLB_ASSETS.md +330 -0
- package/dist/docs/FULLSCREEN_BUTTON_FEATURE.md +296 -0
- package/dist/docs/GAMEPAD_SUPPORT.md +348 -0
- package/dist/docs/GAME_IMPROVEMENTS.md +278 -0
- package/dist/docs/GAME_QUALITY_STATUS.md +300 -0
- package/dist/docs/MIGRATION_GUIDE.md +553 -0
- package/dist/docs/NOVA64_3D_API.md +356 -0
- package/dist/docs/NOVA64_API_REFERENCE.md +1406 -0
- package/dist/docs/NOVA64_UI_API.md +503 -0
- package/dist/docs/UI_SYSTEM_SUMMARY.md +445 -0
- package/dist/docs/VOXEL_ENGINE_GUIDE.md +662 -0
- package/dist/docs/VOXEL_QUICK_REFERENCE.md +386 -0
- package/dist/docs/api-3d.html +750 -0
- package/dist/docs/api-effects.html +385 -0
- package/dist/docs/api-improvements.md +121 -0
- package/dist/docs/api-skybox.html +407 -0
- package/dist/docs/api-sprites.html +321 -0
- package/dist/docs/api-voxel.html +337 -0
- package/dist/docs/api.html +543 -0
- package/dist/docs/assets.html +306 -0
- package/dist/docs/audio.html +340 -0
- package/dist/docs/blogs.html +286 -0
- package/dist/docs/collision.html +316 -0
- package/dist/docs/console.html +247 -0
- package/dist/docs/editor.html +297 -0
- package/dist/docs/font.html +247 -0
- package/dist/docs/framebuffer.html +247 -0
- package/dist/docs/fullscreen-button.html +297 -0
- package/dist/docs/gpu-systems.html +247 -0
- package/dist/docs/index.html +580 -0
- package/dist/docs/input.html +491 -0
- package/dist/docs/physics.html +311 -0
- package/dist/docs/screens.html +311 -0
- package/dist/docs/storage.html +311 -0
- package/dist/docs/textinput.html +332 -0
- package/dist/docs/ui.html +488 -0
- package/dist/examples/3d-advanced/code.js +695 -0
- package/dist/examples/adventure-comic-3d/code.js +342 -0
- package/dist/examples/audio-lab/code.js +150 -0
- package/dist/examples/boids-flocking/code.js +270 -0
- package/dist/examples/crystal-cathedral-3d/code.js +706 -0
- package/dist/examples/cyberpunk-city-3d/code.js +1383 -0
- package/dist/examples/demoscene/README.md +192 -0
- package/dist/examples/demoscene/code.js +1081 -0
- package/dist/examples/demoscene/meta.json +21 -0
- package/dist/examples/dungeon-crawler-3d/code.js +1117 -0
- package/dist/examples/f-zero-nova-3d/code.js +865 -0
- package/dist/examples/f-zero-nova-3d/code_old.js +1555 -0
- package/dist/examples/fps-demo-3d/code.js +744 -0
- package/dist/examples/game-of-life-3d/code.js +338 -0
- package/dist/examples/generative-art/code.js +632 -0
- package/dist/examples/hello-3d/code.js +325 -0
- package/dist/examples/hello-skybox/code.js +183 -0
- package/dist/examples/hello-world/code.js +19 -0
- package/dist/examples/input-showcase/code.js +109 -0
- package/dist/examples/instancing-demo/code.js +315 -0
- package/dist/examples/minecraft-demo/code.js +387 -0
- package/dist/examples/model-viewer-3d/code.js +114 -0
- package/dist/examples/mystical-realm-3d/code.js +1203 -0
- package/dist/examples/nature-explorer-3d/code.js +1318 -0
- package/dist/examples/particles-demo/code.js +522 -0
- package/dist/examples/pbr-showcase/code.js +140 -0
- package/dist/examples/physics-demo-3d/code.js +948 -0
- package/dist/examples/screen-demo/code.js +267 -0
- package/dist/examples/shooter-demo-3d/code.js +1286 -0
- package/dist/examples/space-combat-3d/IMPLEMENTATION_SUMMARY.md +109 -0
- package/dist/examples/space-combat-3d/README.md +135 -0
- package/dist/examples/space-combat-3d/code.js +1332 -0
- package/dist/examples/space-harrier-3d/code.js +923 -0
- package/dist/examples/star-fox-nova-3d/code.js +1116 -0
- package/dist/examples/star-fox-nova-3d/code_backup.js +410 -0
- package/dist/examples/star-fox-nova-3d/code_broken.js +1821 -0
- package/dist/examples/storage-quest/code.js +209 -0
- package/dist/examples/strider-demo-3d/IMPROVEMENT_OPTIONS.md +285 -0
- package/dist/examples/strider-demo-3d/cache-test.html +132 -0
- package/dist/examples/strider-demo-3d/code-fixed.js +582 -0
- package/dist/examples/strider-demo-3d/code-old.js +1537 -0
- package/dist/examples/strider-demo-3d/code.js +1462 -0
- package/dist/examples/strider-demo-3d/code.js.bak2 +1169 -0
- package/dist/examples/strider-demo-3d/fix-game.sh +53 -0
- package/dist/examples/super-plumber-64/README.md +128 -0
- package/dist/examples/super-plumber-64/code.js +1185 -0
- package/dist/examples/super-plumber-64/index.html +88 -0
- package/dist/examples/test-2d-overlay/code.js +32 -0
- package/dist/examples/test-font/code.js +51 -0
- package/dist/examples/test-minimal/code.js +21 -0
- package/dist/examples/ui-demo/code.js +306 -0
- package/dist/examples/wing-commander-space/README.md +180 -0
- package/dist/examples/wing-commander-space/code.js +1285 -0
- package/dist/examples/wizardry-3d/CHANGELOG.md +366 -0
- package/dist/examples/wizardry-3d/code.js +3928 -0
- package/dist/index.html +666 -0
- package/dist/os9-shell/assets/index-DIHfrTaW.css +1 -0
- package/dist/os9-shell/assets/index-KchE_ngx.js +483 -0
- package/dist/os9-shell/assets/index-KchE_ngx.js.map +1 -0
- package/dist/os9-shell/index.html +23 -0
- package/dist/os9-shell/nova-icon.svg +12 -0
- package/index.html +6 -1
- package/package.json +37 -32
- package/public/assets/sky/studio/nx.png +0 -0
- package/public/assets/sky/studio/ny.png +0 -0
- package/public/assets/sky/studio/nz.png +0 -0
- package/public/assets/sky/studio/px.png +0 -0
- package/public/assets/sky/studio/py.png +0 -0
- package/public/assets/sky/studio/pz.png +0 -0
- package/public/os9-shell/assets/index-KchE_ngx.js +483 -0
- package/public/os9-shell/assets/index-KchE_ngx.js.map +1 -0
- package/public/os9-shell/index.html +10 -1
- package/runtime/api-2d.js +301 -21
- package/runtime/api-3d/pbr.js +45 -1
- package/runtime/api-3d.js +1 -0
- package/runtime/api-effects.js +90 -3
- package/runtime/api-gameutils.js +476 -0
- package/runtime/api-generative.js +610 -0
- package/runtime/api-skybox.js +54 -0
- package/runtime/api-voxel.js +139 -28
- package/runtime/gpu-threejs.js +13 -9
- package/runtime/ui.js +2 -2
- package/src/main.js +20 -0
- package/public/os9-shell/assets/index-B1Uvacma.js +0 -32825
- package/public/os9-shell/assets/index-B1Uvacma.js.map +0 -1
|
@@ -0,0 +1,385 @@
|
|
|
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>Visual Effects - Nova64 Documentation</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
--bg-primary: #0f1115;
|
|
10
|
+
--bg-secondary: #151822;
|
|
11
|
+
--bg-tertiary: #1a1d2e;
|
|
12
|
+
--text-primary: #dcdfe4;
|
|
13
|
+
--text-secondary: #99a1b3;
|
|
14
|
+
--accent-cyan: #00ffff;
|
|
15
|
+
--accent-magenta: #ff0080;
|
|
16
|
+
--accent-yellow: #ffff00;
|
|
17
|
+
--border: #2a324a;
|
|
18
|
+
--code-bg: #1a1d2e;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
* {
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 0;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
body {
|
|
28
|
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
29
|
+
background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1625 50%, var(--bg-primary) 100%);
|
|
30
|
+
background-attachment: fixed;
|
|
31
|
+
color: var(--text-primary);
|
|
32
|
+
line-height: 1.6;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.container {
|
|
36
|
+
max-width: 1200px;
|
|
37
|
+
margin: 0 auto;
|
|
38
|
+
padding: 20px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
header {
|
|
42
|
+
background: var(--bg-secondary);
|
|
43
|
+
border: 2px solid var(--accent-cyan);
|
|
44
|
+
border-radius: 12px;
|
|
45
|
+
padding: 30px;
|
|
46
|
+
margin-bottom: 30px;
|
|
47
|
+
box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
h1 {
|
|
51
|
+
color: var(--accent-cyan);
|
|
52
|
+
font-size: 2.5em;
|
|
53
|
+
text-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
|
|
54
|
+
margin-bottom: 10px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.back-link {
|
|
58
|
+
display: inline-block;
|
|
59
|
+
color: var(--accent-cyan);
|
|
60
|
+
text-decoration: none;
|
|
61
|
+
margin-bottom: 15px;
|
|
62
|
+
transition: color 0.3s ease;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.back-link:hover {
|
|
66
|
+
color: #33ffff;
|
|
67
|
+
text-decoration: underline;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.subtitle {
|
|
71
|
+
color: var(--text-secondary);
|
|
72
|
+
font-size: 1.1em;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
section {
|
|
76
|
+
background: var(--bg-secondary);
|
|
77
|
+
border-left: 4px solid var(--accent-cyan);
|
|
78
|
+
padding: 25px;
|
|
79
|
+
margin-bottom: 30px;
|
|
80
|
+
border-radius: 8px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
h2 {
|
|
84
|
+
color: var(--accent-magenta);
|
|
85
|
+
font-size: 2em;
|
|
86
|
+
margin-bottom: 15px;
|
|
87
|
+
text-shadow: 0 0 10px rgba(255, 0, 128, 0.5);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
h3 {
|
|
91
|
+
color: var(--accent-cyan);
|
|
92
|
+
font-size: 1.4em;
|
|
93
|
+
margin: 25px 0 15px 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.function {
|
|
97
|
+
background: var(--bg-tertiary);
|
|
98
|
+
border: 1px solid var(--border);
|
|
99
|
+
border-radius: 8px;
|
|
100
|
+
padding: 20px;
|
|
101
|
+
margin-bottom: 25px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.function-sig {
|
|
105
|
+
font-family: 'Courier New', Courier, monospace;
|
|
106
|
+
font-size: 1.2em;
|
|
107
|
+
color: var(--accent-yellow);
|
|
108
|
+
margin-bottom: 15px;
|
|
109
|
+
padding: 10px;
|
|
110
|
+
background: var(--code-bg);
|
|
111
|
+
border-radius: 4px;
|
|
112
|
+
border-left: 3px solid var(--accent-yellow);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.param-list, .return-info {
|
|
116
|
+
margin: 15px 0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.param {
|
|
120
|
+
padding: 8px 0;
|
|
121
|
+
border-bottom: 1px solid var(--border);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.param:last-child {
|
|
125
|
+
border-bottom: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.param-name {
|
|
129
|
+
color: var(--accent-cyan);
|
|
130
|
+
font-weight: bold;
|
|
131
|
+
font-family: 'Courier New', Courier, monospace;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.param-type {
|
|
135
|
+
color: var(--accent-magenta);
|
|
136
|
+
font-style: italic;
|
|
137
|
+
font-size: 0.9em;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.example {
|
|
141
|
+
background: var(--code-bg);
|
|
142
|
+
border: 1px solid var(--border);
|
|
143
|
+
border-radius: 8px;
|
|
144
|
+
padding: 20px;
|
|
145
|
+
margin: 15px 0;
|
|
146
|
+
overflow-x: auto;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.example-title {
|
|
150
|
+
color: var(--accent-yellow);
|
|
151
|
+
font-weight: bold;
|
|
152
|
+
margin-bottom: 10px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
pre {
|
|
156
|
+
margin: 0;
|
|
157
|
+
font-family: 'Courier New', Courier, monospace;
|
|
158
|
+
line-height: 1.5;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
code {
|
|
162
|
+
color: var(--text-primary);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.note {
|
|
166
|
+
background: var(--bg-tertiary);
|
|
167
|
+
border-left: 4px solid var(--accent-yellow);
|
|
168
|
+
padding: 15px;
|
|
169
|
+
margin: 15px 0;
|
|
170
|
+
border-radius: 4px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.note-title {
|
|
174
|
+
color: var(--accent-yellow);
|
|
175
|
+
font-weight: bold;
|
|
176
|
+
margin-bottom: 10px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
table {
|
|
180
|
+
width: 100%;
|
|
181
|
+
border-collapse: collapse;
|
|
182
|
+
margin: 15px 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
th, td {
|
|
186
|
+
padding: 12px;
|
|
187
|
+
text-align: left;
|
|
188
|
+
border: 1px solid var(--border);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
th {
|
|
192
|
+
background: var(--bg-tertiary);
|
|
193
|
+
color: var(--accent-cyan);
|
|
194
|
+
font-weight: bold;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
tr:nth-child(even) {
|
|
198
|
+
background: var(--bg-tertiary);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
footer {
|
|
202
|
+
text-align: center;
|
|
203
|
+
padding: 30px 20px;
|
|
204
|
+
color: var(--text-secondary);
|
|
205
|
+
border-top: 1px solid var(--border);
|
|
206
|
+
margin-top: 40px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
ul {
|
|
210
|
+
margin-left: 20px;
|
|
211
|
+
margin-top: 10px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
li {
|
|
215
|
+
margin: 5px 0;
|
|
216
|
+
}
|
|
217
|
+
</style>
|
|
218
|
+
</head>
|
|
219
|
+
<body>
|
|
220
|
+
<div class="container">
|
|
221
|
+
<a href="index.html" class="back-link">← Back to Documentation Index</a>
|
|
222
|
+
|
|
223
|
+
<header>
|
|
224
|
+
<h1>✨ Visual Effects</h1>
|
|
225
|
+
<p class="subtitle">Post-processing effects like bloom, chromatic aberration, and CRT scanlines</p>
|
|
226
|
+
</header>
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
<section>
|
|
230
|
+
<h2>📋 Overview</h2>
|
|
231
|
+
<p>The Effects API provides stunning post-processing effects to enhance your game's visual style, from retro CRT effects to modern bloom and color grading.</p>
|
|
232
|
+
|
|
233
|
+
<div class="note">
|
|
234
|
+
<div class="note-title">💡 Available Effects</div>
|
|
235
|
+
<ul><li><strong>Bloom</strong> - Glow effect for lights and bright objects</li><li><strong>Chromatic Aberration</strong> - RGB color split for retro/glitch aesthetic</li><li><strong>CRT Scanlines</strong> - Classic monitor effect</li><li><strong>FXAA</strong> - Fast anti-aliasing for smooth edges</li><li><strong>Color Grading</strong> - Adjust brightness, contrast, saturation</li></ul>
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
</section>
|
|
240
|
+
|
|
241
|
+
<section>
|
|
242
|
+
<h2>✨ Effect Functions</h2>
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
<div class="function">
|
|
247
|
+
<div class="function-sig">enableBloom(intensity, threshold)</div>
|
|
248
|
+
<p>Enables bloom glow effect.</p>
|
|
249
|
+
|
|
250
|
+
<div class="param-list">
|
|
251
|
+
|
|
252
|
+
<div class="param">
|
|
253
|
+
<span class="param-name">intensity</span>
|
|
254
|
+
<span class="param-type">number</span> - Bloom strength (0-3, default: 1)
|
|
255
|
+
</div>
|
|
256
|
+
|
|
257
|
+
<div class="param">
|
|
258
|
+
<span class="param-name">threshold</span>
|
|
259
|
+
<span class="param-type">number</span> - Brightness threshold (0-1, default: 0.8)
|
|
260
|
+
</div>
|
|
261
|
+
|
|
262
|
+
</div>
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
<div class="return-info">
|
|
266
|
+
<strong>Returns:</strong> <span class="param-type">void</span> - No return value
|
|
267
|
+
</div>
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
<div class="example">
|
|
271
|
+
<div class="example-title">Example:</div>
|
|
272
|
+
<pre><code>enableBloom(1.5, 0.7); // Strong bloom effect</code></pre>
|
|
273
|
+
</div>
|
|
274
|
+
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
<div class="function">
|
|
278
|
+
<div class="function-sig">enableChromaticAberration(strength)</div>
|
|
279
|
+
<p>Enables RGB color split effect.</p>
|
|
280
|
+
|
|
281
|
+
<div class="param-list">
|
|
282
|
+
|
|
283
|
+
<div class="param">
|
|
284
|
+
<span class="param-name">strength</span>
|
|
285
|
+
<span class="param-type">number</span> - Effect intensity (0-0.05, default: 0.002)
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
</div>
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
<div class="return-info">
|
|
292
|
+
<strong>Returns:</strong> <span class="param-type">void</span> - No return value
|
|
293
|
+
</div>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
<div class="example">
|
|
297
|
+
<div class="example-title">Example:</div>
|
|
298
|
+
<pre><code>enableChromaticAberration(0.005);</code></pre>
|
|
299
|
+
</div>
|
|
300
|
+
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
<div class="function">
|
|
304
|
+
<div class="function-sig">enableGlitch(intensity)</div>
|
|
305
|
+
<p>Enables screen glitch post-processing effect with scanline displacement, RGB channel split, block artifacts, and random color corruption. Great for damage feedback or digital distortion effects.</p>
|
|
306
|
+
|
|
307
|
+
<div class="param-list">
|
|
308
|
+
|
|
309
|
+
<div class="param">
|
|
310
|
+
<span class="param-name">intensity</span>
|
|
311
|
+
<span class="param-type">number</span> - Glitch intensity (0-1, default: 0.5)
|
|
312
|
+
</div>
|
|
313
|
+
|
|
314
|
+
</div>
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
<div class="return-info">
|
|
318
|
+
<strong>Returns:</strong> <span class="param-type">void</span> - No return value
|
|
319
|
+
</div>
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
<div class="example">
|
|
323
|
+
<div class="example-title">Example:</div>
|
|
324
|
+
<pre><code>// Trigger glitch on damage, then fade out
|
|
325
|
+
enableGlitch(0.6);
|
|
326
|
+
// Later, adjust intensity
|
|
327
|
+
setGlitchIntensity(0.2);
|
|
328
|
+
// When done
|
|
329
|
+
disableGlitch();</code></pre>
|
|
330
|
+
</div>
|
|
331
|
+
|
|
332
|
+
</div>
|
|
333
|
+
|
|
334
|
+
<div class="function">
|
|
335
|
+
<div class="function-sig">disableGlitch()</div>
|
|
336
|
+
<p>Disables the screen glitch effect.</p>
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
<div class="function">
|
|
340
|
+
<div class="function-sig">setGlitchIntensity(intensity)</div>
|
|
341
|
+
<p>Adjusts glitch intensity without recreating the shader pass. Useful for smooth fade-out effects.</p>
|
|
342
|
+
|
|
343
|
+
<div class="param-list">
|
|
344
|
+
<div class="param">
|
|
345
|
+
<span class="param-name">intensity</span>
|
|
346
|
+
<span class="param-type">number</span> - Glitch intensity (0-1)
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
</div>
|
|
350
|
+
|
|
351
|
+
<div class="function">
|
|
352
|
+
<div class="function-sig">enableScanlines(intensity)</div>
|
|
353
|
+
<p>Enables CRT scanline effect.</p>
|
|
354
|
+
|
|
355
|
+
<div class="param-list">
|
|
356
|
+
|
|
357
|
+
<div class="param">
|
|
358
|
+
<span class="param-name">intensity</span>
|
|
359
|
+
<span class="param-type">number</span> - Scanline darkness (0-1, default: 0.3)
|
|
360
|
+
</div>
|
|
361
|
+
|
|
362
|
+
</div>
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
<div class="return-info">
|
|
366
|
+
<strong>Returns:</strong> <span class="param-type">void</span> - No return value
|
|
367
|
+
</div>
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
<div class="example">
|
|
371
|
+
<div class="example-title">Example:</div>
|
|
372
|
+
<pre><code>enableScanlines(0.5); // Retro CRT look</code></pre>
|
|
373
|
+
</div>
|
|
374
|
+
|
|
375
|
+
</div>
|
|
376
|
+
|
|
377
|
+
</section>
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
<footer>
|
|
381
|
+
<p>Nova64 Fantasy Console © 2025 | <a href="index.html" style="color: var(--accent-cyan);">Back to Documentation</a></p>
|
|
382
|
+
</footer>
|
|
383
|
+
</div>
|
|
384
|
+
</body>
|
|
385
|
+
</html>
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Nova64 API Improvement Roadmap
|
|
2
|
+
|
|
3
|
+
A prioritized list of bugs, gaps, and enhancements to make the Nova64 API easier for cart authors to use.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🔴 Bugs — Broken Right Now
|
|
8
|
+
|
|
9
|
+
### 1. `createCylinder()` produces a box
|
|
10
|
+
|
|
11
|
+
**File:** `runtime/api-3d.js`
|
|
12
|
+
`createCylinder()` calls `gpu.createCylinderGeometry()` which does not exist on `GpuThreeJS`. It silently falls back to `createBoxGeometry`, so every cylinder is a box.
|
|
13
|
+
**Fix:** Add `createCylinderGeometry(rt, rb, h, segs)` to `gpu-threejs.js` using `THREE.CylinderGeometry`.
|
|
14
|
+
|
|
15
|
+
### 2. Game-studio code uses wrong skybox API names
|
|
16
|
+
|
|
17
|
+
**File:** `src/main.js` lines 318–319
|
|
18
|
+
The `EXECUTE_CODE` message handler passes `skyApi.createSkybox`, `skyApi.updateSkybox`, and `skyApi.removeSkybox` — none of which exist. The actual names are `createSpaceSkybox`, `animateSkybox`, and `clearSkybox`. Skybox is silently broken in the game-studio execution path.
|
|
19
|
+
**Fix:** Update those three references to the correct names.
|
|
20
|
+
|
|
21
|
+
### 3. `galaxySpiral` option is accepted but does nothing
|
|
22
|
+
|
|
23
|
+
**File:** `runtime/api-skybox.js`
|
|
24
|
+
`createSpaceSkybox({ galaxySpiral: true })` destructures the option but never uses it in the geometry.
|
|
25
|
+
**Fix:** Either implement a spiral star-field variant or remove the option entirely to avoid confusion.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 🟡 Missing Features — Hard to Use Without
|
|
30
|
+
|
|
31
|
+
### 4. Skybox rotation speed is hardcoded
|
|
32
|
+
|
|
33
|
+
**File:** `runtime/api-skybox.js`
|
|
34
|
+
`animateSkybox(dt)` always rotates at `dt * 0.01`. There is no way for a cart to slow it down, speed it up, pause it, or reverse it.
|
|
35
|
+
**Add:**
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
setSkyboxSpeed(multiplier); // e.g. 0 = frozen, 2.0 = double speed, -1 = reverse
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 5. Cart authors must manually call `animateSkybox(dt)` every frame
|
|
42
|
+
|
|
43
|
+
**File:** `runtime/api-skybox.js`
|
|
44
|
+
Forgetting to call it in `update()` is the most common skybox mistake. The engine already has a frame loop — skybox animation should be opt-in automatic.
|
|
45
|
+
**Add:**
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
enableSkyboxAutoAnimate((speed = 1.0)); // engine calls animateSkybox internally
|
|
49
|
+
disableSkyboxAutoAnimate();
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 6. Only one skybox type (procedural space)
|
|
53
|
+
|
|
54
|
+
**File:** `runtime/api-skybox.js`
|
|
55
|
+
There is no way to create a daytime sky, sunset, cave, or interior environment. Only the star-field + nebula preset exists.
|
|
56
|
+
**Add:**
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
createGradientSkybox(topColor, bottomColor, horizonColor?)
|
|
60
|
+
// e.g. createGradientSkybox(0x1a6aa8, 0xf4a460) → sunset
|
|
61
|
+
|
|
62
|
+
createSolidSkybox(color)
|
|
63
|
+
// e.g. createSolidSkybox(0x000000) → cave / indoor
|
|
64
|
+
|
|
65
|
+
createImageSkybox([px, nx, py, ny, pz, nz])
|
|
66
|
+
// cube-face textures for full photorealistic environments
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 7. `removeMesh` vs `destroyMesh` mismatch
|
|
70
|
+
|
|
71
|
+
**Files:** `runtime/api-3d.js`, `CLAUDE.md`, demos
|
|
72
|
+
`CLAUDE.md` and several demos reference `removeMesh()` but the exposed function is `destroyMesh()`. This causes silent no-ops when cart authors follow the documentation.
|
|
73
|
+
**Fix:** Add `removeMesh` as an alias for `destroyMesh`, or rename throughout and update docs.
|
|
74
|
+
|
|
75
|
+
### 8. Missing 3D primitives
|
|
76
|
+
|
|
77
|
+
Useful shapes absent from the API:
|
|
78
|
+
|
|
79
|
+
- `createCone(radius, height, color, position, opts)` — projectiles, trees, hat shapes
|
|
80
|
+
- `createCapsule(radius, height, color, position, opts)` — humanoid character bodies
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 🟢 Quality-of-Life Improvements
|
|
85
|
+
|
|
86
|
+
### 9. `printCentered` is not discoverable
|
|
87
|
+
|
|
88
|
+
**File:** `runtime/api-2d.js`
|
|
89
|
+
`printCentered(text, y, color)` exists and works well, but many demos re-implement text centering manually because `print()` dominates examples. The function should be demonstrated in at least one prominent demo.
|
|
90
|
+
|
|
91
|
+
### 10. `createPointLight` signature unclear
|
|
92
|
+
|
|
93
|
+
**File:** `runtime/api-3d.js`
|
|
94
|
+
`createPointLight` exists but its signature (does it take intensity? color? range?) is not documented and not obvious from usage in demos. Add clear JSDoc and a usage example.
|
|
95
|
+
|
|
96
|
+
### 11. `print()` has no size parameter — requires `setFont()` call first
|
|
97
|
+
|
|
98
|
+
Cart authors wanting larger HUD text must call `setFont('large')` before `print()` and reset it after. A convenience overload `print(text, x, y, color, size?)` would reduce boilerplate.
|
|
99
|
+
|
|
100
|
+
### 12. No built-in crosshair / reticle helper
|
|
101
|
+
|
|
102
|
+
Several FPS and space-shooter demos manually draw a crosshair using `line()` or `rect()`. A simple `drawCrosshair(x, y, size, color, style?)` in `api-2d.js` would reduce copy-paste code.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Summary Priority Order
|
|
107
|
+
|
|
108
|
+
| # | Issue | Priority | Effort |
|
|
109
|
+
| --- | --------------------------------------- | ---------- | ------ |
|
|
110
|
+
| 1 | `createCylinder()` broken | 🔴 Bug | Low |
|
|
111
|
+
| 2 | Game-studio skybox API names wrong | 🔴 Bug | Low |
|
|
112
|
+
| 3 | `galaxySpiral` no-op | 🔴 Bug | Low |
|
|
113
|
+
| 4 | Skybox speed control | 🟡 Missing | Low |
|
|
114
|
+
| 5 | Auto-animate skybox | 🟡 Missing | Medium |
|
|
115
|
+
| 6 | More skybox types | 🟡 Missing | High |
|
|
116
|
+
| 7 | `removeMesh` alias | 🟡 Missing | Low |
|
|
117
|
+
| 8 | Cone + Capsule primitives | 🟡 Missing | Medium |
|
|
118
|
+
| 9 | Improve `printCentered` discoverability | 🟢 QoL | Low |
|
|
119
|
+
| 10 | Document `createPointLight` signature | 🟢 QoL | Low |
|
|
120
|
+
| 11 | `print()` size shorthand | 🟢 QoL | Low |
|
|
121
|
+
| 12 | `drawCrosshair()` helper | 🟢 QoL | Low |
|