nx_game_page_inspection_t142.nx
buildroot/runtime/nx_game_page_inspection_t142.nx
about
nx_game_page_emit.nx -- the SOVEREIGN game-page emitter. Until now the browser page for a wasm
game was assembled by printf blocks in _ops/nx_emit_game.sh -- real emission logic living in
SHELL, against the doctrine (shell only LAUNCHES sovereign ELFs). This organ owns it: reads the
.wasm, base64-encodes it (composes nx_base64 -- one encoder, not a coreutils dependency), and
emits the complete self-contained page (marker, shim, input forwarding, persistence bytes-mover).
usage: nx_game_page_emit <wasm> <out.html> <title> <native-client-name> <controls-html>
RECOVERED 2026-08-02 from buildroot/_build/nx_craft_emit.s (the 14:07 build's data section)
after a failed in-place rewrite TRUNCATED this file to 0 bytes and the damage was copied to
both trees. Every emitted chunk below is the exact byte sequence that build shipped, so the
recovered emitter is byte-equivalent to the last one that passed both gates.
license_tier: ORIGINAL
dependencies 19 imports · 1 importers
diagram shows first 10 each side; +9 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_base64.nxnx_game_page_artifact_lib.nxnx_game_shader_backend_selected_t55.nxnx_game_asset_prepare_emit.nxnx_game_surface_prepare.nxnx_json.nxnx_gpu_choice_workspace_t48.nxnx_site_chrome_search_t53.nxnx_wasmfit.nxnx_hairdyn_lib.nxnx_audio_osc.nxnx_atmosphere.nxnx_glprobe_lib.nxnx_tool_run.nxnx_genp_allow_lib.nxnx_release_view_emit.nxnx_release_recent_lib.nxnx_tier_ladder_lib.nx
imported by: nx_craft_inspection_emit_t142.nx
structs
| none |
consts
| 56 | const GPE_MT_WSRC: *u8 = "const NXMT_WSRC=\"let ex=null;onmessage=async(e)=>{const d=e.data;try{if(d.t==='init'){const i=await WebAssembly.instantiate(d.mod,{env:{memory:d.mem}});ex=i.exports;postMessage({t:'ready'});}else if(d.t==='band'){ex.render_band(BigInt(d.y0),BigInt(d.y1),BigInt(d.wid));postMessage({t:'band'});}}catch(err){postMessage({t:'err',m:String(err)});}};\";\n" |
| 58 | const GPE_WASM_CAP: i64 = 4194304 |
| 141 | const GPE_MAGIC_20260728: i64 = 20260728 |
| 187 | const GPE_EMIT_WEBGL: i64 = 1 |
| 194 | const GPE_ALPHA_BEND_SOFT_Q12: i64 = 40960 // the gate-proven XG_ALPHA_BEND_SOFT_Q12 compliance |
| 195 | const GPE_UNITS_PER_178CM: i64 = 171530 // the page's own 1.78m-to-world-unit pairing |
| 196 | const GPE_G_DEN_60HZ: i64 = 640800 // that pairing carried to a per-tick accel at 60Hz |
| 197 | const GPE_OUT_CAP: i64 = 16777216 |
| 225 | const RK_WGSL_CAP: i64 = 65536 |
| 226 | const RK_WGSL_TMO_MS: i64 = 8000 |
| 227 | const RK_WGSL_ELF: *u8 = "./nx_wgsl.elf" |
| 228 | const RK_WGSL_ELF_ABS: *u8 = "/volume1/homes/elderwesto/nishihost/nx_wgsl.elf" // the emitter's CWD is not always the serving root |
| 229 | const RK_WGSL_BEGIN: *u8 = "--- WGSL ---\n" |
| 230 | const RK_WGSL_END: *u8 = "\nwgsl_bytes=" |
| 231 | const RK_KERNEL_N: i64 = 65536 // u32 lanes per probe (1024 workgroups at the backend's width of 64) |
| 285 | const RK_LAYOUT_BEGIN: *u8 = "struct U{" |
| 286 | const RK_LAYOUT_END: *u8 = "var<uniform> u:U;\n" |
| 287 | const RK_LAYOUT_SIZE_KEY: *u8 = "layoutraw_rc=" |
| 288 | const RK_LAYOUT_NAMES: i64 = 18 |
| 289 | const RK_FLOAT_BYTES: i64 = 4 |
| 370 | const RK_WORLD_FS_BEGIN: *u8 = "--- world_wgsl WGSL ---\n" |
| 371 | const RK_WORLD_FS_END: *u8 = "\nworld_wgsl_rc=" |
| 372 | const RK_WORLD_VS_BEGIN: *u8 = "--- worldvs_wgsl WGSL ---\n" |
| 373 | const RK_WORLD_VS_END: *u8 = "\nworldvs_wgsl_rc=" |
| 431 | const RK_CAST_VS_BEGIN: *u8 = "--- cast_wgsl WGSL ---\n" |
| 432 | const RK_CAST_VS_END: *u8 = "\ncast_wgsl_rc=" |
| 433 | const RK_CAST_FS_BEGIN: *u8 = "--- castfs_wgsl WGSL ---\n" |
| 434 | const RK_CAST_FS_END: *u8 = "\ncastfs_wgsl_rc=" |
| 506 | const RK_CAST_GLSL_VS_BEGIN: *u8 = "--- cast_glsl GLSL ---\n" |
| 507 | const RK_CAST_GLSL_VS_END: *u8 = "\ncast_glsl_rc=" |
| 508 | const RK_CAST_GLSL_FS_BEGIN: *u8 = "--- castfs_glsl GLSL ---\n" |
| 509 | const RK_CAST_GLSL_FS_END: *u8 = "\ncastfs_glsl_rc=" |
| 617 | const GPE_GPU_TIMESTAMP_ENDPOINTS: i64 = 2 |
| 618 | const GPE_GPU_TIMESTAMP_BUFFERS: i64 = 2 |
| 619 | const GPE_GPU_SLOT_BUFFER_BYTES: i64 = GPE_GPU_TIMESTAMP_ENDPOINTS * GPE_GPU_TIMESTAMP_BUFFERS * __size_of(i64) |
| 621 | const GPE_GPU_POLICY_MAX_INTEGER: i64 = 9007199254740991 |
| 622 | const GPE_GPU_POLICY_RADIX: i64 = 10 |
| 623 | const GPE_FACING_INTEGER_MAX: i64 = 2147483647 |
| 624 | const GPE_FACING_HALF_TURN_Q12: i64 = 12868 |
| 1088 | const GPE_HSTR_WORDS_PER_STRAND: i64 = 24 |
| 1089 | const GPE_AXES: i64 = 3 |
| 1095 | const GPE_HAIR_GUIDES: i64 = 900 |
| 1135 | const GPE_HAIR_CYC_FIRST: i64 = 1 |
| 1136 | const GPE_HAIR_CYC_LAST: i64 = 3 |
| 1139 | const GPE_HAIR_CYC_SKIP: i64 = 0 |
| 1140 | const GPE_HAIR_CYC_LEN: i64 = 1 |
| 1141 | const GPE_HAIR_CYC_SLOTS: i64 = 2 |
| 1198 | const GPE_HAIR_DRIVE_FRAMES: i64 = 24 |
| 1205 | const GPE_HAIR_DRIVE_AMP_Q8: i64 = 32 |
| 1208 | const GPE_HAIR_SETTLE_PERIODS_MAX: i64 = 40 |
| 1407 | const GPE_HAIR_AMP_CAP: i64 = 3400 |
| 1433 | const span=(ztop-zbot)||1; |
| 1571 | const GPE_RD_HTML_CAP: i64 = 262144 |
| 1572 | const GPE_RD_PLANS: i64 = 3 |
| 1573 | const GPE_RD_PLAN_GE: *u8 = "buildroot/knowledge/compare/gameengine.plan" |
| 1574 | const GPE_RD_PLAN_GR: *u8 = "buildroot/knowledge/compare/graphics.plan" |
| 1575 | const GPE_RD_PLAN_CS: *u8 = "buildroot/knowledge/compare/charsim.plan" |
| 1979 | const H8=[[.09,.07,.07],[.24,.15,.10],[.38,.24,.14],[.48,.28,.15],[.55,.25,.14],[.70,.32,.14],[.62,.47,.28],[.82,.66,.40]];\n// E-2 EYEBALL GEOMETRY. Painted eyes top out at 'alive'; a real eye is a SPHERE, which is why\n// it catches light and why the iris shifts with parallax as the head turns -- a flat disc never\n// will at any resolution. This transforms the bind-space eye centre through the HEAD joint's own\n// dual quaternion (the same composition the vertex shader uses), so the eyeball rides her skull\n// exactly. Falls back to paint if anything failed at load (uEyeG stays 0).\nfunction eyeWorld(N,v,bp,ihx,ihy,scl,px,py,pz,joint=N.hj){\nconst nj=N.nj,jf=N.jf,hj=joint;\nconst o0=(2*v)*nj*4,o1=(2*v+1)*nj*4;\nconst rx=jf[o0+hj*4],ry=jf[o0+hj*4+1],rz=jf[o0+hj*4+2],rw=jf[o0+hj*4+3];\nconst dx=jf[o1+hj*4],dy=jf[o1+hj*4+1],dz=jf[o1+hj*4+2],dw=jf[o1+hj*4+3];\nconst bx=bp[0],by=bp[1],bz=bp[2];\nconst cx=ry*bz-rz*by+rw*bx,cy=rz*bx-rx*bz+rw*by,cz=rx*by-ry*bx+rw*bz;\nconst sx=bx+2*(ry*cz-rz*cy),sy=by+2*(rz*cx-rx*cz),sz=bz+2*(rx*cy-ry*cx);\nconst tx=2*(rw*dx-dw*rx+(ry*dz-rz*dy));\nconst ty=2*(rw*dy-dw*ry+(rz*dx-rx*dz));\nconst tz=2*(rw*dz-dw*rz+(rx*dy-ry*dx));\nconst mx=sx+tx,my=sy+ty,mz=sz+tz;\nconst yx=mx,yy=mz,yz=-my;\nconst S=1.78/171530*scl;\nreturn [px+(yx*ihy-yz*ihx)*S,py+yy*S,pz+(yx*ihx+yz*ihy)*S];\n}\nfunction drawEyes(g){const N=GL.npc;if(!N||!N.eye)return;const E=N.eye;\nconst k=window.__npcvis|0;if(!k)return;\nconst ya=Number(nxView(\"view_yaw\",\"yaw\"))/4096,pi4=Number(nxView(\"view_pitch\",\"pitch\"))/4096;\ng.useProgram(E.pr);g.bindVertexArray(E.vao);\ng.uniform3fv(E.l.uEC,E.ec);g.uniform4fv(E.l.uEG,E.eg);g.uniform3fv(E.l.uECol,E.ecol);g.uniform1f(E.l.uETm,Number(ex.tnow())/60);\ng.uniform3f(E.l.uEcam,Number(nxView(\"view_x\",\"camx\"))/256,Number(nxView(\"view_y\",\"camy\"))/256,Number(nxView(\"view_z\",\"camz\"))/256);\ng.uniform4f(E.l.uEyp,Math.sin(ya),Math.cos(ya),Math.sin(pi4),Math.cos(pi4));\ng.uniform2f(E.l.uEres,cv.width,cv.height);if(E.l.uESk&&N.__skt)g.uniform3fv(E.l.uESk,N.__skt);\ng.enable(g.DEPTH_TEST);\ng.drawElementsInstanced(g.TRIANGLES,E.ni,g.UNSIGNED_SHORT,0,Math.min(24,k*2));\ng.bindVertexArray(null);}\nconst NXSKYF=[.095,.112,.138];\nfunction castFrame(N,nm){\nif(!N.nativeIds)N.nativeIds=new Int32Array(12);\nconst cam0=Number(nxView(\"view_x\",\"camx\"))/256,cam1=Number(nxView(\"view_y\",\"camy\"))/256,cam2=Number(nxView(\"view_z\",\"camz\"))/256;\nconst ya=Number(nxView(\"view_yaw\",\"yaw\"))/4096,pi3=Number(nxView(\"view_pitch\",\"pitch\"))/4096;\nconst fw0=Math.sin(ya)*Math.cos(pi3),fw1=Math.sin(pi3),fw2=Math.cos(ya)*Math.cos(pi3);\nconst nw2=performance.now();let dtf=(nw2-(N.pt||nw2))/1000;N.pt=nw2;\nif(dtf<0.001)dtf=0.001;if(dtf>0.1)dtf=0.1;\nlet nv=0;window.__npcidle=0;\nfor(let m=0;m<nm&&m<12;m++){\nif(REV&&nxInspect.prepared&&m!==nxInspect.actor)continue;\nconst px=Number(ex.mobx(BigInt(m)))/256,py=Number(ex.moby(BigInt(m)))/256,pz=Number(ex.mobz(BigInt(m)))/256;\nconst st=N.st[m];\n// Native simulation owns normal facing; drawing never advances that state.\n// Asset forward basis is opposite the native positive yaw convention.\nconst normalA=-Number(ex.mob_heading(BigInt(m)))/4096;\nconst _pf9=(typeof PROF9!==\"undefined\"&&PROF9&&!REV);\nconst drawA=_pf9?-Math.atan2(cam0-px,cam2-pz)+Math.PI/2:normalA;\nconst r0=px-cam0,r1=py+0.9-cam1,r2=pz-cam2;\nconst d=Math.hypot(r0,r1,r2);\nif(d>44)continue;\nif(r0*fw0+r1*fw1+r2*fw2<-2.)continue;\nst.iw=Number(ex.cast_iw(BigInt(m)))/4096;\nif(!(REV&&nxInspect.prepared&&nxInspect.N===N&&m===nxInspect.actor&&nv===0))animEval(N,st,m,nv,dtf);\nif(st.iw>.5)window.__npcidle=(window.__npcidle|0)+1;\nconst gv=Number(ex.mobg(BigInt(m))),ki=Number(ex.mobk(BigInt(m))),dgw=ex.mobd?Number(ex.mobd(BigInt(m))):0;\nconst wrd=(ki===2)&&((dgw&1)===0);\nconst sk=.92+((gv>>9)&3)*.04;\nconst ob=.76+.16*((gv>>7)&3);\n// side-by-side calibration (sbs_face v1): our base skin rendered GRAY-BROWN against the\n// reference's warm light tan -- the whole-face tone was the largest alien cue after shape.\n// Warmer, lighter base; the shader's flush/terminator warmth now acts on the right canvas.\n// WARDEN SKIN, REALISM FIRST (operator: one girl reads grey-lavender): the old [.66,.60,.66] is L*65 a*8.5\n// b*-5.9 in CIE L*a*b* -- b* NEGATIVE, outside the human locus nx_skin_ita is built on (its b* band is\n// 10..22), i.e. not a skin colour at all. Now the cast's palest COOL human skin: [.95,.86,.79] = L*88.9\n// a*5.1 b*11.6, ITA 73 deg (VERY LIGHT), the cast base's lightness (L*88) with a cooler, less flushed\n// chroma (b* 11.6 vs 17.5, a* 5 vs 9.6). The warden identity stays where it belongs: outfit and hair.\nconst skin=wrd?[.95,.86,.79]:[.99*sk,.84*sk,.74*sk];\nconst outf=wrd?[.15,.10,.18]:(ki===0?[.58*ob,.16*ob,.22*ob]:ki===1?[.14*ob,.42*ob,.46*ob]:[.34*ob,.14*ob,.38*ob]);\nconst hair=wrd?[.13,.10,.18]:H8[gv&7];\n// NO instance-level bob: the mocap clip already animates the torso -- adding one made her\n// whole body pogo (operator-caught). The gait bob lives ONLY in the engine's spring anchor,\n// so the chest lags a stable torso: breast physics, not body bounce.\nconst sc9=.94+((gv>>5)&3)*.03;\n// PLANT (ap_foot_ground, 2026-08-30): her lowest sole landmark (N.zf[nv], measured by animEval this frame AFTER\n// the ankle levelling) lands ON the terrain top py -- the organ's own MC_Y, exactly the top face of the block she\n// stands on -- and the plant is applied INSIDE the joint rows (animEval drops every joint by N.zf), so uIP.y IS\n// py: the terrain top and the sole plane at once, which is what the cast-shadow projector needs. No constant: a\n// pointed foot, a levelled foot and the asset's 1474-unit bind floor all resolve through the same measured\n// height. Measured before this: py was the terrain top to 4 decimals for all 12 girls and every heel stood\n// 10-15 cm above it -- the float was the foot pose, never the height.\nN.nativeIds[nv]=m;N.ip[nv*3]=px;N.ip[nv*3+1]=py;N.ip[nv*3+2]=pz;\nN.ih[nv*4]=Math.sin(drawA);N.ih[nv*4+1]=Math.cos(drawA);N.ih[nv*4+2]=sc9;N.ih[nv*4+3]=1+2*nv;\nfor(let c=0;c<3;c++){N.cs[nv*3+c]=skin[c];N.co[nv*3+c]=outf[c];N.ch[nv*3+c]=hair[c];}\n// A4: organ spring offsets (Q8 model units, model unit = worldQ8/4 => /16384 = blocks) at\n// PHYSICAL scale -- the solver's gate-proven K/C set the amplitude, not display fudge\nif(ex.sbx){const A9=[1.0,1.0,.8,1.0,1.0,1.0];for(let kd=0;kd<6;kd++){const a9=A9[kd];\nN.sb[nv*18+kd*3]=Number(ex.sbx(BigInt(m),BigInt(kd)))/16384*a9;\nN.sb[nv*18+kd*3+1]=Number((ex.sbyb?ex.sbyb:ex.sby)(BigInt(m),BigInt(kd)))/16384*a9;\nN.sb[nv*18+kd*3+2]=Number(ex.sbz(BigInt(m),BigInt(kd)))/16384*a9;}\n// chest spring onto its DESIGNATED JOINTS: world offset -> model frame (inverse heading,\n// inverse scale, yup remap), then dual += .5*(t (x) real) -- the exact composition\n// animEval itself uses, applied to this instance's jf rows before upload\n// (the chest spring is NOT injected into joints any more: the probe proved this rig carries no\n// breast bones -- its nearest candidates sit at 620-641 permil, the upper abdomen -- so driving\n// them swung the whole TORSO. Soft tissue with no bone of its own moves at the VERTEX band in\n// the vertex shader, centred on the derived bust height.)\n}\nN.gn[nv]=(gv>>11)&3;\n// BODY-HAIR STATUS from her genome (operator standing directive: pubic/brows/pits derive from HEAD-HAIR\n// colour unless a waxed/shaved STATUS overrides -- realism first, fantasy as a delta): bits 13-14 of gv,\n// previously unread. 0,1 = natural (the realism default, half the cast) / 2 = trimmed / 3 = waxed.\n// Colour never lives here: the MFS derives it from uCH.\nN.bh[nv]=(gv>>13)&3;\n// gpe_garment_draw, the JS half (2026-08-30, GE13c): per-girl garment IDS and TINTS from the ORGAN's own garment\n// table -- mobgar = lower/full id, mobgart = upper id, mobgarc 4 = nothing worn, mobgarcol(k,slot) packed\n// r|g<<8|b<<16 (slot 0 lower/full, slot 1 upper). Ids per the engine's table: 0 none 1 bikini-top 2 bikini-bottom\n// 3 one-piece 4 sarong 5 sundress 6 tee 7 shorts 8 skirt 9 evening-dress. uOF keeps being fed as the 0/1/2\n// COVERAGE contract every older consumer reads (nipple detail, pubic hair, the under-cloth hair cull) -- DERIVED\n// from the ids when the doors exist, mobout when they do not; a page without the doors also maps mobout back\n// onto the incumbent's outfit (0 = tee+skirt, 1 = shorts, 2 = bare) so nothing older undresses.\nif(!N.gt){N.gt=new Float32Array(12);N.gb=new Float32Array(12);N.ct=new Float32Array(36);N.cb=new Float32Array(36);}\nconst of9=ex.mobout?Number(ex.mobout(BigInt(m))):0;let gt9=0,gb9=0,ct9=-1,cb9=-1;\nif(ex.mobgar&&ex.mobgart){gb9=Number(ex.mobgar(BigInt(m)));gt9=Number(ex.mobgart(BigInt(m)));if(ex.mobgarc&&Number(ex.mobgarc(BigInt(m)))===4){gb9=0;gt9=0;}if(ex.mobgarcol){cb9=Number(ex.mobgarcol(BigInt(m),0n));ct9=Number(ex.mobgarcol(BigInt(m),1n));}}\nelse{gb9=of9===0?8:(of9===1?7:0);gt9=of9===0?6:0;}\nconst dr9=(gb9===3||gb9===5||gb9===9);const topc9=(gt9===1||gt9===6||dr9)?1:0;const botc9=(gb9!==0)?1:0;\nN.gt[nv]=gt9;N.gb[nv]=gb9;\nfor(let c=0;c<3;c++){N.ct[nv*3+c]=ct9>=0?((ct9>>(8*c))&255)/255:outf[c];N.cb[nv*3+c]=cb9>=0?((cb9>>(8*c))&255)/255:outf[c];}\nN.of[nv]=(topc9&&botc9)?0:(botc9?1:2);\n// her mood, straight off the ledger door, scaled to [-1,1] for the expression bands\nN.mdf[nv]=(typeof ANAT9!==\"undefined\"&&ANAT9)?0:(ex.mobmood?Math.max(-1,Math.min(1,Number(ex.mobmood(BigInt(m)))/20)):0);\n// eyeball instances for this girl: two spheres seated on her skull, gazing at the viewer\nif(N.eye&&nv<12){const E=N.eye;const S9=1.78/171530*N.ih[nv*4+2];\nfor(let s=0;s<2;s++){const q=nv*2+s;\nconst c=eyeWorld(N,nv,E.bp[s],N.ih[nv*4],N.ih[nv*4+1],N.ih[nv*4+2],px,N.ip[nv*3+1],pz);// the eyeballs ride the PLANTED origin (uIP.y), not the raw mob y, or they float above a planted skull\nE.ec[q*3]=c[0];E.ec[q*3+1]=c[1];E.ec[q*3+2]=c[2];\nlet gx=cam0-c[0],gy=cam1-c[1],gz2=cam2-c[2];\nconst gl9=Math.hypot(gx,gy,gz2)||1;gx/=gl9;gy/=gl9;gz2/=gl9;\nE.eg[q*4]=gx;E.eg[q*4+1]=gy;E.eg[q*4+2]=gz2;E.eg[q*4+3]=E.R*S9;\nE.ecol[q*3]=hair[0]*.55;E.ecol[q*3+1]=hair[1]*.55;E.ecol[q*3+2]=hair[2]*.55;}}\nnv++;}\nwindow.__npcvis=nv;return nv;}\nfunction drawNPCs(g,nm){const N=GL.npc;const nv=castFrame(N,nm);if(nv===0)return;\nconst cam0=Number(nxView(\"view_x\",\"camx\"))/256,cam1=Number(nxView(\"view_y\",\"camy\"))/256,cam2=Number(nxView(\"view_z\",\"camz\"))/256;const ya=Number(nxView(\"view_yaw\",\"yaw\"))/4096,pi3=Number(nxView(\"view_pitch\",\"pitch\"))/4096;\ng.activeTexture(g.TEXTURE1);g.bindTexture(g.TEXTURE_2D,N.jt);\ng.texSubImage2D(g.TEXTURE_2D,0,0,1,N.nj,2*nv,g.RGBA,g.FLOAT,N.jf.subarray(0,N.nj*8*nv));\ng.useProgram(N.pr);g.bindVertexArray(N.vao);\nconst l=N.l;\ng.uniform1i(l.uJT,1);\ng.uniform1f(l.uSc,1.78/171530);\ng.uniform3fv(l.uIP,N.ip);g.uniform4fv(l.uIH,N.ih);\ng.uniform3fv(l.uCS,N.cs);g.uniform3fv(l.uCO,N.co);g.uniform3fv(l.uCH,N.ch);\nif(ex.sbx)g.uniform3fv(l.uSB,N.sb);\ng.uniform1fv(l.uGN,N.gn);if(l.uBH)g.uniform1fv(l.uBH,N.bh);\ng.uniform1fv(l.uOF,N.of);\nif(l.uGT&&N.gt){g.uniform1fv(l.uGT,N.gt);g.uniform1fv(l.uGB,N.gb);g.uniform3fv(l.uCT,N.ct);g.uniform3fv(l.uCB,N.cb);}// gpe_garment_draw ids + tints\nif(l.uGMH){let gmh9=0;if(N.gm&&location.search.indexOf('garpaint=1')<0)for(const Gk of N.gm)gmh9|=(1<<Gk.id);g.uniform1i(l.uGMH,gmh9);}// gpe_garment_mesh: the ids whose MESH loaded -> the painted bands retire per bit (?garpaint=1 keeps them, the under-layer lever)\ng.uniform1fv(l.uMoodF,N.mdf);\ng.uniform1i(l.uEyeG,N.eye?1:0);\ng.uniform1i(l.uAnatM,(typeof ANAT9!==\"undefined\"&&ANAT9)?1:0);\n// ANATOMY, DERIVED FROM THE ASSET: normalize in the mesh's own extents and map published\n// anthropometric ratios (hip .52, nipple .72, eye .93 of stature) through THIS mesh's pelvis\n// and head anchors. Guessed constants put the bust at .636 -- the upper abdomen.\ng.uniform1f(l.uZMN,N.an.zmn);g.uniform1f(l.uH,N.an.H);\ng.uniform1f(l.uNIP,N.an.nip);g.uniform1f(l.uEYE,N.an.eye);\n// weather-in-the-hair inputs: ORGAN tick + ORGAN weather (never wall-clock, never guessed)\ng.uniform1f(l.uTm,Number(ex.tnow())/60);\n// uWnd (2026-08-30): the MVS per-lock sway amplitude in blocks, DERIVED instead of the old 0.03/0.10 pair -- the\n// same wind field the chain reads (window.__wxw, gale fractions) times the chain's own tip bound expressed in\n// world blocks (NXHCH_N links x NXHCH_LIM/NXHCH_Q8 segments x hscale mesh units x uSc), so the shader sway and\n// the chain lean agree on one ceiling and both are ZERO in still air (this world publishes zero wind today --\n// see the WIND note in nxHairTick).\n{const w9x=(window.__wxw&&window.__wxw[0])||0,w9z=(window.__wxw&&window.__wxw[1])||0;const w9m=Math.min(1,Math.hypot(w9x,w9z));g.uniform1f(l.uWnd,w9m*(NXHCH_N*NXHCH_LIM/NXHCH_Q8)*(N.hscale||0)*(1.78/171530));}\ng.uniform3f(l.uCamM,cam0,cam1,cam2);\n" as *u8) |
functions
| 38 | func rk_tier_ladder() -> *u8 { return tl_emit() } |
| 60 | func gpe_mt_declare(twin:*u8,bytes:i64,url:*u8,pages:i64,maximum:i64)->i64 |
| 86 | func gpe_mt_boot(out: *u8, p0: i64) -> i64 |
| 127 | func gpe_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 128 | func gpe_pn(v: i64) -> i64 |
| 199 | func gpe_slen(s: *u8) -> i64 { var k: i64 = 0; while s[k] != (0 as u8) { k = k + 1 } return k } |
| 200 | func gpe_ap(out: *u8, pos: i64, s: *u8) -> i64 |
| 206 | func gpe_ap_n(out: *u8, pos: i64, s: *u8, n: i64) -> i64 |
| 232 | func rk_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 233 | func rk_err(s: *u8) -> i64 { sys_write(2, s, rk_slen(s)); return 0 } |
| 234 | func rk_num(out: *u8, pos: i64, v: i64) -> i64 |
| 245 | func rk_find(buf: *u8, n: i64, from: i64, needle: *u8) -> i64 |
| 258 | func rk_js_str(out: *u8, pos: i64, src: *u8, n: i64) -> i64 |
| 274 | func rk_capture_wgsl(buf: *u8, ol: *i64) -> i64 |
| 290 | func rk_capture_layout(buf: *u8, ol: *i64) -> i64 |
| 294 | func rk_int_after(buf: *u8, n: i64, needle: *u8) -> i64 |
| 311 | func rk_uniform_offset(buf: *u8, n: i64, name: *u8) -> i64 |
| 330 | func rk_uniform_block(out: *u8, pos: i64) -> i64 |
| 374 | func rk_capture_world(buf: *u8, ol: *i64) -> i64 |
| 378 | func rk_world_span(buf: *u8, n: i64, begin: *u8, end: *u8, bo: *i64) -> i64 |
| 390 | func rk_world_block(out: *u8, pos: i64) -> i64 |
| 438 | func rk_capture_cast(buf: *u8, ol: *i64) -> i64 |
| 448 | func gpe_cast_identity(out:*u8,pos:i64,buf:*u8,n:i64,vo:*i64,fo:*i64)->i64 |
| 469 | func rk_layout_obj(out: *u8, pos: i64, buf: *u8, n: i64, rowskey: *u8, sizekey: *u8, name: *u8) -> i64 |
| 510 | func rk_cast_glsl(out:*u8,pos:i64,buf:*u8,n:i64)->i64 |
| 526 | func rk_cast_block(out: *u8, pos: i64) -> i64 |
| 569 | func rk_webgpu_door(out: *u8, pos: i64) -> i64 |
| 626 | func gpe_facing_key(t: *NxJsonTok, key: *u8) -> i64 |
| 633 | func gpe_facing_parse(raw: *u8, n: i64, values: *i64) -> i64 |
| 671 | func gpe_facing_policy(out: *u8, pos: i64) -> i64 |
| 687 | func gpe_gpu_timing_policy(out: *u8, pos: i64) -> i64 |
| 742 | func gpe_visitors_gpu(out: *u8,pos: i64) -> i64 |
| 746 | func gpe_emit_webgpu(out: *u8, pos: i64) -> i64 |
| 781 | func gpe_verify(out: *u8, n: i64) -> i64 |
| 953 | func gpe_num(out: *u8, pos: i64, v: i64) -> i64 |
| 975 | func gpe_sunt(out: *u8, pos: i64) -> i64 |
| 995 | func gpe_npcs_emit(out: *u8, pos: i64, vnum: i64) -> i64 |
| 1055 | func gpe_build(wasm: *u8, wn: i64, title: *u8, native: *u8, ctrl: *u8, vnum: i64, out: *u8) -> i64 |
| 1096 | func gpe_hstr_pts() -> i64 { return GPE_HSTR_WORDS_PER_STRAND/GPE_AXES } |
| 1097 | func gpe_hair_nseg() -> i64 { return gpe_hstr_pts() - 1 } |
| 1098 | func gpe_hair_seglen() -> i64 { return SD_Q8 } |
| 1106 | func gpe_hair_seed(st: *i64, n: i64, rigid: i64) -> i64 |
| 1147 | func gpe_hair_cycle(out: *i64) -> i64 |
| 1180 | func gpe_hair_cycle_at(slot: i64) -> i64 |
| 1212 | func gpe_hair_drive(t: i64) -> i64 |
| 1217 | func gpe_hair_frames() -> i64 { return GPE_HAIR_DRIVE_FRAMES } |
| 1225 | func gpe_hair_chain_bake(tbl: *i64, rigid: i64) -> i64 |
| 1311 | func gpe_dress_runtime(out: *u8, pos: i64) -> i64 |
| 1338 | func gpe_hair_runtime(out: *u8, pos: i64) -> i64 |
| 1396 | func gpe_hair_npc_doors(out: *u8, pos: i64) -> i64 |
| 1412 | func gpe_hair_geometry(out: *u8, pos: i64) -> i64 |
| 1464 | func gpe_garment_draw(out: *u8, pos: i64) -> i64 |
| 1473 | func gpe_vb_find(b: *u8, n: i64, pat: *u8, from: i64) -> i64 |
| 1497 | func gpe_version_badge(out: *u8, pos: i64) -> i64 |
| 1576 | func gpe_rd_board(path: *u8, dom: *u8, since: *u8, recent: *ReleaseRecent, counts: *i64, read: *i64) -> i64 |
| 1586 | func gpe_release_block(out: *u8, pos: i64) -> i64 |
| 1655 | func gpe_frame_hud(out: *u8, pos: i64) -> i64 |
| 1677 | func gpe_sky_atmos(out: *u8, p: i64, src: *u8) -> i64 |
| 1681 | func gpe_demand_lifecycle(out: *u8, p0: i64) -> i64 |
| 1685 | func gpe_build_s(wasm: *u8, wn: i64, title: *u8, native: *u8, ctrl: *u8, vnum: i64, seed: i64, spec: *u8, out: *u8) -> i64 |