-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
913 lines (836 loc) · 31.4 KB
/
index.html
File metadata and controls
913 lines (836 loc) · 31.4 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Ontic Systems — Open source technology built for the AI era. Free for everyone.">
<meta property="og:title" content="Ontic Systems">
<meta property="og:description" content="We build the tools AI needs to build the future. Open source, free for everyone.">
<meta property="og:url" content="https://github.com/Ontic-Systems">
<meta property="og:type" content="website">
<title>Ontic Systems</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' fill='%230a0a0a'/><circle cx='16' cy='16' r='5' fill='%2300ff41'/><circle cx='16' cy='16' r='11' fill='none' stroke='%2300ff41' stroke-width='0.8' stroke-opacity='0.4'/><circle cx='16' cy='16' r='15' fill='none' stroke='%2300ff41' stroke-width='0.5' stroke-opacity='0.2'/></svg>">
<style>
/* ── Reset ─────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
background: #0a0a0a;
color: #00ff41;
font-family: 'Courier New', Courier, monospace;
overflow-x: hidden;
}
/* ── Canvas ────────────────────────────── */
/* NOTE: no CSS transition here — opacity is JS-lerped in the draw loop */
#bg-canvas {
position: fixed;
inset: 0;
z-index: 0;
}
/* ── Scanline overlay ──────────────────── */
#scanline {
position: fixed;
inset: 0;
z-index: 1;
pointer-events: none;
background: repeating-linear-gradient(
0deg,
transparent,
transparent 2px,
rgba(0, 0, 0, 0.022) 2px,
rgba(0, 0, 0, 0.022) 4px
);
}
/* ── Page sections ─────────────────────── */
.section {
position: relative;
z-index: 2;
}
/* ── Dividers ──────────────────────────── */
.divider {
position: relative;
z-index: 2;
line-height: 0;
}
.divider img { width: 100%; display: block; height: 80px; }
/* ── Animista: fade-in-bottom ──────────────── */
@keyframes fade-in-bottom {
0% { transform: translateY(24px); opacity: 0; }
100% { transform: translateY(0); opacity: 1; }
}
.fade-in-bottom {
animation: fade-in-bottom 0.7s cubic-bezier(0.39, 0.575, 0.565, 1) both;
}
/* ── Cursor blink ──────────────────────────── */
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
.cursor {
display: inline-block;
animation: blink 1s step-end infinite;
margin-left: 2px;
}
/* ── Hero ──────────────────────────────────── */
#hero {
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
padding: 10vh 8vw;
}
.hero-eyebrow {
font-size: 10px;
letter-spacing: 4px;
opacity: 0.6;
text-transform: uppercase;
margin-bottom: 20px;
animation-delay: 0s;
}
.hero-headline {
font-size: clamp(28px, 4.5vw, 58px);
font-weight: 700;
letter-spacing: -1px;
line-height: 1.05;
text-transform: uppercase;
max-width: 520px;
animation-delay: 0.3s;
}
.hero-sub {
font-size: clamp(10px, 1.1vw, 13px);
letter-spacing: 2px;
opacity: 0.6;
margin-top: 18px;
text-transform: uppercase;
line-height: 1.9;
max-width: 380px;
animation-delay: 0.6s;
}
/* ── UIVerse pulse CTA button ──────────────── */
.cta-btn {
display: inline-flex;
align-items: center;
gap: 10px;
margin-top: 32px;
padding: 10px 20px;
font-family: 'Courier New', monospace;
font-size: 10px;
letter-spacing: 3px;
text-transform: uppercase;
color: #00ff41;
background: transparent;
border: 1px solid rgba(0, 255, 65, 0.4);
cursor: pointer;
text-decoration: none;
position: relative;
overflow: hidden;
animation-delay: 0.9s;
}
.cta-btn::before {
content: '';
position: absolute;
inset: -2px;
border: 1px solid rgba(0, 255, 65, 0.2);
animation: btn-pulse 2.5s ease-in-out infinite;
}
@keyframes btn-pulse {
0%, 100% { transform: scale(1); opacity: 0.6; }
50% { transform: scale(1.04); opacity: 0; }
}
.cta-btn:hover { background: rgba(0, 255, 65, 0.07); }
.cta-dot {
width: 5px; height: 5px;
background: #00ff41;
border-radius: 50%;
animation: blink 1.8s ease-in-out infinite;
}
.hero-ctas {
display: flex;
gap: 12px;
flex-wrap: wrap;
animation-delay: 0.9s;
}
/* ── Animista: word fade-in ────────────────── */
@keyframes word-appear {
0% { opacity: 0; transform: translateY(8px); }
100% { opacity: 1; transform: translateY(0); }
}
.word-reveal span {
display: inline-block;
opacity: 0;
}
.word-reveal.revealed span {
animation: word-appear 0.4s ease both;
}
/* ── Manifesto ─────────────────────────────── */
#manifesto {
min-height: 60vh;
display: flex;
align-items: center;
padding: 8vh 8vw;
}
.manifesto-text {
font-size: clamp(16px, 2vw, 22px);
font-weight: 400;
line-height: 1.9;
opacity: 0.75;
max-width: 680px;
letter-spacing: 0.3px;
}
/* ── Animista: slide-in-left ───────────────── */
@keyframes slide-in-left {
0% { transform: translateX(-20px); opacity: 0; }
100% { transform: translateX(0); opacity: 1; }
}
.stagger-slide .principle-card {
opacity: 0;
}
.stagger-slide.revealed .principle-card:nth-child(1) { animation: slide-in-left 0.5s ease 0.0s both; }
.stagger-slide.revealed .principle-card:nth-child(2) { animation: slide-in-left 0.5s ease 0.15s both; }
.stagger-slide.revealed .principle-card:nth-child(3) { animation: slide-in-left 0.5s ease 0.3s both; }
.stagger-slide.revealed .principle-card:nth-child(4) { animation: slide-in-left 0.5s ease 0.45s both; }
/* ── How We Build ──────────────────────────── */
#how-we-build {
min-height: 70vh;
padding: 8vh 8vw;
}
.section-tag {
font-size: 8px;
letter-spacing: 4px;
text-transform: uppercase;
opacity: 0.25;
margin-bottom: 16px;
}
.section-title {
font-size: clamp(18px, 2.2vw, 28px);
font-weight: 700;
letter-spacing: -0.5px;
text-transform: uppercase;
margin-bottom: 40px;
}
.principles-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
max-width: 860px;
}
.principle-card {
border: 1px solid rgba(0, 255, 65, 0.15);
padding: 24px 28px;
}
.principle-card .card-num {
font-size: 8px;
letter-spacing: 3px;
opacity: 0.3;
margin-bottom: 10px;
text-transform: uppercase;
}
.principle-card .card-title {
font-size: 13px;
font-weight: 700;
letter-spacing: 1px;
text-transform: uppercase;
margin-bottom: 10px;
}
.principle-card .card-body {
font-size: 11px;
line-height: 1.8;
opacity: 0.55;
}
/* ── Animista: pop-in ──────────────────────── */
@keyframes pop-in {
0% { transform: scale(0.92); opacity: 0; }
100% { transform: scale(1); opacity: 1; }
}
.pop-in-group .project-card { opacity: 0; }
.pop-in-group.revealed .project-card:nth-child(1) { animation: pop-in 0.4s ease 0.0s both; }
.pop-in-group.revealed .project-card:nth-child(2) { animation: pop-in 0.4s ease 0.15s both; }
.pop-in-group.revealed .project-card:nth-child(3) { animation: pop-in 0.4s ease 0.3s both; }
/* ── Projects ──────────────────────────────── */
#projects {
min-height: 80vh;
padding: 8vh 8vw;
}
.projects-row {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 20px;
max-width: 920px;
margin-top: 40px;
}
.project-card {
border: 1px solid rgba(0, 255, 65, 0.22);
padding: 24px 26px;
display: flex;
flex-direction: column;
gap: 8px;
}
.project-card.ghost {
border-style: dashed;
opacity: 0.3;
}
.project-card.next-card {
border-style: dashed;
border-color: rgba(0, 255, 65, 0.15);
}
.project-card.next-card .proj-name {
opacity: 0.6;
}
.project-card .proj-name {
font-size: 14px;
font-weight: 700;
letter-spacing: 1px;
text-transform: uppercase;
}
.project-card .proj-meta {
font-size: 9px;
letter-spacing: 1px;
opacity: 0.45;
text-transform: uppercase;
}
.project-card .proj-desc {
font-size: 10px;
line-height: 1.8;
opacity: 0.55;
margin-top: 4px;
}
.project-card .proj-status {
font-size: 9px;
letter-spacing: 2px;
margin-top: 8px;
text-transform: uppercase;
}
.project-card .proj-link {
font-size: 9px;
letter-spacing: 2px;
color: #00ff41;
text-decoration: none;
opacity: 0.6;
margin-top: auto;
padding-top: 12px;
border-top: 1px solid rgba(0, 255, 65, 0.1);
text-transform: uppercase;
}
.project-card .proj-link:hover { opacity: 1; }
.proj-stars {
font-size: 9px;
opacity: 0.4;
letter-spacing: 1px;
}
/* ── Operator ──────────────────────────────── */
#operator {
min-height: 50vh;
display: flex;
flex-direction: column;
justify-content: center;
padding: 8vh 8vw;
}
.operator-name {
font-size: clamp(14px, 1.8vw, 20px);
font-weight: 400;
line-height: 1.9;
opacity: 0.7;
margin-bottom: 24px;
}
.operator-name strong { font-weight: 700; opacity: 1; color: #00ff41; }
.operator-links {
display: flex;
gap: 16px;
margin-bottom: 48px;
}
.operator-links a {
font-size: 9px;
letter-spacing: 3px;
text-transform: uppercase;
color: #00ff41;
text-decoration: none;
opacity: 0.45;
border: 1px solid rgba(0,255,65,0.2);
padding: 6px 12px;
}
.operator-links a:hover { opacity: 0.9; }
footer {
font-size: 9px;
letter-spacing: 2px;
opacity: 0.2;
text-transform: uppercase;
border-top: 1px solid rgba(0,255,65,0.08);
padding-top: 20px;
}
/* ── Fade-in for operator ──────────────────── */
.fade-in-op {
opacity: 0;
transition: opacity 0.8s ease, transform 0.8s ease;
transform: translateY(12px);
}
.fade-in-op.visible {
opacity: 1;
transform: translateY(0);
}
/* ── Responsive ────────────────────────────── */
@media (max-width: 640px) {
.hero-headline { font-size: 28px; }
.principles-grid { grid-template-columns: 1fr; }
.projects-row { grid-template-columns: 1fr; }
.operator-links { flex-direction: column; }
}
</style>
</head>
<body>
<canvas id="bg-canvas" aria-hidden="true" role="presentation"></canvas>
<div id="scanline"></div>
<!-- §00 Hero -->
<section id="hero" class="section">
<p class="hero-eyebrow fade-in-bottom">Ontic Systems</p>
<h1 class="hero-headline fade-in-bottom">
A programming<br>language built<br>for AI agents.<span class="cursor">|</span>
</h1>
<p class="hero-sub fade-in-bottom">
Ontic Systems builds open source infrastructure<br>
for the agentic era. Starting with Gradient.
</p>
<div class="hero-ctas fade-in-bottom">
<a href="https://github.com/Ontic-Systems/Gradient" class="cta-btn" target="_blank" rel="noopener">
<span class="cta-dot"></span>
Star Gradient on GitHub
</a>
<a href="https://github.com/Ontic-Systems" class="cta-btn" target="_blank" rel="noopener">
<span class="cta-dot"></span>
Follow the org
</a>
</div>
</section>
<!-- Divider 1 -->
<div class="divider"><img src="assets/divider-1.svg" alt=""></div>
<!-- §01 Manifesto -->
<section id="manifesto" class="section">
<p class="manifesto-text word-reveal" id="manifesto-text">
AI is rewriting how software gets made.
We're building the infrastructure it needs to do it right —
languages, tools, and systems. Open source, always.
</p>
</section>
<!-- Divider 2 -->
<div class="divider"><img src="assets/divider-2.svg" alt=""></div>
<!-- §02 How We Build -->
<section id="how-we-build" class="section">
<p class="section-tag">§ 02</p>
<h2 class="section-title">How We Build</h2>
<div class="principles-grid stagger-slide" id="principles-grid">
<div class="principle-card">
<p class="card-num">01</p>
<p class="card-title">Open Source</p>
<p class="card-body">Every project ships MIT or Apache. No exceptions. The work belongs to everyone.</p>
</div>
<div class="principle-card">
<p class="card-num">02</p>
<p class="card-title">AI-Native</p>
<p class="card-body">Built for the agent era from day one. Not retrofitted. Designed to be used by machines.</p>
</div>
<div class="principle-card">
<p class="card-num">03</p>
<p class="card-title">Free Forever</p>
<p class="card-body">No paywalls, no tiers. If it exists, you can use it. That's the whole model.</p>
</div>
<div class="principle-card">
<p class="card-num">04</p>
<p class="card-title">Built in Public</p>
<p class="card-body">All code on GitHub. All decisions visible. The process is part of the product.</p>
</div>
</div>
</section>
<!-- Divider 3 -->
<div class="divider"><img src="assets/divider-3.svg" alt=""></div>
<!-- §03 Projects -->
<section id="projects" class="section">
<p class="section-tag">§ 03</p>
<h2 class="section-title">Active Projects</h2>
<div class="projects-row pop-in-group" id="projects-row">
<div class="project-card">
<p class="proj-name">Gradient</p>
<p class="proj-meta">Rust · MIT License · <span id="gradient-stars">—</span> ★</p>
<p class="proj-desc">The first programming language designed for AI agents. Token-efficient, systems-capable, agentic-first.</p>
<p class="proj-status">● In development</p>
<a class="proj-link" href="https://github.com/Ontic-Systems/Gradient" target="_blank" rel="noopener">
github.com/Ontic-Systems/Gradient →
</a>
</div>
<div class="project-card next-card">
<p class="proj-name">What's Next</p>
<p class="proj-desc">Gradient is the first project. More are coming — compilers,
agent runtimes, and protocol libraries. All MIT licensed.</p>
<a class="proj-link" href="https://github.com/Ontic-Systems" target="_blank" rel="noopener">
Follow the org on GitHub →
</a>
</div>
</div>
</section>
<!-- Divider 4 -->
<div class="divider"><img src="assets/divider-4.svg" alt=""></div>
<!-- §04 Operator -->
<section id="operator" class="section">
<p class="operator-name fade-in-op" id="op-name">
Operated by <strong>@graydeon</strong>.<br>
One person. Many tools. All in public.
</p>
<div class="operator-links fade-in-op" id="op-links" style="transition-delay:0.2s">
<a href="https://github.com/Ontic-Systems" target="_blank" rel="noopener">GitHub →</a>
<a href="https://github.com/graydeon" target="_blank" rel="noopener">@graydeon →</a>
</div>
<footer class="fade-in-op" id="op-footer" style="transition-delay:0.4s">
© Ontic Systems · MIT Licensed · github.com/Ontic-Systems
</footer>
</section>
<script>
// ── Canvas setup ────────────────────────────────────────────────────────────
const canvas = document.getElementById('bg-canvas');
const ctx = canvas.getContext('2d');
const G = (a) => `rgba(0,255,65,${a})`;
let W, H, frame = 0;
// ── rAF guard — prevents double draw loops on resize ────────────────────────
let rafId = null;
function resize() {
W = canvas.width = window.innerWidth;
H = canvas.height = window.innerHeight;
buildLayout();
// Cancel any existing draw loop and restart cleanly
if (rafId !== null) {
cancelAnimationFrame(rafId);
rafId = null;
draw();
}
}
// ── Graph topology ───────────────────────────────────────────────────────────
// Hub at center-right. Five rings of project nodes around it.
const HUB_LABEL = 'ONTIC SYSTEMS';
const RING_RADII = [120, 200, 290, 390, 500];
const RING_COUNTS = [5, 8, 10, 12, 15]; // 50 total project nodes
// Generate PROJ_NAMES dynamically: GRADIENT first, then OSS-02 … OSS-50
const PROJ_NAMES = ['GRADIENT'];
for (let i = 2; i <= 50; i++) PROJ_NAMES.push(`OSS-${String(i).padStart(2, '0')}`);
let hub, projNodes, allNodes, edges, edgeSet, packets, spawnIdx;
function buildLayout() {
const cx = W * 0.62;
const cy = H * 0.5;
hub = { x: cx, y: cy, tx: cx, ty: cy, r: 9, label: HUB_LABEL, isHub: true, pulse: 0, visible: true, age: 0 };
projNodes = [];
let nameIdx = 0;
for (let ring = 0; ring < RING_RADII.length; ring++) {
const count = RING_COUNTS[ring];
const radius = RING_RADII[ring];
for (let i = 0; i < count; i++) {
const angle = (i / count) * Math.PI * 2 - Math.PI / 2 + ring * 0.25;
const tx = cx + Math.cos(angle) * radius;
const ty = cy + Math.sin(angle) * radius;
projNodes.push({
x: cx, y: cy, tx, ty,
r: ring === 0 ? 5 : ring === 1 ? 3.5 : ring === 2 ? 2.5 : ring === 3 ? 2 : 1.5,
label: PROJ_NAMES[nameIdx] || `OSS-${nameIdx + 2}`,
isHub: false, pulse: Math.random() * Math.PI * 2,
visible: false, age: 0,
ring,
});
nameIdx++;
}
}
allNodes = [hub, ...projNodes];
edges = [];
edgeSet = new Set();
packets = [];
spawnIdx = 0;
}
// ── Spawning ─────────────────────────────────────────────────────────────────
function spawnNextNode() {
if (spawnIdx >= projNodes.length) return;
const n = projNodes[spawnIdx];
n.visible = true;
n.x = hub.x; n.y = hub.y; // ensure it eases out from hub on re-spawn
// Ring-0 nodes connect directly to hub; others connect to nearest visible node
let parent = hub;
if (n.ring > 0) {
let best = hub, bestDist = Infinity;
for (const m of projNodes.slice(0, spawnIdx)) {
if (!m.visible) continue;
const d = Math.hypot(m.tx - n.tx, m.ty - n.ty);
if (d < bestDist) { bestDist = d; best = m; }
}
parent = best;
}
const newEdge = { from: parent, to: n, alpha: 0 };
edges.push(newEdge);
edgeSet.add(newEdge);
spawnIdx++;
}
function despawnLastNode() {
if (spawnIdx <= 0) return;
spawnIdx--;
const n = projNodes[spawnIdx];
n.visible = false;
n.x = hub.x; n.y = hub.y; // reset position for re-spawn
// Remove the last edge (the one that connected this node)
const removed = edges.pop();
if (removed) edgeSet.delete(removed);
}
// ── Packets ───────────────────────────────────────────────────────────────────
let waveTimer = 0;
const WAVE_INTERVAL = 70;
function firePacketWave() {
const live = edges.filter(e => e.alpha > 0.25);
if (!live.length) return;
live.forEach((e, i) => {
setTimeout(() => {
packets.push({ edge: e, t: 0, speed: 0.014 + Math.random() * 0.012, rev: Math.random() < 0.35 });
}, i * 35);
});
}
// ── Log strip ─────────────────────────────────────────────────────────────────
const LOG_MSGS = ['COMMIT','BUILD OK','TESTS PASS','RELEASE','FORK','STAR','MERGE','ISSUE CLOSED','PR MERGED','CI PASS','LINT OK','DEPLOY','TAG','PUSH'];
const logRows = Array.from({ length: 20 }, (_, i) => ({
y: i * 32 + 14,
text: LOG_MSGS[i % LOG_MSGS.length],
op: 0.025 + Math.random() * 0.045,
timer: Math.floor(Math.random() * 120),
interval: 80 + Math.floor(Math.random() * 140),
flash: 0,
}));
// ── Canvas opacity state (controlled by scroll observer) ──────────────────
window._canvasState = { opacity: 1, targetOpacity: 1 };
// ── Accessibility: reduced motion ────────────────────────────────────────────
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
// ── Live GitHub topology (with static fallback) ──────────────────────────────
async function fetchLiveTopology() {
try {
const res = await fetch('https://api.github.com/orgs/Ontic-Systems/repos?per_page=30');
if (!res.ok) return null;
const repos = await res.json();
if (!Array.isArray(repos) || repos.length === 0) return null;
return repos.map(r => ({
name: r.name.toUpperCase(),
stars: r.stargazers_count,
url: r.html_url,
}));
} catch { return null; }
}
// This is called after the page loads. If live data is available, rebuild the layout.
// Otherwise, the static topology remains.
fetchLiveTopology().then(repos => {
if (!repos) return; // Use static topology
// Merge: GRADIENT stays first, then real repos, then static OSS nodes
const liveNames = ['GRADIENT', ...repos.map(r => r.name).filter(n => n !== 'GRADIENT')];
// Update only the labels — positions rebuild on next resize
liveNames.forEach((name, i) => {
if (projNodes[i]) projNodes[i].label = name.substring(0, 12); // truncate long names
});
});
// ── Draw loop ─────────────────────────────────────────────────────────────────
function draw() {
if (prefersReducedMotion) {
// Static fallback — draw grid + hub node only, no animation loop
ctx.clearRect(0, 0, W, H);
ctx.fillStyle = '#0a0a0a';
ctx.fillRect(0, 0, W, H);
ctx.strokeStyle = G(0.025);
ctx.lineWidth = 0.5;
for (let x = 0; x < W; x += 48) { ctx.beginPath(); ctx.moveTo(x, 0); ctx.lineTo(x, H); ctx.stroke(); }
for (let y = 0; y < H; y += 48) { ctx.beginPath(); ctx.moveTo(0, y); ctx.lineTo(W, y); ctx.stroke(); }
const hx = W * 0.62, hy = H * 0.5;
ctx.beginPath(); ctx.arc(hx, hy, 9, 0, Math.PI * 2);
ctx.fillStyle = G(0.9); ctx.fill();
ctx.font = '8px Courier New'; ctx.fillStyle = G(0.6);
ctx.fillText('ONTIC SYSTEMS', hx - ctx.measureText('ONTIC SYSTEMS').width / 2, hy - 20);
return; // No rAF — static render
}
frame++;
ctx.clearRect(0, 0, W, H);
ctx.fillStyle = '#0a0a0a';
ctx.fillRect(0, 0, W, H);
// Smooth opacity transition
const cs = window._canvasState;
cs.opacity += (cs.targetOpacity - cs.opacity) * 0.04;
canvas.style.opacity = cs.opacity;
// Grid
ctx.strokeStyle = G(0.025);
ctx.lineWidth = 0.5;
for (let x = 0; x < W; x += 48) { ctx.beginPath(); ctx.moveTo(x, 0); ctx.lineTo(x, H); ctx.stroke(); }
for (let y = 0; y < H; y += 48) { ctx.beginPath(); ctx.moveTo(0, y); ctx.lineTo(W, y); ctx.stroke(); }
// Packet waves
waveTimer++;
if (waveTimer >= WAVE_INTERVAL) { firePacketWave(); waveTimer = 0; }
// Ease nodes to target
for (const n of allNodes) {
if (!n.visible) continue;
n.x += (n.tx - n.x) * 0.045;
n.y += (n.ty - n.y) * 0.045;
n.age++;
n.pulse += 0.032;
}
// Fade edges in
for (const e of edges) e.alpha = Math.min(1, e.alpha + 0.016);
// Log strip (right edge)
ctx.font = '9px Courier New';
for (const l of logRows) {
l.timer++;
if (l.timer >= l.interval) {
l.timer = 0;
l.interval = 80 + Math.floor(Math.random() * 140);
l.text = LOG_MSGS[Math.floor(Math.random() * LOG_MSGS.length)];
l.flash = 10;
}
if (l.flash > 0) l.flash--;
ctx.fillStyle = G(l.flash > 0 ? l.op * 5 : l.op);
ctx.fillText(l.text, W - 80, l.y);
}
// Edges
for (const e of edges) {
ctx.beginPath();
ctx.moveTo(e.from.x, e.from.y);
ctx.lineTo(e.to.x, e.to.y);
ctx.strokeStyle = G(e.alpha * 0.2);
ctx.lineWidth = 0.8;
ctx.stroke();
}
// Packets
for (let i = packets.length - 1; i >= 0; i--) {
const p = packets[i];
// Guard: skip packets whose edge was removed by despawn
if (!edgeSet.has(p.edge)) { packets.splice(i, 1); continue; }
p.t += p.speed;
if (p.t >= 1) { packets.splice(i, 1); continue; }
const t = p.rev ? 1 - p.t : p.t;
const px = p.edge.from.x + (p.edge.to.x - p.edge.from.x) * t;
const py = p.edge.from.y + (p.edge.to.y - p.edge.from.y) * t;
const alpha = Math.sin(p.t * Math.PI) * 0.9;
ctx.beginPath(); ctx.arc(px, py, 2, 0, Math.PI * 2);
ctx.fillStyle = G(alpha); ctx.fill();
const tp = Math.max(0, p.t - 0.06);
const tt = p.rev ? 1 - tp : tp;
const tx2 = p.edge.from.x + (p.edge.to.x - p.edge.from.x) * tt;
const ty2 = p.edge.from.y + (p.edge.to.y - p.edge.from.y) * tt;
ctx.beginPath(); ctx.moveTo(tx2, ty2); ctx.lineTo(px, py);
ctx.strokeStyle = G(alpha * 0.3); ctx.lineWidth = 1; ctx.stroke();
}
// Nodes
for (const n of allNodes) {
if (!n.visible) continue;
const p = 0.5 + 0.5 * Math.sin(n.pulse);
if (n.isHub) {
for (let ring = 0; ring < 3; ring++) {
ctx.beginPath();
ctx.arc(n.x, n.y, n.r + 10 + ring * 9 + p * 4, 0, Math.PI * 2);
ctx.strokeStyle = G(0.07 - ring * 0.018);
ctx.lineWidth = 0.6;
ctx.stroke();
}
}
ctx.beginPath();
ctx.arc(n.x, n.y, n.r, 0, Math.PI * 2);
ctx.fillStyle = n.isHub ? G(0.9 + p * 0.1) : G(0.35 + p * 0.3);
ctx.fill();
ctx.font = n.isHub ? '8px Courier New' : '7px Courier New';
ctx.fillStyle = G(n.isHub ? 0.6 : 0.28);
const lx = n.isHub ? n.x - ctx.measureText(n.label).width / 2 : n.x + n.r + 5;
const ly = n.isHub ? n.y - n.r - 10 : n.y + 3;
ctx.fillText(n.label, lx, ly);
}
rafId = requestAnimationFrame(draw);
}
// First build + start loop
resize();
window.addEventListener('resize', resize);
draw();
// ── Scroll-synced node spawning ─────────────────────────────────────────────
function updateNodesForScroll() {
const scrollable = document.body.scrollHeight - window.innerHeight;
if (scrollable <= 0) return;
const progress = Math.min(1, window.scrollY / scrollable);
const target = Math.round(progress * projNodes.length);
while (spawnIdx < target) spawnNextNode();
while (spawnIdx > target) despawnLastNode();
}
window.addEventListener('scroll', updateNodesForScroll, { passive: true });
// Call once on load so the first state is correct
updateNodesForScroll();
// ── Canvas scroll-state machine ────────────────────────────────────────────
const SECTION_STATES = {
'hero': { targetOpacity: 1.0 },
'manifesto': { targetOpacity: 0.28 },
'how-we-build': { targetOpacity: 0.55 },
'projects': { targetOpacity: 0.75 },
'operator': { targetOpacity: 0.15 },
};
(function () {
const sections = Object.keys(SECTION_STATES).map(id => document.getElementById(id));
const scrollObserver = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (!entry.isIntersecting) return;
const state = SECTION_STATES[entry.target.id];
if (state) window._canvasState.targetOpacity = state.targetOpacity;
});
}, { threshold: 0.4 });
sections.forEach(s => s && scrollObserver.observe(s));
})();
// ── Manifesto word-by-word reveal ─────────────────────────────────────────
(function () {
const el = document.getElementById('manifesto-text');
if (!el) return;
// Wrap each word in a span — preserves em-dash as its own token via \s+ split
el.innerHTML = el.textContent
.trim()
.split(/\s+/)
.map((w, i) => `<span style="animation-delay:${i * 0.06}s">${w} </span>`)
.join('');
const observer = new IntersectionObserver(([entry]) => {
if (entry.isIntersecting) {
el.classList.add('revealed');
observer.disconnect();
}
}, { threshold: 0.3 });
observer.observe(el);
})();
// ── Principle cards stagger reveal ────────────────────────────────────────
(function () {
const grid = document.getElementById('principles-grid');
if (!grid) return;
const observer = new IntersectionObserver(([entry]) => {
if (entry.isIntersecting) {
grid.classList.add('revealed');
observer.disconnect();
}
}, { threshold: 0.2 });
observer.observe(grid);
})();
// ── Projects: GitHub stars fetch ──────────────────────────────────────────
fetch('https://api.github.com/repos/Ontic-Systems/Gradient')
.then(r => r.json())
.then(data => {
const el = document.getElementById('gradient-stars');
if (el && typeof data.stargazers_count === 'number') {
el.textContent = data.stargazers_count;
}
})
.catch(() => { /* silent fail — stars stay as — */ });
// ── Projects cards pop-in reveal ──────────────────────────────────────────
(function () {
const row = document.getElementById('projects-row');
if (!row) return;
const observer = new IntersectionObserver(([entry]) => {
if (entry.isIntersecting) {
row.classList.add('revealed');
observer.disconnect();
}
}, { threshold: 0.2 });
observer.observe(row);
})();
// ── Operator section fade-in ───────────────────────────────────────────────
(function () {
const targets = ['op-name', 'op-links', 'op-footer'].map(id => document.getElementById(id));
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting) entry.target.classList.add('visible');
});
}, { threshold: 0.2 });
targets.forEach(t => t && observer.observe(t));
})();
</script>
</body>
</html>