Idle animations. Closes #14
This commit is contained in:
@@ -4,6 +4,7 @@ import IK from '../kinematics.js';
|
||||
import Settings from '../settings.js';
|
||||
import SequenceRunner from '../sequence-runner.js';
|
||||
import Motion from '../motion.js';
|
||||
import { IdleEffects } from '../idle-effects.js';
|
||||
|
||||
let eventCleanup = [];
|
||||
let isHomed = false;
|
||||
@@ -282,6 +283,16 @@ function buildHTML() {
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="margin-bottom: 12px;">
|
||||
<label class="form-label">Idle Animation</label>
|
||||
<select id="se-idle-mode-select" class="form-input idle-mode-select" style="width:100%;">
|
||||
<option value="none">None</option>
|
||||
<option value="circles">Circles</option>
|
||||
<option value="erratic">Erratic</option>
|
||||
<option value="park-bounce">Park Bounce</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div style="background: var(--surface-2); padding: 10px; border-radius: var(--radius-sm);">
|
||||
<div class="setting-row">
|
||||
<label class="form-label" style="margin:0;">Speed</label>
|
||||
@@ -432,6 +443,7 @@ async function loadSpots() {
|
||||
if (!parsedSpots.find(s => s.id === 'PARK')) {
|
||||
parsedSpots.push({ id: 'PARK', label: 'Park Position', x: parkPosition.x, y: parkPosition.y });
|
||||
}
|
||||
IdleEffects.setParkPosition(parkPosition.x, parkPosition.y);
|
||||
spots = parsedSpots;
|
||||
|
||||
document.getElementById('text-input-row').style.display = hasAlphabet ? 'grid' : 'none';
|
||||
@@ -578,6 +590,15 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
// ── Idle Effects Selection ──────────────────────────────────
|
||||
const idleSelect = document.getElementById('se-idle-mode-select');
|
||||
if (idleSelect) {
|
||||
idleSelect.value = IdleEffects.getMode();
|
||||
idleSelect.addEventListener('change', () => {
|
||||
IdleEffects.setMode(idleSelect.value);
|
||||
});
|
||||
}
|
||||
|
||||
// ── Settings Sliders ──────────────────────────────────────
|
||||
const sSpeed = document.getElementById('slider-speed');
|
||||
const sAccel = document.getElementById('slider-accel');
|
||||
|
||||
Reference in New Issue
Block a user