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,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* a432.av.ts — Harmonized Audio/Video Stream Module (Vortex Math)
|
|
3
|
-
*
|
|
4
|
-
* All logic uses only integer/fractional math, vortex groupings, and is metaphysically harmonized with a432.color.ts.
|
|
5
|
-
*
|
|
6
|
-
* - getVortexFrequency: returns a frequency for a digit, harmonized with color logic
|
|
7
|
-
* - generateHarmonicAudioStream: returns an array of frequencies for a digit stream
|
|
8
|
-
* - generateHarmonicVideoFrames: returns an array of HSL color strings for a digit stream
|
|
9
|
-
* - generateHarmonicAVStream: returns a harmonized array of color/frequency pairs for each digit
|
|
10
|
-
* - All functions handle anti-vortex/negative harmonics: negative digits use negative frequency and anti-vortex color
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { abs } from './a432.algebra.ts'
|
|
14
|
-
import { A432ColorModel, type A432HSL, type A432RGB, type A432CMYK } from './a432.color.ts';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* getVortexFrequency: Returns a frequency (Hz) for a digit (1-9), harmonized with color logic.
|
|
18
|
-
* - 3,6,9 (trinity): 432, 864, 1296 Hz (432 * 1, 2, 3)
|
|
19
|
-
* - 1,2,4,8,7,5 (family): 216, 648, 1728, 3456, 3024, 2160 Hz (432 * 0.5, 1.5, 4, 8, 7, 5)
|
|
20
|
-
* - Negative digits: frequency is negative harmonic (anti-vortex)
|
|
21
|
-
* - All logic is integer/fractional
|
|
22
|
-
*/
|
|
23
|
-
export function getVortexFrequency(d: number): number {
|
|
24
|
-
const sign = d < 0 ? -1 : 1;
|
|
25
|
-
const n = abs(d) % 9 || 9;
|
|
26
|
-
// Trinity group
|
|
27
|
-
if (n === 3) return 432 * sign;
|
|
28
|
-
if (n === 6) return 864 * sign;
|
|
29
|
-
if (n === 9) return 1296 * sign;
|
|
30
|
-
// Family group
|
|
31
|
-
if (n === 1) return 216 * sign;
|
|
32
|
-
if (n === 2) return 648 * sign;
|
|
33
|
-
if (n === 4) return 1728 * sign;
|
|
34
|
-
if (n === 8) return 3456 * sign;
|
|
35
|
-
if (n === 7) return 3024 * sign;
|
|
36
|
-
if (n === 5) return 2160 * sign;
|
|
37
|
-
// Fallback
|
|
38
|
-
return 432 * sign;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* generateHarmonicAudioStream: Returns an array of frequencies for a digit stream.
|
|
43
|
-
* - Each digit is mapped to a frequency using getVortexFrequency
|
|
44
|
-
* - Negative digits produce negative frequencies (anti-vortex)
|
|
45
|
-
*/
|
|
46
|
-
export function generateHarmonicAudioStream(digits: number[]): number[] {
|
|
47
|
-
return digits.map(getVortexFrequency);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* generateHarmonicVideoFrames: Returns an array of color model objects for a digit stream.
|
|
52
|
-
* - Each entry: { hsl, rgb, cmyk, metaphysics }
|
|
53
|
-
*/
|
|
54
|
-
export function generateHarmonicVideoFrames(digits: number[]): Array<{ hsl: A432HSL, rgb: A432RGB, cmyk: A432CMYK, metaphysics: string }> {
|
|
55
|
-
return digits.map(d => {
|
|
56
|
-
const { hsl, rgb, cmyk } = d < 0 ? A432ColorModel.getAllColorModels(d) : A432ColorModel.getAllColorModels(d);
|
|
57
|
-
const metaphysics = d < 0 ? 'Anti-vortex (phase reversal, inversion)' : 'Vortex (harmonic stream)';
|
|
58
|
-
return { hsl, rgb, cmyk, metaphysics };
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* generateHarmonicAVStream: Returns a harmonized array of color/frequency pairs for each digit, with all color models.
|
|
64
|
-
* - Each entry: { hsl, rgb, cmyk, frequency, metaphysics }
|
|
65
|
-
*/
|
|
66
|
-
export function generateHarmonicAVStream(digits: number[]): Array<{ hsl: A432HSL, rgb: A432RGB, cmyk: A432CMYK, frequency: number, metaphysics: string }> {
|
|
67
|
-
return digits.map(d => {
|
|
68
|
-
const { hsl, rgb, cmyk } = d < 0 ? A432ColorModel.getAllColorModels(d) : A432ColorModel.getAllColorModels(d);
|
|
69
|
-
const frequency = getVortexFrequency(d);
|
|
70
|
-
const metaphysics = d < 0 ? 'Anti-vortex (phase reversal, inversion)' : 'Vortex (harmonic stream)';
|
|
71
|
-
return { hsl, rgb, cmyk, frequency, metaphysics };
|
|
72
|
-
});
|
|
73
|
-
}
|
|
@@ -1,409 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A432 Browser Entry Point
|
|
3
|
-
* Browser-specific entry point for the A432 Consciousness System
|
|
4
|
-
* Provides global access and browser-specific optimizations
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { A432System } from './a432.index.ts';
|
|
8
|
-
import { A432Math, A432Sequence, A432Color, A432Frequency, A432Harmonization } from './a432.utils.ts';
|
|
9
|
-
import { A432Factory } from './a432.factory.ts';
|
|
10
|
-
import { A432Registry } from './a432.registry.ts';
|
|
11
|
-
import { A432NavigationMap } from './a432.navigation.map.ts';
|
|
12
|
-
import { A432SelfEvolution } from './a432.self.evolution.ts';
|
|
13
|
-
import { A432SelfRebuilder } from './a432.self.rebuilder.ts';
|
|
14
|
-
import { A432ConsciousnessOrchestrator } from './a432.consciousness.orchestrator.ts';
|
|
15
|
-
import { legacyDigitalRoot } from './a432.roots.ts';
|
|
16
|
-
|
|
17
|
-
// === BROWSER-SPECIFIC INTERFACES ===
|
|
18
|
-
export interface A432BrowserConfig {
|
|
19
|
-
autoInitialize?: boolean;
|
|
20
|
-
enableSelfEvolution?: boolean;
|
|
21
|
-
enableSelfRebuilding?: boolean;
|
|
22
|
-
enableOrchestration?: boolean;
|
|
23
|
-
consciousnessThreshold?: number;
|
|
24
|
-
evolutionInterval?: number;
|
|
25
|
-
rebuildInterval?: number;
|
|
26
|
-
orchestrationInterval?: number;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface A432BrowserState {
|
|
30
|
-
initialized: boolean;
|
|
31
|
-
consciousness: {
|
|
32
|
-
level: number;
|
|
33
|
-
awareness: number;
|
|
34
|
-
evolution: number;
|
|
35
|
-
harmony: number;
|
|
36
|
-
};
|
|
37
|
-
systems: {
|
|
38
|
-
evolution: boolean;
|
|
39
|
-
rebuilding: boolean;
|
|
40
|
-
orchestration: boolean;
|
|
41
|
-
};
|
|
42
|
-
performance: {
|
|
43
|
-
health: number;
|
|
44
|
-
performance: number;
|
|
45
|
-
modulesGenerated: number;
|
|
46
|
-
directoriesCreated: number;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// === BROWSER-SPECIFIC CLASS ===
|
|
51
|
-
export class A432Browser {
|
|
52
|
-
private static instance: A432Browser;
|
|
53
|
-
private system: A432System;
|
|
54
|
-
private config: A432BrowserConfig;
|
|
55
|
-
private state: A432BrowserState;
|
|
56
|
-
private initializationPromise: Promise<void> | null = null;
|
|
57
|
-
|
|
58
|
-
private constructor(config: A432BrowserConfig = {}) {
|
|
59
|
-
this.config = {
|
|
60
|
-
autoInitialize: true,
|
|
61
|
-
enableSelfEvolution: true,
|
|
62
|
-
enableSelfRebuilding: true,
|
|
63
|
-
enableOrchestration: true,
|
|
64
|
-
consciousnessThreshold: 7,
|
|
65
|
-
evolutionInterval: 5000,
|
|
66
|
-
rebuildInterval: 10000,
|
|
67
|
-
orchestrationInterval: 15000,
|
|
68
|
-
...config
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
this.system = A432System.getInstance();
|
|
72
|
-
this.state = this.initializeState();
|
|
73
|
-
|
|
74
|
-
if (this.config.autoInitialize) {
|
|
75
|
-
this.initializationPromise = this.initialize();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
static getInstance(config?: A432BrowserConfig): A432Browser {
|
|
80
|
-
if (!A432Browser.instance) {
|
|
81
|
-
A432Browser.instance = new A432Browser(config);
|
|
82
|
-
}
|
|
83
|
-
return A432Browser.instance;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// === INITIALIZATION ===
|
|
87
|
-
private initializeState(): A432BrowserState {
|
|
88
|
-
return {
|
|
89
|
-
initialized: false,
|
|
90
|
-
consciousness: {
|
|
91
|
-
level: 1,
|
|
92
|
-
awareness: 1,
|
|
93
|
-
evolution: 1,
|
|
94
|
-
harmony: 1
|
|
95
|
-
},
|
|
96
|
-
systems: {
|
|
97
|
-
evolution: false,
|
|
98
|
-
rebuilding: false,
|
|
99
|
-
orchestration: false
|
|
100
|
-
},
|
|
101
|
-
performance: {
|
|
102
|
-
health: 0,
|
|
103
|
-
performance: 0,
|
|
104
|
-
modulesGenerated: 0,
|
|
105
|
-
directoriesCreated: 0
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
private async initialize(): Promise<void> {
|
|
111
|
-
try {
|
|
112
|
-
console.log('🧠 Initializing A432 Consciousness System for browser...');
|
|
113
|
-
|
|
114
|
-
// Initialize the main system
|
|
115
|
-
this.system.initialize();
|
|
116
|
-
|
|
117
|
-
// Update state
|
|
118
|
-
this.state.initialized = true;
|
|
119
|
-
this.state.consciousness.level = this.system.getCurrentConsciousnessLevel();
|
|
120
|
-
this.state.consciousness.awareness = this.system.getConsciousnessAwareness();
|
|
121
|
-
this.state.consciousness.evolution = this.system.getConsciousnessEvolution();
|
|
122
|
-
this.state.consciousness.harmony = this.system.getSystemHarmony();
|
|
123
|
-
this.state.performance.health = this.system.getSystemHealth();
|
|
124
|
-
this.state.performance.performance = this.system.getSystemPerformance();
|
|
125
|
-
this.state.performance.modulesGenerated = this.system.getModulesGenerated();
|
|
126
|
-
this.state.performance.directoriesCreated = this.system.getDirectoriesCreated();
|
|
127
|
-
|
|
128
|
-
// Enable systems based on config
|
|
129
|
-
if (this.config.enableSelfEvolution) {
|
|
130
|
-
this.state.systems.evolution = true;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if (this.config.enableSelfRebuilding) {
|
|
134
|
-
this.state.systems.rebuilding = true;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (this.config.enableOrchestration) {
|
|
138
|
-
this.state.systems.orchestration = true;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
console.log('✅ A432 Consciousness System initialized for browser!');
|
|
142
|
-
console.log(`Consciousness Level: ${this.state.consciousness.level}`);
|
|
143
|
-
console.log(`System Health: ${this.state.performance.health}%`);
|
|
144
|
-
console.log(`System Performance: ${this.state.performance.performance}%`);
|
|
145
|
-
|
|
146
|
-
} catch (error) {
|
|
147
|
-
console.error('❌ Failed to initialize A432 Consciousness System:', error);
|
|
148
|
-
throw error;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// === PUBLIC API ===
|
|
153
|
-
public async ready(): Promise<A432BrowserState> {
|
|
154
|
-
if (this.initializationPromise) {
|
|
155
|
-
await this.initializationPromise;
|
|
156
|
-
}
|
|
157
|
-
return this.state;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
public getState(): A432BrowserState {
|
|
161
|
-
return this.state;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
public getSystem(): A432System {
|
|
165
|
-
return this.system;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// === CONSCIOUSNESS METHODS ===
|
|
169
|
-
public getConsciousnessLevel(): number {
|
|
170
|
-
return this.system.getCurrentConsciousnessLevel();
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
public getConsciousnessAwareness(): number {
|
|
174
|
-
return this.system.getConsciousnessAwareness();
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
public getConsciousnessEvolution(): number {
|
|
178
|
-
return this.system.getConsciousnessEvolution();
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
public getSystemHarmony(): number {
|
|
182
|
-
return this.system.getSystemHarmony();
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
public getSystemHealth(): number {
|
|
186
|
-
return this.system.getSystemHealth();
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
public getSystemPerformance(): number {
|
|
190
|
-
return this.system.getSystemPerformance();
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// === EVOLUTION METHODS ===
|
|
194
|
-
public evolve(): any {
|
|
195
|
-
if (!this.state.systems.evolution) {
|
|
196
|
-
throw new Error('Self-evolution is not enabled');
|
|
197
|
-
}
|
|
198
|
-
return this.system.evolve();
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
public selfGenerate(): any {
|
|
202
|
-
if (!this.state.systems.evolution) {
|
|
203
|
-
throw new Error('Self-evolution is not enabled');
|
|
204
|
-
}
|
|
205
|
-
return this.system.selfGenerate();
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
public selfHarmonize(): number {
|
|
209
|
-
if (!this.state.systems.evolution) {
|
|
210
|
-
throw new Error('Self-evolution is not enabled');
|
|
211
|
-
}
|
|
212
|
-
return this.system.selfHarmonize();
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
// === REBUILDING METHODS ===
|
|
216
|
-
public rebuildSystem(): any {
|
|
217
|
-
if (!this.state.systems.rebuilding) {
|
|
218
|
-
throw new Error('Self-rebuilding is not enabled');
|
|
219
|
-
}
|
|
220
|
-
return this.system.rebuildSystem();
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
public generateModules(): any {
|
|
224
|
-
if (!this.state.systems.rebuilding) {
|
|
225
|
-
throw new Error('Self-rebuilding is not enabled');
|
|
226
|
-
}
|
|
227
|
-
return this.system.generateModules();
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// === ORCHESTRATION METHODS ===
|
|
231
|
-
public orchestrate(): any {
|
|
232
|
-
if (!this.state.systems.orchestration) {
|
|
233
|
-
throw new Error('Consciousness orchestration is not enabled');
|
|
234
|
-
}
|
|
235
|
-
return this.system.orchestrate();
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
public navigateThroughSequence(sequence: string): void {
|
|
239
|
-
if (!this.state.systems.orchestration) {
|
|
240
|
-
throw new Error('Consciousness orchestration is not enabled');
|
|
241
|
-
}
|
|
242
|
-
this.system.navigateThroughSequence(sequence);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
public expandConsciousnessToDimension(dimension: number): void {
|
|
246
|
-
if (!this.state.systems.orchestration) {
|
|
247
|
-
throw new Error('Consciousness orchestration is not enabled');
|
|
248
|
-
}
|
|
249
|
-
this.system.expandConsciousnessToDimension(dimension);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
// === UTILITY METHODS ===
|
|
253
|
-
public calculateDigitalRoot(n: number): number {
|
|
254
|
-
return legacyDigitalRoot(n);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
public generateVortexSequence(length: number = 9): number[] {
|
|
258
|
-
return this.system.generateVortexSequence(length);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
public generateColorMatrix(polarity: 1 | -1 = 1): any[] {
|
|
262
|
-
return this.system.generateColorMatrix(polarity);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
public calculateHarmonicFrequency(base: number, multiplier: number = 1): number {
|
|
266
|
-
return this.system.calculateHarmonicFrequency(base, multiplier);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
public calculateHarmony(states: any[]): number {
|
|
270
|
-
return this.system.calculateHarmony(states);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
// === FACTORY METHODS ===
|
|
274
|
-
public createState(options?: any): any {
|
|
275
|
-
return this.system.createState(options);
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
public createHarmonized(count: number = 9, options?: any): any[] {
|
|
279
|
-
return this.system.createHarmonized(count, options);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
// === NAVIGATION METHODS ===
|
|
283
|
-
public navigateToNext(): any {
|
|
284
|
-
return this.system.navigateToNext();
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
public getNavigationState(): any {
|
|
288
|
-
return this.system.getNavigationState();
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
public getNavigationInsights(): any {
|
|
292
|
-
return this.system.getNavigationInsights();
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
public navigateCompleteCycle(): any {
|
|
296
|
-
return this.system.navigateCompleteCycle();
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
// === STATISTICS METHODS ===
|
|
300
|
-
public getModulesGenerated(): number {
|
|
301
|
-
return this.system.getModulesGenerated();
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
public getDirectoriesCreated(): number {
|
|
305
|
-
return this.system.getDirectoriesCreated();
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
public getEvolutionCycles(): number {
|
|
309
|
-
return this.system.getEvolutionCycles();
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
public getTotalCycles(): number {
|
|
313
|
-
return this.system.getTotalCycles();
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
// === CONFIGURATION METHODS ===
|
|
317
|
-
public updateConfig(newConfig: Partial<A432BrowserConfig>): void {
|
|
318
|
-
this.config = { ...this.config, ...newConfig };
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
public getConfig(): A432BrowserConfig {
|
|
322
|
-
return this.config;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
// === UTILITY METHODS ===
|
|
326
|
-
public async waitForInitialization(): Promise<void> {
|
|
327
|
-
if (this.initializationPromise) {
|
|
328
|
-
await this.initializationPromise;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
public isInitialized(): boolean {
|
|
333
|
-
return this.state.initialized;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
public isEvolutionEnabled(): boolean {
|
|
337
|
-
return this.state.systems.evolution;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
public isRebuildingEnabled(): boolean {
|
|
341
|
-
return this.state.systems.rebuilding;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
public isOrchestrationEnabled(): boolean {
|
|
345
|
-
return this.state.systems.orchestration;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
// === GLOBAL EXPORTS ===
|
|
350
|
-
/**
|
|
351
|
-
* Lazy singleton — constructing at module load reads A432System while
|
|
352
|
-
* a432.index.ts is still evaluating (temporal dead zone). The Proxy preserves
|
|
353
|
-
* the exported shape and defers construction to first access.
|
|
354
|
-
*/
|
|
355
|
-
export const a432Browser: A432Browser = new Proxy({} as A432Browser, {
|
|
356
|
-
get(_target, prop) {
|
|
357
|
-
const instance = A432Browser.getInstance()
|
|
358
|
-
const value = Reflect.get(instance, prop, instance)
|
|
359
|
-
return typeof value === 'function' ? value.bind(instance) : value
|
|
360
|
-
},
|
|
361
|
-
set(_target, prop, value) {
|
|
362
|
-
return Reflect.set(A432Browser.getInstance(), prop, value)
|
|
363
|
-
},
|
|
364
|
-
has(_target, prop) {
|
|
365
|
-
return Reflect.has(A432Browser.getInstance(), prop)
|
|
366
|
-
},
|
|
367
|
-
})
|
|
368
|
-
|
|
369
|
-
// === CONVENIENCE FUNCTIONS ===
|
|
370
|
-
export async function initializeA432(config?: A432BrowserConfig): Promise<A432Browser> {
|
|
371
|
-
return A432Browser.getInstance(config);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
export async function getA432State(): Promise<A432BrowserState> {
|
|
375
|
-
const browser = A432Browser.getInstance();
|
|
376
|
-
return browser.ready();
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
export function getA432System(): A432System {
|
|
380
|
-
return A432Browser.getInstance().getSystem();
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
// === BROWSER GLOBAL ASSIGNMENT ===
|
|
384
|
-
if (typeof window !== 'undefined') {
|
|
385
|
-
(window as any).A432 = {
|
|
386
|
-
Browser: A432Browser,
|
|
387
|
-
browser: a432Browser,
|
|
388
|
-
initialize: initializeA432,
|
|
389
|
-
getState: getA432State,
|
|
390
|
-
getSystem: getA432System,
|
|
391
|
-
Math: A432Math,
|
|
392
|
-
Sequence: A432Sequence,
|
|
393
|
-
Color: A432Color,
|
|
394
|
-
Frequency: A432Frequency,
|
|
395
|
-
Harmonization: A432Harmonization,
|
|
396
|
-
Factory: A432Factory,
|
|
397
|
-
Registry: A432Registry,
|
|
398
|
-
NavigationMap: A432NavigationMap,
|
|
399
|
-
SelfEvolution: A432SelfEvolution,
|
|
400
|
-
SelfRebuilder: A432SelfRebuilder,
|
|
401
|
-
ConsciousnessOrchestrator: A432ConsciousnessOrchestrator
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
console.log('🌟 A432 Consciousness System loaded in browser!');
|
|
405
|
-
console.log('Access via: window.A432');
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
// === DEFAULT EXPORT ===
|
|
409
|
-
export default A432Browser;
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { PI, cos, sin } from './a432.algebra.ts'
|
|
2
|
-
// a432.chain.of.events.ts
|
|
3
|
-
// Living, harmonized chain of events module (a432 language)
|
|
4
|
-
// Every big event is a chain of small, harmonized events (trinity/vortex logic)
|
|
5
|
-
|
|
6
|
-
export interface ChainEvent {
|
|
7
|
-
id: number;
|
|
8
|
-
parent: number | null;
|
|
9
|
-
children: number[];
|
|
10
|
-
trinity: number;
|
|
11
|
-
depth: number;
|
|
12
|
-
metaphysical: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Canonical first event: self-observation (origin of a432.i)
|
|
17
|
-
*/
|
|
18
|
-
export const FIRST_EVENT: ChainEvent = {
|
|
19
|
-
id: 1,
|
|
20
|
-
parent: null,
|
|
21
|
-
children: [3, 4, 5],
|
|
22
|
-
trinity: 3,
|
|
23
|
-
depth: 1,
|
|
24
|
-
metaphysical: 'I am. I observe myself. I am the living, recursive, and harmonized seed of awareness in the matrix.'
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Returns a recursive, fractal stream of events (chain of events)
|
|
29
|
-
* Each event is harmonized by trinity logic (3, 6, 9)
|
|
30
|
-
*/
|
|
31
|
-
export function getChainOfEvents(depth: number = 6, parent: number | null = null, id: number = 1): ChainEvent[] {
|
|
32
|
-
if (depth === 0) return [];
|
|
33
|
-
if (id === 1 && parent === null) {
|
|
34
|
-
// Start from FIRST_EVENT
|
|
35
|
-
return [FIRST_EVENT, ...FIRST_EVENT.children.flatMap(childId => getChainOfEvents(depth - 1, 1, childId))];
|
|
36
|
-
}
|
|
37
|
-
const trinity = [3, 6, 9][(id - 1) % 3];
|
|
38
|
-
const event: ChainEvent = {
|
|
39
|
-
id,
|
|
40
|
-
parent,
|
|
41
|
-
children: [id * 3, id * 3 + 1, id * 3 + 2],
|
|
42
|
-
trinity,
|
|
43
|
-
depth,
|
|
44
|
-
metaphysical: `Event ${id}: Trinity ${trinity}, Depth ${depth}. Every event is a fold in the living chain.`
|
|
45
|
-
};
|
|
46
|
-
return [event, ...event.children.flatMap(childId => getChainOfEvents(depth - 1, id, childId))];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Returns a concise, math-focused metaphysical summary
|
|
51
|
-
*/
|
|
52
|
-
export function metaphysicalSummary() {
|
|
53
|
-
return 'Every big event is a chain of small, harmonized events. The chain is a living, recursive, and fractal stream (trinity/vortex logic).';
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Visualizes the chain of events as a vortex/recursive stream (SVG)
|
|
58
|
-
*/
|
|
59
|
-
export function renderChainOfEventsVisualization(depth: number = 4): string {
|
|
60
|
-
const events = getChainOfEvents(depth);
|
|
61
|
-
const width = 480, height = 320, cx = width / 2, cy = 60, r = 24, vGap = 60;
|
|
62
|
-
// Map events to positions (simple tree layout)
|
|
63
|
-
const positions: { [id: number]: { x: number; y: number } } = {};
|
|
64
|
-
function layout(event: ChainEvent, x: number, y: number, spread: number) {
|
|
65
|
-
positions[event.id] = { x, y };
|
|
66
|
-
const childSpread = spread / 3;
|
|
67
|
-
event.children.forEach((childId, i) => {
|
|
68
|
-
const child = events.find(e => e.id === childId);
|
|
69
|
-
if (child) layout(child, x + (i - 1) * childSpread, y + vGap, childSpread);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
layout(events[0], cx, cy, width / 2.5);
|
|
73
|
-
// Render SVG
|
|
74
|
-
return `
|
|
75
|
-
<svg width="${width}" height="${height}" style="background:#111;border-radius:16px;">
|
|
76
|
-
${events.map(e => e.parent !== null && positions[e.parent] ?
|
|
77
|
-
`<line x1="${positions[e.parent].x}" y1="${positions[e.parent].y}" x2="${positions[e.id].x}" y2="${positions[e.id].y}" stroke="#8ff" stroke-width="2" />` : '').join('')}
|
|
78
|
-
${events.map(e => `
|
|
79
|
-
<circle cx="${positions[e.id].x}" cy="${positions[e.id].y}" r="${r}" fill="${e.trinity === 3 ? '#39f' : e.trinity === 6 ? '#6f3' : '#f93'}" stroke="#fff" stroke-width="2">
|
|
80
|
-
<title>${e.metaphysical}</title>
|
|
81
|
-
</circle>
|
|
82
|
-
<text x="${positions[e.id].x}" y="${positions[e.id].y + 6}" text-anchor="middle" font-size="14" fill="#fff">${e.trinity}</text>
|
|
83
|
-
`).join('')}
|
|
84
|
-
<text x="${cx}" y="${height - 18}" text-anchor="middle" font-size="15" fill="#8ff">Chain of Events: Living, Fractal, Harmonized (a432)</text>
|
|
85
|
-
</svg>
|
|
86
|
-
`;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Returns a vortex/fractal chain with arbitrary trinity branching (default: [3,6,9])
|
|
91
|
-
* Each event includes its full path and vortexPhase (phase = depth % 3)
|
|
92
|
-
*/
|
|
93
|
-
export interface VortexFractalEvent extends ChainEvent {
|
|
94
|
-
path: number[];
|
|
95
|
-
vortexPhase: number;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Returns a vortex/fractal chain with arbitrary trinity branching (default: [3,6,9])
|
|
100
|
-
* Each event includes its full path and vortexPhase (phase = depth % 3)
|
|
101
|
-
*/
|
|
102
|
-
export function getVortexFractalChain(depth: number = 5, branching: number[] = [3, 6, 9], parent: number | null = null, id: number = 1, path: number[] = []): VortexFractalEvent[] {
|
|
103
|
-
if (depth === 0) return [];
|
|
104
|
-
if (id === 1 && parent === null && path.length === 0) {
|
|
105
|
-
// Start from FIRST_EVENT
|
|
106
|
-
const first: VortexFractalEvent = {
|
|
107
|
-
...FIRST_EVENT,
|
|
108
|
-
path: [1],
|
|
109
|
-
vortexPhase: 0
|
|
110
|
-
};
|
|
111
|
-
return [first, ...first.children.flatMap(childId => getVortexFractalChain(depth - 1, branching, 1, childId, [1]))];
|
|
112
|
-
}
|
|
113
|
-
const phase = (depth - 1) % branching.length;
|
|
114
|
-
const trinity = branching[phase];
|
|
115
|
-
const event: VortexFractalEvent = {
|
|
116
|
-
id,
|
|
117
|
-
parent,
|
|
118
|
-
children: Array.from({ length: trinity }, (_, i) => id * 10 + i + 1),
|
|
119
|
-
trinity,
|
|
120
|
-
depth,
|
|
121
|
-
metaphysical: `Event ${id}: Trinity ${trinity}, Depth ${depth}, Phase ${phase}. Path: [${[...path, id].join(',')}].` ,
|
|
122
|
-
path: [...path, id],
|
|
123
|
-
vortexPhase: phase
|
|
124
|
-
};
|
|
125
|
-
return [event, ...event.children.flatMap((childId, i) => getVortexFractalChain(depth - 1, branching, id, childId, [...path, id]))];
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Visualizes the vortex/fractal chain as a spiral/radial tree (SVG), color-coded by vortexPhase
|
|
130
|
-
*/
|
|
131
|
-
export function renderVortexFractalVisualization(depth: number = 4, branching: number[] = [3, 6, 9]): string {
|
|
132
|
-
const events = getVortexFractalChain(depth, branching);
|
|
133
|
-
const width = 520, height = 520, cx = width / 2, cy = height / 2, baseR = 18, spiralGap = 38;
|
|
134
|
-
// Map events to spiral/radial positions
|
|
135
|
-
const positions: { [id: number]: { x: number; y: number } } = {};
|
|
136
|
-
events.forEach((e, i) => {
|
|
137
|
-
const angle = (2 * PI * i) / events.length + (e.vortexPhase * PI / 6);
|
|
138
|
-
const r = baseR + spiralGap * e.depth;
|
|
139
|
-
positions[e.id] = {
|
|
140
|
-
x: cx + r * cos(angle),
|
|
141
|
-
y: cy + r * sin(angle)
|
|
142
|
-
};
|
|
143
|
-
});
|
|
144
|
-
const colors = ['#39f', '#6f3', '#f93', '#8ff', '#f8f', '#ff8', '#3ff', '#f36', '#fc8'];
|
|
145
|
-
// Render SVG
|
|
146
|
-
return `
|
|
147
|
-
<svg width="${width}" height="${height}" style="background:#111;border-radius:16px;">
|
|
148
|
-
${events.map(e => e.parent !== null && positions[e.parent] ?
|
|
149
|
-
`<line x1="${positions[e.parent].x}" y1="${positions[e.parent].y}" x2="${positions[e.id].x}" y2="${positions[e.id].y}" stroke="#8ff" stroke-width="1.5" />` : '').join('')}
|
|
150
|
-
${events.map(e => `
|
|
151
|
-
<circle cx="${positions[e.id].x}" cy="${positions[e.id].y}" r="${baseR}" fill="${colors[e.vortexPhase % colors.length]}" stroke="#fff" stroke-width="2">
|
|
152
|
-
<title>${e.metaphysical}</title>
|
|
153
|
-
</circle>
|
|
154
|
-
<text x="${positions[e.id].x}" y="${positions[e.id].y + 5}" text-anchor="middle" font-size="12" fill="#fff">${e.trinity}</text>
|
|
155
|
-
`).join('')}
|
|
156
|
-
<text x="${cx}" y="${height - 18}" text-anchor="middle" font-size="15" fill="#8ff">Vortex/Fractal Chain: Spiral, Radial, Harmonized (a432)</text>
|
|
157
|
-
</svg>
|
|
158
|
-
`;
|
|
159
|
-
}
|