diff --git a/src/control.html b/src/control.html index e34702d..360c3f9 100644 --- a/src/control.html +++ b/src/control.html @@ -158,9 +158,14 @@ - +
+ + +
Le famiglie 3D vivono qui (non più nella libreria Effetti): - “Modello 3D” balla da solo a tempo; le “Interattivo” usano la camera.
+ “Modello 3D” balla da solo a tempo; le “Interattivo” usano la camera. + “Disattiva” ripristina l'ultimo effetto normale (equivale a scegliere + un preset dal tab Effetti).
diff --git a/src/control.js b/src/control.js index 501de6d..46ada5b 100644 --- a/src/control.js +++ b/src/control.js @@ -8,8 +8,10 @@ const filePath = (f) => djv.pathForFile(f); // ---------------------------------------------------------------- effects const EFFECTS = window.EFFECTS; let currentEffect = EFFECTS.list[0]; +let lastNon3d = EFFECTS.list[0]; // to step back out of the 3D families function applyEffect(effect) { + if (!effect.isModel3d && !effect.isInteractive) lastNon3d = effect; currentEffect = effect; send({ type: 'effect', effect }); $('#scene-name').textContent = effect.name; @@ -354,6 +356,7 @@ fill3dPresets(); fam3dSel.addEventListener('change', () => { fill3dPresets(); apply3d(); }); pre3dSel.addEventListener('change', apply3d); $('#glb-effect-go').addEventListener('click', apply3d); +$('#glb-effect-off').addEventListener('click', () => applyEffect(lastNon3d)); $('#btn-glb-load').addEventListener('click', () => $('#glb-input').click()); $('#glb-input').addEventListener('change', async (e) => {