Quick Reference
Other 15
| reactorSplitGlb() | Off-thread GLB parsing: a worker splits the container, parses the JSON chunk, and decodes embedded textures t… |
| reactorCompactGlb() | The part of a GLB's binary chunk the runtime reads: every accessor's view, packed into a buffer of its own (e… |
| reactorKtx2Worker() | The transcoder worker's message loop, run after basis_transcoder.js in the worker (so BASIS is there). |
| keyStop() | Key stop. |
| keyField() | Key field. |
| keyMeets() | Key meets. |
| keySlope() | Key slope. |
| keyWidth() | Key width. |
| keyTangent() | Key tangent. |
| animNextVec() | The animation pool's hand-outs, as plain functions over counters kept on the pool itself. |
| animNextQuat() | Anim next quat. |
| animNextMat() | Anim next mat. |
| animPivotTurn() | Anim pivot turn. |
| animPivotGrow() | Anim pivot grow. |
| animSetQuaternion() | Anim set quaternion. |
Other
reactorSplitGlb
function sourcefunction reactorSplitGlb(buffer)
Off-thread GLB parsing: a worker splits the container, parses the JSON chunk, and decodes embedded textures to ImageBitmaps, transferring the file buffer there and back.
Details
Off-thread GLB parsing: a worker splits the container, parses the JSON chunk, and decodes embedded textures to ImageBitmaps, transferring the file buffer there and back. The worker's source is assembled from the two functions below and spawned from a Blob URL, so the runtime stays one module and the same worker serves the game and the editor alike. Any failure hands the buffer back and the caller parses synchronously.
reactorCompactGlb
function sourcefunction reactorCompactGlb(json, buffer, binOffset, binLength)
The part of a GLB's binary chunk the runtime reads: every accessor's view, packed into a buffer of its own (each view keeps its offset's remainder by 16, so every typed array over it stays aligned), and the pictures a material names as Blobs on their images entries (rrBlob).
Details
The part of a GLB's binary chunk the runtime reads: every accessor's view,
packed into a buffer of its own (each view keeps its offset's remainder by
16, so every typed array over it stays aligned), and the pictures a
material names as Blobs on their images entries (rrBlob). This includes
normal and emissive maps and extension textures: the model reader still
needs their bytes after the original buffer is released. Pictures nothing
names are left behind, with the rest of the file. json is updated in
place to the new offsets. Returns the packed ArrayBuffer.
reactorKtx2Worker
function sourcefunction reactorKtx2Worker(scope)
The transcoder worker's message loop, run after basis_transcoder.js in the worker (so BASIS is there).
Details
The transcoder worker's message loop, run after basis_transcoder.js in the worker (so BASIS is
there). The first message brings the WebAssembly; each later one a KTX2 file to transcode from the
first level at most cap on a side, its levels sent back as they will be uploaded.
keyStop
function sourcefunction keyStop(line, j)
Key stop.
keyField
function sourcefunction keyField(stop, name, i)
Key field.
keyMeets
function sourcefunction keyMeets(line, name, i)
Key meets.
keySlope
function sourcefunction keySlope(line, name, i, j)
Key slope.
keyWidth
function sourcefunction keyWidth(line, j)
Key width.
keyTangent
function sourcefunction keyTangent(line, name, i, j)
Key tangent.
animNextVec
function sourcefunction animNextVec(pool)
The animation pool's hand-outs, as plain functions over counters kept on the pool itself.
Details
The animation pool's hand-outs, as plain functions over counters kept on the pool itself. As closures they were made afresh on every call: seven allocations per animated model per frame, for the same four lines.
animNextQuat
function sourcefunction animNextQuat(pool)
Anim next quat.
animNextMat
function sourcefunction animNextMat(pool)
Anim next mat.
animPivotTurn
function sourcefunction animPivotTurn(pool, pivot, quat)
Anim pivot turn.
animPivotGrow
function sourcefunction animPivotGrow(pool, pivot, size)
Anim pivot grow.
animSetQuaternion
function sourcefunction animSetQuaternion(entry, q)
Anim set quaternion.