euv-core 0.57.0

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
/// Total skeletal joints in the sculpted Jianlai swordsman hierarchical armature.
pub const JIANLAI_BONE_COUNT: usize = 27;

/// Total floating spirit swords summoned in the Myriad Swords Return Bagua halo array.
pub const JIANLAI_MYRIAD_SWORD_COUNT: usize = 18;

/// Total martial arts and ultimate NLA actions supported by the Jianlai rig.
pub const JIANLAI_ACTION_COUNT: usize = 5;

/// Total Blender viewport render and inspection modes supported by the Jianlai controller.
pub const JIANLAI_RENDER_MODE_COUNT: usize = 6;

/// Total shader debug visualization channels available in `JianlaiRenderMode::ShaderDebugPass`.
pub const JIANLAI_DEBUG_CHANNEL_COUNT: usize = 4;

/// Total instanced sculpted entities spawned in the celestial sword-vortex stress world.
pub const JIANLAI_STRESS_VORTEX_COUNT: usize = 256;

/// Canonical Blender Collection name containing the rigged Jianlai hero and spirit sword.
pub const JIANLAI_COLLECTION_HERO: &str = "HeroRig";

/// Canonical Blender Collection name containing the pavilion, lanterns, pine tree, and props.
pub const JIANLAI_COLLECTION_PROPS: &str = "StudioProps";

/// Canonical Blender Collection name containing the eroded ink-wash karst cliffs and Bagua terrace.
pub const JIANLAI_COLLECTION_CLIFF: &str = "InkCliffStage";

/// Canonical Blender Collection name containing ultimate sword-qi waves, halos, and shockwave rings.
pub const JIANLAI_COLLECTION_VFX: &str = "SwordQiVfx";

/// Canonical Blender Collection name containing inverted-hull Freestyle ink outline meshes.
pub const JIANLAI_COLLECTION_OUTLINES: &str = "FreestyleInk";

/// Canonical Blender Collection name containing 3D octahedral armature bones and wireframe cages.
pub const JIANLAI_COLLECTION_ARMATURE: &str = "ArmatureOverlay";

/// Ordered human-readable names for all 27 joints in the Jianlai swordsman armature.
pub const JIANLAI_BONE_NAMES: [&str; JIANLAI_BONE_COUNT] = [
    "Root",
    "Pelvis",
    "Spine",
    "Chest",
    "Neck",
    "Head",
    "HairRibbonL",
    "HairRibbonR",
    "ShoulderL",
    "UpperArmL",
    "ForearmL",
    "HandL",
    "ShoulderR",
    "UpperArmR",
    "ForearmR",
    "HandR",
    "SwordSocket",
    "ThighL",
    "ShinL",
    "FootL",
    "ThighR",
    "ShinR",
    "FootR",
    "RobeHemFront",
    "RobeHemBack",
    "RobeHemLeft",
    "RobeHemRight",
];

/// Parent joint index table defining the 27-bone skeletal hierarchy (`None` for `Root`).
pub const JIANLAI_BONE_PARENTS: [Option<usize>; JIANLAI_BONE_COUNT] = [
    None,
    Some(0),
    Some(1),
    Some(2),
    Some(3),
    Some(4),
    Some(5),
    Some(5),
    Some(3),
    Some(8),
    Some(9),
    Some(10),
    Some(3),
    Some(12),
    Some(13),
    Some(14),
    Some(15),
    Some(1),
    Some(17),
    Some(18),
    Some(1),
    Some(20),
    Some(21),
    Some(1),
    Some(1),
    Some(1),
    Some(1),
];

/// Display labels for the five NLA martial arts and ultimate actions.
pub const JIANLAI_ACTION_LABELS: [&str; JIANLAI_ACTION_COUNT] = [
    "Ink Stance",
    "Flowing Sword Dance",
    "Myriad Swords Return",
    "Sky-Cleaving Sword Qi",
    "Cloud-Step Glide",
];

