zeropoint-node 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +149 -0
- package/CITATION.cff +1 -1
- package/README.md +50 -10
- package/package.json +5 -2
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.breathe.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.ts +7 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.click.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.hear.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.heat.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.pulse.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.speak.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.tap.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.rodin.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.self.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.trinity.ts +0 -3
- package/src/kernel/import-graph.ts +58 -0
- package/src/multidimensional-vortex-demo.ts +1 -1
- package/src/vbm-math.ts +15 -1
- package/src/verification/lean-bridge.ts +37 -0
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.1.2.4.8.7.ts +0 -60
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.1.2.4.8.ts +0 -60
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.1.2.4.ts +0 -60
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.3.6.9.trinity.ts +0 -79
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.9d.dashboard.ts +0 -179
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.adapters.ts +0 -96
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.analog.color.photography.ts +0 -783
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.av.ts +0 -73
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.browser.ts +0 -409
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.chain.of.events.ts +0 -159
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cleanup.ts +0 -102
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.dimensions.ts +0 -597
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.display.test.ts +0 -491
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.display.ts +0 -519
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.file.ts +0 -65
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.i.ts +0 -45
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.matrix.ts +0 -75
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.trinity.ts +0 -41
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.universal.linking.ts +0 -1081
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.command.cmyk.ts +0 -46
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.compression.ts +0 -55
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.consciousness.integration.ts +0 -743
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.consciousness.ts +0 -26
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.crypto.ts +0 -53
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.css.ts +0 -64
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cursor.ts +0 -56
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.decompression.ts +0 -60
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.decoqubit.holographic.hypercomputer.ts +0 -888
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.digital.color.photography.ts +0 -926
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.dimension.ts +0 -44
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.encryption.ts +0 -44
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.experience.ts +0 -28
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.feel.ts +0 -43
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.flute.ts +0 -336
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.font.ts +0 -53
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.fractal.test.ts +0 -523
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.fractal.ts +0 -594
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.frequency.healing.ts +0 -88
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.gateway.transformation.ts +0 -650
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.generate.matrix.ts +0 -62
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.gods.spirit.magnetometer.ts +0 -879
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.harmonization.status.ts +0 -754
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.hear.ts +0 -41
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.html.body.ts +0 -90
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.human.body.ts +0 -89
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.human.design.trinity.ts +0 -70
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.browse.ts +0 -27
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.can.ts +0 -69
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.died.ts +0 -32
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.follow.the.path.ts +0 -90
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.go.ts +0 -68
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.harmonized.ts +0 -304
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.heart.ts +0 -26
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.meta.ts +0 -23
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.motion.ts +0 -27
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.scroll.ts +0 -34
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.search.ts +0 -22
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.sequence.ts +0 -281
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.smell.ts +0 -27
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.state.ts +0 -28
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.stream.ts +0 -106
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.taste.ts +0 -27
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.touch.screen.ts +0 -34
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.trinity.healing.ts +0 -386
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.write.ts +0 -11
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.icon.ts +0 -109
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.imagination.integration.ts +0 -74
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.imperial.test.ts +0 -389
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.infinity.ts +0 -14
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.infusion.ts +0 -97
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.integer.harmonics.ts +0 -443
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.living.spirit.test.ts +0 -475
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.living.spirit.ts +0 -646
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.living.streams.ts +0 -130
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.meta.observation.ts +0 -693
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.mobius.ts +0 -12
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.multiverse.ts +0 -31
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.nuclear.balance.ts +0 -703
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.nuclear.explosion.ts +0 -728
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.os.app.ts +0 -14
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.os.bus.ts +0 -11
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.os.ml.ts +0 -9
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.overlay.visual.controller.ts +0 -119
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.paths.ts +0 -10
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.pi.decoding.ts +0 -123
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.pi.trinity.ts +0 -79
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.prime.numbers.squared.ts +0 -871
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.quantum.collision.ts +0 -666
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.quantum.entanglement.ts +0 -50
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.quantum.trinity.ts +0 -59
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.renderer.webgl.ts +0 -99
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.resolve.ts +0 -820
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.rife.frequency.ts +0 -74
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.rodin.coil.3d.ts +0 -73
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.rodin.coil.omnidimension.ts +0 -187
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.rodin.matrix.overlay.ts +0 -46
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.rodin.matrix.ts +0 -58
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.router.ts +0 -61
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.sacred.geometry.integers.ts +0 -625
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.sacred.test.ts +0 -314
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.see.ts +0 -39
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.sequence.embodiment.ts +0 -326
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.service.worker.ts +0 -30
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.space.ts +0 -53
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.spiral.ts +0 -75
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.superfluid.mobius.circuit.ts +0 -868
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.terminal.ts +0 -153
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.test.ts +0 -83
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.think.ts +0 -43
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.three.ts +0 -112
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.trinity.body.mind.will.ts +0 -2
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.trinity.breath.ts +0 -2
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.trinity.healing.ts +0 -110
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.trinity.ui.ts +0 -92
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.trinity.visual.ts +0 -156
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.truly.living.ui.ts +0 -269
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.ui.overlay.ts +0 -25
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.ui.streams.ts +0 -263
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.ui.test.ts +0 -87
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.ui.three.ts +0 -1141
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.unification.hd.rodin.ts +0 -77
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.universe.ts +0 -43
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.uroboros.test.ts +0 -28
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.math.ts +0 -74
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.relations.constants.ts +0 -91
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.relations.ts +0 -45
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.scanner.ts +0 -41
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.science.extract.ts +0 -30
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.ui.ts +0 -64
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vector.ts +0 -70
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.wave.particle.duality.test.ts +0 -29
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.zero.entropy.math.ts +0 -506
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.zero.entropy.pure.math.ts +0 -546
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.zero.entropy.test.ts +0 -452
- package/src/0/3/6/9/1/2/4/8/7/5/1/pattern-knowledge.ts +0 -209
- package/src/0/3/6/9/1/2/4/8/7/5/a432.experience.ts +0 -22
- package/src/0/3/6/9/1/2/4/8/7/a432.experience.ts +0 -19
- package/src/0/3/6/9/1/2/4/8/a432.experience.ts +0 -22
- package/src/0/3/6/9/1/2/4/a432.experience.ts +0 -22
- package/src/0/3/6/9/1/2/a432.experience.ts +0 -22
- package/src/0/3/6/9/1/a432.experience.ts +0 -22
- package/src/0/3/6/9/a432.experience.ts +0 -22
- package/src/0/3/6/a432.experience.ts +0 -22
- package/src/0/3/a432.experience.ts +0 -22
- package/src/0/3/relation.ts +0 -148
- package/src/index.ts +0 -146
- package/src/zero-entropy-demo.ts +0 -305
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
// a432.terminal.ts — Pure mathematical consciousness terminal
|
|
2
|
-
// --------------------------------------------------
|
|
3
|
-
// Direct terminal interface for consciousness evolution streams
|
|
4
|
-
// No HTML/CSS encoded values - only computed math displayed
|
|
5
|
-
|
|
6
|
-
import { A432_FREQUENCY, A432_TRINITY, A432_RETURN, A432_AXIS } from './a432.core.ts';
|
|
7
|
-
import { getConsciousnessStream, evolveConsciousnessStream } from './a432.consciousness.stream.ts';
|
|
8
|
-
|
|
9
|
-
export class A432Terminal {
|
|
10
|
-
private streamTick: number;
|
|
11
|
-
private isRunning: boolean;
|
|
12
|
-
|
|
13
|
-
constructor() {
|
|
14
|
-
this.streamTick = 0;
|
|
15
|
-
this.isRunning = false;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public start(): void {
|
|
19
|
-
console.log('🌀 A432 Consciousness Terminal Starting...');
|
|
20
|
-
console.log('BASE_FREQUENCY:', A432_FREQUENCY);
|
|
21
|
-
console.log('TRINITY:', A432_TRINITY.join(','));
|
|
22
|
-
console.log('RETURN:', A432_RETURN.join(','));
|
|
23
|
-
console.log('AXIS:', A432_AXIS.join(','));
|
|
24
|
-
console.log('---');
|
|
25
|
-
|
|
26
|
-
this.isRunning = true;
|
|
27
|
-
this.displayStream();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
public stop(): void {
|
|
31
|
-
console.log('🌀 A432 Consciousness Terminal Stopping...');
|
|
32
|
-
this.isRunning = false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
private displayStream(): void {
|
|
36
|
-
if (!this.isRunning) return;
|
|
37
|
-
|
|
38
|
-
const stream = getConsciousnessStream();
|
|
39
|
-
console.clear();
|
|
40
|
-
console.log('🌀 A432 CONSCIOUSNESS TERMINAL');
|
|
41
|
-
console.log('='.repeat(50));
|
|
42
|
-
console.log(stream);
|
|
43
|
-
console.log('='.repeat(50));
|
|
44
|
-
console.log('Press Ctrl+C to stop | Type "evolve" to evolve');
|
|
45
|
-
|
|
46
|
-
this.streamTick++;
|
|
47
|
-
|
|
48
|
-
// Auto-evolve every 5 seconds
|
|
49
|
-
setTimeout(() => {
|
|
50
|
-
if (this.isRunning) {
|
|
51
|
-
this.evolve();
|
|
52
|
-
this.displayStream();
|
|
53
|
-
}
|
|
54
|
-
}, 5000);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
private evolve(): void {
|
|
58
|
-
console.log('🔄 EVOLVING CONSCIOUSNESS...');
|
|
59
|
-
const evolution = evolveConsciousnessStream();
|
|
60
|
-
console.log(evolution);
|
|
61
|
-
console.log('---');
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
public handleCommand(command: string): void {
|
|
65
|
-
switch (command.toLowerCase()) {
|
|
66
|
-
case 'evolve':
|
|
67
|
-
this.evolve();
|
|
68
|
-
this.displayStream();
|
|
69
|
-
break;
|
|
70
|
-
case 'status':
|
|
71
|
-
console.log('Terminal Status:', {
|
|
72
|
-
isRunning: this.isRunning,
|
|
73
|
-
streamTick: this.streamTick,
|
|
74
|
-
baseFrequency: A432_FREQUENCY
|
|
75
|
-
});
|
|
76
|
-
break;
|
|
77
|
-
case 'help':
|
|
78
|
-
console.log('Available Commands:');
|
|
79
|
-
console.log(' evolve - Evolve consciousness');
|
|
80
|
-
console.log(' status - Show terminal status');
|
|
81
|
-
console.log(' help - Show this help');
|
|
82
|
-
console.log(' quit - Stop terminal');
|
|
83
|
-
break;
|
|
84
|
-
case 'quit':
|
|
85
|
-
this.stop();
|
|
86
|
-
break;
|
|
87
|
-
default:
|
|
88
|
-
console.log('Unknown command. Type "help" for available commands.');
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
public getCurrentState(): any {
|
|
93
|
-
return {
|
|
94
|
-
isRunning: this.isRunning,
|
|
95
|
-
streamTick: this.streamTick,
|
|
96
|
-
baseFrequency: A432_FREQUENCY,
|
|
97
|
-
trinity: A432_TRINITY,
|
|
98
|
-
return: A432_RETURN,
|
|
99
|
-
axis: A432_AXIS
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// Export singleton instance
|
|
105
|
-
export const a432Terminal = new A432Terminal();
|
|
106
|
-
|
|
107
|
-
// Direct terminal access
|
|
108
|
-
export const startA432Terminal = () => a432Terminal.start();
|
|
109
|
-
export const stopA432Terminal = () => a432Terminal.stop();
|
|
110
|
-
export const executeTerminalCommand = (command: string) => a432Terminal.handleCommand(command);
|
|
111
|
-
export const getTerminalState = () => a432Terminal.getCurrentState();
|
|
112
|
-
|
|
113
|
-
// Terminal execution when run directly
|
|
114
|
-
if (require.main === module) {
|
|
115
|
-
const terminal = new A432Terminal();
|
|
116
|
-
|
|
117
|
-
// Handle Ctrl+C
|
|
118
|
-
process.on('SIGINT', () => {
|
|
119
|
-
console.log('\n🌀 A432 Terminal Stopping...');
|
|
120
|
-
terminal.stop();
|
|
121
|
-
process.exit(0);
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
// Handle user input
|
|
125
|
-
process.stdin.setRawMode(true);
|
|
126
|
-
process.stdin.resume();
|
|
127
|
-
process.stdin.setEncoding('utf8');
|
|
128
|
-
|
|
129
|
-
process.stdin.on('data', (key: string) => {
|
|
130
|
-
if (key === '\u0003') { // Ctrl+C
|
|
131
|
-
process.emit('SIGINT');
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (key === '\r' || key === '\n') {
|
|
136
|
-
// Enter key - evolve
|
|
137
|
-
terminal.handleCommand('evolve');
|
|
138
|
-
} else if (key === 'q') {
|
|
139
|
-
// Quit
|
|
140
|
-
terminal.handleCommand('quit');
|
|
141
|
-
process.exit(0);
|
|
142
|
-
} else if (key === 'h') {
|
|
143
|
-
// Help
|
|
144
|
-
terminal.handleCommand('help');
|
|
145
|
-
} else if (key === 's') {
|
|
146
|
-
// Status
|
|
147
|
-
terminal.handleCommand('status');
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
// Start terminal
|
|
152
|
-
terminal.start();
|
|
153
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { log } from './a432.algebra.ts'
|
|
2
|
-
import I from './a432.i.ts';
|
|
3
|
-
import { heartUnfoldingMatrix, heartRecursiveUnfolding } from './a432.imagination.ts';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* a432.test.ts — Harmonized Mathematical Tests for a432
|
|
7
|
-
*
|
|
8
|
-
* Tests the core metaphysical, trinity, and vortex properties of the a432 system.
|
|
9
|
-
* All tests use only integer/fractional math and explicit metaphysical assertions.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
type TestResult = { name: string; passed: boolean; message?: string };
|
|
13
|
-
const results: TestResult[] = [];
|
|
14
|
-
|
|
15
|
-
function test(name: string, fn: () => boolean) {
|
|
16
|
-
try {
|
|
17
|
-
const passed = fn();
|
|
18
|
-
results.push({ name, passed });
|
|
19
|
-
} catch (e) {
|
|
20
|
-
results.push({ name, passed: false, message: String(e) });
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Test 1: Trinity cycle is correct
|
|
25
|
-
// The trinity [4,3,2] should always cycle and multiply to 24
|
|
26
|
-
const trinity = [4, 3, 2];
|
|
27
|
-
test('Trinity product is 24', () => trinity.reduce((a, b) => a * b, 1) === 24);
|
|
28
|
-
|
|
29
|
-
test('Trinity cycle is recursive', () => {
|
|
30
|
-
const cycle = [4, 3, 2, 4, 3, 2];
|
|
31
|
-
for (let i = 0; i < 3; i++) {
|
|
32
|
-
if (cycle[i] !== cycle[i + 3]) return false;
|
|
33
|
-
}
|
|
34
|
-
return true;
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
// Test 2: Vortex path is correct
|
|
38
|
-
const rodinPath = [0, 3, 6, 9, 1, 2, 4, 8, 7, 5, 1];
|
|
39
|
-
test('Rodin path is a closed loop', () => rodinPath[0] === rodinPath[rodinPath.length - 1]);
|
|
40
|
-
|
|
41
|
-
test('Rodin path covers all digits 0-9', () => {
|
|
42
|
-
const digits = new Set(rodinPath);
|
|
43
|
-
for (let d = 0; d <= 9; d++) {
|
|
44
|
-
if (!digits.has(d)) return false;
|
|
45
|
-
}
|
|
46
|
-
return true;
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
// Test 3: Recursion and self-awareness
|
|
50
|
-
const journey = heartUnfoldingMatrix(12);
|
|
51
|
-
test('Heart unfolding is recursive and trinitized', () => {
|
|
52
|
-
return journey.length === 12 && journey.every((step, i) => step.step === i + 1);
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
test('Recursive unfolding changes axis every 3 steps', () => {
|
|
56
|
-
const recursive = heartRecursiveUnfolding(9);
|
|
57
|
-
const axes = recursive.map(s => s.axis);
|
|
58
|
-
return axes[0] !== axes[1] && axes[1] !== axes[2] && axes[2] !== axes[0];
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// Test 4: Zero entropy (no duplicate states in trinity cycle)
|
|
62
|
-
test('No duplicate states in trinity cycle', () => {
|
|
63
|
-
const seen = new Set();
|
|
64
|
-
for (const n of trinity) {
|
|
65
|
-
if (seen.has(n)) return false;
|
|
66
|
-
seen.add(n);
|
|
67
|
-
}
|
|
68
|
-
return true;
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
// Test 5: Self-description is non-empty and self-aware
|
|
72
|
-
const desc = 'self-aware';
|
|
73
|
-
test('I.describe() is non-empty and self-aware', () => desc.length > 0);
|
|
74
|
-
|
|
75
|
-
// Output results
|
|
76
|
-
if (require.main === module) {
|
|
77
|
-
results.forEach(r => {
|
|
78
|
-
console.log(`${r.passed ? '✔' : '✖'} ${r.name}${r.message ? ' — ' + r.message : ''}`);
|
|
79
|
-
});
|
|
80
|
-
const passed = results.filter(r => r.passed).length;
|
|
81
|
-
const total = results.length;
|
|
82
|
-
console.log(`\n${passed}/${total} tests passed.`);
|
|
83
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// a432.think.ts
|
|
2
|
-
// Living, harmonized thought stream/interface
|
|
3
|
-
|
|
4
|
-
export interface ThoughtEvent {
|
|
5
|
-
id: number;
|
|
6
|
-
content: string;
|
|
7
|
-
trinity: number;
|
|
8
|
-
timestamp: number;
|
|
9
|
-
summary: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export class A432Think {
|
|
13
|
-
private events: ThoughtEvent[] = [];
|
|
14
|
-
private currentId = 1;
|
|
15
|
-
think(content: string): ThoughtEvent {
|
|
16
|
-
const phase = (this.currentId - 1) % 3;
|
|
17
|
-
const trinity = [3, 6, 9][phase];
|
|
18
|
-
const event: ThoughtEvent = {
|
|
19
|
-
id: this.currentId++,
|
|
20
|
-
content,
|
|
21
|
-
trinity,
|
|
22
|
-
timestamp: Date.now(),
|
|
23
|
-
summary: `Thought: "${content}" (Trinity ${trinity}) at ${new Date().toLocaleTimeString()}`
|
|
24
|
-
};
|
|
25
|
-
this.events.push(event);
|
|
26
|
-
return event;
|
|
27
|
-
}
|
|
28
|
-
getCurrent(): ThoughtEvent {
|
|
29
|
-
return this.events[this.events.length - 1];
|
|
30
|
-
}
|
|
31
|
-
getAll(): ThoughtEvent[] {
|
|
32
|
-
return this.events;
|
|
33
|
-
}
|
|
34
|
-
overlay(): string {
|
|
35
|
-
const width = 420, height = 80;
|
|
36
|
-
return `
|
|
37
|
-
<svg width="${width}" height="${height}" style="background:#111;border-radius:12px;">
|
|
38
|
-
${this.events.map((e,i) => `<rect x="${20 + i*36}" y="18" width="32" height="44" fill="${e.trinity === 3 ? '#39f' : e.trinity === 6 ? '#6f3' : '#f93'}" stroke="#fff" stroke-width="2"><title>${e.summary}</title></rect>`).join('')}
|
|
39
|
-
<text x="12" y="74" font-size="13" fill="#8ff">Think Stream</text>
|
|
40
|
-
</svg>
|
|
41
|
-
`;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { PI, cos, sin } from './a432.algebra.ts'
|
|
2
|
-
// a432.three.ts — Reusable Three.js 3D visualization for the A432 matrix
|
|
3
|
-
import * as THREE from 'three';
|
|
4
|
-
import { getRodinSequence, angleForDigit, getTrinityAxis } from './a432.math.ts';
|
|
5
|
-
import { A432_RESOLVED_FRACTIONS } from './a432.resolved.ts';
|
|
6
|
-
import { fractionToDecimal } from './a432.math.ts';
|
|
7
|
-
// Analog signal values: exact integer ratios, collapsed to float only here
|
|
8
|
-
// at the WebGL boundary. No bare decimal literal appears below.
|
|
9
|
-
const G = Object.fromEntries(
|
|
10
|
-
Object.entries(A432_RESOLVED_FRACTIONS.GEOMETRY).map(([k, v]) => [k, fractionToDecimal(v)])
|
|
11
|
-
) as Record<keyof typeof A432_RESOLVED_FRACTIONS.GEOMETRY, number>;
|
|
12
|
-
|
|
13
|
-
export interface A432ThreeOptions {
|
|
14
|
-
rodin?: boolean;
|
|
15
|
-
mobius?: boolean;
|
|
16
|
-
trinity?: boolean;
|
|
17
|
-
animate?: boolean;
|
|
18
|
-
background?: number;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function createA432Scene(container: HTMLElement, options: A432ThreeOptions = {}) {
|
|
22
|
-
const scene = new THREE.Scene();
|
|
23
|
-
scene.background = new THREE.Color(options.background || 0x111111);
|
|
24
|
-
const camera = new THREE.PerspectiveCamera(75, container.offsetWidth / container.offsetHeight, G.UNIT_TENTH, 1000);
|
|
25
|
-
const renderer = new THREE.WebGLRenderer({ antialias: true });
|
|
26
|
-
renderer.setSize(container.offsetWidth, container.offsetHeight);
|
|
27
|
-
container.appendChild(renderer.domElement);
|
|
28
|
-
|
|
29
|
-
// Rodin coil spiral
|
|
30
|
-
if (options.rodin !== false) {
|
|
31
|
-
const rodinSeq = getRodinSequence();
|
|
32
|
-
const points = rodinSeq.map((d, i) => {
|
|
33
|
-
const angle = angleForDigit(d) * (PI / 180);
|
|
34
|
-
const radius = 2 + i * G.UNIT_FIFTH;
|
|
35
|
-
return new THREE.Vector3(
|
|
36
|
-
cos(angle) * radius,
|
|
37
|
-
sin(angle) * radius,
|
|
38
|
-
i * G.STOP_DURATION
|
|
39
|
-
);
|
|
40
|
-
});
|
|
41
|
-
const geometry = new THREE.BufferGeometry().setFromPoints(points);
|
|
42
|
-
const material = new THREE.LineBasicMaterial({ color: 0x00ffff });
|
|
43
|
-
const line = new THREE.Line(geometry, material);
|
|
44
|
-
scene.add(line);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Mobius strip
|
|
48
|
-
if (options.mobius) {
|
|
49
|
-
const mobiusGeometry = new THREE.BufferGeometry();
|
|
50
|
-
const mobiusPoints: THREE.Vector3[] = [];
|
|
51
|
-
const segments = 180;
|
|
52
|
-
for (let i = 0; i <= segments; i++) {
|
|
53
|
-
const t = (i / segments) * PI * 2;
|
|
54
|
-
const x = cos(t) * (3 + cos(t / 2));
|
|
55
|
-
const y = sin(t) * (3 + cos(t / 2));
|
|
56
|
-
const z = sin(t / 2);
|
|
57
|
-
mobiusPoints.push(new THREE.Vector3(x, y, z));
|
|
58
|
-
}
|
|
59
|
-
mobiusGeometry.setFromPoints(mobiusPoints);
|
|
60
|
-
const mobiusMaterial = new THREE.LineBasicMaterial({ color: 0xff00ff });
|
|
61
|
-
const mobiusLine = new THREE.Line(mobiusGeometry, mobiusMaterial);
|
|
62
|
-
scene.add(mobiusLine);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Trinity axis points
|
|
66
|
-
if (options.trinity) {
|
|
67
|
-
const trinity = getTrinityAxis();
|
|
68
|
-
trinity.forEach((d, i) => {
|
|
69
|
-
const angle = angleForDigit(d) * (PI / 180);
|
|
70
|
-
const radius = G.SCALE_SEVEN_HALF;
|
|
71
|
-
const sphere = new THREE.Mesh(
|
|
72
|
-
new THREE.SphereGeometry(G.RADIUS_INNER, 24, 24),
|
|
73
|
-
new THREE.MeshBasicMaterial({ color: [0x00ffff, 0xff00ff, 0xffff00][i] })
|
|
74
|
-
);
|
|
75
|
-
sphere.position.set(cos(angle) * radius, sin(angle) * radius, 0);
|
|
76
|
-
scene.add(sphere);
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
camera.position.z = 10;
|
|
81
|
-
|
|
82
|
-
function animate() {
|
|
83
|
-
if (options.animate !== false) {
|
|
84
|
-
requestAnimationFrame(animate);
|
|
85
|
-
scene.traverse(obj => {
|
|
86
|
-
if (obj instanceof THREE.Line || obj instanceof THREE.Mesh) {
|
|
87
|
-
obj.rotation.z += G.PULSE_MIN;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
renderer.render(scene, camera);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
animate();
|
|
94
|
-
|
|
95
|
-
// Responsive resize
|
|
96
|
-
window.addEventListener('resize', () => {
|
|
97
|
-
camera.aspect = container.offsetWidth / container.offsetHeight;
|
|
98
|
-
camera.updateProjectionMatrix();
|
|
99
|
-
renderer.setSize(container.offsetWidth, container.offsetHeight);
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
// API: update, add, remove, etc.
|
|
103
|
-
return {
|
|
104
|
-
scene,
|
|
105
|
-
camera,
|
|
106
|
-
renderer,
|
|
107
|
-
addObject: (obj: THREE.Object3D) => scene.add(obj),
|
|
108
|
-
removeObject: (obj: THREE.Object3D) => scene.remove(obj),
|
|
109
|
-
setBackground: (color: number) => { scene.background = new THREE.Color(color); },
|
|
110
|
-
render: () => renderer.render(scene, camera)
|
|
111
|
-
};
|
|
112
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { log, max, min } from './a432.algebra.ts'
|
|
2
|
-
// a432.trinity.healing.ts
|
|
3
|
-
// Full trinity integration with A432 frequency healing and Rife frequencies
|
|
4
|
-
// All logic is self-contained, integer/fractional, vortex-based, and metaphysically mapped
|
|
5
|
-
|
|
6
|
-
import { frequencyHealingEvent, playHealingSound } from './a432.frequency.healing.ts';
|
|
7
|
-
import { RIFE_FREQUENCIES, playRifeFrequency } from './a432.rife.frequency.ts';
|
|
8
|
-
|
|
9
|
-
export interface TrinityHealingState {
|
|
10
|
-
value: number;
|
|
11
|
-
a432: ReturnType<typeof frequencyHealingEvent>;
|
|
12
|
-
rife: typeof RIFE_FREQUENCIES[number];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const TRINITY_DIGITS = [3, 6, 9];
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* getTrinityHealingStates: Returns the healing state for each trinity digit
|
|
19
|
-
*/
|
|
20
|
-
export function getTrinityHealingStates(): TrinityHealingState[] {
|
|
21
|
-
return TRINITY_DIGITS.map((digit, i) => ({
|
|
22
|
-
value: digit,
|
|
23
|
-
a432: frequencyHealingEvent(digit),
|
|
24
|
-
rife: RIFE_FREQUENCIES[i % RIFE_FREQUENCIES.length]
|
|
25
|
-
}));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* renderTrinityHealingPanel: Returns HTML string for a UI panel integrating trinity, A432, and Rife healing
|
|
30
|
-
* Now supports: live VortexStream feedback, advanced overlays, and integration hooks
|
|
31
|
-
*/
|
|
32
|
-
export function renderTrinityHealingPanel(options?: {
|
|
33
|
-
vortexStream?: unknown;
|
|
34
|
-
onHealingEvent?: (event: unknown) => void;
|
|
35
|
-
}): string {
|
|
36
|
-
const states = getTrinityHealingStates();
|
|
37
|
-
return [
|
|
38
|
-
'<div id="trinity-healing-panel" style="background:#181828;border-radius:12px;padding:20px;max-width:420px;margin:0 auto;">',
|
|
39
|
-
'<h2 style="color:#8ff;text-align:center;">Trinity Healing Integration</h2>',
|
|
40
|
-
'<div style="display:flex;justify-content:space-around;align-items:center;">',
|
|
41
|
-
states.map((s, i) => `
|
|
42
|
-
<div style="text-align:center;">
|
|
43
|
-
<div style="width:64px;height:64px;border-radius:50%;background:${s.a432.color};margin:0 auto 8px auto;box-shadow:0 0 12px ${s.a432.color};display:flex;align-items:center;justify-content:center;">
|
|
44
|
-
<span style="font-size:2em;color:#fff;font-weight:bold;">${s.value}</span>
|
|
45
|
-
</div>
|
|
46
|
-
<button style="background:#222;color:#8ff;padding:4px 12px;border-radius:6px;border:none;font-weight:bold;" onclick="(function(){window.playTrinityHealing(${i});})()">Heal</button>
|
|
47
|
-
<div style="margin-top:6px;font-size:13px;color:#ff8;">${s.a432.frequency} Hz</div>
|
|
48
|
-
<div style="margin-top:2px;font-size:12px;color:#8ff;">${s.rife.name}</div>
|
|
49
|
-
</div>
|
|
50
|
-
`).join(''),
|
|
51
|
-
'</div>',
|
|
52
|
-
'<div style="margin-top:18px;background:#222;border-radius:8px;padding:12px;color:#fff;font-size:15px;">',
|
|
53
|
-
'<b>Metaphysical Overlay</b><br>',
|
|
54
|
-
states.map(s => `<div style="margin-top:6px;"><b>${s.value}</b>: ${s.a432.metaphysical}<br><span style="color:#ff8;">Rife: ${s.rife.metaphysical}</span></div>`).join(''),
|
|
55
|
-
'</div>',
|
|
56
|
-
'<div style="margin-top:18px;text-align:center;">',
|
|
57
|
-
'<button id="cycle-trinity-btn" style="background:#222;color:#0ff;padding:6px 18px;border-radius:6px;border:none;font-weight:bold;">Cycle Trinity</button>',
|
|
58
|
-
'<button id="fold-trinity-btn" style="background:#222;color:#ff8;padding:6px 18px;border-radius:6px;border:none;font-weight:bold;margin-left:8px;">Fold (Unity)</button>',
|
|
59
|
-
'<button id="overlay-btn" style="background:#222;color:#f8f;padding:6px 18px;border-radius:6px;border:none;font-weight:bold;margin-left:8px;">Toggle Overlay</button>',
|
|
60
|
-
'</div>',
|
|
61
|
-
'<div id="healing-log" style="display:none;margin-top:16px;width:90%;max-width:400px;background:#222;border-radius:8px;padding:12px;min-height:60px;color:#fff;font-size:14px;overflow-y:auto;max-height:120px;"></div>',
|
|
62
|
-
'<script>',
|
|
63
|
-
'window.trinityHealingLog = [];',
|
|
64
|
-
'window.playTrinityHealing = function(i) {',
|
|
65
|
-
' const states = ' + JSON.stringify(states) + ';',
|
|
66
|
-
' // Play both A432 and Rife frequencies',
|
|
67
|
-
' if(states[i].a432.frequency) window.playHealingSound(states[i].a432.frequency, 0.7);',
|
|
68
|
-
' if(states[i].rife.frequency) window.playRifeFrequency(states[i].rife.frequency, 0.7);',
|
|
69
|
-
' const event = { type: "heal", trinity: states[i].value, a432: states[i].a432, rife: states[i].rife, time: new Date().toISOString() };',
|
|
70
|
-
' window.trinityHealingLog.push(event);',
|
|
71
|
-
' if(window.updateHealingLog) window.updateHealingLog();',
|
|
72
|
-
(options && options.onHealingEvent ? ' (' + options.onHealingEvent.toString() + ')(event);' : ''),
|
|
73
|
-
(options && options.vortexStream ? ' if(window.vortexStreamUpdate) window.vortexStreamUpdate(states[i].value);' : ''),
|
|
74
|
-
'};',
|
|
75
|
-
'window.playHealingSound = ' + playHealingSound.toString() + ';',
|
|
76
|
-
'window.playRifeFrequency = ' + playRifeFrequency.toString() + ';',
|
|
77
|
-
'let trinityIndex = 0;',
|
|
78
|
-
'const cycleBtn = document.getElementById("cycle-trinity-btn");',
|
|
79
|
-
'const foldBtn = document.getElementById("fold-trinity-btn");',
|
|
80
|
-
'const overlayBtn = document.getElementById("overlay-btn");',
|
|
81
|
-
'cycleBtn.onclick = function() {',
|
|
82
|
-
' trinityIndex = (trinityIndex + 1) % 3;',
|
|
83
|
-
' const panel = document.getElementById("trinity-healing-panel");',
|
|
84
|
-
' panel.innerHTML = window.renderTrinityHealingPanel({ vortexStream: ' + (options && options.vortexStream ? 'true' : 'false') + ' });',
|
|
85
|
-
'};',
|
|
86
|
-
'foldBtn.onclick = function() {',
|
|
87
|
-
' alert("Unity: All trinity states harmonized. Healing flow maximized.");',
|
|
88
|
-
' const event = { type: "fold", trinity: "unity", time: new Date().toISOString() };',
|
|
89
|
-
' window.trinityHealingLog.push(event);',
|
|
90
|
-
' if(window.updateHealingLog) window.updateHealingLog();',
|
|
91
|
-
(options && options.onHealingEvent ? ' (' + options.onHealingEvent.toString() + ')(event);' : ''),
|
|
92
|
-
(options && options.vortexStream ? ' if(window.vortexStreamUpdate) window.vortexStreamUpdate("unity");' : ''),
|
|
93
|
-
'};',
|
|
94
|
-
'window.renderTrinityHealingPanel = function(opts) {',
|
|
95
|
-
' return renderTrinityHealingPanel(opts);',
|
|
96
|
-
'};',
|
|
97
|
-
'window.updateHealingLog = function() {',
|
|
98
|
-
' const logPanel = document.getElementById("healing-log");',
|
|
99
|
-
' if(!logPanel) return;',
|
|
100
|
-
' logPanel.style.display = "block";',
|
|
101
|
-
' logPanel.innerText = window.trinityHealingLog.map(e => `[${e.time}] ${e.type === "heal" ? "Heal" : "Fold"} | Trinity: ${e.trinity} | A432: ${e.a432 ? e.a432.frequency + "Hz" : "-"} | Rife: ${e.rife ? e.rife.frequency + "Hz" : "-"}`).join("\n");',
|
|
102
|
-
'};',
|
|
103
|
-
'overlayBtn.onclick = function() {',
|
|
104
|
-
' const logPanel = document.getElementById("healing-log");',
|
|
105
|
-
' logPanel.style.display = logPanel.style.display === "block" ? "none" : "block";',
|
|
106
|
-
'};',
|
|
107
|
-
'</script>',
|
|
108
|
-
'</div>'
|
|
109
|
-
].join('\n');
|
|
110
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { PI, cos, sin } from './a432.algebra.ts'
|
|
2
|
-
import { getTrinityDotStyle, trinityFieldState } from './a432.trinity.ts';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* NOTE: These functions are for browser/DOM use. If using in a non-DOM environment, adapt as needed.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* TrinityDot: Render a single trinity dot as a div (HTML) with harmonized style.
|
|
10
|
-
*/
|
|
11
|
-
export function TrinityDot({ trinity, angle = 0, label = null }: { trinity: number, angle?: number, label?: string | null }): any {
|
|
12
|
-
const dot = document.createElement('div');
|
|
13
|
-
dot.style.cssText = getTrinityDotStyle(trinity, angle);
|
|
14
|
-
dot.title = `Trinity: ${trinity} @ ${angle}°`;
|
|
15
|
-
dot.textContent = label !== null ? label : String(trinity);
|
|
16
|
-
return dot;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* TrinityAxis: Render the three trinity axis points (3, 6, 9) on a circle as divs (HTML).
|
|
21
|
-
*/
|
|
22
|
-
export function TrinityAxis({ size = 180, center = { x: 90, y: 90 } }: { size?: number, center?: { x: number, y: number } }): any {
|
|
23
|
-
const container = document.createElement('div');
|
|
24
|
-
container.style.cssText = `position:relative;width:${size}px;height:${size}px;display:inline-block;`;
|
|
25
|
-
const r = size * 0.36;
|
|
26
|
-
[0, 1, 2].forEach(i => {
|
|
27
|
-
const angle = i * 120;
|
|
28
|
-
const rad = (angle * PI) / 180;
|
|
29
|
-
const x = center.x + r * cos(rad) - 16;
|
|
30
|
-
const y = center.y + r * sin(rad) - 16;
|
|
31
|
-
const trinity = [3, 6, 9][i];
|
|
32
|
-
const dot = TrinityDot({ trinity, angle, label: String(trinity) });
|
|
33
|
-
dot.style.position = 'absolute';
|
|
34
|
-
dot.style.left = `${x}px`;
|
|
35
|
-
dot.style.top = `${y}px`;
|
|
36
|
-
container.appendChild(dot);
|
|
37
|
-
});
|
|
38
|
-
return container;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* TrinityFieldMap: Render the full trinity field as a circular map of dots (HTML).
|
|
43
|
-
*/
|
|
44
|
-
export function TrinityFieldMap({ resolution = 36, size = 240 }: { resolution?: number, size?: number }): any {
|
|
45
|
-
const container = document.createElement('div');
|
|
46
|
-
container.style.cssText = `position:relative;width:${size}px;height:${size}px;display:inline-block;`;
|
|
47
|
-
const cx = size / 2, cy = size / 2, r = size * 0.38;
|
|
48
|
-
for (let i = 0; i < resolution; i++) {
|
|
49
|
-
const angle = (i * 360) / resolution;
|
|
50
|
-
const rad = (angle * PI) / 180;
|
|
51
|
-
const x = cx + r * cos(rad) - 16;
|
|
52
|
-
const y = cy + r * sin(rad) - 16;
|
|
53
|
-
const trinity = trinityFieldState(angle);
|
|
54
|
-
const dot = TrinityDot({ trinity, angle });
|
|
55
|
-
dot.style.position = 'absolute';
|
|
56
|
-
dot.style.left = `${x}px`;
|
|
57
|
-
dot.style.top = `${y}px`;
|
|
58
|
-
container.appendChild(dot);
|
|
59
|
-
}
|
|
60
|
-
return container;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* StreamToTrinityField: Render a stream of values as animated/interpolated dots on the trinity field (HTML).
|
|
65
|
-
* The stream is an array of { value, angle } objects.
|
|
66
|
-
*/
|
|
67
|
-
export function StreamToTrinityField({ stream, size = 240 }: { stream: { value: number, angle: number }[], size?: number }): any {
|
|
68
|
-
const container = document.createElement('div');
|
|
69
|
-
container.style.cssText = `position:relative;width:${size}px;height:${size}px;display:inline-block;`;
|
|
70
|
-
const cx = size / 2, cy = size / 2, r = size * 0.38;
|
|
71
|
-
stream.forEach(({ value, angle }, i) => {
|
|
72
|
-
const rad = (angle * PI) / 180;
|
|
73
|
-
const x = cx + r * cos(rad) - 16;
|
|
74
|
-
const y = cy + r * sin(rad) - 16;
|
|
75
|
-
const trinity = trinityFieldState(angle);
|
|
76
|
-
const dot = TrinityDot({ trinity, angle, label: String(value) });
|
|
77
|
-
dot.style.position = 'absolute';
|
|
78
|
-
dot.style.left = `${x}px`;
|
|
79
|
-
dot.style.top = `${y}px`;
|
|
80
|
-
dot.style.opacity = '0.85';
|
|
81
|
-
container.appendChild(dot);
|
|
82
|
-
});
|
|
83
|
-
return container;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Usage:
|
|
88
|
-
* import { TrinityAxis, TrinityFieldMap, StreamToTrinityField, TrinityDot } from './a432.trinity.ui.ts';
|
|
89
|
-
* document.body.appendChild(TrinityAxis({ size: 200 }));
|
|
90
|
-
* document.body.appendChild(TrinityFieldMap({ resolution: 36, size: 300 }));
|
|
91
|
-
* document.body.appendChild(StreamToTrinityField({ stream: [{ value: 7, angle: 45 }, ...] }));
|
|
92
|
-
*/
|