Comments (4)
Neutral, positive, and negative voltage colors are changeable in the web interface via the menu: Options → Other Options
If you need to change it in the Java source: setColorScale()
from circuitjs1.
The effect achieved is that some wires are yellow, some wires are blue, and so on
from circuitjs1.
... like wire-specific voltage colors? e.g. one wire at 5 volts is red while another at 5 volts is blue? That's an interesting use case.
It could be maybe confusing when two elements with different colors intersect---particularly components. If a resistor is 5 v blue at one end and 5 v red at the other, should the color blend? Should the max and min voltage for choosing color also be per-wire variable?
That would generally be cool for a circuit like "op-amp internals" or "555 internals" or some CPU register circuits, where you can split each subcircuit—level shifters, comparators, mirror, output stage—into its own color.
I don't know how the JavaScript elements are drawn, but the easiest way (for me) to implement this (if everything is an SVG) is by figuring out the id/data-name/class for each drawn component and override whatever property is being used for gradients AFTER everything is already drawn on the JavaScript-enabled page. I'm on my phone right now and haven't ever looked thru the new (non-java) source, so i don't know if anything in this paragraph would work. If I remember and have time, I'll try to do this soon
from circuitjs1.
"If there is no current passing, it is gray." I suppose you mean that the amount of current is under some threshold value?
Changing the color for individual wires is not that bad, but every component has small pieces of wire embedded in it, so they would all have to change. Nothing is an SVG, unfortunately, all the drawing is done in code. I suppose you could store the wire color on a per-node basis and each element could get the color from the node.
from circuitjs1.
Related Issues (20)
- Ctrl + 2 fingers click = 2 fingers click = context menu in the way on Mac M1 HOT 2
- Zooming and panning doesn't work on mobile HOT 2
- interrupts on avr8js
- Ignoring timestep and running simulations without UI updates HOT 1
- I've discovered free energy!
- There is no quick undo ! HOT 2
- 555 timer with non-ground negative supply HOT 3
- Apple Silicon (ARM) version ? HOT 4
- How to remove sub circuits from the Draw->Subcircuits menu
- Analog switch: Lack of input voltage settings in the Edit Component dialog
- low frame rate when speed is too high HOT 4
- Annoying unintentional drag of the drawn box or line
- BUG: Potentiometer wiper position change on file open (or on file save?)
- Feature Request: Plot charge in scope (useful for switched capacitors) - example provided
- The relay component switches to the intermediate state immediately giving incorrect results for some circuits.
- Coil voltage on open relay contacts ? HOT 2
- Uncaught Error: java.lang.StringIndexOutOfBoundsException HOT 1
- CirciutJS 2.8.1js run simulation not smooth in some circuits. HOT 2
- Question-Is this the place to add issues now? HOT 1
- Simulation wrong for reverse diode? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from circuitjs1.