/// Display labels for the six Blender render and inspection modes.
pub const JIANLAI_RENDER_MODE_LABELS: [&str; JIANLAI_RENDER_MODE_COUNT] = [
    "Ink-Wash Donghua",
    "Cycles PBR",
    "Eevee Volumetric",
    "Solid Matcap",
    "Wire + Armature",
    "Shader Debug",
];

/// Display labels for the four shader debug channels.
pub const JIANLAI_DEBUG_CHANNEL_LABELS: [&str; JIANLAI_DEBUG_CHANNEL_COUNT] =
    ["Normals", "Rough / Metal", "Depth", "Freestyle Ink"];

/// Joint index for the root transform bone.
pub(crate) const BONE_ROOT: usize = 0;

/// Joint index for the pelvis bone.
pub(crate) const BONE_PELVIS: usize = 1;

/// Joint index for the lower spine bone.
pub(crate) const BONE_SPINE: usize = 2;

/// Joint index for the upper chest bone.
pub(crate) const BONE_CHEST: usize = 3;

/// Joint index for the neck bone.
pub(crate) const BONE_NECK: usize = 4;

/// Joint index for the head bone.
pub(crate) const BONE_HEAD: usize = 5;

/// Joint index for the left flowing hair ribbon bone.
pub(crate) const BONE_HAIR_L: usize = 6;

/// Joint index for the right flowing hair ribbon bone.
pub(crate) const BONE_HAIR_R: usize = 7;

/// Joint index for the left clavicle/shoulder bone.
pub(crate) const BONE_SHOULDER_L: usize = 8;

/// Joint index for the left upper arm bone.
pub(crate) const BONE_UPPER_ARM_L: usize = 9;

/// Joint index for the left forearm and flared sleeve bone.
pub(crate) const BONE_FOREARM_L: usize = 10;

/// Joint index for the left hand sword-seal bone.
pub(crate) const BONE_HAND_L: usize = 11;

/// Joint index for the right clavicle/shoulder bone.
pub(crate) const BONE_SHOULDER_R: usize = 12;

/// Joint index for the right upper arm bone.
pub(crate) const BONE_UPPER_ARM_R: usize = 13;

/// Joint index for the right forearm and flared sleeve bone.
pub(crate) const BONE_FOREARM_R: usize = 14;

/// Joint index for the right sword-grip hand bone.
pub(crate) const BONE_HAND_R: usize = 15;

/// Joint index for the spirit sword attachment socket bone.
pub(crate) const BONE_SWORD_SOCKET: usize = 16;

/// Joint index for the left thigh bone.
pub(crate) const BONE_THIGH_L: usize = 17;

/// Joint index for the left shin bone.
pub(crate) const BONE_SHIN_L: usize = 18;

/// Joint index for the left cloth boot bone.
pub(crate) const BONE_FOOT_L: usize = 19;

/// Joint index for the right thigh bone.
pub(crate) const BONE_THIGH_R: usize = 20;

/// Joint index for the right shin bone.
pub(crate) const BONE_SHIN_R: usize = 21;

/// Joint index for the right cloth boot bone.
pub(crate) const BONE_FOOT_R: usize = 22;

/// Joint index for the front split robe hem bone.
pub(crate) const BONE_HEM_FRONT: usize = 23;

/// Joint index for the rear split robe hem bone.
pub(crate) const BONE_HEM_BACK: usize = 24;

/// Joint index for the left split robe hem bone.
pub(crate) const BONE_HEM_LEFT: usize = 25;

/// Joint index for the right split robe hem bone.
pub(crate) const BONE_HEM_RIGHT: usize = 26;

/// Procedural ink-wash texture resolution in pixels per side.
pub(crate) const JIANLAI_TEX_SIZE: u32 = 128;

/// Minimum non-degenerate triangle double-area threshold (`|e1 x e2|`).
pub(crate) const JIANLAI_MIN_TRI_DOUBLE_AREA: f32 = 1.0e-7;

/// Default Freestyle inverted-hull silhouette extrusion thickness for the hero in meters.
pub(crate) const JIANLAI_HERO_OUTLINE_THICKNESS: f32 = 0.015;

