-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathllms.txt
More file actions
130 lines (98 loc) · 4.07 KB
/
llms.txt
File metadata and controls
130 lines (98 loc) · 4.07 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
# SMNTC
> Semantic Engine for Motion, Animation, and Numerical Topographic Interactivity & Composition.
> Abstracts WebGL shader complexity into a Tokenized Intent Schema.
> Describe the *meaning* — the engine provides the *motion*.
SMNTC converts high-level semantic tokens into GPU-optimized GLSL shader programs for Three.js.
Instead of writing shader math, you declare intent using human-readable tokens like
`surface: 'fluid'`, `vibe: 'calm'`, `palette: 'arctic'`.
## Docs
- [README](https://github.com/NAME0x0/SMNTC/blob/main/README.md): Quick start, token tables, API reference
- [SMNTC-SPEC](https://github.com/NAME0x0/SMNTC/blob/main/SMNTC-SPEC.md): Full technical specification
- [LLMs Full Context](https://github.com/NAME0x0/SMNTC/blob/main/llms-full.txt): Complete API with all tokens, types, and examples
## Install
```bash
npm install smntc three
```
## Core Concept
All configuration uses a single `SMNTCConfig` object with five semantic token categories:
- **surface**: `'topographic'` | `'crystalline'` | `'fluid'` | `'glitch'` | `'organic'` | `'terrain'` | `'plasma'` | `'wave'`
- **vibe**: `'stable'` | `'calm'` | `'agitated'` | `'chaotic'` | `'breathing'` | `'pulse'` | `'drift'` | `'storm'` | `'cinematic'`
- **reactivity**: `'static'` | `'magnetic'` | `'repel'` | `'shockwave'`
- **fidelity**: `'low'` | `'medium'` | `'high'` | `'ultra'`
- **palette**: `'monochrome'` | `'ember'` | `'arctic'` | `'neon'` | `'phantom'` | `'ocean'` | `'sunset'` | `'matrix'` | `'vapor'` | `'gold'` | `'infrared'` | `'aurora'` | `'midnight'`
Plus numeric overrides: `intensity` (0-2), `speed` (0-5), `contourLines` (4-64).
Plus VFX post-processing: `angle` (0-360°), `grain` (0-1), `glow` (0-2), `chromatic` (0-1), `vignette` (0-1), `blur` (0-1).
## Minimal Example (Vanilla Three.js)
```typescript
import { SMNTCKernel } from 'smntc';
import * as THREE from 'three';
const geometry = new THREE.PlaneGeometry(4, 4, 128, 128);
const mesh = new THREE.Mesh(geometry);
scene.add(mesh);
const kernel = new SMNTCKernel({ surface: 'fluid', vibe: 'calm', palette: 'monochrome' });
kernel.apply(mesh, camera, renderer.domElement);
kernel.start(renderer, scene, camera);
```
## Minimal Example (React-Three-Fiber)
```tsx
import { Canvas } from '@react-three/fiber';
import { SMNTCSurface } from 'smntc/react';
function App() {
return (
<Canvas>
<SMNTCSurface surface="topographic" vibe="calm" reactivity="magnetic" palette="arctic" />
</Canvas>
);
}
```
## R3F Material Element
```tsx
import React from 'react';
import { extend, useFrame } from '@react-three/fiber';
import { SMNTCMaterial } from 'smntc';
extend({ SMNTCMaterial });
function Surface() {
const mat = React.useRef<SMNTCMaterial>(null);
useFrame((_state, delta) => mat.current?.update(delta));
return (
<mesh>
<planeGeometry args={[1, 1, 128, 128]} />
<smntcMaterial ref={mat} surface="fluid" vibe="calm" palette="arctic" />
</mesh>
);
}
```
## Web Component (No Framework)
```html
<script type="module">
import 'https://unpkg.com/smntc/dist/web/index.mjs';
</script>
<smntc-surface
style="width: 100%; height: 60vh; display: block;"
surface="topographic"
vibe="calm"
palette="monochrome"
reactivity="magnetic"
></smntc-surface>
```
## CLI
```bash
npx smntc init
npx smntc add hero
npx smntc preview
```
## Key Methods
- `kernel.setVibe('agitated')` — Spring-animated vibe transition
- `kernel.setSurface('crystalline')` — Switch surface mode
- `kernel.setPalette('neon')` — Spring-animated color transition
- `kernel.setReactivity('shockwave')` — Change interaction model
- `kernel.setAngle(45)` — Rotate displacement field
- `kernel.setGrain(0.3)` — Add film grain
- `kernel.setGlow(1.0)` — Add bloom/glow
- `kernel.setChromatic(0.5)` — Chromatic aberration
- `kernel.setVignette(0.4)` — Edge darkening
- `kernel.setBlur(0.2)` — Depth blur
- `kernel.configure({ vibe: 'chaotic', palette: 'ember' })` — Bulk update
- `kernel.dispose()` — Clean up all GPU/DOM resources
## Optional
- [JSON Schema](https://github.com/NAME0x0/SMNTC/blob/main/smntc.schema.json): Machine-validatable config schema