🔹 nor gate 🏃

This commit is contained in:
Matei Adriel 2019-06-04 20:10:47 +00:00
parent 2a790a51a9
commit 840aa1cb9a
3 changed files with 16 additions and 2 deletions

BIN
src/assets/nor_gate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -12,7 +12,8 @@ export class Material {
} = { } = {
and: require("../../../assets/and_gate.jpg"), and: require("../../../assets/and_gate.jpg"),
or: require("../../../assets/or_gate.png"), or: require("../../../assets/or_gate.png"),
xor: require("../../../assets/xor_gate.png") xor: require("../../../assets/xor_gate.png"),
nor: require("../../../assets/nor_gate.png")
} }

View file

@ -117,6 +117,19 @@ export class ComponentTemplateStore {
data: "or" data: "or"
} }
}) })
this.store.set("nor", {
inputs: 2,
outputs: 1,
name: "nor",
version: "1.0.0",
activation: `
ctx.outputs[0].value = !(ctx.inputs[0].value || ctx.inputs[1].value)
`.trim(),
material: {
mode: "standard_image",
data: "nor"
}
})
this.store.set("xor", { this.store.set("xor", {
inputs: 2, inputs: 2,
outputs: 1, outputs: 1,