Ling — The Omniglot Systems Language
Ling is a polyglot scripting language whose keywords and builtins are available in 16+ human languages simultaneously — Chinese, Thai, Korean, Japanese, English, Arabic, Hebrew, Russian, and more — in the same source file.
# All four in one file:
令 启 = 执 { 印("你好") } # Chinese
令 เริ่ม = ดำเนินการ { พิมพ์("สวัสดี") } # Thai
bind start = do { print("Hello") } # English
바인드 시작 = 수행 { 인쇄("안녕") } # Korean
Core features
- Polyglot keywords — write loops in Chinese, functions in Thai, variables in English
- 3D software renderer — vector geometry (
vtex_*) and pixel textures (tex_*) - 4D spatial audio — pentatonic synthesis with positional mixing
- FFT analysis — frequency bands from any audio source
- Cross-platform — native Windows/macOS/Linux and WebGL2 WASM
Crates
| Crate | Version | Purpose |
|---|---|---|
ling-lang | 2030.1.3 | Main interpreter binary |
ling-core | 2030.0.0 | Core types |
ling-audio | 2030.0.0 | 4D audio + FFT |
ling-game | 2030.0.0 | ECS, mesh, physics |
ling-graphics | 2030.0.0 | 3D/4D rendering |
ling-crypto | 2030.0.0 | Cryptography |
ling-net | 2030.0.0 | Async networking |
ling-ai | 2030.0.0 | LLM / neural nets |
Quick navigation
Ling — Showcase
Ling is the omniglot creative-systems language: you write the same program in English, 中文, 日本語, 한국어, or ไทย — keywords, builtins, even file names — and it runs identically. One small native binary gives you a 3D/4D holographic renderer, vector fonts, a UI toolkit, a music studio (decode · BPM/key · GM synth · MIDI · karaoke), spatial audio, post-quantum crypto, and a physics lab — no engine install, no package soup.
# the same program, four ways — all run:
bind start = do { open_window(800, 600) draw_disc(400.0, 300.0, 120.0) present() }
绑定 开始 = 做 { 开窗(800.0, 600.0) 画实心圆(400.0, 300.0, 120.0) 显() }
バインド 開始 = 実行 { ウィンドウ開く(800,600) 塗りつぶし円(400,300,120) 表示() }
ผูก เริ่ม = ทำ { เปิดหน้าต่าง(800,600) วาดวงกลมทึบ(400,300,120) แสดงผล() }
lingfu normalize <lang> rewrites any Ling project into a single language — so a team can
each read the code in their own tongue and commit a normalized form.
What makes Ling unique
- Polyglot by design — five human languages are first-class, not comments or i18n strings. Every keyword and ~hundreds of builtins have native aliases; the lexer/parser accept any mix.
- Batteries welded in — graphics, vector fonts, UI, music, MIDI, spatial audio, crypto, physics and AI tensors ship in the one toolchain. First pixel in ~5 lines.
- 3D and 4D / holographic — a depth-sorted software renderer with a cel/holographic shader,
4D camera projection, and vector-texture primitives (
vtex_*). - Resolution-independent vector fonts — TrueType outlines cached as
.lingglyph files and rendered (stroke or fill) crisp in 2D/3D/4D, in every script (灵 · ABC · あ · 가 · ก). - A real music layer — load WAV/FLAC/OGG/MP3, extract BPM & musical key, synthesize any
GM-style instrument from a
.lingpatch, read MIDI, build rhythm games & karaoke. - Post-quantum crypto built in — hashes, AEAD, signatures, ML-KEM/X25519 hybrids, Shamir, Schnorr/VRF — usable from a script in one call.
- Physics from a script — rigid + angular dynamics, deformable soft-body meshes, and a fast immiscible water/oil liquid sim that maps onto plane/sphere/cylinder/cone/dome.
- Tiny & native — one binary, software-rendered (no GPU driver required), runs headless for CI frame-capture; also targets WASM.
How Ling compares
Legend: ● built-in · ◐ partial / via add-on · ○ not a goal.
| Capability | Ling | Unity | Godot | Bevy (Rust) | Pygame | p5.js | LÖVE |
|---|---|---|---|---|---|---|---|
| Source in 5 human languages | ● | ○ | ○ | ○ | ○ | ○ | ○ |
| Single self-contained binary | ● | ○ | ◐ | ● | ◐ | ○ | ◐ |
| No GPU/driver required (software) | ● | ○ | ○ | ○ | ● | ◐ | ○ |
| 3D rendering | ● | ● | ● | ● | ○ | ◐ | ○ |
| 4D / hyperbolic / holographic | ● | ○ | ○ | ○ | ○ | ○ | ○ |
| Vector fonts (2D/3D/4D) | ● | ◐ | ◐ | ◐ | ◐ | ◐ | ◐ |
| Immediate-mode UI toolkit | ● | ◐ | ● | ◐ | ○ | ○ | ◐ |
| Audio playback | ● | ● | ● | ● | ● | ● | ● |
| Spatial (3D/4D) audio + FX | ● | ● | ● | ◐ | ○ | ◐ | ◐ |
| BPM / musical-key analysis | ● | ○ | ○ | ○ | ○ | ◐ | ○ |
| GM-style synth from a patch file | ● | ◐ | ◐ | ○ | ○ | ◐ | ○ |
| MIDI load + rhythm/karaoke kit | ● | ◐ | ◐ | ○ | ◐ | ◐ | ○ |
| Rigid + angular physics | ● | ● | ● | ◐ | ○ | ○ | ◐ |
| Soft-body / deformable mesh | ● | ◐ | ◐ | ◐ | ○ | ○ | ○ |
| Fast immiscible liquid sim | ● | ◐ | ◐ | ○ | ○ | ○ | ○ |
| Post-quantum crypto built in | ● | ○ | ○ | ○ | ○ | ○ | ○ |
| Headless CI frame capture | ● | ◐ | ◐ | ◐ | ◐ | ○ | ◐ |
| Lines to first pixel | ~5 | many | ~15 | ~40 | ~10 | ~5 | ~8 |
Comparisons are about what ships in the box. Mature engines like Unity/Godot/Bevy have far deeper 3D pipelines, tooling and ecosystems — Ling’s angle is breadth-in-one-binary plus the things no one else has: truly multilingual source, 4D/holographic vector rendering, built-in music analysis + GM synth, and post-quantum crypto.
See it run
| Demo | What it shows |
|---|---|
examples/music/hallway_runner.ling | Auto-playing FFT-reactive infinite runner; MIDI-driven coins ring the melody as spatial SFX |
examples/music/karaoke_hero.ling | Karaoke-Hero pitch bars from a vocal MIDI + live mic tuner |
examples/music/synth_jam.ling | GM instruments synthesized from .ling patches |
examples/physics/bouncy_ball.ling | Spring-mass soft body squashing as it bounces |
examples/physics/tumbling.ling | Rigid bodies tumbling & rolling (angular dynamics) |
examples/physics/liquid_marble.ling | Water+oil sim mapped onto a spinning sphere/cone/dome |
examples/ui/hud_showcase.ling | The full vector UI toolkit (HUD, meters, controls, game UI) |
examples/crypto/crypto_donut_physics.ling | A SHA3 hash → a bouncing knot-torus with reactive audio |
cargo run --bin ling -- examples/physics/liquid_marble.ling
See the full reference (in 5 languages) at https://docs.ling-lang.org.
Installation
From crates.io
cargo install ling-lang
From source
git clone https://github.com/taellinglin/ling
cd ling
cargo build --release
# binary at target/release/ling
Requirements
- Rust 1.75+
- On Linux:
libasound2-dev(for audio) - On macOS/Windows: no extra dependencies
Run a script
ling examples/basics/thai_hello_world.ling
Hello World
Ling supports any Unicode identifier. All built-in keywords work in every supported language simultaneously in the same source file.
English
bind start = do {
print("Hello, World!")
}
Chinese 中文
令 启 = 执 {
印("你好,世界!")
}
Thai ภาษาไทย
ผูก เริ่ม = ทำ {
พิมพ์("สวัสดีชาวโลก")
}
Korean 한국어
바인드 시작 = 실행 {
print("안녕하세요, 세계!")
}
Mixed (all valid simultaneously)
令 启 = 执 {
若 true {
印("Hello from 中文!")
}
bind x = 42
println(x)
}
Your First 3D Room
A minimal windowed scene with a floor grid and a spinning chakra mandala.
令 PI = 3.14159265
令 启 = 执 {
open_fullscreen("My First Room")
set_ambient(0.15)
令 帧 = 0
循 window_is_open() {
fill(0, 0, 8) # deep-blue background
令 ry = 帧 * 0.0006
set_camera(cos(ry), sin(ry), 1.0, 0.0)
set_camera_pos(sin(ry) * 6.0, 1.0, cos(ry) * 6.0)
set_zdist(2.0)
# Floor grid
vtex_grid(0, -3, 0, 1,0,0, 0,0,1, 8, 8, 1.0, 1.0, 帧*0.0001, 1.57)
# Spinning mandala
vtex_chakra(0, 0, 0, 1,0,0, 0,1,0, 2.5, 8, 帧*0.0005, 3.50)
vtex_lotus( 0, 0, 0, 1,0,0, 0,1,0, 0.6, 2.2, 8, 帧*0.0004, 2.10)
display()
令 帧 = 帧 + 1
}
}
Save as room.ling and run:
ling room.ling
Press Escape or close the window to exit.
Syntax Reference
Ling is an expression-oriented language with a clean, minimal syntax. Every keyword below has equivalents in all supported lexicons — see Keyword Aliases for the full table.
Binding (variable declaration)
令 x = 42
令 name = "Ling"
令 flag = true
Re-binding shadows the previous binding in the same scope:
令 i = 0
令 i = i + 1 # i is now 1
Functions
函 add(a, b) {
返 a + b
}
Functions are values and can be stored in bindings:
令 square = 函 (n) { 返 n * n }
令 result = square(7) # 49
Do blocks (执)
A 执 block evaluates all statements and returns the value of the last one.
The entry point of every Ling program is 令 启 = 执 { ... }.
令 启 = 执 {
令 x = 10
令 y = 20
印(x + y)
}
Conditionals
若 x > 0 {
印("positive")
}
若 x > 0 {
印("positive")
} 否则 {
印("non-positive")
}
While loops
令 i = 0
循 i < 10 {
印(i)
令 i = i + 1
}
Note: Ling has no unary minus operator. Write
0 - xinstead of-x.
Lists
令 lst = list_new()
令 lst = list_push(lst, 42)
令 lst = list_push(lst, "hello")
令 n = list_len(lst) # 2
令 v = list_get(lst, 0) # 42
Comments
# This is a comment
令 x = 1 # inline comment
Arithmetic and comparison
令 sum = a + b
令 diff = a - b
令 prod = a * b
令 quot = a / b
令 rem = a % b
令 eq = a == b
令 neq = a != b
令 lt = a < b
令 lte = a <= b
令 gt = a > b
令 gte = a >= b
Built-in math functions
sin(x) cos(x) tan(x)
asin(x) acos(x) atan2(y, x)
sqrt(x) abs(x) floor(x) ceil(x)
log(x) exp(x) pow(x, y)
Core Builtins Reference
All builtins support multilingual names — see Builtin Aliases for the full international lookup table.
Every alias listed in the 5-language tables below is accepted by the
interpreter, the lexer/parser, and the lingfu normalize command, so an
English program normalized to any of these languages runs unchanged. The
interpreter accepts the union of every alias, so you can mix languages in one
file.
Output · Core
| EN | 🇨🇳 ZH | 🇯🇵 JA | 🇰🇷 KO | 🇹🇭 TH | Description |
|---|---|---|---|---|---|
print / println | 印 / 打印 | 印刷 | 출력 | พิมพ์ | Print value(s) to stdout |
format | 格式 | フォーマット | 서식 | รูปแบบ | Format string with args |
ok | 好 | 良し | 좋아 | โอเค | Wrap value as Ok |
bad / err | 坏 | 悪い | 나쁨 | ผิด | Wrap value as Err |
sleep | 睡眠 | 眠る / スリープ | 잠자기 / 잠 | หยุด / นอน | Sleep for N ms |
Math
All math args and results are f64. Angles are in radians.
| EN | 🇨🇳 ZH | 🇯🇵 JA | 🇰🇷 KO | 🇹🇭 TH | Description |
|---|---|---|---|---|---|
sin | 正弦 | サイン | 사인 | ไซน์ | Sine |
cos | 余弦 | コサイン | 코사인 | โคไซน์ | Cosine |
tan | 正切 | タンジェント | 탄젠트 | แทนเจนต์ | Tangent |
asin | 反正弦 | アークサイン | 아크사인 | อาร์กไซน์ | Arcsine |
acos | 反余弦 | アークコサイン | 아크코사인 | อาร์กโคไซน์ | Arccosine |
atan | 反正切 | アークタンジェント | 아크탄젠트 | อาร์กแทนเจนต์ | Arctangent |
atan2 | 反正切2 | アークタンジェント2 | 아크탄젠트2 | — | Two-arg arctangent |
tanh | 双曲正切 | 双曲線正接 | 쌍곡탄젠트 | — | Hyperbolic tangent |
sqrt | 平方根 / 根 | 平方根 | 제곱근 | รากที่สอง | Square root |
cbrt | 立方根 | 立方根 | 세제곱근 | รากที่สาม | Cube root |
pow | 幂 | べき乗 | 거듭제곱 | ยกกำลัง | x raised to y |
exp | 指数 | 指数関数 | 지수 | — | e^x |
hypot | 斜边 | 斜辺 | 빗변 | — | √(x²+y²) |
ln / log | 对数 | 対数 | 로그 | ลอการิทึม | Natural log |
log2 / log10 | 对数2 / 对数10 | 対数2 / 対数10 | 로그2 / 로그10 | — | Base-2 / base-10 log |
abs | 绝对值 / 绝对 | 絶対値 | 절댓값 / 절대값 | ค่าสัมบูรณ์ | Absolute value |
floor | 向下取整 / 下整 | 床関数 | 내림 | ปัดลง | Round down |
ceil | 向上取整 / 上整 | 天井関数 | 올림 | ปัดขึ้น | Round up |
round | 四舍五入 / 四舍 | 四捨五入 | 반올림 | ปัดเศษ | Round to nearest |
trunc / int | 取整 / 整数 | 整数化 / 切り捨て | 정수화 / 정수 | ตัดทศนิยม | Truncate toward zero |
fract | 小数部分 | 小数部 | 소수부 | — | Fractional part |
min | 最小 | 最小 | 최솟값 | ต่ำสุด | Minimum of two |
max | 最大 | 最大 | 최댓값 | สูงสุด | Maximum of two |
clamp | 截取 | 範囲制限 | 범위제한 | จำกัด | Clamp to [lo, hi] |
pi | 圆周率 | 円周率 | 파이 | พาย | π constant |
tau | 双周率 | タウ | 타우 | ทาว | τ constant (2π) |
Cells marked
—have no native alias in that language yet (English still works everywhere). Filling these is tracked inTODO.md.
Lists
| EN | 🇨🇳 ZH | 🇯🇵 JA | 🇰🇷 KO | 🇹🇭 TH | Description |
|---|---|---|---|---|---|
list_new | 新建列表 | 新規リスト | 새목록 | รายการใหม่ | Create empty list |
list_push | 列表添加 | リスト追加 | 목록추가 | เพิ่มรายการ | Append value, return new list |
list_get | 取元素 | 要素取得 | 요소가져오기 | รับรายการ | Get element at index |
list_join / join | 连接 | 連結 | 연결 | รวมรายการ | Join list into a string |
len / str_len | 长度 | 長さ | 길이 | ความยาว | Length of list or string |
Strings
| Function | Description |
|---|---|
str_len(s) | Length in characters |
str_concat(a, b) | Concatenate strings |
str_slice(s, start, end) | Substring |
str_to_num(s) | Parse as number |
num_to_str(n) | Number to string |
str_contains(s, sub) | Substring test |
Type checks
| Function | Returns |
|---|---|
is_num(v) | true if number |
is_str(v) | true if string |
is_list(v) | true if list |
is_bool(v) | true if boolean |
Window & display
See Window & Camera reference.
Vector geometry
See vtex reference.
Pixel textures
See tex reference.
Audio
See Audio reference.
Cryptography & Physics
ling-crypto (Blake3, SHA-3, AES-GCM-256, XChaCha20, Ed25519, X25519, Shamir,
Schnorr, VRF …) and ling-physics (vectors, rigid bodies, forces, hyperbolic
geometry) are exposed as Rust crate APIs, not yet as .ling builtins — call
them from Rust, or via a host that embeds the interpreter. Coverage is verified
by the crate test suites (crates/ling-crypto/tests, crates/ling-physics/tests).
Wiring them in as multilingual builtins is tracked in
TODO.md.
FFT (native only, no-op on WASM)
| Function | Description |
|---|---|
fft_push(samples) | Feed list of f32 samples to analyzer |
fft_bands(n) | Return n log-spaced magnitude bands (0..1) |
fft_beat() | true if current frame energy exceeds average |
fft_beat_ratio() | energy ratio (1.0 = threshold) |
fft_rms() | RMS level of current window |
fft_dominant_freq() | Peak frequency in Hz |
3-D Primitive Shapes
The shape builtins are Ling’s “Inkscape for 3-D” — a library of parametric solids (boxes, spheres, dice, cogs, gyros…) that render as lit filled triangles, wireframe, or both. Every shape shares one uniform call signature, so once you know one you know them all.
name(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, e0, e1, e2)
| Group | Params | Meaning |
|---|---|---|
| Centre | cx, cy, cz | world-space position of the shape’s centre |
| Scale | sx, sy, sz | per-axis size (half-extent). Non-uniform values give stretched cubes, ellipsoids, flat discs, … |
| Rotation | rx, ry, rz | Euler rotation in radians, applied X → Y → Z |
| Mode | mode | 0 = filled · 1 = wireframe · 2 = both (wire drawn on top) |
| Extras | e0, e1, e2 | shape-specific (segment counts, sides, ratios). Omit or pass 0 for sensible defaults |
The current pen colour (set_color / สีดินสอ / 设色 …) drives both the
fill lighting (cel-shaded against the active lights) and the wireframe colour.
Shapes are depth-sorted with the rest of the scene and flushed on present().
Camera note: like all 3-D draws, shapes are projected through the camera set with
set_camera(...). Keep the camera at the origin and place shapes in front at positive Z (the same convention the room demos use).
Quick start
bind start = do {
open_fullscreen("shapes")
set_ambient(0.25)
add_light(4, 4, 8, 4.0, 255, 240, 220)
bind FR = 0
while window_is_open() {
fill(4, 5, 12)
set_camera(1, 0, 1, 0)
bind a = FR * 0.02
set_color(230, 120, 90)
cube(-2, 0, 9, 0.8,0.8,0.8, a, a*0.7, 0, 0) # filled cube
set_color(120, 200, 255)
icosahedron(0, 0, 9, 0.9,0.9,0.9, a, a, 0, 2) # d20, fill+wire
set_color(190, 190, 200)
gear(2, 0, 9, 0.8,0.3,0.8, 1.57, a*2, 0, 0, 14, 0.3) # spinning cog
present()
bind FR = FR + 1
}
}
Draw modes
mode | Result |
|---|---|
0 | Filled — cel-lit triangles |
1 | Wireframe — edges only, in the pen colour |
2 | Both — filled, with the wireframe biased slightly nearer so it reads on top |
Rendering & lighting modes (holographic cel)
Shape fills use an anime / holographic cel model by default: surfaces are lit with smooth (averaged) vertex normals, the lit colour is interpolated across each triangle, then posterised per pixel into crisp luminance bands. The result is smooth shading with no faceted triangle edges, but clean toon bands that curve over the surface — plus coloured lights, coloured shadows, and a Fresnel rim glow.
| Builtin | Args | Effect |
|---|---|---|
set_shade_mode(m) | 0 flat · 1 cel · 2 holo (default) | overall style |
set_cel_bands(n) | n ≥ 2 (default 4) | number of posterisation bands — lower = chunkier |
set_shadow_color(r,g,b) | 0–255 | tint of unlit regions (coloured shadows) |
set_rim(strength, r,g,b) | strength + 0–255 | Fresnel edge-glow colour/intensity |
set_shade_mode(2) # holographic cel (default)
set_cel_bands(4) # 4 bands
set_shadow_color(28,36,90) # cool indigo shadows
set_rim(0.7, 120,220,255) # cyan holographic edge
- Mode 0 (flat): legacy per-face cel — every triangle one flat band (faceted).
- Mode 1 (cel): smooth bands, no rim/sheen — clean toon.
- Mode 2 (holo): smooth bands + Fresnel rim + a subtle normal-gradient sheen.
Lighting comes from add_light(x,y,z, intensity, r,g,b) (each light contributes
its own colour) and set_ambient(level). The lighting math lives in the
ling-graphics crate (ling_graphics::shading).
Round & swept solids
cube · box — 立方体 · 方块 · 정육면체 · ลูกบาศก์ (box: 方块/箱/상자/กล่อง)
Axis-aligned box. Non-uniform sx,sy,sz make any rectangular block.
cube(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode)
sphere — 球体 · 球 · 구 · ทรงกลม
UV sphere. Scale axes independently for an ellipsoid.
sphere(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, segments=16, rings=12)
icosphere — 二十面球 · アイコ球 · 아이코구체 · ทรงกลมเหลี่ยม
Geodesic sphere from a subdivided icosahedron (more even than a UV sphere).
icosphere(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, subdivisions=1) # 0..4
dome — 穹顶 · ドーム · 돔 · โดม
Hemisphere with a closing base — useful for cupolas and skies.
dome(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, segments=24, rings=8)
cylinder — 圆柱 · 円柱 · 원기둥 · ทรงกระบอก
Capped tube (height runs along local Y, scaled by sy).
cylinder(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, segments=24)
cone — 圆锥 · 円錐 · 원뿔 · กรวย
Capped cone, apex at +Y.
cone(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, segments=24)
capsule — 胶囊 · カプセル · 캡슐 · แคปซูล
Cylinder with hemispherical caps (a “pill”).
capsule(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, segments=16, rings=6)
torus · ring — 圆环 · トーラス · 토러스 · ทอรัส
Donut. tube is the tube radius as a fraction of the outer radius.
torus(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, segments=32, sides=12, tube=0.35)
Prisms & pyramids
pyramid — 金字塔 · ピラミッド · 피라미드 · พีระมิด
N-sided pyramid. sides=4 is the classic square pyramid.
pyramid(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, sides=4)
prism — 棱柱 · 角柱 · 각기둥 · ปริซึม
N-sided prism (extruded polygon). sides=3 → triangular prism, 6 → hex column.
prism(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, sides=6)
frustum — 棱台 · 錐台 · 원뿔대 · กรวยตัด
Truncated cone/pyramid. top_ratio is the top radius as a fraction of the base
(0 → cone, 1 → cylinder).
frustum(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, sides=24, top_ratio=0.5)
Dice (Platonic solids)
Perfect for dice, gems, and crystal shapes — all take no extra params.
| Builtin | Die | Aliases |
|---|---|---|
tetrahedron | d4 | d4 · 四面体 · 정사면체 · ทรงสี่หน้า |
cube | d6 | (see above) |
octahedron | d8 | d8 · 八面体 · 정팔면체 · ทรงแปดหน้า |
dodecahedron | d12 | d12 · 十二面体 · 정십이면체 · ทรงสิบสองหน้า |
icosahedron | d20 | d20 · 二十面体 · 정이십면체 · ทรงยี่สิบหน้า |
icosahedron(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode)
d20(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode) # same thing
Mechanical & architectural
gear · cog — 齿轮 · 歯車 · 톱니바퀴 · เฟือง
Extruded spur gear in the XZ plane. teeth count and tooth depth are
configurable; thickness comes from sy.
gear(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, teeth=12, tooth=0.25)
gyro — 陀螺 · ジャイロ · 자이로 · ไจโร
Nested gimbal: rings concentric tori on alternating axes — a gyroscope / armillary.
gyro(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, rings=3)
arch — 拱门 · アーチ · 아치 · ซุ้มโค้ง
Semicircular archway (tube swept over 180°).
arch(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, segments=24, tube=0.18)
stairs — 楼梯 · 階段 · 계단 · บันได
Staircase of steps cuboid steps rising along +Y/+Z.
stairs(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, steps=5)
Curves & surfaces
helix — 螺旋线 · らせん · 나선 · เกลียว
Tube swept along a helix around Y.
helix(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, turns=3, tube=0.15, sides=8)
spring — 弹簧 · ばね · 스프링 · สปริง
A tighter, thinner helix (coil). Same params as helix.
spring(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, turns=6, tube=0.12, sides=8)
star_prism · star — 星柱 · 별기둥 · แท่งดาว
An N-point star cross-section extruded along Y.
star_prism(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, points=5, inner_ratio=0.5)
capsule_chain · chain — 胶囊链 · カプセル鎖 · 캡슐체인 · โซ่แคปซูล
A row of count capsule beads along X — a chain / caterpillar.
capsule_chain(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, count=3)
mobius — 莫比乌斯 · メビウス · 뫼비우스 · เมอบีอุส
A half-twisted Möbius band.
mobius(cx,cy,cz, sx,sy,sz, rx,ry,rz, mode, segments=60, width=0.3)
Tips
- Flat disc / plate:
cylinderwith a smallsy(e.g.0.05). - Ellipsoid:
spherewith unequalsx,sy,sz. - Obelisk:
frustumwith a smalltop_ratioand tallsy. - Animate by feeding the frame counter into
rx,ry,rzeach frame. - Outlined solid: use
mode = 2and a bright pen colour for a crisp cel-look with ink edges.
All shape names are available in every Ling language; see Builtin Aliases by Language.
Vector Geometry Builtins (vtex_*)
All vtex_* functions draw line-based 3D geometry onto a plane defined by:
- Centre
(cx, cy, cz)— world-space anchor point - U tangent
(ux, uy, uz)— “right” direction in the plane - V tangent
(vx, vy, vz)— “up” direction in the plane
Lines are depth-sorted and drawn on top of the pixel buffer when present() / แสดงผล() / 显() / 表示() / 표시() is called.
Performance tip: vtex calls are fast (pure line rasterisation). Prefer them over
tex_*for real-time use — atex_mandelbroton a 1920×1080 window is ~2 million pixel ops per call; avtex_ringswith 32 segments is ~32 line ops.
Common plane orientations
# Horizontal plane (floor / ceiling): U=right, V=forward
1,0,0, 0,0,1
# Vertical front-facing plane (wall / mandala disc): U=right, V=up
1,0,0, 0,1,0
# Vertical side-facing plane (left/right wall): U=forward, V=up
0,0,1, 0,1,0
Primitives
vtex_grid · ลายตาราง · 纹格 · 格子模様 · 격자무늬
Rectilinear grid.
vtex_grid(cx,cy,cz, ux,uy,uz, vx,vy,vz, cols, rows, cell_w, cell_h, fr, hue)
| Param | Default | Description |
|---|---|---|
cols | — | number of columns |
rows | — | number of rows |
cell_w | — | cell width in world units |
cell_h | — | cell height in world units |
fr | — | frame counter (drives colour animation) |
hue | — | colour phase offset |
vtex_rings · ลายวงซ้อน · 纹环 · 同心円 · 동심원
Concentric N-sided polygon rings with optional twist.
vtex_rings(cx,cy,cz, ux,uy,uz, vx,vy,vz, n_rings, n_sides, max_r, twist, fr, hue)
| Param | Description |
|---|---|
n_rings | number of concentric rings |
n_sides | polygon sides per ring (32 = smooth circle) |
max_r | outer ring radius |
twist | extra rotation per ring in radians (creates vortex) |
vtex_star · ลายดาว · 纹星 · 星模様 · 별무늬
Alternating outer/inner star polygon.
vtex_star(cx,cy,cz, ux,uy,uz, vx,vy,vz, n_points, r_outer, r_inner, rot_speed, fr, hue)
vtex_spiral · ลายเกลียว · 纹螺 · 螺旋 · 나선
Archimedean spiral.
vtex_spiral(cx,cy,cz, ux,uy,uz, vx,vy,vz, n_turns, max_r, n_steps, fr, hue)
vtex_flower · ลายดอก · 纹花 · 花模様 · 꽃무늬
Flower of Life: centre circle plus 6 surrounding circles.
vtex_flower(cx,cy,cz, ux,uy,uz, vx,vy,vz, radius, n_sides, fr, hue)
vtex_lotus · ลายดอกบัว · 纹莲 · 蓮模様 · 연꽃무늬
Radial kite-petal lotus.
vtex_lotus(cx,cy,cz, ux,uy,uz, vx,vy,vz, r_inner, r_outer, n_petals, fr, hue)
vtex_chakra · ลายจักร · 纹轮 · 輪模様 · 바퀴무늬
Dhamma wheel: outer rim + inner hub + N spokes + tick marks.
vtex_chakra(cx,cy,cz, ux,uy,uz, vx,vy,vz, r, n_spokes, fr, hue)
vtex_yantra · ลายยันต์ · 纹咒 · 護符模様 · 부적무늬
Nested interlocked triangle pairs (Sri Yantra style) with bhupura gate square.
vtex_yantra(cx,cy,cz, ux,uy,uz, vx,vy,vz, n_layers, max_r, fr, hue)
vtex_spiked_cog · ฟันเฟืองหนาม · 纹棘轮 · 歯車模様 · 톱니바퀴
Mechanical gear with triangular spike teeth, inner body ring, hub, and spokes.
vtex_spiked_cog(cx,cy,cz, ux,uy,uz, vx,vy,vz,
n_teeth, r_body, r_spike, r_hub, n_spokes,
fr, hue)
| Param | Default | Description |
|---|---|---|
n_teeth | 12 | number of spike teeth |
r_body | 1.0 | radius of the flat gear body |
r_spike | 1.3 | radius of spike tips |
r_hub | 0.2 | inner hub radius |
n_spokes | 6 | spokes from hub to body |
# Example: ornate gold dharma gear
vtex_spiked_cog(0, 0, 8, 1,0,0, 0,1,0, 18, 1.6, 2.0, 0.28, 9, FR * 0.0004, 1.57)
vtex_torii · ประตูโทริอิ · 纹鸟居 · 鳥居 · 도리이
Japanese torii gate silhouette: two pillars, straight nuki crossbar, curved kasagi top beam.
vtex_torii(cx,cy,cz, ux,uy,uz, vx,vy,vz, width, height, fr, hue)
| Param | Default | Description |
|---|---|---|
width | 4.0 | total gate width |
height | 5.0 | pillar height |
# Gate on the far wall, crimson
vtex_torii(0, 0, 16, 1,0,0, 0,1,0, 6.0, 5.0, FR * 0.0001, 2.1)
vtex_pagoda · เจดีย์ · 纹塔 · 塔 · 탑
Multi-tiered pagoda silhouette with upturned eaves and spire finial.
vtex_pagoda(cx,cy,cz, ux,uy,uz, vx,vy,vz,
n_tiers, base_w, tier_h, taper, eave_out,
fr, hue)
| Param | Default | Description |
|---|---|---|
n_tiers | 5 | number of storeys |
base_w | 2.0 | half-width of base tier |
tier_h | 1.0 | height of each tier |
taper | 0.72 | width reduction per tier |
eave_out | 0.28 | eave overhang fraction |
# 5-tier gold pagoda on back wall
vtex_pagoda(0, 0, 16, 1,0,0, 0,1,0, 5, 2.2, 1.0, 0.72, 0.28, FR * 0.0001, 1.57)
vtex_halftone · ลายจุด · 纹半调 · 網点模様 · 망점
Cross-hatch dithered fill.
vtex_halftone(cx,cy,cz, ux,uy,uz, vx,vy,vz, cols, rows, cell_w, cell_h, density, fr, hue)
vtex_tessellated · ลายตาข่าย · 纹镶嵌 · 網目模様 · 격자망
Animated triangle mesh fill (sine-displaced vertices).
vtex_tessellated(cx,cy,cz, ux,uy,uz, vx,vy,vz, cols, rows, cell, amplitude, freq, fr, hue)
vtex_hyperbolic_uv · ลายไฮเพอร์โบลิก · 纹曲面 · 双曲線 · 쌍곡선
Poincaré-disc hyperbolic tiling (concentric circles + geodesic rays).
vtex_hyperbolic_uv(cx,cy,cz, ux,uy,uz, vx,vy,vz, max_r, n_circles, n_rays, fr, hue)
vtex_letter_rain · ลายอักษรไหล · 纹字雨 · 文字雨 · 글자비
Falling-glyph rain (Matrix-style, using simplified stroke glyphs).
vtex_letter_rain(cx,cy,cz, ux,uy,uz, vx,vy,vz, n_cols, n_visible, col_w, row_h, speed, fr, hue)
Colour system
All vtex functions use the cycle(phase) colour formula:
R = sin(phase) * 127 + 128
G = sin(phase + 2.094) * 127 + 128 # 120° offset
B = sin(phase + 4.189) * 127 + 128 # 240° offset
Useful hue anchor values for cultural palettes:
| Colour | hue value |
|---|---|
| Gold / amber | 1.57 (π/2) |
| Jade green | 3.50 |
| Crimson red | 2.10 |
| Ivory white | 0.30 |
| Deep blue | 4.70 |
| Purple | 5.80 |
Pixel Texture Builtins (tex_*)
tex_* functions write RGBA pixels directly to the framebuffer before the depth
queue is flushed. They are drawn underneath all vtex_* geometry.
Performance warning: Each
tex_*call iterates over every pixel in the destination rectangle. A full-screen 1920×1080 call costs ~2 million iterations. For smooth 60fps, keep tex_* calls to a small off-centre region or reduce window resolution.
All functions share the signature prefix:
tex_*(dst_x, dst_y, width, height, ...params, palette)
Palette names: "rainbow" · "fire" · "ocean" · "psychedelic" · "neon" · "forest"
tex_checkerboard · ลายตารางหมากรุก
tex_checkerboard(x, y, w, h, tiles, r1,g1,b1, r2,g2,b2)
Two-colour checker pattern. tiles = number of tiles across the width.
tex_gradient · ลายไล่สี
tex_gradient(x, y, w, h, angle_deg, r1,g1,b1, r2,g2,b2)
Linear gradient at angle_deg degrees.
tex_noise · ลายนอยส์
tex_noise(x, y, w, h, scale, octaves, seed, palette)
Fractal Brownian Motion noise.
| Param | Description |
|---|---|
scale | Noise frequency (higher = finer) |
octaves | FBM octave count (1–8) |
seed | Randomisation seed |
tex_mandelbrot · ลายแมนเดลบรอต
tex_mandelbrot(x, y, w, h, zoom, cx, cy, max_iter, palette)
| Param | Description |
|---|---|
zoom | Zoom level (1.0 = full set) |
cx, cy | Centre of view in the complex plane |
max_iter | Iteration cap (higher = more detail, slower) |
tex_julia · ลายจูเลีย
tex_julia(x, y, w, h, c_re, c_im, max_iter, palette)
Julia set with complex parameter c = c_re + i·c_im.
tex_voronoi · ลายโวโรนอย
tex_voronoi(x, y, w, h, cells, seed, palette)
tex_ripple · ลายระลอก
tex_ripple(x, y, w, h, freq, cx, cy, time, palette)
Concentric ripple emanating from (cx, cy) in normalised [0,1] coords.
tex_spiral · ลายเกลียวหมุน
tex_spiral(x, y, w, h, freq, n_bands, time, palette)
tex_halftone · ลายฮาล์ฟโทน
tex_halftone(x, y, w, h, dot_size, time, palette)
tex_freq_map · ลายความถี่
tex_freq_map(x, y, w, h, time, speed, palette)
Audio-reactive frequency bar display. Reads from the last fft_bands() call.
Call fft_push(samples) then fft_bands(n) each frame to keep it animated.
Palette reference
| Name | Description |
|---|---|
"rainbow" | Full spectrum cycle |
"fire" | Red → orange → yellow |
"ocean" | Blue → cyan → white |
"psychedelic" | High-saturation cycling |
"neon" | Bright neon green/cyan/magenta |
"forest" | Earthy greens and browns |
Audio Builtins
Audio builtins are available on native targets. On WASM they are no-ops.
Every builtin below is callable in all five languages — the aliases are accepted
by the interpreter and produced by lingfu normalize.
Multilingual names
| EN | 🇨🇳 ZH | 🇯🇵 JA | 🇰🇷 KO | 🇹🇭 TH |
|---|---|---|---|---|
audio_tone | 音调 | 音調 | 음조 | เสียงโทน |
audio_volume | 音量 | 音量 | 음량 | ระดับเสียง |
audio_listener | 音频监听 | 音声リスナー | 오디오리스너 | ผู้ฟัง |
audio_bgm | 背景乐 | BGM | 배경음악 | เพลงพื้นหลัง |
audio_bgm_volume | 背景乐音量 | BGM音量 | 배경음악음량 | ระดับเสียงพื้นหลัง |
fft_push | 频谱输入 | FFT入力 | FFT입력 | วิเคราะห์เสียง |
fft_bands | 频段 | 周波数帯 | 주파수대 | แถบความถี่ |
fft_beat | 节拍检测 | ビート検出 | 비트 | จังหวะเสียง |
fft_rms | 均方根 | 二乗平均 | RMS레벨 | ระดับRMS |
fft_dominant_freq | 主频 | 主要周波数 | 주파수 | ความถี่หลัก |
Tone synthesis
# audio_tone(slot, x, y, z, w, freq_hz, amplitude, lfo_rate, lfo_depth)
audio_tone(0, 0.0, 0.0, 8.0, 1.5, 261.63, 0.08, 0.10, 0.008)
| Param | Description |
|---|---|
slot | Tone slot index (0–15) |
x, y, z | 3D world position of the sound source |
w | Spatial spread / falloff width |
freq_hz | Oscillator frequency in Hz |
amplitude | Base amplitude (0..1) |
lfo_rate | LFO modulation rate in Hz |
lfo_depth | LFO depth (0..1) |
Volume
audio_volume(0.5) # master volume
audio_bgm_volume(0.4) # background music volume
Background music
audio_bgm("path/to/file.wav", 0.5) # load and play WAV BGM
Listener position
# Must be called each frame to update 3D audio perspective
audio_listener(cos(ry), sin(ry), cos(rx), sin(rx))
Pentatonic reference
Common frequencies for East Asian pentatonic scales:
| Note | 宫 (Gōng) | 商 (Shāng) | 角 (Jué) | 徵 (Zhǐ) | 羽 (Yǔ) |
|---|---|---|---|---|---|
| Octave 3 | C3 130.81 | D3 146.83 | E3 164.81 | G3 196.00 | A3 220.00 |
| Octave 4 | C4 261.63 | D4 293.66 | E4 329.63 | G4 392.00 | A4 440.00 |
| Octave 5 | C5 523.25 | D5 587.33 | E5 659.25 | G5 783.99 | A5 880.00 |
FFT analysis
# Push mono samples to the rolling FFT window
令 smp = list_new()
令 k = 0
循 k < 64 {
令 smp = list_push(smp, sin(k * 0.1))
令 k = k + 1
}
fft_push(smp)
# Get 32 log-spaced frequency bands (values 0..1)
令 bands = fft_bands(32)
# Beat detection
若 fft_beat() {
印("beat!")
}
令 ratio = fft_beat_ratio() # 1.0 = at threshold
令 rms = fft_rms()
令 freq = fft_dominant_freq()
Builtins — Music & Spatial Audio
ling-music is a full music layer (separate from the SFX-oriented ling-audio): decode any
common format, analyse tempo & key, synthesize GM-style instruments from .ling patches, read
MIDI, and build rhythm games & karaoke. ling-audio adds positional one-shots, sample
playback/loops, and master FX.
Playback & analysis
music_load("song.wav") → id (WAV/FLAC/OGG/MP3/AAC) · music_play(id) / music_pause /
music_stop / music_seek(sec) / music_pos() / music_volume(v) / music_duration(id) ·
music_bpm(id) · music_key(id) → e.g. "A minor" · music_onsets(id) · music_beat_grid(id) ·
music_fft(id, nbands) → spectrum at the current position (drives reactive visuals).
Synthesis (GM-capable, from .ling patches)
music_patch("instruments/rhodes_ep.ling") → inst · music_note(inst, "C4", dur, vel) ·
music_note_on(inst, pitch, vel) / music_note_off(inst, pitch). A patch is a small modular
FM/subtractive voice (operators + ADSR + filter + LFO) able to approximate any GM family.
MIDI · rhythm · karaoke
music_midi_load("song.mid") → id · music_midi_notes(id) → [time,midi,…] ·
music_midi_bars(id) → [time,midi,dur,…] (karaoke note bars) · music_midi_count(id).
music_judge(delta_ms) → grade · music_grade_name(g). music_lrc("song.lrc") /
music_lyric(id,t). music_mic_pitch() → Hz (sung pitch) · music_note_name(hz) ·
music_hz(midi) · music_pitch_score(hz, target_hz).
Spatial audio (ling-audio)
audio_tone(idx,x,y,z,w,freq,amp,lfo_rate,lfo_depth) (continuous, 3D/4D) ·
audio_sfx(x,y,z,w,freq,amp,dur,wave) (positional one-shot) ·
audio_sample_load(path) / audio_sample_play(id,x,y,z,w,vol,loop) / audio_sample_stop(v) ·
audio_listener(cry,sry,crx,srx) (match the camera) · audio_volume(v) ·
master FX: audio_fx_delay(time,fb,mix) · audio_fx_reverb(mix) · audio_fx_lowpass(cutoff)
(1.0 = open, lower = muffled/underwater).
See examples/music/{synth_jam,rhythm_game,karaoke_hero,hallway_runner}.ling. Full
implemented-vs-missing list: docs/AUDIO_MUSIC_TODO.md.
Builtins — Vector Fonts
Ling renders real TrueType/OpenType fonts as resolution-independent vectors. The first time
a glyph is used its outline is extracted and cached as cache/fonts/<font>/<codepoint>.ling
(curves preserved), then rendered crisp — stroked or filled, with anti-aliasing — at any size
and in 2D or 3D/4D.
| Builtin | Meaning |
|---|---|
font_load(path [, weight]) → handle | Load a TTF/OTF; optional variable-font weight (e.g. 600 for bold). Returns -1 on failure. |
font_text(handle, x, y, px, "text") | Anti-aliased stroked outline in the current set_color/set_blend. |
font_text_fill(handle, x, y, px, "text") | Anti-aliased filled glyphs (solid letterforms). |
font_text_3d(handle, cx,cy,cz, ux,uy,uz, vx,vy,vz, size, "text") | Stroked text on a 3-D plane (basis u,v), depth-sorted — rotates with the camera and projects through the 4-D pipeline. |
font_width(handle, px, "text") | Pixel width of a string. |
Any script is covered: Latin, 中文, 日本語, 한국어, ไทย all render from the right font (e.g. Noto Sans SC covers Latin + CJK + Thai).
bind f = font_load("assets/fonts/Exo2.ttf", 600.0)
set_color(0, 230, 255)
font_text_fill(f, 40.0, 30.0, 36.0, "LING 灵")
font_text_3d(f, 0.0,0.0,0.0, 1.0,0.0,0.0, 0.0,-1.0,0.0, 0.6, "3D TEXT")
Related: project_3d(x,y,z) → [sx,sy,depth] and draw_poly([x0,y0,…]) (filled 2-D polygon,
blend-aware) let you place filled vector shapes onto projected 3-D points.
Builtins — UI Toolkit
A vector, theme-coloured immediate-mode widget library (HUD, meters, interface controls, game
UI, plus a few faux-3D widgets). All widgets are drawn each frame; interactive ones read the
mouse and return their state. Set the palette once with ui_theme; every widget takes an
optional trailing r,g,b to override its main colour.
ui_theme(0,210,255, 60,255,180, 40,60,95, 255,90,90, 190,235,255, 10,16,24)
HUD / sci-fi overlays
ui_radar(cx,cy,r,sweep) · ui_compass(x,y,w,h,heading) · ui_reticle(cx,cy,r,spread) ·
ui_target(x,y,w,h,lock) · ui_panel(x,y,w,h,bevel) · ui_scanlines(x,y,w,h,density)
Meters & gauges
ui_bar(x,y,w,h,value,max) · ui_segbar(…,segs) · ui_gauge(cx,cy,r,value,max) ·
ui_ring(cx,cy,r,value,max) · ui_vu(x,y,w,h,levels_list) · ui_spark(x,y,w,h,values_list) ·
ui_battery(x,y,w,h,value,max)
Interface controls (interactive — return state)
ui_button(x,y,w,h) → 1 when clicked · ui_toggle(x,y,w,h,state) → new state ·
ui_slider(x,y,w,value,min,max) → new value · ui_checkbox(x,y,size,checked) → new checked ·
ui_tabs(x,y,w,h,count,active) → active index · ui_progress(x,y,w,h,frac) ·
ui_tooltip(x,y,w,h) · ui_stepper(x,y,w,h,value,step) → new value
Game UI
ui_healthbar(x,y,w,h,hp,max,pulse) · ui_cooldown(cx,cy,r,frac) ·
ui_counter(x,y,dw,dh,value,digits) (7-segment) · ui_minimap(x,y,w,h) ·
ui_dpad(cx,cy,r) → direction · ui_slotgrid(x,y,cols,rows,cell,sel) ·
ui_vignette(intensity, r,g,b)
Faux-3D in 2D space
ui_gauge3d(cx,cy,r,value,spin) · ui_panel3d(x,y,w,h,depth) · ui_radar3d(cx,cy,r,tilt,sweep)
Interface sounds
ui_sound("click"|"hover"|"confirm"|"error"|"toggle"|"tick") · audio_blip(freq,dur,wave,amp)
See examples/ui/hud_showcase.ling.
Builtins — Physics
Ling exposes the ling-physics engine to scripts: rigid bodies with angular dynamics,
deformable soft bodies, and a fast 2-D immiscible liquid simulation that maps onto 3-D
surfaces. Every builtin has aliases in all five languages (see
Builtin Aliases by Language).
Coordinate note: in the renderer +y points down, so “gravity” is a positive y value.
Soft bodies (deformable / bouncy)
A spring-mass sphere that squashes and stretches on impact.
| Builtin | Meaning |
|---|---|
soft_ball(x, y, z, r) → id | Create a deformable ball at (x,y,z) radius r. |
soft_step(id, dt, gravity) | Advance the body dt seconds under gravity (y). |
soft_bounce(id, floor_y, restitution) | Bounce nodes off a horizontal floor. |
soft_contain(id, minx,miny,minz, maxx,maxy,maxz, restitution) | Keep the body inside a box, bouncing (squashing) off every wall. |
soft_kick(id, dx, dy, dz, strength) | Impulse the whole body along a direction. |
soft_deform(id) → f | Deformation factor 0 (round) … 1 (squished). |
soft_centroid(id) → [x,y,z] | Centre of mass. |
soft_nodes(id) → [x,y,z, …] | Flat list of every mesh node — draw it to show the deformed surface. |
bind ball = soft_ball(0.0, 0.0-2.5, 0.0, 1.2)
while window_is_open() {
soft_step(ball, 0.016, 9.0)
soft_contain(ball, 0.0-4.0,0.0-4.0,0.0-4.0, 4.0,4.0,4.0, 0.55)
bind ns = soft_nodes(ball) # draw the squashing mesh
# … render nodes …
}
See examples/physics/bouncy_ball.ling.
Rigid bodies + angular dynamics
A shared rigid-body world with torque, spin, inertia and a spin-inducing floor bounce, so bodies tumble and roll.
| Builtin | Meaning |
|---|---|
rb_add(x, y, z, mass) → i | Add a body, returns its index. |
rb_gravity(gx, gy, gz) | Set world gravity. |
rb_torque(i, tx, ty, tz) | Apply torque (world axes). |
rb_spin(i, wx, wy, wz) | Add to angular velocity. |
rb_impulse(i, ix, iy, iz) | Apply a linear impulse. |
rb_floor(i, y, restitution, friction) | Bounce off a floor; friction converts motion into roll/spin. |
rb_step(dt) | Step the whole world (integrate + collide). |
rb_pos(i) → [x,y,z] | Body position. |
rb_rot(i) → [qx,qy,qz,qw] | Body orientation quaternion (rotate your mesh by it). |
See examples/physics/tumbling.ling (cubes rotated by rb_rot).
Liquid simulation (water + oil)
Two immiscible density fields advected by one incompressible velocity grid. The fluids only
blend at their interface, so the physics decides where the blue (water) and amber (oil) colours
mix. Built for speed; wrap makes it seamless for mapping onto curved surfaces.
| Builtin | Meaning |
|---|---|
liquid_new(w, h) → id | Create a w×h fluid grid. |
liquid_splat(id, x, y, kind, amount, radius) | Add fluid (kind 0 = water, 1 = oil) in a disc. |
liquid_gravity(id, gx, gy) | Set the gravity vector (rotate it to slosh). |
liquid_step(id, dt) | Advance the simulation. |
liquid_draw(id, x, y, scale) | Fast flat 2-D blit of the colour field. |
liquid_draw_surface(id, kind, cx,cy,cz, radius, height) | Map/wrap the field onto a 3-D surface — kind: 0 plane · 1 sphere · 2 cylinder · 3 cone · 4 dome. |
bind liq = liquid_new(84.0, 84.0)
liquid_splat(liq, 42.0, 25.0, 1.0, 1.0, 3.0) # oil
liquid_splat(liq, 42.0, 58.0, 0.0, 1.0, 3.0) # water
while window_is_open() {
liquid_gravity(liq, sin(time_now())*55.0, cos(time_now())*55.0)
liquid_step(liq, 0.016)
set_camera(cos(time_now()*0.3), sin(time_now()*0.3), cos(0.4), sin(0.4))
liquid_draw_surface(liq, 1.0, 0.0,0.0,0.0, 2.2, 3.2) # onto a sphere
present()
}
See examples/physics/liquid_marble.ling.
Builtins — Animation (Anima)
Anima is Ling’s unified animation system (the ling-animation crate). Its guiding
idea: one rig, any target, any temperament. Every animated thing — a 2-D vtexture, a
3-D mesh, a particle field, or a bag of scalar parameters — is a rig of abstract
joints, driven by composable drivers, and deformed onto its target by a binding.
What makes Anima different is the temperament axis: a per-chain scalar from organic (灵) to mechanical (机) that selects and cross-fades the solver — muscle, breath, jiggle, and IK on one end; exact gear, cam, and linkage coupling on the other. A robot can have organic hydraulic sag; a creature can have a mechanical jaw.
The scalar drivers below are available today as builtins. They are pure functions — call them every frame with the current time (and any state you keep) to drive a scale, a position, a rotation, or a vtex parameter. Each is available in all five languages.
Organic drivers (灵)
| English | Signature | Returns | Description |
|---|---|---|---|
tween | tween(a, b, t) | number | Linear interpolation a → b, t clamped to [0,1]. |
tween_ease | tween_ease(a, b, t, "kind") | number | Eased interpolation. kind is a curve name (see below). |
breathe | breathe(t, rate, depth) | number | Breathing multiplier centred on 1.0: 1 + depth·sin(2π·rate·t). |
wobble | wobble(t, freq, amp, phase) | number | Secondary sway / jiggle sine. |
gait_phase | gait_phase(t, speed) | number | Locomotion phase in [0,1). |
gait_swing | gait_swing(t, speed, stride) | number | Forward/back leg swing for a walk cycle. |
gait_lift | gait_lift(t, speed, height) | number | Foot lift (rises only during the swing half). |
spring_to | spring_to(pos, vel, target, stiffness, damping, dt) | [pos, vel] | One spring step (spring-bone / secondary motion). Returns the new position and velocity. |
ik2 | ik2(l1, l2, tx, ty) | [shoulder, elbow] | Planar two-bone IK: joint angles that reach target (tx, ty). |
Easing curve names (for tween_ease)
linear, step, quad_in/out/in_out, cubic_in/out/in_out (smooth),
sine_in/out/in_out, expo_in/out/in_out, elastic_in/out (elastic),
back_in/out/in_out (overshoot), bounce_in/out (bounce).
Mechanical drivers (机)
| English | Signature | Returns | Description |
|---|---|---|---|
gear_couple | gear_couple(angle, teeth_in, teeth_out) | number | Meshed-gear output angle — opposite sign, scaled by the tooth ratio. |
gear_train | gear_train(angle, [t0, t1, t2, …]) | [angle…] | Angles of every gear down a meshed train. |
cam_lift | cam_lift(angle, lift) | number | Cam follower displacement over a rotation (0 at θ=0, peak at θ=π). |
piston | piston(angle, crank, rod) | number | Slider-crank pin position from a crank angle. |
rack | rack(angle, radius) | number | Rack-and-pinion linear travel: θ · radius. |
Multilingual names
| en | zh | ja | ko | th |
|---|---|---|---|---|
tween | 补间 | 補間 | 트윈 | แทรกค่า |
breathe | 呼吸 | 呼吸 | 호흡 | หายใจ |
wobble | 摆动 | 揺れ | 흔들림 | โยก |
gait_swing | 步摆 | 歩振り | 걸음흔들 | ก้าวแกว่ง |
spring_to | 弹向 | バネ寄せ | 스프링이동 | สปริงไป |
ik2 | 反解 | 逆運動 | 역운동 | ไอเค2 |
gear_couple | 齿轮联动 | 歯車連動 | 기어연동 | เฟืองทด |
piston | 活塞 | ピストン | 피스톤 | ลูกสูบ |
(The full table lives in lexicons/*.ling and lingfu normalize’s BUILTINS_ANIM.)
Example — a breathing, walking, geared scene
bind start = do {
open_window("Anima")
bind t = 0.0
while window_is_open() {
bind t = t + delta_time()
fill(10, 12, 24)
// organic 灵 — a body that breathes and a foot that walks
bind chest = breathe(t, 0.4, 0.08) // ~1.0 ± 0.08
bind foot = gait_swing(t, 1.6, 30.0) // leg swing in pixels
// mechanical 机 — a gear train driven by a turning shaft
bind shaft = t * 2.0
bind gears = gear_train(shaft, [12, 36, 12])
present()
}
}
For Rust authors — the crate (ling-animation)
The builtins above are the scalar layer. The crate also exposes the structural core that the runtime rig/skin builtins will build on:
ease—EaseFunction,Lerp,tween_ease.track—Keyframe,Track,Timeline.rig—Rig,Joint,Pose, world-pose + skinning matrices.temperament— theTemperament(灵 ↔ 机) axis withblend,liveliness,rigidity.scalar— the per-frame driver math used by the builtins.mechanism— exact linkages (gear_train,four_bar).creature— proceduralbiped_legs,quadruped_legs,breathing_scale.
Not yet wired (roadmap)
The full rig pipeline is staged. Still to land as builtins:
rig_load(glTF skin import),rig_joint,pose/anim_clip/anim_play/anim_tick.SkinBinding(3-D linear-blend skinning over a mesh),WarpBinding(2-D vtex control lattice),ParamBinding(drive vtex parameters / blendshapes).- The driver motion graph (masked, weighted blending of clip + procedural + physics).
- GPU skinning (via
ling-gpu) and driver-state snapshotting (vialing-net).
Builtins — Dialog
Cinematic, Ocarina/Majora-style dialog boxes (from ling-game): text typed out
letter-by-letter, paged, auto-advancing, with colour-coded highlighting and a
font of your choice. Pure-logic in ling-game; the runtime renders it.
Markup: {n}…{/} name/character · {p}…{/} place · {i}…{/} item · \n newline ·
|| page break.
| Builtin | Meaning |
|---|---|
dialog_show("text" [, cps]) | Start a dialog (chars-per-second typing speed, default 32). |
dialog_step(dt) | Advance the typewriter + auto-advance timers (call each frame). |
dialog_advance() | On a key press: reveal the rest of the page, else go to the next page / close (drive it from SPACE release). |
dialog_active() → bool | A box is open — gate your world update on this to “suspend” physics/input. |
dialog_typing() → bool | Still revealing characters. |
dialog_close() | Force-close the box. |
dialog_color(role, r,g,b) | Recolour a role — 0 text · 1 name · 2 place · 3 item. |
dialog_draw(x, y, w, h [, font]) | Draw the beveled box + revealed text (pass a font_load handle, or -1 for the stroke font). |
mic_open()
bind ui = font_load("assets/fonts/Exo2.ttf", 600.0)
bind line = "Hey {n}Link{/}! Take the {i}Master Sword{/} to {p}Hyrule{/} field.||Beware the night."
while window_is_open() {
if key_pressed("space") { if dialog_active() { dialog_advance() } else { dialog_show(line, 34.0) } }
if dialog_active() {
dialog_step(0.016) # world suspended while talking
dialog_draw(50.0, 420.0, 800.0, 150.0, ui)
} else {
# … normal game update …
}
present()
}
See examples/ui/dialog_demo.ling.
Asset Conversion — ling convert
Transcode an external asset into a self-contained, importable .ling file that
reconstructs it with the engine’s own builtins — preserving geometry, names, and
structure. Bulk numeric data is embedded losslessly: deflate-compressed + base64
behind the blob_f32 / blob_i32 builtins by default, or plain .ling arrays with
--no-compression.
ling convert model.glb # → model.ling (compressed, lossless)
ling convert sfx.wav -o sfx.ling # explicit output
ling convert logo.svg --no-compression # plain arrays (human-readable / diff-able)
lingfu convert song.mid # lingfu forwards to ling
| Extension | Becomes | Preserves |
|---|---|---|
.gltf / .glb | per-mesh pos/nrm/uv + indices, node names/transforms, draw_<name>() | geometry, mesh & node names, hierarchy, materials index |
.wav .ogg .flac .mp3 | <name>_pcm (mono f32) + _rate / _dur | full-precision PCM at source rate |
.mid / .midi | flat [time,dur,midi,vel,channel] note list | every note event + timing |
.svg | flattened polylines + draw_<name>(ox,oy,scale) | paths (M/L/H/V/C/Q/Z), line/rect/polyline/polygon |
.blend | routed through Blender’s glTF exporter (needs Blender on PATH or $BLENDER) | whatever Blender’s glTF export carries |
Flags: -o <out.ling> (default <asset>.ling) · --no-compression.
Using a converted file
ใช้ "model.ling" # use / import the generated module
bind start = do {
open_window(1280, 720)
while window_is_open() {
set_color(180, 220, 255)
draw_<name>(0.0, 0.0, 0.0, 1.0) # the generated draw fn
flush_3d()
present()
}
}
The blob builtins decode the embedded data on import:
blob_f32("…")→ list of numbers (little-endian f32, deflate+base64).blob_i32("…")→ list of numbers (little-endian i32) — mesh/polyline indices.
Both are lossless; --no-compression simply emits the same numbers as a literal
[ … ] list instead of a blob, which is larger but human-readable.
Window & Camera Builtins
Every builtin below is callable in all five languages — the aliases listed are
accepted by the interpreter and produced by lingfu normalize, so a program
written (or normalized) in any language runs unchanged.
Window · 2-D drawing
| EN | 🇨🇳 ZH | 🇯🇵 JA | 🇰🇷 KO | 🇹🇭 TH | Description |
|---|---|---|---|---|---|
open_window | 开窗 | ウィンドウ開く | 창열기 | เปิดหน้าต่าง | Open a window |
open_fullscreen | 全屏 | 全画面 | 전체화면 | เปิดหน้าต่างเต็มจอ | Open fullscreen window |
window_is_open | 窗开 | 開いている | 창열림 | หน้าต่างเปิดอยู่ | True while window is open |
get_width | 宽 | 幅取得 | 너비 | ความกว้าง | Window width (px) |
get_height | 高 | 高取得 | 높이 | ความสูง | Window height (px) |
fill / clear | 填 / 清 | 塗り潰し / 消去 | 채우기 / 지우기 | เติม | Clear screen to RGB |
set_color | 设色 | 色設定 | 색설정 | สีดินสอ | Set pen colour |
set_color_hsl | 色相 | HSL色 | HSL색설정 | สีHSLวาด | Set pen colour via HSL |
draw_line | 画线 | 線描く | 선그리기 | วาดเส้น | Draw a 2-D line |
draw_pixel | 画点 | 点描く | 점그리기 | วาดจุด | Plot a pixel |
triangle | 画三角 | 三角形描画 | 삼각형그리기 | วาดสามเหลี่ยม | Fill a 2-D triangle |
present | 显 | 表示 | 표시 | แสดงผล | Flush depth queue → screen |
capture_mouse | 捕鼠 | マウス捕捉 | 마우스잡기 | จับเมาส์ | Lock mouse to window |
See also draw_circle / draw_disc / set_blend (procedural set).
Input
| EN | 🇨🇳 ZH | 🇯🇵 JA | 🇰🇷 KO | 🇹🇭 TH | Description |
|---|---|---|---|---|---|
key_down | 按键 | キー押す | 키누름 | กดค้าง | True while key held |
key_pressed | 键按 | キー押した | 키눌림 | กดปุ่ม | True on key-press edge |
mouse_dx | 鼠ΔX | マウスΔX | 마우스ΔX | เมาส์X | Mouse delta X |
mouse_dy | 鼠ΔY | マウスΔY | 마우스ΔY | เมาส์Y | Mouse delta Y |
Camera
| EN | 🇨🇳 ZH | 🇯🇵 JA | 🇰🇷 KO | 🇹🇭 TH | Description |
|---|---|---|---|---|---|
set_camera | 设镜 | カメラ設定 | 카메라설정 | ตั้งกล้อง | Orient camera (yaw/pitch) |
set_camera_pos | 镜坐标 | カメラ座標 | 카메라좌표 | ตั้งตำแหน่งกล้อง | Position camera |
set_zdist | 镜距 | Z距離設定 | Z거리설정 | ตั้งระยะห่าง | Near-plane distance |
set_projection | 投影 | 投影設定 | 투영설정 | ตั้งโปรเจกชัน | Set projection mode |
Lighting
| EN | 🇨🇳 ZH | 🇯🇵 JA | 🇰🇷 KO | 🇹🇭 TH | Description |
|---|---|---|---|---|---|
set_ambient | 环境光 | 環境光設定 | 환경광설정 | ตั้งแสงรอบข้าง | Ambient level 0–1 |
add_light | 加灯 | ライト追加 | 조명추가 | เพิ่มแสง | Add a point light |
clear_lights | 清灯 | ライト消去 | 조명초기화 | ล้างแสง | Remove all lights |
# Orient camera by yaw (ry) and pitch (rx) angles
set_camera(cos(ry), sin(ry), cos(rx), sin(rx))
set_camera_pos(x, y, z)
set_zdist(d)
Camera
# Orient camera by yaw (ry) and pitch (rx) angles
set_camera(cos(ry), sin(ry), cos(rx), sin(rx))
# Position camera in world space
set_camera_pos(x, y, z)
# Set near-plane distance (default 2.0)
set_zdist(d)
Lighting
# Remove all lights
clear_lights()
# Add a point light
# add_light(x, y, z, r, g, b, intensity, radius)
add_light(0, 4, 8, 1.0, 0.85, 0.3, 2.5, 16.0)
# Ambient level (0.0–1.0)
set_ambient(0.1)
Pen colour (for 2D drawing)
# Set pen colour for subsequent 2D draws
สีดินสอ(r, g, b) # or: pen_color(r,g,b)
Typical main loop structure
令 启 = 执 {
เปิดหน้าต่างเต็มจอ("My Scene")
capture_mouse()
set_ambient(0.10)
令 帧 = 0
循 หน้าต่างเปิดอยู่() {
เติม(0, 0, 0) # clear to black
# update camera
set_camera(cos(ry), sin(ry), cos(rx), sin(rx))
set_camera_pos(cx, cy, cz)
set_zdist(2.0)
# draw geometry
clear_lights()
add_light(...)
vtex_grid(...)
vtex_rings(...)
แสดงผล() # flush
令 帧 = 帧 + 1
}
}
Glossary
A language-switchable reference for every Ling keyword, type, literal and builtin. Pick a language from the selector in the top bar — the tables and the sidebar switch to show only that language’s spelling.
- 40 keywords · 6 types · 363 builtins across 12 crates.
Builtins by crate
- ling (core runtime) — I/O, math, noise, time, colour helpers and collections — always available.
- ling-graphics — Window, 2-D/3-D drawing, camera, lighting, cel shading, vector textures, surfaces, shadows and SVG export.
- ling-ui — HUD, meters, controls, game UI widgets and vector fonts.
- ling-audio — Tone synthesis, WAV playback, microphone capture, spatial SFX, samples and FX.
- ling-music — Music decode/analysis, GM synth, rhythm grading, karaoke and MIDI.
- ling-physics — Vector maths, forces, soft bodies, rigid + angular bodies and a liquid sim.
- ling-animation — The Anima procedural-animation drivers: tweens, gaits, springs, gears and IK.
- ling-ai — Neural nets, behaviour trees and the dialog LLM.
- ling-crypto — Hashing, AEAD, signatures and the geometric / post-quantum suite.
- ling-input — Gamepad / joystick polling, sticks, triggers and rumble.
- ling-net — HTTP and WebSocket clients.
- ling-dialog — On-screen dialog boxes with typewriter text.
Keywords
Reserved words and their spelling in each language.
| English | 中文 | 日本語 | 한국어 | ไทย | Description |
|---|---|---|---|---|---|
bind | 令 | 束縛 | 바인드 | ผูก | Bind a value or function to a name. |
do | 执 | 実行 | 실행 | ทำ | Block expression do { … }. |
fn | 函 | 関数 | 함수 | ฟังก์ชัน | Function type / lambda. |
mod | 核 | モジュール | 모듈 | โมดูล | Declare a module. |
type | 符 | 型 | 타입 | ชนิด | Declare a type. |
if | 若 | もし | 만약 | ถ้า | Conditional branch. |
else | 否 | 他 | 아니면 | มิฉะนั้น | Alternative branch. |
while | 循 | 間 | 동안 | ขณะที่ | Loop while a condition holds. |
for | 历 | 繰 | 반복 | สำหรับ | Iterate over a range or collection. |
in | 于 | の中 | 안에 | ใน | Iteration source: for x in 0..10. |
match | 配 | 一致 | 매치 | ตรงกับ | Pattern match. |
return | 归 | 戻る | 반환 | คืนค่า | Return a value from a function. |
own | 独 | 所有 | 소유 | เป็นเจ้าของ | Ownership: take ownership. |
lend | 借 | 貸す | 빌려 | ให้ยืม | Ownership: borrow immutably. |
share | 共 | 共有 | 공유 | แบ่งปัน | Ownership: shared reference. |
move | 移 | 移動 | 이동 | ย้าย | Ownership: move value. |
copy | 复 | 複製 | 복사 | คัดลอก | Ownership: copy value. |
async | 异 | 非同期 | 비동기 | อะซิงค์ | Mark a function/block asynchronous. |
wait | 待 | 待つ | 기다려 | รอ | Await an async value. |
as | 为 | として | 로서 | เป็น | Type cast / alias. |
where | where | where | where | where | Constraint clause. |
post | 出 | 投稿 | 게시 | ส่ง | Return a value (idiomatic return). |
give | 予 | 渡す | 전달 | ให้ | Yield / return a value. |
fit | fit | fit | fit | จับคู่ | Pattern / refinement. |
form | 形 | 形 | 형태 | รูปแบบ | Construct a form / struct. |
choose | 选 | 選ぶ | 선택 | เลือก | Enum / selection construct. |
can | 能 | できる | 가능 | สามารถ | Capability / permission. |
change | 变 | 変える | 변경 | เปลี่ยนแปลง | Mutate a binding. |
stop | 止 | 停止 | 멈춤 | หยุด | Break out of the loop. |
again | 继 | 続ける | 계속 | ทำอีก | Continue the loop. |
try | 试 | 試す | 시도 | ลอง | Fallible expression. |
sure | 确 | 確か | 확실 | แน่นอน | Assert success. |
maybe | 或 | 多分 | 아마도 | อาจจะ | Optional value. |
pure | 纯 | 純粋 | 순수 | บริสุทธิ์ | Mark as pure (no side effects). |
spawn | 启 | 起動 | 생성 | สร้าง | Spawn a concurrent task. |
ok | 可 | 良い | 좋아 | ตกลง | Success result. |
bad | 误 | 悪い | 나쁨 | ผิดพลาด | Error result. |
none | 无 | なし | 없음 | ไม่มี | Absent value. |
start | 始 | 開始 | 시작 | เริ่ม | Program entry point: bind start = do { … }. |
result | 果 | 結果 | 결과 | ผลลัพธ์ | Result value. |
Types
Built-in types.
| English | 中文 | 日本語 | 한국어 | ไทย | Description |
|---|---|---|---|---|---|
number | 数 | 数値 | 숫자 | จำนวน | Numeric type (integer or float). |
text | 文 | 文字列 | 문자열 | ข้อความ | Text / string type. |
bool | 布 | 論理 | 논리 | ตรรกะ | Boolean (true / false). |
list | 列 | リスト | 목록 | รายการ | Ordered list type. |
map | 图 | マップ | 맵 | แผนที่ | Key / value map type. |
tuple | 元 | タプル | 튜플 | สิ่งอันดับ | Fixed-size tuple type. |
Literals & operators
Literals and operators are spelled the same in every language.
Literals
| Literal | Meaning |
|---|---|
true / false | Boolean values |
ok / bad | Result success / error |
none | Absent value |
123, 1.5, -7 | Numbers |
"hello" | Text |
[1, 2, 3] | List |
0..10 | Range (used by for) |
Operators
| Operator | Meaning |
|---|---|
+ - * / % | Arithmetic |
== != < <= > >= | Comparison |
&& || ! | Logical and / or / not |
= | Bind / assign |
-> | Function return type |
. | Field / method access |
|> | Pipe |
ling (core runtime)
I/O, math, noise, time, colour helpers and collections — always available.
I/O
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
print | 印 | 印刷 | 출력 | พิมพ์ |
debug | 查 | 調査 | 디버그 | ดีบัก |
panic | 慌 | パニック | 패닉 | ตกใจ |
Color helpers
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
hsl_color | 色相值 | HSL色値 | HSL색값 | สีHSL |
Math
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
trunc | 截整 | 切り捨て | 버림 | ตัดทศนิยม |
int | 取整 | 整数化 | 정수화 | ตัดทศนิยม |
sin | 正弦 | 正弦 | 사인 | ไซน์ |
cos | 余弦 | 余弦 | 코사인 | โคไซน์ |
tan | 正切 | 正接 | 탄젠트 | แทนเจนต์ |
sqrt | 根 | 平方根 | 제곱근 | รากที่สอง |
abs | 绝对 | 絶対値 | 절대값 | ค่าสัมบูรณ์ |
floor | 下整 | 床 | 내림 | ปัดลง |
ceil | 上整 | 天井 | 올림 | ปัดขึ้น |
round | 四舍 | 四捨五入 | 반올림 | ปัดเศษ |
pow | 幂 | べき乗 | 거듭제곱 | ยกกำลัง |
log | 对数 | 対数 | 로그 | ลอการิทึม |
min | 最小 | 最小 | 최솟값 | ต่ำสุด |
max | 最大 | 最大 | 최댓값 | สูงสุด |
clamp | 截取 | 範囲制限 | 범위제한 | จำกัด |
pi | 圆周率 | 円周率 | 파이 | พาย |
tau | 双周率 | タウ | 타우 | ทาว |
lerp | 线性插值 | 線形補間 | 선형보간 | ค่าระหว่าง |
smoothstep | 平滑步进 | スムーズステップ | 스무스스텝 | เปลี่ยนแบบนุ่ม |
rand | 随机 | 乱数 | 난수 | สุ่ม |
Noise
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
vnoise | 柏林噪声2D | バリューノイズ2D | 값노이즈2D | นอยส์2ดี |
fbm | 分形噪声 | フラクタルノイズ | 프랙탈노이즈 | นอยส์ออร์แกนิก |
perlin | 柏林噪声3D | パーリンノイズ3D | 펄린노이즈3D | เพอร์ลิน3ดี |
Color
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
hsv_to_rgb | HSV转RGB | HSV変換RGB | HSV변환RGB | เอชเอสวีเป็นRGB |
lerp_color | 颜色插值 | 色補間 | 색보간 | ไล่สี |
Time
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
time_now | 当前时间 | 経過時間 | 현재시간 | เวลาปัจจุบัน |
frame_count | 帧数 | フレーム数 | 프레임수 | เฟรม |
time | 时 | 時刻 | 시간 | เวลา |
sleep | 眠 | 眠る | 잠 | นอนหลับ |
Collections
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
len | 长 | 長さ | 길이 | ความยาว |
push | 加 | 追加 | 추가 | ต่อท้าย |
pop | 弹 | 取出 | 꺼내기 | ดึงออก |
new_list | 新列 | 新リスト | 새목록 | รายการใหม่ |
new_map | 新图 | 新マップ | 새맵 | แผนที่ใหม่ |
keys | 键集 | キー一覧 | 키목록 | ชุดคีย์ |
values | 值集 | 値一覧 | 값목록 | ชุดค่า |
contains | 含 | 含む | 포함 | มีอยู่ |
ling-graphics
Window, 2-D/3-D drawing, camera, lighting, cel shading, vector textures, surfaces, shadows and SVG export.
Window / graphics
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
open_window | 开窗 | ウィンドウ開く | 창열기 | เปิดหน้าต่าง |
open_fullscreen | 全屏 | 全画面 | 전체화면 | เปิดหน้าต่างเต็มจอ |
fill | 填 | 塗り潰し | 채우기 | เติม |
clear | 清 | 消去 | 지우기 | clear |
set_color | 设色 | 色設定 | 색설정 | สีดินสอ |
set_color_hsl | 色相 | HSL色 | HSL색설정 | สีHSLวาด |
present | 显 | 表示 | 표시 | แสดงผล |
draw_line | 画线 | 線描く | 선그리기 | วาดเส้น |
draw_pixel | 画点 | 点描く | 점그리기 | วาดจุด |
triangle | 画三角 | 三角形 | 삼각형 | วาดสามเหลี่ยม |
draw_rect | 画矩形 | 矩形描く | 사각형그리기 | วาดสี่เหลี่ยม |
draw_circle | 画圆 | 円描く | 원그리기 | วาดวงกลม |
draw_text | 画字 | 文字描く | 글자그리기 | วาดข้อความ |
window_is_open | 窗开 | 開いている | 창열림 | หน้าต่างเปิดอยู่ |
get_width | 宽 | 幅取得 | 너비 | ความกว้าง |
get_height | 高 | 高取得 | 높이 | ความสูง |
Monitor detection + framerate
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
monitor_width | 屏宽 | 画面幅 | 화면너비 | ความกว้างจอ |
monitor_height | 屏高 | 画面高 | 화면높이 | ความสูงจอ |
monitor_refresh | 刷新率 | リフレッシュレート | 주사율 | อัตรารีเฟรช |
monitor_info | 屏幕信息 | 画面情報 | 화면정보 | ข้อมูลจอ |
set_fps | 设帧率 | フレームレート設定 | 프레임설정 | ตั้งเฟรมเรต |
Input
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
key_down | 按键 | キー押す | 키누름 | กดค้าง |
key_pressed | 键按 | キー押した | 키눌림 | กดปุ่ม |
mouse_x | 鼠X | マウスX | 마우스X | เมาส์X |
mouse_y | 鼠Y | マウスY | 마우스Y | เมาส์Y |
mouse_dx | 鼠ΔX | マウスΔX | 마우스ΔX | เมาส์X |
mouse_dy | 鼠ΔY | マウスΔY | 마우스ΔY | เมาส์Y |
mouse_button | 鼠键 | マウスボタン | 마우스버튼 | ปุ่มเมาส์ |
capture_mouse | 捕鼠 | マウス捕捉 | 마우스잡기 | จับเมาส์ |
3-D
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
camera_pos | 镜位 | カメラ位置 | 카메라위치 | ตำแหน่งกล้อง |
camera_look | 镜向 | カメラ方向 | 카메라방향 | ทิศทางกล้อง |
camera_fov | 镜角 | 視野角 | 시야각 | มุมมองกล้อง |
draw_mesh | 画网 | メッシュ描く | 메시그리기 | วาดตาข่าย |
draw_triangle_3d | 画3D三角 | 3D三角形描く | 3D삼각형그리기 | วาดสามเหลี่ยม3มิติ |
draw_line_3d | 画3D线 | 3D線描く | 3D선그리기 | วาดเส้น3มิติ |
set_camera | 设镜 | カメラ設定 | 카메라설정 | ตั้งกล้อง |
set_camera_pos | 镜坐标 | カメラ座標 | 카메라좌표 | ตั้งตำแหน่งกล้อง |
set_zdist | 镜距 | Z距離設定 | Z거리설정 | ตั้งระยะห่าง |
set_projection | 投影 | 投影設定 | 투영설정 | ตั้งโปรเจกชัน |
Lighting
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
set_ambient | 环境光 | 環境光設定 | 환경광설정 | ตั้งแสงรอบข้าง |
add_light | 加灯 | ライト追加 | 조명추가 | เพิ่มแสง |
clear_lights | 清灯 | ライト消去 | 조명초기화 | ล้างแสง |
Texture patterns (vtex)
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
vtex_grid | 纹格 | 格子模様 | 격자무늬 | ลายตาราง |
vtex_rings | 纹环 | 同心円 | 동심원 | ลายวงซ้อน |
vtex_star | 纹星 | 星模様 | 별무늬 | ลายดาว |
vtex_spiral | 纹螺 | 螺旋 | 나선 | ลายเกลียว |
vtex_flower | 纹花 | 花模様 | 꽃무늬 | ลายดอก |
vtex_lotus | 纹莲 | 蓮模様 | 연꽃무늬 | ลายดอกบัว |
vtex_chakra | 纹轮 | 輪模様 | 바퀴무늬 | ลายจักร |
vtex_yantra | 纹咒 | 護符模様 | 부적무늬 | ลายยันต์ |
vtex_letter_rain | 纹字雨 | 文字雨 | 글자비 | ลายอักษรไหล |
vtex_hyperbolic_uv | 纹曲面 | 双曲線 | 쌍곡선 | ลายไฮเพอร์โบลิก |
vtex_tessellated | 纹镶嵌 | 網目模様 | 격자망 | ลายตาข่าย |
vtex_halftone | 纹半调 | 網点模様 | 망점 | ลายจุด |
vtex_spiked_cog | 纹棘轮 | 歯車模様 | 톱니바퀴 | ฟันเฟืองหนาม |
vtex_torii | 纹鸟居 | 鳥居 | 도리이 | ประตูโทริอิ |
vtex_pagoda | 纹塔 | 塔 | 탑 | เจดีย์ |
SVG export
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
svg_begin | SVG开始 | SVG開始 | SVG시작 | เริ่มSVG |
svg_rect | SVG矩形 | SVG矩形 | SVG사각형 | SVGสี่เหลี่ยม |
svg_circle | SVG圆 | SVG円 | SVG원 | SVGวงกลม |
svg_line | SVG线 | SVG線 | SVG선 | SVGเส้น |
svg_polyline | SVG折线 | SVG折れ線 | SVG꺾은선 | SVGเส้นหัก |
svg_text | SVG文字 | SVG文字 | SVG글자 | SVGข้อความ |
svg_end | SVG结束 | SVG終了 | SVG끝 | จบSVG |
Blending
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
set_blend | 混合模式 | ブレンドモード | 블렌드모드 | โหมดผสม |
Drawing - filled
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
draw_disc | 画实心圆 | 塗りつぶし円 | 원채우기 | วาดวงกลมทึบ |
Surfaces & shadows
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
set_alpha | 设透明 | アルファ設定 | 투명도설정 | ตั้งความโปร่งใส |
grad_triangle | 渐变三角 | グラデ三角 | 그라데삼각 | สามเหลี่ยมไล่สี |
grad_rect | 渐变矩形 | グラデ矩形 | 그라데사각 | สี่เหลี่ยมไล่สี |
shadow_blob | 阴影斑 | 影ブロブ | 그림자블롭 | เงาวงรี |
cast_shadow | 投射阴影 | 影を落とす | 그림자드리우기 | ทอดเงา |
shadow_params | 阴影参数 | 影設定 | 그림자설정 | ตั้งค่าเงา |
depth_triangle | 深度三角 | 深度三角形 | 깊이삼각 | สามเหลี่ยมเรียงลึก |
depth_line | 深度线 | 深度線 | 깊이선 | เส้นเรียงลึก |
2030 compositing: linear-light, OkLab gradients, z-buffer
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
set_color_space | 色彩空间 | 色空間 | 색공간 | ปริภูมิสี |
set_gradient_space | 渐变空间 | グラデ空間 | 그라데이션공간 | ปริภูมิไล่สี |
mix_color | 混合颜色 | 色混合 | 색혼합 | ผสมสี |
set_depth_test | 深度测试 | 深度テスト | 깊이테스트 | ทดสอบความลึก |
mode: 0 filled · 1 wireframe · 2 both
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
cube | 立方体 | 立方体 | 정육면체 | ลูกบาศก์ |
box | 方块 | 箱 | 상자 | กล่อง |
sphere | 球体 | 球 | 구 | ทรงกลม |
icosphere | 二十面球 | アイコ球 | 아이코구체 | ทรงกลมเหลี่ยม |
dome | 穹顶 | ドーム | 돔 | โดม |
cylinder | 圆柱 | 円柱 | 원기둥 | ทรงกระบอก |
cone | 圆锥 | 円錐 | 원뿔 | กรวย |
capsule | 胶囊 | カプセル | 캡슐 | แคปซูล |
torus | 圆环 | トーラス | 토러스 | ทอรัส |
pyramid | 金字塔 | ピラミッド | 피라미드 | พีระมิด |
prism | 棱柱 | 角柱 | 각기둥 | ปริซึม |
frustum | 棱台 | 錐台 | 원뿔대 | กรวยตัด |
tetrahedron | 四面体 | 四面体 | 정사면체 | ทรงสี่หน้า |
octahedron | 八面体 | 八面体 | 정팔면체 | ทรงแปดหน้า |
dodecahedron | 十二面体 | 十二面体 | 정십이면체 | ทรงสิบสองหน้า |
icosahedron | 二十面体 | 二十面体 | 정이십면체 | ทรงยี่สิบหน้า |
gear | 齿轮 | 歯車 | 톱니바퀴 | เฟือง |
gyro | 陀螺 | ジャイロ | 자이로 | ไจโร |
helix | 螺旋线 | らせん | 나선 | เกลียว |
spring | 弹簧 | ばね | 스프링 | สปริง |
arch | 拱门 | アーチ | 아치 | ซุ้มโค้ง |
stairs | 楼梯 | 階段 | 계단 | บันได |
star_prism | 星柱 | 星柱 | 별기둥 | แท่งดาว |
capsule_chain | 胶囊链 | カプセル鎖 | 캡슐체인 | โซ่แคปซูล |
mobius | 莫比乌斯 | メビウス | 뫼비우스 | เมอบีอุส |
render / lighting modes (holographic cel)
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
set_shade_mode | 设置着色 | シェード設定 | 셰이드모드 | ตั้งการแรเงา |
set_cel_bands | 设置色阶 | セル段数 | 셀밴드 | ตั้งระดับสี |
set_shadow_color | 设置阴影色 | 影の色 | 그림자색 | ตั้งสีเงา |
set_rim | 设置边缘光 | リム設定 | 림라이트 | ตั้งขอบเรือง |
3D projection + filled 2D polygons
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
project_3d | 投影3D | 3D投影 | 3D투영 | ฉาย3มิติ |
draw_poly | 填充多边形 | ポリゴン塗り | 다각형채우기 | เติมรูปหลายเหลี่ยม |
dialog + liquid rainbow + sparkle
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
sparkle | 闪光 | きらめき | 반짝임 | ประกาย |
game AI : neural net, behavior tree, dialog LLM
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
orb_shell | 球壳 | オーブ殻 | 오브껍질 | เปลือกทรงกลม |
orb_particles | 球内粒子 | オーブ粒子 | 오브입자 | อนุภาคทรงกลม |
ling-ui
HUD, meters, controls, game UI widgets and vector fonts.
UI toolkit (HUD / meters / controls / game UI) + vector fonts
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
ui_theme | 界面主题 | UIテーマ | 인터페이스테마 | ธีมส่วนติดต่อ |
ui_text | 界面文字 | UI文字 | UI텍스트 | ข้อความหน้าจอ |
ui_frame | 边框 | フレーム枠 | 프레임틀 | กรอบ |
ui_bevel | 斜角框 | ベベル枠 | 베벨틀 | กรอบเฉียง |
ui_hot | 热区 | ホットエリア | 핫존 | พื้นที่สัมผัส |
ui_radar | 雷达 | レーダー | 레이더 | เรดาร์ |
ui_compass | 罗盘 | コンパス | 나침반 | เข็มทิศ |
ui_reticle | 准星 | 照準 | 조준선 | เป้าเล็ง |
ui_target | 锁定框 | ターゲット | 표적 | กรอบเป้า |
ui_panel | 面板 | パネル | 패널 | แผง |
ui_scanlines | 扫描线 | 走査線 | 스캔라인 | เส้นสแกน |
ui_bar | 进度条 | バー | 막대 | แถบ |
ui_segbar | 分段条 | 分割バー | 분할막대 | แถบแบ่ง |
ui_gauge | 仪表 | ゲージ | 게이지 | มาตรวัด |
ui_ring | 环表 | リングメーター | 링미터 | วงแหวนวัด |
ui_vu | 音量条 | VUメーター | 음량막대 | มาตรเสียง |
ui_spark | 迷你图 | スパークライン | 스파크라인 | กราฟจิ๋ว |
ui_battery | 电池 | バッテリー | 배터리 | แบตเตอรี่ |
ui_button | 按钮 | ボタン | 버튼 | ปุ่ม |
ui_toggle | 开关 | トグル | 토글 | สวิตช์ |
ui_slider | 滑块 | スライダー | 슬라이더 | แถบเลื่อน |
ui_checkbox | 复选框 | チェックボックス | 체크박스 | ช่องเลือก |
ui_tabs | 标签页 | タブ | 탭 | แท็บ |
ui_progress | 进度 | プログレス | 진행바 | ความคืบหน้า |
ui_tooltip | 提示框 | ツールチップ | 툴팁 | คำแนะนำ |
ui_stepper | 步进器 | ステッパー | 스테퍼 | ตัวปรับค่า |
ui_healthbar | 血条 | 体力バー | 체력바 | แถบพลังชีวิต |
ui_cooldown | 冷却 | クールダウン | 쿨다운 | คูลดาวน์ |
ui_counter | 计数器 | カウンター | 카운터 | ตัวนับ |
ui_minimap | 小地图 | ミニマップ | 미니맵 | แผนที่ย่อ |
ui_dpad | 方向键 | 方向パッド | 방향패드 | ปุ่มทิศทาง |
ui_slotgrid | 物品格 | スロットグリッド | 슬롯격자 | ช่องไอเทม |
ui_vignette | 暗角 | ビネット | 비네트 | ขอบมืด |
ui_gauge3d | 立体仪表 | 立体ゲージ | 입체게이지 | มาตรวัด3มิติ |
ui_panel3d | 立体面板 | 立体パネル | 입체패널 | แผง3มิติ |
ui_radar3d | 立体雷达 | 立体レーダー | 입체레이더 | เรดาร์3มิติ |
ui_sound | 界面音 | UI音 | 인터페이스음 | เสียงปุ่ม |
font_load | 加载字体 | フォント読込 | 글꼴로드 | โหลดฟอนต์ |
font_text | 字体文本 | フォント文字 | 글꼴텍스트 | ข้อความฟอนต์ |
font_text_fill | 填充字体 | フォント塗り | 글꼴채움 | เติมฟอนต์ |
font_text_3d | 字体3D | フォント3D | 글꼴3D | ข้อความฟอนต์3มิติ |
font_width | 字体宽度 | フォント幅 | 글꼴너비 | ความกว้างฟอนต์ |
ling-audio
Tone synthesis, WAV playback, microphone capture, spatial SFX, samples and FX.
Audio
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
tone | 音调 | 音調 | 음조 | เสียงโทน |
play_wav | 播音 | WAV再生 | WAV재생 | เล่นWAV |
stop_audio | 止音 | 音停止 | 음악멈춤 | หยุดเสียง |
set_volume | 音量 | 音量設定 | 음량설정 | ปรับระดับเสียง |
mic_open | 开麦 | マイク開く | 마이크열기 | เปิดไมค์ |
mic_peak | 麦克风峰值 | マイクピーク | 마이크피크 | เสียงพีค |
mic_rms | 麦克风音量 | マイクRMS | 마이크RMS | เสียงRMS |
mic_fft | 实时频谱 | リアルタイムFFT | 실시간FFT | วิเคราะห์เสียงสด |
audio_tone | 空间音 | 空間音 | 공간음 | เสียงโทน |
audio_volume | 总音量 | マスター音量 | 마스터음량 | ระดับเสียง |
audio_listener | 听者 | リスナー | 청취자 | ผู้ฟัง |
audio_bgm | 背景乐 | BGM | 배경음악 | เพลงพื้นหลัง |
audio_bgm_volume | 背景音量 | BGM音量 | 배경음량 | ระดับเสียงพื้นหลัง |
UI toolkit (HUD / meters / controls / game UI) + vector fonts
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
audio_blip | 提示音 | ビープ音 | 효과음 | เสียงบี๊บ |
spatial audio / samples / FX / MIDI
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
audio_sfx | 音效 | 空間効果音 | 공간효과음 | เสียงเอฟเฟกต์ |
audio_sample_load | 载入采样 | サンプル読込 | 샘플로드 | โหลดตัวอย่างเสียง |
audio_sample_play | 播放采样 | サンプル再生 | 샘플재생 | เล่นตัวอย่างเสียง |
audio_sample_stop | 停止采样 | サンプル停止 | 샘플정지 | หยุดตัวอย่างเสียง |
audio_fx_delay | 回声 | ディレイ効果 | 딜레이 | เสียงสะท้อน |
audio_fx_reverb | 混响 | リバーブ | 리버브 | เสียงก้อง |
audio_fx_lowpass | 低通滤波 | ローパス | 저역통과 | กรองความถี่ต่ำ |
ling-music
Music decode/analysis, GM synth, rhythm grading, karaoke and MIDI.
music toolkit (decode / analysis / GM synth / rhythm / karaoke)
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
music_load | 载入音乐 | 音楽読込 | 음악로드 | โหลดเพลง |
music_duration | 音乐时长 | 音楽長さ | 음악길이 | ความยาวเพลง |
music_bpm | 节拍速度 | テンポ | 템포 | จังหวะต่อนาที |
music_key | 调性 | 調性 | 조성 | คีย์เพลง |
music_onsets | 音符起点 | オンセット | 온셋 | จุดเริ่มเสียง |
music_beat_grid | 节拍网格 | ビートグリッド | 비트그리드 | กริดจังหวะ |
music_play | 播放音乐 | 音楽再生 | 음악재생 | เล่นเพลง |
music_pause | 暂停音乐 | 音楽一時停止 | 음악일시정지 | หยุดเพลงชั่วคราว |
music_stop | 停止音乐 | 音楽停止 | 음악정지 | หยุดเพลง |
music_seek | 定位音乐 | 音楽シーク | 음악탐색 | ค้นหาเพลง |
music_pos | 音乐位置 | 音楽位置 | 음악위치 | ตำแหน่งเพลง |
music_volume | 音乐音量 | 音楽音量 | 음악음량 | ระดับเพลง |
music_patch | 乐器音色 | 音色読込 | 악기패치 | แพตช์เครื่องดนตรี |
music_note | 弹音符 | 音符演奏 | 음표연주 | เล่นโน้ต |
music_note_on | 音符开始 | 音符オン | 음표켜기 | โน้ตเริ่ม |
music_note_off | 音符结束 | 音符オフ | 음표끄기 | โน้ตจบ |
music_judge | 判定 | 判定する | 판정 | ตัดสินจังหวะ |
music_grade_name | 判定名 | 判定名称 | 판정이름 | ชื่อการตัดสิน |
music_lrc | 载入歌词 | 歌詞読込 | 가사로드 | โหลดเนื้อเพลง |
music_lyric | 当前歌词 | 現在歌詞 | 현재가사 | เนื้อเพลงปัจจุบัน |
music_mic_pitch | 麦克风音高 | マイク音程 | 마이크음정 | ระดับเสียงไมค์ |
music_note_name | 音名 | 音名称 | 음이름 | ชื่อโน้ต |
music_hz | 音符频率 | 音符周波数 | 음표주파수 | ความถี่โน้ต |
music_pitch_score | 音准评分 | 音程スコア | 음정점수 | คะแนนเสียง |
spatial audio / samples / FX / MIDI
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
music_midi_load | 载入MIDI | MIDI読込 | 미디로드 | โหลดมิดี |
music_midi_count | MIDI数量 | MIDI数 | 미디수 | จำนวนมิดี |
music_midi_notes | MIDI音符 | MIDIノート | 미디음표 | โน้ตมิดี |
music_fft | 音乐频谱 | 音楽スペクトル | 음악스펙트럼 | สเปกตรัมเพลง |
music_midi_bars | MIDI音条 | MIDIバー | 미디바 | แท่งมิดี |
ling-physics
Vector maths, forces, soft bodies, rigid + angular bodies and a liquid sim.
Physics - vectors
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
physics_normalize | 向量_单位化 | ベクトル_単位化 | 벡터_단위화 | เวกเตอร์_ทำให้เป็นหน่วย |
physics_dot | 向量_点积 | ベクトル_内積 | 벡터_내적 | เวกเตอร์_ผลคูณจุด |
physics_cross | 向量_叉积 | ベクトル_外積 | 벡터_외적 | เวกเตอร์_ผลคูณไขว้ |
physics_distance | 向量_距离 | ベクトル_距離 | 벡터_거리 | เวกเตอร์_ระยะห่าง |
physics_magnitude | 向量_长度 | ベクトル_大きさ | 벡터_크기 | เวกเตอร์_ความยาว |
physics_lerp | 向量_插值 | ベクトル_補間 | 벡터_보간 | เวกเตอร์_สอดแทรก |
physics_angle | 向量_夹角 | ベクトル_角度 | 벡터_각도 | เวกเตอร์_มุม |
physics_project | 向量_投影 | ベクトル_投影 | 벡터_정사영 | เวกเตอร์_ฉาย |
physics_reflect | 向量_反射 | ベクトル_反射 | 벡터_반사 | เวกเตอร์_สะท้อน |
Physics - forces
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
physics_gravity | 重力_力 | 重力_力 | 중력_힘 | แรงโน้มถ่วง_แรง |
physics_drag | 阻力_风阻 | 抵抗_力 | 항력_저항 | แรงลาก_ความต้านทาน |
physics_spring | 弹簧_力 | バネ_力 | 스프링_힘 | สปริง_แรง |
physics_damping | 阻尼_力 | 減衰_力 | 감쇠_힘 | การลดการสั่น_แรง |
physics_attraction | 万有_引力 | 万有_引力 | 만유_인력 | แรงดึงดูด_แรง |
physics_repulsion | 排斥_力 | 斥力_力 | 척력_힘 | แรงผลัก_แรง |
physics_buoyancy | 浮力_力 | 浮力_力 | 부력_힘 | แรงลอยตัว_แรง |
physics_wind | 风_力 | 風_力 | 바람_힘 | ลม_แรง |
physics_bounce | 碰撞_反弹 | 衝突_バウンス | 충돌_반발 | การชน_กระเด้ง |
physics_accel | 力_加速度 | 力_加速度 | 힘_가속도 | แรง_ความเร่ง |
physics (soft bodies / rigid+angular / liquid sim)
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
soft_ball | 软球 | ソフトボール | 소프트볼 | ลูกบอลนุ่ม |
soft_step | 软体步进 | ソフト更新 | 소프트스텝 | ก้าวนุ่ม |
soft_bounce | 软体落地 | ソフト着地 | 소프트바운스 | เด้งนุ่ม |
soft_contain | 软体边界 | ソフト箱 | 소프트경계 | กล่องนุ่ม |
soft_kick | 软体踢 | ソフト衝撃 | 소프트킥 | เตะนุ่ม |
soft_deform | 形变量 | 変形量 | 변형량 | ความบิดเบี้ยว |
soft_centroid | 软体质心 | ソフト重心 | 소프트중심 | จุดศูนย์กลางนุ่ม |
soft_nodes | 软体节点 | ソフト節点 | 소프트노드 | จุดนุ่ม |
rb_add | 刚体添加 | 剛体追加 | 강체추가 | เพิ่มวัตถุแข็ง |
rb_torque | 扭矩 | トルク | 토크 | แรงบิด |
rb_spin | 自旋 | スピン | 스핀 | หมุน |
rb_impulse | 刚体冲量 | 剛体インパルス | 강체충격 | แรงดลแข็ง |
rb_floor | 刚体落地 | 剛体着地 | 강체바닥 | พื้นแข็ง |
rb_gravity | 刚体重力 | 剛体重力 | 강체중력 | แรงโน้มถ่วงแข็ง |
rb_step | 刚体步进 | 剛体更新 | 강체스텝 | ก้าวแข็ง |
rb_pos | 刚体位置 | 剛体位置 | 강체위치 | ตำแหน่งแข็ง |
rb_rot | 刚体旋转 | 剛体回転 | 강체회전 | การหมุนแข็ง |
liquid_new | 新建液体 | 液体新規 | 액체생성 | สร้างของเหลว |
liquid_splat | 液体注入 | 液体追加 | 액체분사 | หยดของเหลว |
liquid_gravity | 液体重力 | 液体重力ベクトル | 액체중력 | แรงโน้มถ่วงเหลว |
liquid_step | 液体步进 | 液体更新 | 액체스텝 | ก้าวของเหลว |
liquid_draw | 绘制液体 | 液体描画 | 액체그리기 | วาดของเหลว |
liquid_draw_surface | 液体贴面 | 液体曲面 | 액체곡면 | ของเหลวบนพื้นผิว |
dialog + liquid rainbow + sparkle
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
liquid_rainbow | 液体彩虹 | 液体虹 | 액체무지개 | ของเหลวสายรุ้ง |
game AI : neural net, behavior tree, dialog LLM
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
soft_spin | 软体自旋 | ソフト回転 | 소프트회전 | หมุนนุ่ม |
soft_angular_speed | 软体角速 | ソフト角速度 | 소프트각속도 | ความเร็วเชิงมุมนุ่ม |
liquid_mix | 液体混合 | 液体混合度 | 액체혼합 | การผสมของเหลว |
ling-animation
The Anima procedural-animation drivers: tweens, gaits, springs, gears and IK.
Anima animation drivers
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
tween | 补间 | 補間 | 트윈 | แทรกค่า |
tween_ease | 缓动补间 | 緩和補間 | 이징트윈 | แทรกนุ่ม |
breathe | 呼吸 | 呼吸 | 호흡 | หายใจ |
wobble | 摆动 | 揺れ | 흔들림 | โยก |
gait_phase | 步相 | 歩相 | 걸음위상 | เฟสก้าว |
gait_swing | 步摆 | 歩振り | 걸음흔들 | ก้าวแกว่ง |
gait_lift | 抬脚 | 足上げ | 발들기 | ยกเท้า |
spring_to | 弹向 | バネ寄せ | 스프링이동 | สปริงไป |
ik2 | 反解 | 逆運動 | 역운동 | ไอเค2 |
gear_couple | 齿轮联动 | 歯車連動 | 기어연동 | เฟืองทด |
gear_train | 齿轮组 | 歯車列 | 기어열 | ชุดเฟือง |
cam_lift | 凸轮升程 | カム揚程 | 캠리프트 | ยกลูกเบี้ยว |
piston | 活塞 | ピストン | 피스톤 | ลูกสูบ |
rack | 齿条 | ラック | 랙 | แร็ค |
ling-ai
Neural nets, behaviour trees and the dialog LLM.
AI
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
ai_chat | 智聊 | AI会話 | AI대화 | สนทนาAI |
ai_embed | 智嵌 | AI埋込 | AI임베드 | ฝังAI |
game AI : neural net, behavior tree, dialog LLM
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
nn_new | 建神经网 | ニューラル作成 | 신경망생성 | สร้างโครงข่าย |
nn_dense | 密集层 | 密層追加 | 밀집층 | ชั้นหนาแน่น |
nn_forward | 神经前向 | 順伝播 | 순전파 | ส่งต่อโครงข่าย |
nn_train | 训练网 | ニューラル学習 | 신경망학습 | ฝึกโครงข่าย |
nn_save | 保存网 | 網保存 | 신경망저장 | บันทึกโครงข่าย |
nn_load | 载入网 | 網読込 | 신경망불러오기 | โหลดโครงข่าย |
bt_build | 建行为树 | 行動木構築 | 행동트리구성 | สร้างต้นไม้พฤติกรรม |
bt_set | 设事实 | 事実設定 | 사실설정 | ตั้งข้อเท็จจริง |
bt_tick | 行为树滴答 | 行動木更新 | 행동트리틱 | เดินต้นไม้พฤติกรรม |
bt_status | 行为树状态 | 行動木状態 | 행동트리상태 | สถานะต้นไม้พฤติกรรม |
dialog_new | 建对话模型 | 対話モデル作成 | 대화모델생성 | สร้างโมเดลสนทนา |
dialog_learn | 对话学习 | 対話学習 | 대화학습 | เรียนรู้สนทนา |
dialog_load | 对话载入 | 対話読込 | 대화불러오기 | โหลดชุดสนทนา |
dialog_train | 对话训练 | 対話訓練 | 대화훈련 | ฝึกสนทนา |
dialog_say | 对话生成 | 対話生成 | 대화생성 | พูดสนทนา |
dialog_save | 对话存模 | 対話モデル保存 | 대화모델저장 | บันทึกโมเดลสนทนา |
dialog_load_model | 对话载模 | 対話モデル読込 | 대화모델불러오기 | โหลดโมเดลสนทนา |
ling-crypto
Hashing, AEAD, signatures and the geometric / post-quantum suite.
Math
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
sign | 签名 | 署名 | 서명 | ลายเซ็น |
Crypto
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
hash | 哈希 | ハッシュ | 해시 | แฮช |
encrypt | 加密 | 暗号化 | 암호화 | เข้ารหัส |
decrypt | 解密 | 復号化 | 복호화 | ถอดรหัส |
verify | 验证 | 検証 | 검증 | ยืนยัน |
Geometric / post-quantum crypto (ling-crypto geo suite)
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
crypto_hash | 几何哈希 | 幾何ハッシュ | 기하해시 | แฮชเข้ารหัส |
knot_points | 结点坐标 | 結び目点 | 매듭점 | จุดปม |
knot_label | 结点标签 | 結び目ラベル | 매듭라벨 | ป้ายปม |
knot_keygen | 生成密钥 | 鍵生成 | 키생성 | สร้างกุญแจปม |
knot_public | 公钥 | 公開鍵 | 공개키 | กุญแจสาธารณะปม |
knot_encapsulate | 封装密钥 | カプセル化 | 캡슐화 | ห่อกุญแจปม |
knot_decapsulate | 解封装密钥 | カプセル解除 | 캡슐해제 | แกะกุญแจปม |
crypto_seal | 封印 | 封印する | 봉인 | ผนึก |
crypto_open | 解封 | 封印解除 | 봉인해제 | เปิดผนึก |
holo_points | 全息点 | ホログラム点 | 홀로그램점 | จุดโฮโลแกรม |
holo_fragment_count | 全息碎片数 | ホログラム断片数 | 홀로그램조각수 | จำนวนชิ้นโฮโลแกรม |
ling-input
Gamepad / joystick polling, sticks, triggers and rumble.
Gamepad / joystick
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
pad_poll | 手柄轮询 | パッド更新 | 패드폴링 | อัปเดตแพด |
pad_count | 手柄数 | パッド数 | 패드수 | จำนวนแพด |
pad_connected | 手柄连接 | パッド接続 | 패드연결 | แพดเชื่อม |
pad_button | 手柄按键 | パッドボタン | 패드버튼 | ปุ่มแพด |
pad_pressed | 手柄按下 | パッド押下 | 패드눌림 | แพดกด |
pad_lx | 手柄左X | パッド左X | 패드왼X | แพดซ้ายX |
pad_ly | 手柄左Y | パッド左Y | 패드왼Y | แพดซ้ายY |
pad_rx | 手柄右X | パッド右X | 패드오X | แพดขวาX |
pad_ry | 手柄右Y | パッド右Y | 패드오Y | แพดขวาY |
pad_lt | 手柄左扳机 | パッド左トリガー | 패드왼트리거 | ไกแพดซ้าย |
pad_rt | 手柄右扳机 | パッド右トリガー | 패드오트리거 | ไกแพดขวา |
pad_rumble | 手柄震动 | パッド振動 | 패드진동 | แพดสั่น |
ling-net
HTTP and WebSocket clients.
Network
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
http_get | 网取 | HTTP取得 | HTTP가져오기 | ดึงHTTP |
http_post | 网发 | HTTP送信 | HTTP보내기 | ส่งHTTP |
ws_connect | 网链 | WS接続 | WS연결 | เชื่อมWS |
ling-dialog
On-screen dialog boxes with typewriter text.
dialog + liquid rainbow + sparkle
| English | 中文 | 日本語 | 한국어 | ไทย |
|---|---|---|---|---|
dialog_show | 对话显示 | 会話表示 | 대화표시 | แสดงบทสนทนา |
dialog_step | 对话步进 | 会話更新 | 대화스텝 | ก้าวบทสนทนา |
dialog_advance | 对话推进 | 会話送り | 대화진행 | เลื่อนบทสนทนา |
dialog_active | 对话激活 | 会話中 | 대화중 | บทสนทนาทำงาน |
dialog_typing | 对话打字 | 会話タイプ中 | 대화타이핑 | กำลังพิมพ์บทสนทนา |
dialog_close | 对话关闭 | 会話閉じる | 대화닫기 | ปิดบทสนทนา |
dialog_color | 对话颜色 | 会話色 | 대화색 | สีบทสนทนา |
dialog_draw | 对话绘制 | 会話描画 | 대화그리기 | วาดบทสนทนา |
Crates & Functions
Ling is a Cargo workspace: the ling interpreter is backed by ~two dozen
focused crates under crates/.
This page lists every workspace crate, what it does, and its public functions
(generated from each crate’s source — the Rust API behind the Ling builtins).
ling-ai v2030.0.1
Tensor computation, neural networks, and LLM inference
51 public functions:
add as_str assistant backward config corpus_len decode dense encode forward forward_cache from_bytes from_vec from_vocab get id_to_token learn learn_dataset matmul meta mul new next_f32 next_u64 numel ones out_width parse push rank relu say set softmax status system tick to_bytes to_chatml to_lingdialog to_plain token_to_id train train_mse training_lines turn_count uniform user utterances vocab_size zeros
ling-animation v2030.0.0
Anima — Ling’s unified animation system: one rig, any target, any temperament (organic 灵 ↔ mechanical 机)
61 public functions:
add add_rig add_timeline apply biped_legs blend breathe breathing_scale cam_lift duration eye_aperture_l find four_bar from_name from_translation gait_lift gait_phase gait_swing gear gear_train idle_noise is_empty is_mechanical is_organic key len lerp liveliness matrix new normalized offset pause piston play quadruped_legs rack reset resolve rest rig rig_mut rigidity sample set_local skinning_matrices solve solve_point spring_step stop tick tick_all timeline topology tween_ease two_bone_fk two_bone_ik value wobble world world_pos
ling-ast v2030.0.0
Abstract Syntax Tree types for the Ling language
5 public functions:
is_empty len new span union
ling-audio v2030.0.3
4D positional audio synthesis and WAV BGM for Ling
34 public functions:
add_sample beat_ratio blip clear_tone dominant_freq eval eval_animated fire freq_bands freq_texture frequency from_name fx_delay fx_lowpass fx_reverb is_beat load_bgm map_bands new ocean play_sample psychedelic push_samples rainbow rms set_bgm_volume set_listener set_listener_pos set_master_volume set_tone set_window sfx stop_sample waveform_texture
ling-codegen v2030.0.1
Code generation backends for Ling (bytecode, WASM, native)
4 public functions:
compile_mir_program load new run_main
ling-core v2030.0.1
Core types, errors, and compiler infrastructure for Ling
No public free functions (types / re-exports only).
ling-crypto v2030.1.3
Post-quantum and classical cryptography for Ling — real ML-KEM-768 (FIPS 203), X25519+ML-KEM hybrid KEM, AES-GCM, XChaCha20, Blake3, SHA3, Argon2id, Shamir over GF(2^8), Ristretto Schnorr ZKP, VRF
49 public functions:
decapsulate decrypt derive_key diffie_hellman encapsulate encapsulation_key encrypt encryption_key evaluate expand from_bytes from_digest from_scalar_bytes from_seed gather generate generate_key hash hash_many hash_password hkdf_sha3 holo_hash holo_open holo_seal kem_seed key keyed_hash knot_encapsulate knot_for_public_key label new params prove public_bytes public_key public_knot reconstruct_secret scatter schnorr_verify seed sign signing_seed split_secret subkey to_bytes verify verify_password vrf_verify xof
ling-fu v2030.1.6
灵符 — The Ling project manager. lingfu new/build/run/normalize and more.
12 public functions:
dir_names from_code from_str name name_in normalize_content normalize_project sanitize_project_kind scaffold_in_dir scaffold_project to_chinese to_english
ling-game v2030.1.1
Ling game engine — ECS, physics, and scene management
61 public functions:
add_system advance apply_force checkerboard close color_cycle cube cylinder despawn dot eval fire forest freq_map get get_mut gradient grid halftone hyperbolic_patch hypnotic_spiral icosphere index insert integrate into_vec is_closed is_last_page is_typing iter julia len mandelbrot merge mobius neon new noise normalise normals ocean overlaps pentagon positions psychedelic quit rainbow register remove rgba rgba_alpha ripple run set set_fps spawn sphere torus update visible_runs voronoi
ling-gpu v2030.0.1
GPU compute backend for Ling (CUDA via cudarc, with a portable CPU fallback)
4 public functions:
backend device_name gpu_active new
ling-graphics v2030.0.4
3D/4D rendering, geometry, animation, and font tools for the Ling ecosystem
132 public functions:
add add_child add_node add_root add_triangle add_vertex advance apply ascent at blend blend_pixel build cel_ramp center clamp clear collect_render_items compute_normals compute_tangents cone contains contains_aabb contains_point contains_sphere cube cylinder descent distance dot draw_text duration expand forward from_bytes from_color from_hex from_path from_path_weight from_point_normal from_points from_rotation from_scale from_srgb from_srgba from_three_points from_translation from_trs from_view_proj generate_text_mesh get_or_rasterize get_pixel global_matrix global_transform glyph_outline half_extents icosphere identity intersect_aabb intersect_plane intersect_sphere length lerp lit_vertex look_at luminance matrix measure measure_text minkowski_dot move_by move_forward move_right move_up mul mul_vec new node node_mut normalize normalized_time orbit orthographic pack pause perspective plane play posterize premultiply_alpha present_terminal project projection_matrix pyramid render_scene right roots run sample sample_albedo set_light set_pixel signed_distance size spawn_mesh sphere stop tick to_klein to_poincare to_rgba_bytes torus translation_4d transpose triangle_count union unpack unproject_ray up view_matrix view_proj with_alpha with_color with_emissive with_material with_mesh with_metallic_roughness with_terminal_dimensions with_texture with_transform xyz zero
ling-icon v2030.0.1
Rasterize SVG/PNG icons to multi-resolution .ico and embed them in Windows executables
4 public functions:
embed_in_build ico_bytes rasterize_and_embed write_ico
ling-input v2030.0.1
Sensorium — Ling’s unified input system: gamepads, joysticks, haptics, motion, XR controllers, and themeable on-screen touch controls (灵 organic ↔ 机 mechanical)
104 public functions:
active active_count add analog apply assign_player axis axis2d begin begin_frame bind button button_mut cancel center click contains contains_xz count current_opacity define delta disconnect dpad drift duration end events faded floating for_player forward from_center_size from_degrees gamepad get get_mut glyph gyro_aim hand hand_mut hat heartbeat high_contrast ingest is_active is_down is_playing is_silent iter joint just_pressed just_released lerp ling map map_mut max minimal modern_gamepad mouse move_by move_to moved neon new of_kind pick play player pop pressed prune pulse pump push push_text ray recenter right sample scaled scroll set set_axis set_button set_held stick stop tick to_f32 transform_point trigger twin_stick up update update_analog update_buttons value vector with_keyboard with_layout with_mouse xr_controller
ling-lex v2030.0.0
Lexical analysis and polyglot tokenization for Ling
9 public functions:
into_tokens is_keyword is_literal is_operator is_type new next_token peek pos
ling-macro v2030.0.0
Procedural macros for the Ling language ecosystem
1 public functions:
derive_ling_type
ling-mic v2030.0.2
Microphone input and real-time audio capture for Ling
7 public functions:
latest_samples open peak rms sample_rate start stop
ling-mir v2030.0.1
Ling MIR - Mid-level Intermediate Representation for codegen backends
7 public functions:
clone_blocks compute find_loops inline_function is_move_type new run
ling-music v2030.0.1
2030-ready music toolkit for Ling — decode, BPM/key analysis, GM-capable synthesis, rhythm-game & karaoke tools
53 public functions:
accuracy active_voices add_patch all_notes_off beat_grid bpm chroma detect detect_range duration from_beats from_bytes from_index from_name from_path from_str hz_to_midi hz_to_name index index_at judge key key_name line_at load midi_to_hz midi_to_name name name_to_hz name_to_midi new next_sample note note_off note_off_pitch note_on onset_envelope onsets parse parse_pitch pause pitch_class_name pitch_score play position register rms scale_steps seek set_track set_track_volume set_volume stop
ling-net v2030.0.0
Async networking — HTTP, WebSocket, QUIC, and peer-to-peer
56 public functions:
add append apply_delta approx_eq as_slice as_str at blob bool clear contains count delay delta_from expect_end finish fixed from_bytes from_seed generate get hash_snapshot head header is_empty is_success iter keyframe latest_tick len lerp matches_local new ok post public_key push quat raw remaining sample server_public_key set set_delay sign sign_snapshot stats_of str text to_bytes vec3 verify with with_capacity with_genesis with_stats
ling-physics v2030.1.8
Physics, world generation, and hyperbolic geometry for Ling
142 public functions:
aabb_max aabb_min acceleration_from_force acceleration_from_force_4d add add_room advance ambient_light angle_between angle_between_4d angular_speed angular_velocity apply_force apply_impulse apply_impulse_at apply_spin apply_torque bounce_floor bounce_velocity bounce_velocity_4d buoyancy_force centripetal_force centroid clamp_magnitude clamp_magnitude_4d contain cross damping_force damping_force_4d day_fraction deformation directional_light distance distance_4d distance_4d_squared distance_squared dot dot_4d drag_force drag_force_4d eval_node_transform exp_map fbm find floor_collision fog_color from_poincare gen_grass generate get_chunk get_height gravitational_attraction gravitational_attraction_4d gravity_dir gravity_force gravity_force_4d gust integrate is_day is_raining is_snowing joint_matrices kick lambda lerp lerp_4d load load_chunk log_map lorentz_force magnitude magnitude_4d mean_velocity mix_amount mobius_add moon_direction nbody_accel new normalize normalize_4d oil_at overlaps parallel_transport pentagon_tiling pentagon_vertices perpendicular_2d place portal_at pressure_force project project_4d quat_from_euler quat_mul reflect reflect_4d refresh_inertia reject reject_4d remove repulsive_force repulsive_force_4d resolve_collision rotate_axis_angle rotation_4d_from_axis_angle sample sample_height sample_rgb set_colors set_gravity signed_area_2d sky_color smooth_lerp smooth_lerp_4d spawn_entity sphere spin splat spring_force spring_force_4d step sun_direction terminal_velocity to_poincare total_oil total_water transform transform_dir transform_vec3 translate_pentagon unit_cube up_at update update_lod vec3_to_vec4 vec4_to_vec3 viscous_drag water_at wind_deform wind_force wind_vector world_distance world_origin
ling-polyglot v2030.0.0
Polyglot lexicon system - 16+ human languages
12 public functions:
as_str builtin_ja builtin_ko builtin_th builtin_zh detect_language from_str insert new to_canonical to_native translate_keyword
ling-py v2030.0.0
Python bindings for ling-audio, ling-physics, and ling-net
No public free functions (types / re-exports only).
ling-runtime v2030.0.0
Ling language runtime — GC, allocator, and standard library
7 public functions:
into_inner ling_debug ling_panic ling_print ling_sleep_ms ling_time new
ling-ui v2030.0.1
Ling UI framework — retained-mode widgets and flex layout
54 public functions:
add apply bar battery beveled_rect button checkbox clear compass cooldown corner_brackets counter done dpad ease from_name gauge gauge3d glyph healthbar hit_rect is_settled minimap mix new panel panel3d pixels progress radar radar3d render_widget reticle ring scanlines segbar set_target shade simple_layout slider slotgrid spark stepper tabs target text_lines text_width toggle tooltip ui update value vignette vu
ling-wasm v2030.0.8
Ling language — WebGL2 WASM runtime
2 public functions:
init_canvas run_program
道场 — Shrine Room
Source: examples/3d-rooms/ling-dao-chamber.ling
A quiet Chinese-Japanese temple rendered entirely with vector geometry (vtex_*).
No pixel fills. Slow, dignified motion in a gold · jade · crimson palette.
Features demonstrated:
vtex_torii— torii gatevtex_pagoda— five-tier pagodavtex_spiked_cog— gear mandala altarvtex_chakra+vtex_lotus— dharma-wheel mandala- Pentatonic bell-circle audio with spatial 3D positioning
- Pendulum camera orbit
Run with:
ling examples/3d-rooms/ling-dao-chamber.ling
Garden
Source: examples/audiovisual/Garden.ling
An outdoor garden scene with flowing organic geometry.
Run with:
ling examples/audiovisual/Garden.ling
Hyperbolic World — an H²×ℝ block walker
examples/physics/hyperbolic_world.ling is a tiny game world inspired by
Hypermine. Hypermine is set in H³
(fully 3-D hyperbolic space); this demo uses the simplest playable cousin,
H²×ℝ: you walk on the hyperbolic plane (the Poincaré disk) with ordinary
vertical gravity.
ling run examples/physics/hyperbolic_world.ling
Controls
| Key | Action |
|---|---|
W / S | walk forward / back |
A / D | strafe left / right |
Q / E | turn left / right |
SPACE | jump (gravity pulls you back down) |
What makes it hyperbolic
- Exponential crowding. Blocks are placed on a lattice of growing rings;
because the plane is hyperbolic, ever more cells pile up toward the horizon
(the disk boundary = infinity) and shrink via the Poincaré conformal factor
1 − |z|². - Möbius locomotion. You stay at the disk centre and the whole world slides
under you by a Möbius translation
z ↦ (z + a)/(1 + ā z). Turning is a rotation about the centre. - Holonomy. Walk a closed loop and you come back rotated — the signature effect of moving through negatively-curved space. (Try strafing in a square.)
- Gravity acts on the ordinary vertical axis (the ℝ factor), so jumping and falling feel completely normal even though the ground is hyperbolic.
Procedural block “textures”
Each cell hashes its lattice id (fract(sin(...))) into a block type
(grass / stone / dirt / crystal) and a height, so the world is generated
without any texture assets — the colour is the procedural texture, shaded with
the holographic cel renderer.
Notes & ideas
- The blocks are drawn with the
cubeprimitive; swap inprism,cylinder, oricosahedronfor different tilings. - Increase the ring count or
cells = 6 * ringfor a denser world. - This is H²×ℝ, not full H³ — a true Hypermine-style H³ voxel engine would
track an
{p,q,r}honeycomb and node graph, which is a much larger build.