3 Commits

Author SHA1 Message Date
Jose Luis
f0f3516efa fix: use requestAnimationFrame + real timestamps for clock simulation
Replace setInterval with requestAnimationFrame loop that tracks elapsed
time via performance.now(). Clock ticks now fire based on real time
rather than assuming perfect interval spacing, so user interactions
(toggling inputs, dragging gates) no longer cause the clock to stutter
or pause.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 03:16:26 +01:00
Jose Luis Montañes
7c58174f5f fix: remove alert(), fix waveform zoom, add waveform scroll (wheel + ctrl+wheel) 2026-03-19 22:08:26 +01:00
Jose Luis Montañes
7409a96cf1 refactor: modularize into ES6 modules
Split monolithic index.html into:
- js/constants.js - gate config, colors, dimensions
- js/state.js     - shared application state
- js/gates.js     - evaluation logic, port geometry
- js/renderer.js  - canvas drawing
- js/waveform.js  - GTKWave-style signal viewer
- js/simulation.js - clock tick engine
- js/events.js    - mouse, keyboard, UI handlers
- js/app.js       - entry point
- css/style.css   - all styles
2026-03-19 22:00:02 +01:00