-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathindex.html
More file actions
1124 lines (1079 loc) · 33.7 KB
/
Copy pathindex.html
File metadata and controls
1124 lines (1079 loc) · 33.7 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
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Docs — three.ws</title>
<meta name="description" content="Documentation for three.ws — the open-source platform for 3D AI agents." />
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" href="/fonts/fonts.css" />
<link rel="stylesheet" href="/style.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css"
/>
<script src="https://cdn.jsdelivr.net/npm/marked@9.1.6/marked.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<style>
:root {
--sidebar-w: 268px;
--header-h: 52px;
--docs-accent: #8b5cf6;
--docs-accent-soft: rgba(139, 92, 246, 0.12);
--docs-bg: #09090f;
--sidebar-bg: #0c0c13;
--border: rgba(255, 255, 255, 0.07);
--text-muted: rgba(224, 224, 224, 0.5);
--text-body: rgba(224, 224, 224, 0.85);
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
height: auto;
overflow: visible;
}
body {
background: var(--docs-bg);
color: #e0e0e0;
font-family: var(--font-body);
font-size: var(--text-base);
line-height: 1.65;
display: block;
}
/* ── Header ─────────────────────────────────── */
.docs-header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: var(--header-h);
background: rgba(9, 9, 15, 0.88);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
padding: 0 var(--space-lg);
gap: var(--space-md);
z-index: 100;
}
.docs-logo {
font-family: var(--font-display);
font-size: var(--text-lg);
font-weight: 600;
color: #fff;
text-decoration: none;
display: flex;
align-items: center;
gap: 7px;
flex-shrink: 0;
}
.docs-logo-dot {
width: 9px;
height: 9px;
border-radius: 50%;
background: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
flex-shrink: 0;
}
.docs-logo-mark {
width: 24px;
height: 24px;
flex-shrink: 0;
filter: grayscale(1) contrast(1.05) brightness(1.08)
drop-shadow(0 0 5px rgba(139, 92, 246, 0.45))
drop-shadow(0 0 1px rgba(99, 102, 241, 0.55));
}
.docs-header-sep {
width: 1px;
height: 18px;
background: var(--border);
flex-shrink: 0;
}
.docs-header-label {
font-size: var(--text-sm);
color: var(--text-muted);
font-family: var(--font-body);
}
.docs-header-right {
margin-left: auto;
display: flex;
align-items: center;
gap: var(--space-sm);
}
.docs-header-right a {
font-size: var(--text-sm);
color: var(--text-muted);
text-decoration: none;
padding: 4px 10px;
border-radius: var(--radius-md);
transition: color 0.15s, background 0.15s;
}
.docs-header-right a:hover {
color: #fff;
background: rgba(255, 255, 255, 0.05);
}
.docs-header-right .btn-primary {
background: var(--docs-accent-soft);
color: #c4b5fd;
border: 1px solid rgba(139, 92, 246, 0.25);
}
.docs-header-right .btn-primary:hover {
background: rgba(139, 92, 246, 0.2);
color: #ddd6fe;
}
/* ── Shell ───────────────────────────────────── */
.docs-shell {
display: flex;
padding-top: var(--header-h);
min-height: 100vh;
}
/* ── Sidebar ─────────────────────────────────── */
.docs-sidebar {
position: fixed;
top: var(--header-h);
left: 0;
bottom: 0;
width: var(--sidebar-w);
background: var(--sidebar-bg);
border-right: 1px solid var(--border);
overflow-y: auto;
padding: var(--space-md) 0 var(--space-2xl);
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}
.docs-sidebar::-webkit-scrollbar {
width: 3px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.08);
border-radius: 2px;
}
.sidebar-search {
margin: 0 var(--space-sm) var(--space-md);
position: relative;
}
.sidebar-search input {
width: 100%;
background: rgba(255, 255, 255, 0.04);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 7px 10px 7px 32px;
font-size: var(--text-sm);
color: #ccc;
outline: none;
font-family: var(--font-body);
transition: border-color 0.15s, background 0.15s;
}
.sidebar-search input::placeholder {
color: rgba(255, 255, 255, 0.25);
}
.sidebar-search input:focus {
border-color: rgba(139, 92, 246, 0.5);
background: rgba(139, 92, 246, 0.05);
}
.sidebar-search-icon {
position: absolute;
left: 9px;
top: 50%;
transform: translateY(-50%);
pointer-events: none;
opacity: 0.35;
}
.sidebar-section {
margin-bottom: var(--space-md);
}
.sidebar-section-title {
display: block;
font-size: 10px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.28);
padding: 0 var(--space-sm) 5px var(--space-md);
}
.sidebar-link {
display: block;
padding: 5px var(--space-sm) 5px var(--space-md);
font-size: 13.5px;
color: rgba(255, 255, 255, 0.52);
text-decoration: none;
border-left: 2px solid transparent;
transition: color 0.12s, background 0.12s, border-color 0.12s;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.5;
}
.sidebar-link:hover {
color: rgba(255, 255, 255, 0.9);
background: rgba(255, 255, 255, 0.035);
}
.sidebar-link.active {
color: #c4b5fd;
border-left-color: var(--docs-accent);
background: var(--docs-accent-soft);
font-weight: 500;
}
.sidebar-link.external::after {
content: '↗';
font-size: 10px;
margin-left: 4px;
opacity: 0.5;
}
/* ── Main ────────────────────────────────────── */
.docs-main {
flex: 1;
margin-left: var(--sidebar-w);
padding: var(--space-2xl) clamp(var(--space-lg), 5vw, var(--space-2xl)) 100px;
}
.docs-content {
max-width: 728px;
}
/* ── Markdown typography ─────────────────────── */
.docs-content h1 {
font-family: var(--font-display);
font-weight: 500;
font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
letter-spacing: -0.03em;
margin: 0 0 var(--space-sm);
color: #fff;
line-height: 1.2;
}
.docs-content h2 {
font-family: var(--font-display);
font-weight: 500;
font-size: var(--text-xl);
letter-spacing: -0.02em;
margin: var(--space-2xl) 0 var(--space-sm);
padding-bottom: var(--space-xs);
border-bottom: 1px solid var(--border);
color: #fff;
line-height: 1.3;
}
.docs-content h2:first-child {
margin-top: 0;
}
.docs-content h3 {
font-weight: 600;
font-size: var(--text-lg);
margin: var(--space-xl) 0 var(--space-xs);
color: #f0f0f0;
}
.docs-content h4 {
font-weight: 600;
font-size: var(--text-base);
margin: var(--space-lg) 0 var(--space-xs);
color: #ddd;
}
.docs-content p {
color: var(--text-body);
margin: 0 0 var(--space-md);
}
.docs-content ul,
.docs-content ol {
padding-left: var(--space-lg);
margin: 0 0 var(--space-md);
}
.docs-content li {
color: var(--text-body);
margin-bottom: 4px;
}
.docs-content li > ul,
.docs-content li > ol {
margin-top: 4px;
margin-bottom: 4px;
}
.docs-content a {
color: #a78bfa;
text-decoration: none;
border-bottom: 1px solid rgba(167, 139, 250, 0.25);
transition: color 0.12s, border-color 0.12s;
}
.docs-content a:hover {
color: #c4b5fd;
border-bottom-color: rgba(196, 181, 253, 0.5);
}
.docs-content strong {
color: #fff;
font-weight: 600;
}
.docs-content em {
color: rgba(224, 224, 224, 0.75);
}
.docs-content code {
font-family: var(--font-mono);
font-size: 0.875em;
background: rgba(139, 92, 246, 0.1);
border: 1px solid rgba(139, 92, 246, 0.18);
padding: 1px 5px;
border-radius: 3px;
color: #c4b5fd;
}
.docs-content pre {
background: #0d0d18;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: var(--radius-md);
padding: var(--space-md);
overflow-x: auto;
margin: 0 0 var(--space-md);
position: relative;
}
.docs-content pre code {
background: transparent;
border: none;
padding: 0;
color: inherit;
font-size: var(--text-sm);
line-height: 1.6;
}
.docs-content blockquote {
border-left: 3px solid var(--docs-accent);
margin: 0 0 var(--space-md);
padding: var(--space-xs) var(--space-md);
background: rgba(139, 92, 246, 0.06);
border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.docs-content blockquote p {
color: rgba(224, 224, 224, 0.7);
margin: 0;
}
.docs-content table {
width: 100%;
border-collapse: collapse;
margin: 0 0 var(--space-md);
font-size: 13.5px;
}
.docs-content th {
text-align: left;
padding: 8px var(--space-sm);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.45);
font-weight: 600;
font-size: 11px;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.docs-content td {
padding: 9px var(--space-sm);
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
color: var(--text-body);
vertical-align: top;
}
.docs-content tr:last-child td {
border-bottom: none;
}
.docs-content hr {
border: none;
border-top: 1px solid var(--border);
margin: var(--space-xl) 0;
}
.docs-content img {
max-width: 100%;
border-radius: var(--radius-md);
border: 1px solid var(--border);
}
/* ── Loading state ───────────────────────────── */
.docs-loading {
display: flex;
align-items: center;
gap: var(--space-sm);
color: var(--text-muted);
font-size: var(--text-sm);
padding: var(--space-2xl) 0;
}
.docs-loading-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--docs-accent);
animation: blink 1s ease-in-out infinite;
}
@keyframes blink {
0%,
100% {
opacity: 0.15;
}
50% {
opacity: 1;
}
}
/* ── Prev/Next nav ───────────────────────────── */
.docs-pager {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space-sm);
margin-top: var(--space-2xl);
padding-top: var(--space-xl);
border-top: 1px solid var(--border);
}
.docs-pager-btn {
display: flex;
flex-direction: column;
gap: 3px;
padding: var(--space-sm) var(--space-md);
background: rgba(255, 255, 255, 0.025);
border: 1px solid var(--border);
border-radius: var(--radius-md);
text-decoration: none;
transition: background 0.15s, border-color 0.15s;
color: inherit;
}
.docs-pager-btn:hover {
background: rgba(255, 255, 255, 0.05);
border-color: rgba(255, 255, 255, 0.12);
border-bottom-color: rgba(255, 255, 255, 0.12);
}
.docs-pager-btn .pager-dir {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
}
.docs-pager-btn .pager-title {
font-size: var(--text-sm);
font-weight: 500;
color: #e0e0e0;
}
.docs-pager-btn.next {
text-align: right;
}
.docs-pager-btn.placeholder {
visibility: hidden;
}
/* ── Mobile toggle ───────────────────────────── */
.sidebar-fab {
display: none;
position: fixed;
bottom: 22px;
right: 22px;
z-index: 200;
background: var(--docs-accent);
color: #fff;
border: none;
border-radius: 50%;
width: 46px;
height: 46px;
cursor: pointer;
align-items: center;
justify-content: center;
box-shadow: 0 4px 24px rgba(139, 92, 246, 0.45);
transition: transform 0.15s;
}
.sidebar-fab:hover {
transform: scale(1.06);
}
.sidebar-overlay {
display: none;
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 140;
}
@media (max-width: 860px) {
.docs-sidebar {
transform: translateX(-100%);
transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 150;
box-shadow: 4px 0 32px rgba(0, 0, 0, 0.5);
}
.docs-sidebar.open {
transform: translateX(0);
}
.docs-main {
margin-left: 0;
padding: var(--space-lg) var(--space-md) 80px;
}
.sidebar-fab {
display: flex;
}
.sidebar-overlay.visible {
display: block;
}
}
/* highlight.js override */
.hljs {
background: transparent !important;
padding: 0 !important;
}
/* Anchor IDs — offset for fixed header */
.docs-content h2[id],
.docs-content h3[id],
.docs-content h4[id] {
scroll-margin-top: calc(var(--header-h) + 16px);
}
/* ── Copy page control ───────────────────────── */
.docs-content {
position: relative;
}
.docs-pagetools {
position: absolute;
top: 0;
right: 0;
z-index: 20;
}
.docs-pagetools + h1 {
padding-right: 184px;
}
.docs-pagetools-group {
display: inline-flex;
align-items: stretch;
border: 1px solid var(--border);
border-radius: 9px;
background: rgba(255, 255, 255, 0.025);
overflow: visible;
transition: border-color 0.15s ease, background 0.15s ease;
}
.docs-pagetools-group:hover {
border-color: rgba(255, 255, 255, 0.14);
background: rgba(255, 255, 255, 0.05);
}
.docs-pagetools-btn {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 7px 12px;
font-family: var(--font-body);
font-size: var(--text-sm);
font-weight: 500;
color: var(--text-body);
background: none;
border: none;
border-radius: 8px 0 0 8px;
cursor: pointer;
white-space: nowrap;
transition: color 0.15s ease, background 0.15s ease;
}
.docs-pagetools-btn:hover {
color: #fff;
background: rgba(255, 255, 255, 0.04);
}
.docs-pagetools-btn svg {
flex-shrink: 0;
}
.docs-pagetools-btn.copied {
color: #34d399;
}
.docs-pagetools-caret {
padding: 7px 9px;
border-left: 1px solid var(--border);
border-radius: 0 8px 8px 0;
}
.docs-pagetools-caret svg {
transition: transform 0.18s ease;
}
.docs-pagetools-group.open .docs-pagetools-caret svg {
transform: rotate(180deg);
}
.docs-pagetools-menu {
position: absolute;
top: calc(100% + 8px);
right: 0;
min-width: 288px;
padding: 6px;
background: #14141b;
border: 1px solid var(--border);
border-radius: 12px;
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
opacity: 0;
transform: translateY(-6px);
pointer-events: none;
transition: opacity 0.16s ease, transform 0.16s ease;
}
.docs-pagetools-group.open .docs-pagetools-menu {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}
.docs-pagetools-item {
display: flex;
align-items: center;
gap: 12px;
width: 100%;
padding: 9px 10px;
border-radius: 8px;
background: none;
border: none;
text-align: left;
text-decoration: none;
color: inherit;
cursor: pointer;
transition: background 0.13s ease;
}
.docs-pagetools-item:hover {
background: rgba(255, 255, 255, 0.05);
}
.docs-pagetools-item:focus-visible {
outline: 2px solid var(--docs-accent);
outline-offset: -2px;
}
.docs-pagetools-icon {
display: grid;
place-items: center;
width: 34px;
height: 34px;
flex-shrink: 0;
border: 1px solid var(--border);
border-radius: 8px;
color: var(--text-body);
background: rgba(255, 255, 255, 0.02);
}
.docs-pagetools-text {
display: flex;
flex-direction: column;
gap: 1px;
min-width: 0;
}
.docs-pagetools-title {
display: flex;
align-items: center;
gap: 5px;
font-size: var(--text-sm);
font-weight: 600;
color: #fff;
}
.docs-pagetools-title svg {
opacity: 0.45;
}
.docs-pagetools-sub {
font-size: var(--text-xs);
color: var(--text-muted);
}
@media (max-width: 640px) {
.docs-pagetools {
position: static;
margin-bottom: var(--space-md);
}
.docs-pagetools + h1 {
padding-right: 0;
}
.docs-pagetools-menu {
left: 0;
right: auto;
min-width: 0;
width: 100%;
}
}
</style>
</head>
<body>
<header class="docs-header">
<a href="/" class="docs-logo">
<img src="/three.svg" class="docs-logo-mark" alt="" aria-hidden="true" />three.ws
</a>
<span class="docs-header-sep"></span>
<span class="docs-header-label">Docs</span>
<nav class="docs-header-right">
<a href="/widgets">Widgets</a>
<a href="/discover">Discover</a>
<a href="/app">Launch app</a>
<a href="/studio" class="btn-primary">Studio</a>
</nav>
</header>
<div class="docs-shell">
<aside class="docs-sidebar" id="sidebar">
<div class="sidebar-search">
<svg
class="sidebar-search-icon"
width="14"
height="14"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2.2"
>
<circle cx="11" cy="11" r="8" /><path d="m21 21-4.35-4.35" />
</svg>
<input
type="text"
id="search-input"
placeholder="Search…"
autocomplete="off"
spellcheck="false"
/>
</div>
<nav id="sidebar-nav"></nav>
</aside>
<main class="docs-main">
<div class="docs-content" id="docs-content"></div>
</main>
</div>
<div class="sidebar-overlay" id="sidebar-overlay"></div>
<button class="sidebar-fab" id="sidebar-fab" aria-label="Open navigation">
<svg
width="20"
height="20"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2"
>
<path d="M4 6h16M4 12h10M4 18h16" />
</svg>
</button>
<script>
const NAV = [
{
title: 'Start here',
links: [
{ label: 'What is three.ws?', path: 'start-here' },
{ label: 'Agents vs. Avatars', path: 'agents-vs-avatars' },
{ label: 'Make your first agent', path: 'make-your-agent' },
{ label: 'Share & embed', path: 'share-and-embed' },
{ label: 'Do I need crypto?', path: 'do-i-need-crypto' },
],
},
{
title: 'Getting started',
links: [
{ label: 'Introduction', path: 'introduction' },
{ label: 'Quick start', path: 'quick-start' },
{ label: 'Getting started (hosted)', path: 'tutorials/getting-started' },
{ label: 'Deployment', path: 'deployment' },
],
},
{
title: 'Core concepts',
links: [
{ label: 'How it works', path: 'how-it-works' },
{ label: 'Architecture overview', path: 'architecture' },
{ label: 'Agent system', path: 'agent-system' },
{ label: 'Agent reputation', path: 'agent-reputation' },
{ label: 'Solana reputation', path: 'solana-reputation' },
{ label: 'Memory system', path: 'memory' },
{ label: 'Skills system', path: 'skills' },
{ label: 'Multi-agent', path: 'multi-agent' },
{ label: 'Permissions', path: 'permissions' },
{ label: 'Layers', path: 'layers' },
],
},
{
title: 'Economy & payments',
links: [
{ label: 'Circulation engine', path: 'circulation-engine' },
{ label: 'Money feed', path: 'money-feed' },
{ label: 'Agent wallets', path: 'agent-wallets' },
{ label: 'Marketplace', path: 'marketplace' },
{ label: 'Coin launches', path: 'coin-launches' },
{ label: 'x402 protocol', path: 'x402' },
{ label: 'x402 paid endpoints', path: 'x402-endpoints' },
{ label: 'x402 buyer client', path: 'x402-buyer' },
{ label: 'Autonomous x402 loop', path: 'autonomous-x402' },
{ label: 'AgenC', path: 'agenc' },
],
},
{
title: 'Guides',
links: [
{ label: 'Embedding', path: 'embedding' },
{ label: 'AR & WebXR', path: 'ar' },
{ label: 'Authentication', path: 'authentication' },
{ label: 'Avatar creation', path: 'avatar-creation' },
{ label: 'Avatar pipeline (end to end)', path: 'avatar-pipeline' },
{ label: 'three.ws Selfie (Avaturn)', path: 'avaturn' },
{ label: 'ERC-8004', path: 'erc8004' },
{ label: 'Reputation system', path: 'reputation' },
{ label: 'Validation attestations', path: 'validation' },
{ label: 'SAS attestations', path: 'sas-attestations' },
{ label: 'Solana agents', path: 'solana' },
{ label: 'Deploy agents on-chain (bulk)', path: 'onchain-agents' },
{ label: 'Solana pump.fun signals', path: 'solana-pumpfun' },
{ label: 'Mint mark ("3ws")', path: 'mint-mark' },
{ label: 'Agents in X Spaces', path: 'x-spaces' },
{ label: 'Security', path: 'security' },
{ label: 'Configuration', path: 'configuration' },
{ label: 'Contributing', path: 'contributing' },
],
},
{
title: 'SDK / API reference',
links: [
{ label: 'REST API', path: 'api-reference' },
{ label: 'JavaScript API', path: 'js-api' },
{ label: 'Web component', path: 'web-component' },
{ label: 'MCP', path: 'mcp' },
{ label: 'MCP tools catalog', path: 'mcp-tools' },
{ label: 'SDK', path: 'sdk' },
{ label: 'Widgets', path: 'widgets' },
{ label: 'Widget Studio', path: 'widget-studio' },
{ label: 'Widget API (JSON-RPC)', path: 'widget-api' },
{ label: 'Widget reference', href: '/docs/widgets', external: true },
],
},
{
title: 'Integrations',
links: [
{ label: 'NVIDIA free models', path: 'nvidia-models' },
{ label: 'IBM watsonx & Granite', path: 'ibm' },
{ label: 'IBM co-marketing kit', path: 'ibm-co-marketing/README' },
],
},
{
title: 'Tutorials',
links: [
{ label: 'Text prompt to 3D model', path: 'tutorials/text-to-3d' },
{ label: 'Photos to 3D model', path: 'tutorials/image-to-3d' },
{ label: 'Prompt recipes for 3D', path: 'tutorials/prompts-for-3d' },
{ label: 'Generate 3D from code', path: 'tutorials/generate-3d-api' },
{ label: 'Place your model in AR', path: 'tutorials/view-in-ar' },
{ label: 'Build your first agent', path: 'tutorials/first-agent' },
{ label: 'Personal AI site', path: 'tutorials/personal-ai-site' },
{ label: 'Create a custom skill', path: 'tutorials/custom-skill' },
{ label: 'Embed on a website', path: 'tutorials/embed-on-website' },
{ label: 'Register on-chain', path: 'tutorials/register-onchain' },
{ label: "Read an agent's reputation", path: 'tutorials/agent-reputation' },
{ label: "Read a Solana agent's reputation", path: 'tutorials/solana-agent-reputation' },
],
},
{
title: 'Reference',
links: [
{ label: 'Examples', path: 'examples' },
{ label: 'Listings & distribution', path: 'listings' },
{ label: 'Troubleshooting', path: 'troubleshooting' },
{ label: 'Changelog', path: 'changelog' },
],
},
{
title: 'Operations',
links: [
{ label: 'Local setup', path: 'internal/SETUP' },
{ label: 'Development guide', path: 'internal/DEVELOPMENT' },
{ label: 'Smoke test', path: 'internal/SMOKE_TEST' },
{ label: 'Validation deployment', path: 'internal/VALIDATION_DEPLOY' },
{ label: 'API inventory', path: 'internal/api-inventory' },
{ label: 'IBM webinar runbook', path: 'internal/IBM-WEBINAR-RUNBOOK' },
],
},
];
const ALL_PAGES = NAV.flatMap(s => s.links.filter(l => l.path));
function currentPath() {
if (location.hash) return location.hash.slice(1).replace(/^\//, '');
const m = location.pathname.match(/^\/docs\/([^/]+)$/);
return m ? m[1] : 'start-here';
}
function buildSidebar(filter) {
const q = (filter || '').toLowerCase();
const current = currentPath();
const nav = document.getElementById('sidebar-nav');
nav.innerHTML = NAV.map(section => {
const links = section.links.filter(
l => !q || l.label.toLowerCase().includes(q),
);
if (!links.length) return '';
return `<div class="sidebar-section">
<span class="sidebar-section-title">${section.title}</span>
${links
.map(l => {
const href = l.href || '#' + l.path;
const active = !l.href && l.path === current ? ' active' : '';
const external = l.external ? ' external' : '';
const target = l.href ? ' target="_blank" rel="noopener"' : '';
return `<a href="${href}" class="sidebar-link${active}${external}"${target}>${l.label}</a>`;
})
.join('')}
</div>`;
}).join('');
}
marked.setOptions({
highlight: (code, lang) => {
if (lang && hljs.getLanguage(lang)) {
return hljs.highlight(code, { language: lang }).value;
}
return hljs.highlightAuto(code).value;
},
gfm: true,
breaks: false,
});
const COPY_ICON =
'<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>';
const CHECK_ICON =
'<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>';
const EXTERNAL_ICON =
'<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 17 17 7M9 7h8v8"/></svg>';
function renderPageTools(path, md) {
const content = document.getElementById('docs-content');
const mdUrl = '/docs/' + path + '.md';
const absMdUrl = 'https://three.ws' + mdUrl;
const claudePrompt =
'Read ' +
absMdUrl +
' so I can ask questions about this three.ws documentation page.';
const claudeUrl =
'https://claude.ai/new?q=' + encodeURIComponent(claudePrompt);
const wrap = document.createElement('div');
wrap.className = 'docs-pagetools';
wrap.innerHTML = `
<div class="docs-pagetools-group" id="pagetools-group">
<button type="button" class="docs-pagetools-btn" id="pagetools-copy" title="Copy page as Markdown">
${COPY_ICON}<span>Copy page</span>
</button>
<button type="button" class="docs-pagetools-caret" id="pagetools-caret" aria-label="More options" aria-haspopup="true" aria-expanded="false">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
</button>
<div class="docs-pagetools-menu" role="menu">
<button type="button" class="docs-pagetools-item" id="pagetools-copy-2" role="menuitem">
<span class="docs-pagetools-icon">${COPY_ICON}</span>
<span class="docs-pagetools-text">
<span class="docs-pagetools-title">Copy page</span>
<span class="docs-pagetools-sub">Copy page as Markdown for LLMs</span>
</span>
</button>
<a class="docs-pagetools-item" href="${mdUrl}" target="_blank" rel="noopener" role="menuitem">
<span class="docs-pagetools-icon">
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><rect x="2" y="5" width="20" height="14" rx="2.5"/><path d="M6 15V9l3 3 3-3v6" stroke-linecap="round" stroke-linejoin="round"/><path d="M17 9v6m0 0 2-2m-2 2-2-2" stroke-linecap="round" stroke-linejoin="round"/></svg>
</span>
<span class="docs-pagetools-text">
<span class="docs-pagetools-title">View as Markdown ${EXTERNAL_ICON}</span>
<span class="docs-pagetools-sub">View this page as plain text</span>
</span>
</a>
<a class="docs-pagetools-item" href="${claudeUrl}" target="_blank" rel="noopener" role="menuitem">
<span class="docs-pagetools-icon">
<svg width="17" height="17" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2.4 13.9 8l5.7.2-4.5 3.5 1.6 5.5L12 14l-4.7 3.2 1.6-5.5L4.4 8.2 10.1 8 12 2.4Z"/></svg>
</span>
<span class="docs-pagetools-text">
<span class="docs-pagetools-title">Open in Claude ${EXTERNAL_ICON}</span>
<span class="docs-pagetools-sub">Ask questions about this page</span>
</span>
</a>
</div>
</div>`;
content.prepend(wrap);
const group = wrap.querySelector('#pagetools-group');
const caret = wrap.querySelector('#pagetools-caret');
const copyBtn = wrap.querySelector('#pagetools-copy');
const copyBtn2 = wrap.querySelector('#pagetools-copy-2');
const closeMenu = () => {
group.classList.remove('open');
caret.setAttribute('aria-expanded', 'false');
};
caret.addEventListener('click', e => {
e.stopPropagation();
const open = group.classList.toggle('open');
caret.setAttribute('aria-expanded', String(open));
});
document.addEventListener('click', e => {
if (!group.contains(e.target)) closeMenu();
});
document.addEventListener('keydown', e => {
if (e.key === 'Escape') closeMenu();
});
let resetTimer;
const label = copyBtn.querySelector('span');
const doCopy = async () => {
try {
await navigator.clipboard.writeText(md);
} catch {