/// Default Freestyle inverted-hull silhouette extrusion thickness for stage landmarks in meters.
pub(crate) const JIANLAI_STAGE_OUTLINE_THICKNESS: f32 = 0.035;

/// Default NLA action crossfade transition duration in seconds.
pub(crate) const JIANLAI_NLA_CROSSFADE_SECS: f32 = 0.35;

/// Local rest translations relative to each bone's parent in meters (hero height ~1.88m).
pub(crate) const JIANLAI_BONE_LOCAL_REST: [[f32; 3]; JIANLAI_BONE_COUNT] = [
    [0.0, 0.0, 0.0],
    [0.0, 0.96, 0.0],
    [0.0, 0.22, 0.0],
    [0.0, 0.24, 0.0],
    [0.0, 0.16, 0.0],
    [0.0, 0.11, 0.0],
    [-0.08, 0.10, -0.10],
    [0.08, 0.10, -0.10],
    [-0.14, 0.12, 0.0],
    [-0.12, -0.04, 0.0],
    [-0.22, -0.18, 0.04],
    [-0.18, -0.14, 0.06],
    [0.14, 0.12, 0.0],
    [0.12, -0.04, 0.0],
    [0.22, -0.18, 0.04],
    [0.18, -0.14, 0.06],
    [0.05, 0.02, 0.14],
    [-0.11, -0.06, 0.0],
    [0.0, -0.44, 0.0],
    [0.0, -0.40, 0.04],
    [0.11, -0.06, 0.0],
    [0.0, -0.44, 0.0],
    [0.0, -0.40, 0.04],
    [0.0, -0.08, 0.14],
    [0.0, -0.08, -0.15],
    [-0.16, -0.08, 0.0],
    [0.16, -0.08, 0.0],
];

/// Mesh name for the sculpted multi-part Jianlai swordsman character.
pub(crate) const MESH_NAME_HERO: &str = "Jianlai_Swordsman_Hero";

/// Mesh name for the Freestyle inverted-hull contour of the hero.
pub(crate) const MESH_NAME_HERO_OUTLINE: &str = "Jianlai_Swordsman_Freestyle";

/// Mesh name for the sculpted ancient spirit sword.
pub(crate) const MESH_NAME_SPIRIT_SWORD: &str = "Jianlai_Spirit_Sword";

/// Mesh name for the Freestyle contour of the spirit sword.
pub(crate) const MESH_NAME_SWORD_OUTLINE: &str = "Jianlai_Spirit_Sword_Freestyle";

/// Mesh name for the carved floating bronze-jade spirit sword scabbard.
pub(crate) const MESH_NAME_SCABBARD: &str = "Jianlai_Floating_Scabbard";

/// Mesh name for the carved circular Bagua stone sword terrace.
pub(crate) const MESH_NAME_TERRACE: &str = "Jianlai_Bagua_Terrace";

/// Mesh name for the ancient flying-eave Chinese pavilion.
pub(crate) const MESH_NAME_PAVILION_ROOF: &str = "Jianlai_Pavilion_FlyingEaves";

/// Mesh name for the crimson pavilion pillars and carved stone balustrades.
pub(crate) const MESH_NAME_PAVILION_PILLARS: &str = "Jianlai_Pavilion_Pillars";

/// Mesh name for the glowing palace paper lantern.
pub(crate) const MESH_NAME_LANTERN: &str = "Jianlai_Palace_Lantern";

/// Mesh name for the eroded ink-wash karst cliff terrain.
pub(crate) const MESH_NAME_CLIFF_TERRAIN: &str = "Jianlai_Karst_Cliff_Terrain";

/// Mesh name for a towering jagged ink-wash karst mountain spire.
pub(crate) const MESH_NAME_KARST_SPIRE: &str = "Jianlai_Karst_Mountain_Spire";

/// Mesh name for the gnarled cliffside ink-pine trunk and limbs.
pub(crate) const MESH_NAME_PINE_TRUNK: &str = "Jianlai_Cliff_Pine_Trunk";

