Interattivo Modello: camera-driven 3D model puppet

New interactive mode 'model': the webcam motion drives the GLB model as
a physical puppet — a hand swipe spins it with inertia, it leans toward
the motion centroid, strong agitation makes it hop with squash & stretch
and a touch-glow rim. ModelSim.render accepts an optional pose (yaw,
leanX, hopY, squash, rim) and slows its auto-spin when driven live.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
lucianoandClaude Fable 5 committed 2026-07-30 18:18:11 +02:00
1 parent 65fb6ae895
commit 7f0e8b94a7
4 files changed
+64 -10

No files matched your search

+6
View File
@@ -120,6 +120,12 @@ class Visualizer {
if (e.isInteractive && window.InteractiveSim) {
if (!this.inter) this.inter = new window.InteractiveSim(gl);
this.inter.customSource = this.customSource || null;
// The model-puppet mode drives the shared 3D renderer.
if (e.interactiveMode === 'model' && window.ModelSim) {
if (!this.model3d) this.model3d = new window.ModelSim(gl);
if (this._pendingGlb) { this.model3d.setModel(this._pendingGlb); this._pendingGlb = null; }
this.inter.modelSim = this.model3d;
}
this.inter.render(timeSec, audio, e, this.canvas);
return;
}