Deactivate button for the 3D effect
'Disattiva' in the Animazioni 3D tab restores the last non-3D preset (tracked by applyEffect), answering 'how do I turn the 3D output off' without hunting through the effect library. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8b4b2cbfa8
commit
26c9653668
2 files changed
+10
-2
No files matched your search
+7
-2
@@ -158,9 +158,14 @@
|
||||
<select id="glb-effect-fam"></select>
|
||||
<select id="glb-effect-preset"></select>
|
||||
</div>
|
||||
<button id="glb-effect-go" class="wide">▶ Attiva sull'output</button>
|
||||
<div class="row">
|
||||
<button id="glb-effect-go">▶ Attiva sull'output</button>
|
||||
<button id="glb-effect-off">⏹ Disattiva (torna agli effetti)</button>
|
||||
</div>
|
||||
<div class="hint-mini">Le famiglie 3D vivono qui (non più nella libreria Effetti):
|
||||
“Modello 3D” balla da solo a tempo; le “Interattivo” usano la camera.</div>
|
||||
“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).</div>
|
||||
</section>
|
||||
<section class="span2">
|
||||
<label>Modello 3D (GLB)</label>
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user