/// Mesh name for the layered ink-pine needle canopy pads.
pub(crate) const MESH_NAME_PINE_CANOPY: &str = "Jianlai_Cliff_Pine_Canopy";

/// Mesh name for a sinuous drifting ink-cloud mist ribbon.
pub(crate) const MESH_NAME_CLOUD_RIBBON: &str = "Jianlai_Ink_Cloud_Ribbon";

/// Mesh name for the colossal Sky-Cleaving crescent sword-qi energy wave.
pub(crate) const MESH_NAME_CRESCENT_QI: &str = "Jianlai_Crescent_SwordQi_Wave";

/// Mesh name for the calligraphic ink-splash shockwave ring.
pub(crate) const MESH_NAME_SHOCKWAVE_RING: &str = "Jianlai_Ink_Shockwave_Ring";

/// Mesh name for the dynamic sweeping sword-arc motion trail.
pub(crate) const MESH_NAME_SWORD_TRAIL: &str = "Jianlai_Sword_Arc_Trail";

/// Mesh name for an octahedral Blender armature bone prism.
pub(crate) const MESH_NAME_BONE_PRISM: &str = "Blender_Armature_OctaBone";

/// Mesh name for the topological wireframe inspection cage.
pub(crate) const MESH_NAME_WIREFRAME_CAGE: &str = "Blender_Wireframe_Cage";

/// Mesh name for sculpted jade talisman tablets used in the stress vortex.
pub(crate) const MESH_NAME_JADE_TALISMAN: &str = "Jianlai_Jade_Talisman";

/// Mesh name for fluted sword-tomb monolith spires used in the stress vortex.
pub(crate) const MESH_NAME_MONOLITH_SPIRE: &str = "Jianlai_SwordTomb_Monolith";

/// Mesh name for sculpted carved stone lotus pedestals used in the sword gallery.
pub(crate) const MESH_NAME_LOTUS_PEDESTAL: &str = "Jianlai_Lotus_Pedestal";

/// Shape key name for the surging Sword-Qi Battle Aura morph target.
pub(crate) const MORPH_NAME_BATTLE_AURA: &str = "SwordQi_BattleAura";

/// Shape key name for the billowing wind-swept robe volume morph target.
pub(crate) const MORPH_NAME_WIND_BILLOW: &str = "Robe_WindBillow";

/// Armature skin label registered on `World3D`.
pub(crate) const SKIN_NAME_JIANLAI_ARMATURE: &str = "Jianlai_Armature_27Bones";

/// Camera name for the default 3/4 heroic donghua framing.
pub(crate) const CAM_NAME_HERO_THREE_QUARTER: &str = "HeroInkCam";

/// Camera name for the dramatic low-angle ultimate framing.
pub(crate) const CAM_NAME_LOW_ULTIMATE: &str = "UltimateLowCam";

/// Camera name for the wide cliff-and-pavilion panorama camera.
pub(crate) const CAM_NAME_CLIFF_PANORAMA: &str = "CliffPanoramaCam";

/// Camera name for the overhead Bagua sword-array camera.
pub(crate) const CAM_NAME_ARRAY_OVERHEAD: &str = "BaguaArrayTopCam";

/// Material label for Xuan-paper ivory and cyan-jade swordsman robes.
pub(crate) const MAT_NAME_INK_ROBE: &str = "InkWash_SwordsmanRobe";

/// Material label for dark mineral-ink collar trim and boots.
pub(crate) const MAT_NAME_INK_TRIM: &str = "InkWash_CalligraphyTrim";

/// Material label for sculpted jade pendant and hairpin.
pub(crate) const MAT_NAME_INK_JADE: &str = "Mineral_CeladonJade";

/// Material label for ancient bronze-gold sword fittings and Bagua inlay.
pub(crate) const MAT_NAME_INK_BRONZE: &str = "Ancient_GildedBronze";

