@vib3code/sdk 2.0.3-canary.89c05e0 → 2.0.3-canary.b52c293
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/DOCS/AGENT_HARNESS_ARCHITECTURE.md +2 -0
- package/DOCS/ANDROID_DEPLOYMENT.md +59 -0
- package/DOCS/ARCHITECTURE.md +1 -0
- package/DOCS/CI_TESTING.md +2 -0
- package/DOCS/CLI_ONBOARDING.md +2 -0
- package/DOCS/CONTROL_REFERENCE.md +2 -0
- package/DOCS/CROSS_SITE_DESIGN_PATTERNS.md +2 -0
- package/DOCS/ENV_SETUP.md +2 -0
- package/DOCS/EPIC_SCROLL_EVENTS.md +2 -0
- package/DOCS/EXPANSION_DESIGN.md +2 -0
- package/DOCS/EXPANSION_DESIGN_ULTRA.md +2 -0
- package/DOCS/EXPORT_FORMATS.md +2 -0
- package/DOCS/GPU_DISPOSAL_GUIDE.md +2 -0
- package/DOCS/HANDOFF_LANDING_PAGE.md +2 -0
- package/DOCS/HANDOFF_SDK_DEVELOPMENT.md +2 -0
- package/DOCS/LICENSING_TIERS.md +2 -0
- package/DOCS/MASTER_PLAN_2026-01-31.md +2 -0
- package/DOCS/MULTIVIZ_CHOREOGRAPHY_PATTERNS.md +3 -1
- package/DOCS/OBS_SETUP_GUIDE.md +2 -0
- package/DOCS/OPTIMIZATION_PLAN_MATH.md +1 -0
- package/DOCS/PRODUCT_STRATEGY.md +2 -0
- package/DOCS/PROJECT_SETUP.md +2 -0
- package/DOCS/README.md +5 -3
- package/DOCS/REFERENCE_SCROLL_ANALYSIS.md +2 -0
- package/DOCS/RENDERER_LIFECYCLE.md +2 -0
- package/DOCS/REPO_MANIFEST.md +2 -0
- package/DOCS/ROADMAP.md +2 -0
- package/DOCS/SCROLL_TIMELINE_v3.md +2 -0
- package/DOCS/SITE_REFACTOR_PLAN.md +2 -0
- package/DOCS/STATUS.md +2 -0
- package/DOCS/SYSTEM_INVENTORY.md +2 -0
- package/DOCS/TELEMETRY_EXPORTS.md +2 -0
- package/DOCS/VISUAL_ANALYSIS_CLICKERSS.md +2 -0
- package/DOCS/VISUAL_ANALYSIS_FACETAD.md +2 -0
- package/DOCS/VISUAL_ANALYSIS_SIMONE.md +2 -0
- package/DOCS/VISUAL_ANALYSIS_TABLESIDE.md +2 -0
- package/DOCS/WEBGPU_STATUS.md +2 -0
- package/DOCS/XR_BENCHMARKS.md +2 -0
- package/DOCS/archive/BLUEPRINT_EXECUTION_PLAN_2026-01-07.md +1 -34
- package/DOCS/archive/DEV_TRACK_ANALYSIS.md +1 -80
- package/DOCS/archive/DEV_TRACK_PLAN_2026-01-07.md +1 -42
- package/DOCS/archive/SESSION_014_PLAN.md +1 -195
- package/DOCS/archive/SESSION_LOG_2026-01-07.md +1 -56
- package/DOCS/archive/STRATEGIC_BLUEPRINT_2026-01-07.md +1 -72
- package/DOCS/archive/SYSTEM_AUDIT_2026-01-30.md +1 -741
- package/DOCS/archive/WEBGPU_STATUS_2026-02-15_STALE.md +1 -38
- package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-01-31.md +2 -0
- package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-06.md +2 -0
- package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-13.md +2 -0
- package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-15.md +2 -0
- package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-16.md +2 -0
- package/DOCS/dev-tracks/PERF_UPGRADE_2026-02-16.md +2 -0
- package/DOCS/dev-tracks/README.md +2 -0
- package/package.json +1 -1
- package/src/math/Mat4x4.js +33 -17
- package/src/math/Vec4.js +81 -25
|
@@ -1,38 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This document records the current WebGPU backend state, what is implemented, and what is required
|
|
4
|
-
to validate it in local development or CI.
|
|
5
|
-
|
|
6
|
-
## Current status
|
|
7
|
-
- **Backend scaffold:** `WebGPUBackend` initializes adapter/device, configures the canvas, manages
|
|
8
|
-
resize, and supports a clear-pass `renderFrame()` path.
|
|
9
|
-
- **Async context creation:** `createRenderContextAsync()` can instantiate WebGPU contexts using
|
|
10
|
-
`{ backend: 'webgpu' }`.
|
|
11
|
-
- **Resource tracking:** depth textures are registered in the shared `RenderResourceRegistry`.
|
|
12
|
-
|
|
13
|
-
## What is still needed
|
|
14
|
-
1. **Pipeline parity:** implement basic shader pipelines (vertex/fragment) and buffer binding that
|
|
15
|
-
match the WebGL backend command flow.
|
|
16
|
-
2. **Command buffer bridge:** map existing render commands to WebGPU render passes.
|
|
17
|
-
3. **Feature gating:** add host-app controls to toggle WebGPU via feature flags.
|
|
18
|
-
4. **Diagnostics:** add per-frame stats and resource delta reporting for WebGPU.
|
|
19
|
-
|
|
20
|
-
## Testing requirements
|
|
21
|
-
### Local smoke test
|
|
22
|
-
Prerequisites:
|
|
23
|
-
- A browser with WebGPU enabled (Chrome/Edge with `chrome://flags/#enable-unsafe-webgpu`, or a
|
|
24
|
-
Chromium build with WebGPU support).
|
|
25
|
-
- A device with WebGPU-capable GPU drivers.
|
|
26
|
-
|
|
27
|
-
Suggested smoke flow:
|
|
28
|
-
1. Create a canvas and call `createRenderContextAsync(canvas, { backend: 'webgpu' })`.
|
|
29
|
-
2. Call `backend.renderFrame({ clearColor: [0.1, 0.1, 0.2, 1] })` and confirm the canvas clears.
|
|
30
|
-
3. Resize the canvas and ensure the clear pass still succeeds.
|
|
31
|
-
|
|
32
|
-
### CI validation
|
|
33
|
-
- WebGPU cannot be reliably validated in headless CI without GPU support.
|
|
34
|
-
- CI should instead run WebGL tests and lint/static checks; keep a manual WebGPU smoke checklist.
|
|
35
|
-
|
|
36
|
-
## File locations
|
|
37
|
-
- `src/render/backends/WebGPUBackend.js`
|
|
38
|
-
- `src/render/index.js` (`createRenderContextAsync`)
|
|
1
|
+
Last reviewed: 2026-02-17
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vib3code/sdk",
|
|
3
|
-
"version": "2.0.3-canary.
|
|
3
|
+
"version": "2.0.3-canary.b52c293",
|
|
4
4
|
"description": "VIB3+ 4D Visualization SDK - Unified engine with 6D rotation, MCP agentic integration, and cross-platform support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/core/VIB3Engine.js",
|
package/src/math/Mat4x4.js
CHANGED
|
@@ -157,10 +157,11 @@ export class Mat4x4 {
|
|
|
157
157
|
/**
|
|
158
158
|
* Multiply two matrices
|
|
159
159
|
* @param {Mat4x4} m - Right operand
|
|
160
|
+
* @param {Mat4x4} [target=null] - Optional target matrix to store result
|
|
160
161
|
* @returns {Mat4x4} New matrix = this * m
|
|
161
162
|
*/
|
|
162
|
-
multiply(m) {
|
|
163
|
-
const out = new Mat4x4();
|
|
163
|
+
multiply(m, target = null) {
|
|
164
|
+
const out = target || new Mat4x4();
|
|
164
165
|
const r = out.data;
|
|
165
166
|
const a = this.data;
|
|
166
167
|
const b = m.data;
|
|
@@ -259,16 +260,22 @@ export class Mat4x4 {
|
|
|
259
260
|
/**
|
|
260
261
|
* Transform a Vec4 by this matrix
|
|
261
262
|
* @param {Vec4} v
|
|
263
|
+
* @param {Vec4} [target=null] - Optional target vector to store result
|
|
262
264
|
* @returns {Vec4} Transformed vector
|
|
263
265
|
*/
|
|
264
|
-
multiplyVec4(v) {
|
|
266
|
+
multiplyVec4(v, target = null) {
|
|
265
267
|
const m = this.data;
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
268
|
+
const out = target || new Vec4();
|
|
269
|
+
|
|
270
|
+
// Cache components to support aliasing (target === v)
|
|
271
|
+
const x = v.x, y = v.y, z = v.z, w = v.w;
|
|
272
|
+
|
|
273
|
+
out.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;
|
|
274
|
+
out.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;
|
|
275
|
+
out.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;
|
|
276
|
+
out.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;
|
|
277
|
+
|
|
278
|
+
return out;
|
|
272
279
|
}
|
|
273
280
|
|
|
274
281
|
/**
|
|
@@ -310,27 +317,36 @@ export class Mat4x4 {
|
|
|
310
317
|
/**
|
|
311
318
|
* Add another matrix
|
|
312
319
|
* @param {Mat4x4} m
|
|
320
|
+
* @param {Mat4x4} [target=null] - Optional target matrix
|
|
313
321
|
* @returns {Mat4x4} New matrix
|
|
314
322
|
*/
|
|
315
|
-
add(m) {
|
|
316
|
-
const
|
|
323
|
+
add(m, target = null) {
|
|
324
|
+
const out = target || new Mat4x4();
|
|
325
|
+
const r = out.data;
|
|
326
|
+
const a = this.data;
|
|
327
|
+
const b = m.data;
|
|
328
|
+
|
|
317
329
|
for (let i = 0; i < 16; i++) {
|
|
318
|
-
|
|
330
|
+
r[i] = a[i] + b[i];
|
|
319
331
|
}
|
|
320
|
-
return
|
|
332
|
+
return out;
|
|
321
333
|
}
|
|
322
334
|
|
|
323
335
|
/**
|
|
324
336
|
* Multiply by scalar
|
|
325
337
|
* @param {number} s
|
|
338
|
+
* @param {Mat4x4} [target=null] - Optional target matrix
|
|
326
339
|
* @returns {Mat4x4} New matrix
|
|
327
340
|
*/
|
|
328
|
-
scale(s) {
|
|
329
|
-
const
|
|
341
|
+
scale(s, target = null) {
|
|
342
|
+
const out = target || new Mat4x4();
|
|
343
|
+
const r = out.data;
|
|
344
|
+
const a = this.data;
|
|
345
|
+
|
|
330
346
|
for (let i = 0; i < 16; i++) {
|
|
331
|
-
|
|
347
|
+
r[i] = a[i] * s;
|
|
332
348
|
}
|
|
333
|
-
return
|
|
349
|
+
return out;
|
|
334
350
|
}
|
|
335
351
|
|
|
336
352
|
/**
|
package/src/math/Vec4.js
CHANGED
|
@@ -128,11 +128,19 @@ export class Vec4 {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
|
-
* Add another vector (immutable)
|
|
131
|
+
* Add another vector (immutable unless target provided)
|
|
132
132
|
* @param {Vec4} v
|
|
133
|
-
* @
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
* @param {Vec4} [target=null] - Optional target vector
|
|
134
|
+
* @returns {Vec4} New vector or target
|
|
135
|
+
*/
|
|
136
|
+
add(v, target = null) {
|
|
137
|
+
if (target) {
|
|
138
|
+
target._x = this._x + v._x;
|
|
139
|
+
target._y = this._y + v._y;
|
|
140
|
+
target._z = this._z + v._z;
|
|
141
|
+
target._w = this._w + v._w;
|
|
142
|
+
return target;
|
|
143
|
+
}
|
|
136
144
|
return new Vec4(
|
|
137
145
|
this._x + v._x,
|
|
138
146
|
this._y + v._y,
|
|
@@ -155,11 +163,19 @@ export class Vec4 {
|
|
|
155
163
|
}
|
|
156
164
|
|
|
157
165
|
/**
|
|
158
|
-
* Subtract another vector (immutable)
|
|
166
|
+
* Subtract another vector (immutable unless target provided)
|
|
159
167
|
* @param {Vec4} v
|
|
160
|
-
* @
|
|
161
|
-
|
|
162
|
-
|
|
168
|
+
* @param {Vec4} [target=null] - Optional target vector
|
|
169
|
+
* @returns {Vec4} New vector or target
|
|
170
|
+
*/
|
|
171
|
+
sub(v, target = null) {
|
|
172
|
+
if (target) {
|
|
173
|
+
target._x = this._x - v._x;
|
|
174
|
+
target._y = this._y - v._y;
|
|
175
|
+
target._z = this._z - v._z;
|
|
176
|
+
target._w = this._w - v._w;
|
|
177
|
+
return target;
|
|
178
|
+
}
|
|
163
179
|
return new Vec4(
|
|
164
180
|
this._x - v._x,
|
|
165
181
|
this._y - v._y,
|
|
@@ -182,11 +198,19 @@ export class Vec4 {
|
|
|
182
198
|
}
|
|
183
199
|
|
|
184
200
|
/**
|
|
185
|
-
* Multiply by scalar (immutable)
|
|
201
|
+
* Multiply by scalar (immutable unless target provided)
|
|
186
202
|
* @param {number} s
|
|
187
|
-
* @
|
|
188
|
-
|
|
189
|
-
|
|
203
|
+
* @param {Vec4} [target=null] - Optional target vector
|
|
204
|
+
* @returns {Vec4} New vector or target
|
|
205
|
+
*/
|
|
206
|
+
scale(s, target = null) {
|
|
207
|
+
if (target) {
|
|
208
|
+
target._x = this._x * s;
|
|
209
|
+
target._y = this._y * s;
|
|
210
|
+
target._z = this._z * s;
|
|
211
|
+
target._w = this._w * s;
|
|
212
|
+
return target;
|
|
213
|
+
}
|
|
190
214
|
return new Vec4(
|
|
191
215
|
this._x * s,
|
|
192
216
|
this._y * s,
|
|
@@ -211,9 +235,17 @@ export class Vec4 {
|
|
|
211
235
|
/**
|
|
212
236
|
* Component-wise multiply (Hadamard product)
|
|
213
237
|
* @param {Vec4} v
|
|
214
|
-
* @
|
|
215
|
-
|
|
216
|
-
|
|
238
|
+
* @param {Vec4} [target=null] - Optional target vector
|
|
239
|
+
* @returns {Vec4} New vector or target
|
|
240
|
+
*/
|
|
241
|
+
multiply(v, target = null) {
|
|
242
|
+
if (target) {
|
|
243
|
+
target._x = this._x * v._x;
|
|
244
|
+
target._y = this._y * v._y;
|
|
245
|
+
target._z = this._z * v._z;
|
|
246
|
+
target._w = this._w * v._w;
|
|
247
|
+
return target;
|
|
248
|
+
}
|
|
217
249
|
return new Vec4(
|
|
218
250
|
this._x * v._x,
|
|
219
251
|
this._y * v._y,
|
|
@@ -223,10 +255,18 @@ export class Vec4 {
|
|
|
223
255
|
}
|
|
224
256
|
|
|
225
257
|
/**
|
|
226
|
-
* Negate vector (immutable)
|
|
227
|
-
* @
|
|
258
|
+
* Negate vector (immutable unless target provided)
|
|
259
|
+
* @param {Vec4} [target=null] - Optional target vector
|
|
260
|
+
* @returns {Vec4} New vector or target
|
|
228
261
|
*/
|
|
229
|
-
negate() {
|
|
262
|
+
negate(target = null) {
|
|
263
|
+
if (target) {
|
|
264
|
+
target._x = -this._x;
|
|
265
|
+
target._y = -this._y;
|
|
266
|
+
target._z = -this._z;
|
|
267
|
+
target._w = -this._w;
|
|
268
|
+
return target;
|
|
269
|
+
}
|
|
230
270
|
return new Vec4(-this._x, -this._y, -this._z, -this._w);
|
|
231
271
|
}
|
|
232
272
|
|
|
@@ -286,15 +326,23 @@ export class Vec4 {
|
|
|
286
326
|
}
|
|
287
327
|
|
|
288
328
|
/**
|
|
289
|
-
* Normalize to unit length (immutable)
|
|
290
|
-
* @
|
|
329
|
+
* Normalize to unit length (immutable unless target provided)
|
|
330
|
+
* @param {Vec4} [target=null] - Optional target vector
|
|
331
|
+
* @returns {Vec4} New normalized vector or target
|
|
291
332
|
*/
|
|
292
|
-
normalize() {
|
|
333
|
+
normalize(target = null) {
|
|
293
334
|
const len = this.length();
|
|
294
335
|
if (len < 1e-10) {
|
|
336
|
+
if (target) {
|
|
337
|
+
target._x = 0;
|
|
338
|
+
target._y = 0;
|
|
339
|
+
target._z = 0;
|
|
340
|
+
target._w = 0;
|
|
341
|
+
return target;
|
|
342
|
+
}
|
|
295
343
|
return new Vec4(0, 0, 0, 0);
|
|
296
344
|
}
|
|
297
|
-
return this.scale(1 / len);
|
|
345
|
+
return this.scale(1 / len, target);
|
|
298
346
|
}
|
|
299
347
|
|
|
300
348
|
/**
|
|
@@ -314,9 +362,17 @@ export class Vec4 {
|
|
|
314
362
|
* Linear interpolation to another vector
|
|
315
363
|
* @param {Vec4} v - Target vector
|
|
316
364
|
* @param {number} t - Interpolation factor (0-1)
|
|
317
|
-
* @
|
|
318
|
-
|
|
319
|
-
|
|
365
|
+
* @param {Vec4} [target=null] - Optional target vector
|
|
366
|
+
* @returns {Vec4} New interpolated vector or target
|
|
367
|
+
*/
|
|
368
|
+
lerp(v, t, target = null) {
|
|
369
|
+
if (target) {
|
|
370
|
+
target._x = this._x + (v._x - this._x) * t;
|
|
371
|
+
target._y = this._y + (v._y - this._y) * t;
|
|
372
|
+
target._z = this._z + (v._z - this._z) * t;
|
|
373
|
+
target._w = this._w + (v._w - this._w) * t;
|
|
374
|
+
return target;
|
|
375
|
+
}
|
|
320
376
|
return new Vec4(
|
|
321
377
|
this._x + (v._x - this._x) * t,
|
|
322
378
|
this._y + (v._y - this._y) * t,
|