0.2.4 • Published 8 months ago
@capytale/capytale-logic v0.2.4
Logic Circuit Simulator
A logic circuit simulator useful for educational use.
This is a fork followed by an almost complete rewrite of drendog's Logic-Circuit-Simuator.
Demo
See https://jp.pellet.name/hep/logiga/
Development
- Checkout with git
npm install- Open VS Code and open folder
npm run compile-watchto run the TypeScript compiler (without output) to check for errorsnpm run lint-watchto runeslintto check for linting errorsnpm run bundle-watchto build the bundle withesbuild(can be done on every save becauseesbuildis so fast)npm run serverto serve locally for testing on port 8088
Differences with Original Version
- This fork is completely written in TypeScript
- Based on web components so that it can easily be embedded by pulling in a single JS file
- Dependency on p5 was removed
- Interface is drawn differently, all with canvas calls and no external images
- Screen is only refreshed when needed and not 60 times per second no matter what
- Clocks can be paused
- Components have been added: bit display, segment display, nibble display, half adder, muxes, register, RAM, counter, various decoders, etc.
- Size of components (in terms of number of bits) can be changed
- RAM/ROM contents can be loaded from files
- Mouseover tooltips have been added
- Components can be edited to be faulty, for educational exercises
- Editor can be in several modes with different capabilities
- Component buttons can be hidden or shown for educational purposes with URL parameters
- Loading and saving using JSON is much cleaner and does not include unnecessary properties
- Demo circuits are predefined and can be loaded from the JavaScript console
- Circuits can be loaded from a JSON export by drag-n-drop
- An animated propagation delay can be set
- Custom components can be created, loaded, saved from library files
- Tests for a given circuit can be defined (or automatically generated) and run
- UI can be in English or French (easy to add more translations)
- Much more