/// Material label for folded Damascus ink-steel spirit blade with luminous runes.
pub(crate) const MAT_NAME_INK_BLADE: &str = "SpiritBlade_RuneSteel";

/// Material label for cinnabar-vermilion pavilion pillars and tassels.
pub(crate) const MAT_NAME_INK_CINNABAR: &str = "Cinnabar_Lacquer";

/// Material label for Guilin cyan-green ink-wash karst cliff strata.
pub(crate) const MAT_NAME_INK_CLIFF: &str = "QingLv_KarstCliff";

/// Material label for engraved Bagua blue-stone terrace.
pub(crate) const MAT_NAME_INK_TERRACE: &str = "Bagua_CarvedTerrace";

/// Material label for dark glazed flying-eave pavilion roof tiles.
pub(crate) const MAT_NAME_PAVILION_ROOF: &str = "Glazed_InkRoofTiles";

/// Material label for warm glowing palace paper lanterns.
pub(crate) const MAT_NAME_LANTERN_GLOW: &str = "Lantern_WarmPaperGlow";

/// Material label for gnarled cliff pine bark.
pub(crate) const MAT_NAME_PINE_BARK: &str = "CliffPine_InkBark";

/// Material label for layered malachite ink-pine foliage.
pub(crate) const MAT_NAME_PINE_NEEDLES: &str = "CliffPine_MalachiteNeedles";

/// Material label for drifting translucent Xuan-paper ink-cloud mist.
pub(crate) const MAT_NAME_INK_CLOUD: &str = "XuanPaper_MistRibbon";

/// Material label for golden-cinnabar Sky-Cleaving Sword Qi energy wave.
pub(crate) const MAT_NAME_QI_GOLD: &str = "SwordQi_GoldenCrescent";

/// Material label for luminous cyan-jade sword trail and aura halo.
pub(crate) const MAT_NAME_QI_CYAN: &str = "SwordQi_CyanJadeArc";

/// Material label for inverted-hull Freestyle dark calligraphy ink outlines.
pub(crate) const MAT_NAME_FREESTYLE_INK: &str = "Freestyle_SumiInkOutline";

/// Material label for Blender sculptor studio terracotta-clay Matcap mode.
pub(crate) const MAT_NAME_MATCAP_CLAY: &str = "Blender_SolidMatcapClay";

/// Material label for topological wireframe inspection cage edges.
pub(crate) const MAT_NAME_WIREFRAME_EDGE: &str = "Blender_WireframeTopology";

/// Material label for glowing octahedral Blender armature bone visualizer.
pub(crate) const MAT_NAME_BONE_PRISM: &str = "Blender_ArmatureBoneGlow";

/// Material label for Shader Debug Normals pass.
pub(crate) const MAT_NAME_DBG_NORMALS: &str = "DebugPass_NormalsRGB";

/// Material label for Shader Debug Roughness/Metallic pass.
pub(crate) const MAT_NAME_DBG_ROUGH_METAL: &str = "DebugPass_RoughnessMetallic";

/// Material label for Shader Debug Depth pass.
pub(crate) const MAT_NAME_DBG_DEPTH: &str = "DebugPass_LinearDepth";

/// Material label for Shader Debug Freestyle Xuan-paper base pass.
pub(crate) const MAT_NAME_DBG_FREESTYLE_PAPER: &str = "DebugPass_FreestylePaper";

/// Gallery blade name 0.
pub(crate) const GALLERY_SWORD_LONGQUE: &str = "LongZhongQue_InkSteel";

/// Gallery blade name 1.
pub(crate) const GALLERY_SWORD_QINGLIAN: &str = "QingLian_CeladonJade";

/// Gallery blade name 2.
pub(crate) const GALLERY_SWORD_CHIXIAO: &str = "ChiXiao_CinnabarGold";

/// Gallery blade name 3.
pub(crate) const GALLERY_SWORD_XUANMING: &str = "XuanMing_ObsidianInk";

/// Gallery blade name 4.
pub(crate) const GALLERY_SWORD_TIANMEN: &str = "KaiTianMen_CelestialGold";