This commit is contained in:
锦恢 2025-01-02 01:54:46 +08:00
parent 859e9734f0
commit f148e9a24f
5 changed files with 9 additions and 11 deletions

View File

@ -15,7 +15,7 @@
<script> <script>
window.readNetFile = async () => { window.readNetFile = async () => {
const inputVcdFile = 'IF_ID.json'; const inputVcdFile = 'full_adder.json';
const skin = 'dide.skin'; const skin = 'dide.skin';
const r1 = await fetch(inputVcdFile); const r1 = await fetch(inputVcdFile);
const r2 = await fetch(skin); const r2 = await fetch(skin);
@ -23,7 +23,7 @@
const skinBinary = await r2.arrayBuffer(); const skinBinary = await r2.arrayBuffer();
return [ netJson, skinBinary ]; return [ netJson, skinBinary ];
} }
window.moduleName = 'IF_ID'; window.moduleName = 'full_adder';
// window.avoidWasm = 'avoid.wasm'; // window.avoidWasm = 'avoid.wasm';
</script> </script>
</head> </head>

View File

@ -43,8 +43,8 @@
--multiplexers-fill-color: #E59866; --multiplexers-fill-color: #E59866;
--registers-color: #95A5A6; --registers-color: #95A5A6;
--registers-fill-color: #D5DBDB; --registers-fill-color: #D5DBDB;
--unary-color: #1ABC9C; --unary-color: #279BB0;
--unary-fill-color: #A3E4D7; --unary-fill-color: #a3cee4;
--line-arrow-opacity: 1; --line-arrow-opacity: 1;

Binary file not shown.

View File

@ -145,8 +145,8 @@ export function onGeneralColorChange(colorString) {
export function onCellColorChange(colorString) { export function onCellColorChange(colorString) {
const { r, g, b } = parseColor(colorString); const { r, g, b } = parseColor(colorString);
const index = colorManager.currentGerneralIndex; const index = colorManager.currentCellIndex;
const item = colorManager.generals[index]; const item = colorManager.cells[index];
const borderColor = `rgb(${r}, ${g}, ${b})`; const borderColor = `rgb(${r}, ${g}, ${b})`;
const { ir, ig, ib } = increaseBrightness({ r, g, b }, 10); const { ir, ig, ib } = increaseBrightness({ r, g, b }, 10);
@ -154,7 +154,7 @@ export function onCellColorChange(colorString) {
const rootStyles = getComputedStyle(document.documentElement); const rootStyles = getComputedStyle(document.documentElement);
document.documentElement.style.setProperty(`--${item.type}-color`, borderColor); document.documentElement.style.setProperty(`--${item.type}-color`, borderColor);
document.documentElement.style.setProperty(`--${item.type}-fill-color`, fillColor); // document.documentElement.style.setProperty(`--${item.type}-fill-color`, fillColor);
} }
export const predefinedColors = [ export const predefinedColors = [

View File

@ -31,8 +31,6 @@ export class InstantiationRender {
* @param {import('../jsdoc').ElkNode} node * @param {import('../jsdoc').ElkNode} node
*/ */
addAsD3DataItem(node) { addAsD3DataItem(node) {
console.log(node);
const nodeModule = this.rootRender.nameToModule.get(node.renderName); const nodeModule = this.rootRender.nameToModule.get(node.renderName);
const view = nodeModule.view; const view = nodeModule.view;
const textPadding = 5; const textPadding = 5;