-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
not.js
26 lines (21 loc) · 781 Bytes
/
not.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { composePatterns } from "../composition/composer.js";
import { withSettings } from "../composition/with-settings.js";
import { gliderGunP60 } from "../life/population/patterns/glider-gun-p60.js";
import { reflector } from "../life/population/patterns/reflector.js";
const clockGun = withSettings(gliderGunP60, {
rotate: 270,
});
const signalGun = withSettings(gliderGunP60, {
rotate: 270,
reflect: true,
});
const redirection = withSettings(reflector, {
reflect: true,
phase: 13,
});
export function not(input = 0) {
const signal = input ? { pattern: signalGun } : null;
const clock = { pattern: clockGun, offset: { x: 38, y: 1 } };
const router = { pattern: redirection, offset: { x: 9, y: 62 } };
return composePatterns([clock, signal, router]);
}