Namespace in reactor_3d_models.js
Reactor3D
288 public functions in 6 groups · show internal (_) functions
Quick Reference
Setup & Creation 21
| loadDatabaseSidecar() | Loads the database sidecar. |
| loadLaterModels() | Models fetched behind the map, one at a time, so they never share the line with what it is waiting for. |
| buildModelCollisionMask() | The mask itself, from a loaded template and its sidecar json; the editor builds one from its own copy. |
| loadModel() | Loads the model. |
| buildMeshTemplate() | Build mesh template. |
| buildGlbTemplate() | Build glb template. |
| attachLodLevels() | Attach distance levels to a base template: buffers are the LOD GLBs' bytes in level order. |
| buildAnimatedGlbTemplate() | A GLB with embedded animations keeps its node hierarchy live instead of being baked flat: joints stay real ob… |
| attachLibraryMotions() | Gives a rigged humanoid (applyModelRig) the library's motions as clips: one for each state the file's own cli… |
| attachRigHands() | Where a hand's palm and fingertips are, as points in the hand joint's own frame: from the rig's palm and fing… |
| attachRigFingers() | Give a hand its finger joints: the file's own finger bones when it has them, else new joints at the marked ba… |
| loadLodLevels() | Fetch the distance levels model.json lists for a loaded static template and attach them. |
| loadModelSidecar() | Loads the model sidecar. |
| loadModelAnimations() | Loads the model animations. |
| prepareModelInstance() | Ready a cloned instance for animation: an inner group receives every child so whole-model rules can move the… |
| prepareFlatModelBounds() | Cache conservative skin bounds in each influencing bone's bind space. |
| installProps() | Stand the map's props in it as model-bound events. |
| installEventFootprints() | A sized event is at every tile of its footprint (triggers, the action button and collision all ask pos), and… |
| installVerticalMotion() | Install vertical motion. |
| installRoomFloorPassage() | In a room (reactor3d.room) the floor is the parallax plane, so a cell with no tile painted is still floor: RP… |
| installPropHooks() | Install prop hooks. |
Getting Information 5
| pickLod() | Pick lod. |
| measureSkinnedBox() | Measure skinned box. |
| resolveLibraryMotion() | Fills a library motion's clip with its keys the first time it plays: the library's motion made for this skele… |
| findHeadJoint() | The joint that carries a model's head, for the look to pitch: the rig's own Head joint first, then a joint na… |
| listModelMaterial() | A model's material on a scene's list, and on that scene's only: the scene that lists a material disposes of i… |
Checks (True / False) 11
| hasEventModels() | Whether it has the event models. |
| isDatabaseSidecarReady() | True once the sidecar has answered — instantly on NW.js, after one fetch in a browser. |
| hasCharacterModel() | Whether it has the character model. |
| isRigJoint() | A node that hinges like a bone: a THREE.Bone, or a file joint (often a plain Group) the rig names. |
| isClimbing() | Whether a character is climbing by the physics: on a ladder, or pulling itself up (or lowering itself down) b… |
| isSwimming() | Whether a character is swimming by the physics. |
| isAirborne() | Whether a character is in the air by the physics (a jump, a fall). |
| isIdleState() | Standing still on the ground: not moving, in the air, in deep water, on a ladder or seated on a vehicle. |
| isBuilderGlb() | Whether a GLB was saved by the Character Builder or the Prop Builder (they write the one generator). |
| isIdentityTransform() | Whether it is identity transform. |
| isPropEvent() | Whether an event is a prop the sidecar stood in the map. |
Actions 33
| setEventModelSpec() | Sets the event model spec. |
| applyEventModelPose() | Applies the event model pose. |
| applyGlbWrap() | How a model's picture carries on past its edges, where the file says: repeated, mirrored or held at the edge… |
| markHeldShape() | Lay a held thing's markers over what its shape was read as; they win. |
| releaseModelInstance() | Free what an instance of template holds on the GPU of its own: carved part geometries and its skeletons' bone… |
| applyRestSkins() | Applies the rest skins. |
| applyPivotOverrides() | Rewrite the recorded pivots of every part an override names, converting the model-space point into each mesh'… |
| applyModelRig() | Applies the model rig. |
| startRagdoll() | Starts the ragdoll. |
| runRagdoll() | Run ragdoll. |
| moveTriggerActive() | Move trigger active. |
| applyModelGlow() | Applies the model glow. |
| applyModelAnimation() | Applies the model animation. |
| releaseMapModelState() | Unregister a replaced flat holder before its replacement loads. |
| playActorBattlerAnimation() | Plays the actor battler animation. |
| playBattlerAnimation() | Queue a named action on a 3D enemy battler, by troop member index. |
| setMaterialShine() | Give one lit material a surface (or take it away), recompiling only when it starts or stops shining. |
| applyModelSurface() | A model's surface on every lit material it has. |
| applyModelLook() | Put a look (a variant's color adjustment and texture, or null for the model's own) on an instance's materials. |
| setModelVariant() | Give a live character another of its model's variants ("" for the model's own look), from a script or a plugi… |
| applyModelTransform() | Put the base transform on an instance. |
| applyLookLean() | In third person the player looks where the camera looks: the head joint pitches with the look when the model… |
| setModelAnimationSpeed() | Sets the model animation speed. |
| pauseModelPlayback() | Pause model playback. |
| resumeModelPlayback() | Resume model playback. |
| playModelAnimation() | Queue a named action animation on a character's model. |
| playModelSequence() | Play several animations one after another: a door's open, then its settle; a turret's raise, then its sweep. |
| applyLiveTransform() | Applies the live transform. |
| moveModelMaterials() | Every material of a model, moved to scene's list (Reactor3D.listModelMaterial). |
| releaseModelHolder() | A character model going for good: what its copy holds on the GPU goes with it (the renderer outlives map scen… |
| turnCharacterBillboard() | The sprite's turn on its billboard (Rotate, Face Ceiling / Face Ground, a page's angle): rolled in the billbo… |
| setEventZ() | Sets the event z. |
| setEventSize() | Sets the event size. |
Updating & Drawing 6
| stepRagdoll() | Step ragdoll. |
| updateModelFlash() | Updates the model flash each frame. |
| updateEnemyModelSprite() | 3D enemy battlers, without touching the battle renderer: an enemy bound to a model in the database sidecar ge… |
| updateActorModelSprite() | A battler-slot binding shows the actor as a live 3D render in side-view battles, exactly the way a bound enem… |
| updateMapModelSprite() | A model-bound character on a map that is not rendered in 3D is still a sprite: an orthographic render of the… |
| refreshModelVariant() | A live instance takes another variant of its model: its surface, color adjustment and texture change on the m… |
Other 212
| splitModelRef() | Split model ref. |
| modelSpecFromNote() | Model spec from note. |
| modelSourceName() | Model source name. |
| modelUrls() | Model urls. |
| modelUrl() | Model url. |
| modelTextureDir() | Model texture dir. |
| modelCacheKey() | Model cache key. |
| eventModelSpec() | Event model spec. |
| normalizeModelSpec() | One raw sidecar entry → the validated spec every consumer shares. |
| readModelFaces() | Read model faces. |
| characterModelSpec() | Character model spec. |
| databaseModelSpec() | Database model spec. |
| actorEntrySlots() | Actor entry slots. |
| actorSlotSpec() | Actor slot spec. |
| collectMapModelSpecs() | Every model a map can possibly show, before its first frame: the map sidecar's event specs plus each actor's… |
| preloadMapModels() | Load every model the map references while its loading fade still hides the work, so nothing loads — or hitche… |
| laterActorSpecs() | Of a map's specs, the actors' models no one in the party wears and no event of the map places: wanted only if… |
| laterModelsWanted() | Whether other actors' models are worth having ahead: online, or loaded over the web. |
| boundModelTemplate() | A loaded model's rest bounds, worked out while the map loads: every copy, finger skin and detail level takes… |
| collectMapPoseSpecs() | Every size and pose the map's events give their models, one spec for each (a footprint is kept per pose). |
| collectBattleModelSpecs() | The models a battle on this map will bring that the map itself does not place: the Database models of the rec… |
| preloadBattleModels() | Ready what a battle on this map will show, before one starts: the models loaded and built, their pictures que… |
| prewarmTextures() | The pictures of the models readied for a battle go to the GPU ahead of it: one model a frame is handed to the… |
| warmLoadedTemplates() | Shader compilation and texture upload happen on a model's first visible frame unless something asks earlier —… |
| specCacheKey() | modelCacheKey for a spec, remembered beside it: asked per character sprite per frame, and building the string… |
| characterModelYaw() | Character model yaw. |
| dir8Yaw() | Dir8 yaw. |
| characterModelDir8() | Character model dir8. |
| eventModelFaceName() | Event model face name. |
| eventModelFaceTurn() | Event model face turn. |
| eventModelInterpolatedMark() | Event model interpolated mark. |
| eventModelWorldYaw() | The yaw the mesh actually stands at in the world: the authored spec rotation plus the front-mark aim, as appl… |
| readModelCollision() | How a model blocks: the shape of its mesh (default) or its bounding box (collision: "box", for a model whose… |
| collisionKeysFor() | The model key and the mask's pose key for a spec. |
| modelHasRigidMesh() | Whether a model has a mesh that is drawn where it was built (a hull, a turret). |
| modelCollisionMask() | Which tiles a model's mesh actually covers, in the body's own frame. |
| blockedTilesFor() | The map tiles a placed model blocks: its mask (or, with collision: "box", its box) turned to its facing and l… |
| pointInTriangle2D() | Point in triangle2 d. |
| eventModelFootprint() | A model's footprint as it stands at yaw: its mask (or its box) and the bounds of it. |
| eventModelContains() | Event model contains. |
| eventModelCanFace() | Event model can face. |
| eventModelWouldOverlap() | Whether a character, stepping so its own tile is (x, y) and turning as a step in direction turns it, would pu… |
| eventModelWouldOverlapEvents() | Whether moving the model event's center to (x, y) would put its body on another solid event's (bodyMeetsEvent… |
| aimCharacterBillboard() | Aim character billboard. |
| characterIsBehindModel() | Character is behind model. |
| eventModelOccupies() | Event model occupies. |
| bodyHas() | Whether a shape covers the tile (dx, dy) away from the character's own. |
| eventIsUnit() | Whether an event is a battle unit (rrUnit, or a <unit: ...> note). |
| eventBody() | The body of a character: the tiles it covers round its own, as a shape { ox, oy, w, h, cells, count, reach, m… |
| eventBodyCovers() | Whether a character's body is on tile (x, y). |
| bodyDepth() | How deep inside a shape a tile is: steps to the nearest tile the shape leaves free (1 at its edge), 0 when no… |
| eventIsFallen() | Whether an event is a unit that has fallen in the battle under way: it is still drawn while it fades, and sta… |
| bodyLetsOut() | A walker already standing inside an event's body (a unit placed or spawned over it, a battle begun where it s… |
| modelCasterMoves() | Placed props with a continuous animation cast moving shadows, as walking events do. |
| bodyBlocksTile() | Body blocks tile. |
| bodyMeetsEvents() | Whether an event, stepping so its own tile is (x, y) and turning as a step in direction turns it, would put i… |
| bodyMeetsParty() | The same for the player and the followers who are not walked through: a body may not step, or turn, onto one… |
| bodyFits() | Whether an event's body, with its own tile at (x, y), is clear of every other body, the player and the follow… |
| bodyTouchesPlayer() | Whether an event touches the player with a step it was refused: its body, with its own tile at (x, y) and tur… |
| eventBodyGap() | How far a point of the ground (tiles, as _realX + 0.5) is from a character's body: 0 on a tile it covers, els… |
| freePartyOfBodies() | Free party of bodies. |
| readGlb() | Read glb. |
| modelRetryAllowed() | Only a game served over the web: from the disk nothing drops. |
| packJsonArrays() | A worker's message arrives with every array holey and generic, whatever it holds. |
| parseGlbAsync() | Parse glb async. |
| lowMemory() | Low memory. |
| textureCap() | The largest side a model texture keeps on this machine. |
| modelAnisotropy() | Model anisotropy. |
| capImage() | The main-thread twin of capBitmapSize for images decoded by the browser: a canvas at the capped size. |
| fitModelTexture() | A model picture, decoded, onto its texture at no more than its cap (the machine's, or the texture's own: anot… |
| capBitmapSize() | Cap bitmap size. |
| readModelAsync() | Read model async. |
| readModel() | Read model. |
| readObj() | Read obj. |
| readStl() | Read stl. |
| readDxf() | Read dxf. |
| readFbxAscii() | Read fbx ascii. |
| readFbxBinary() | Read fbx binary. |
| modelCost() | What a model file costs, in the shape RRGlbOptimizer.analyze gives for a GLB: triangles, vertices, draw calls… |
| readFbx() | Read fbx. |
| read3mf() | Read3mf. |
| readUsdaMesh() | Read usda mesh. |
| readUsdz() | Read usdz. |
| studioEnvMap() | Studio env map. |
| carrySurfaceData() | What Material.clone loses of a model material's surface (it copies userData through JSON): its normal and emi… |
| cloneSurfaceMaterial() | Clone surface material. |
| hairStrandDirections() | Per vertex, the way the picture's v runs over the surface (dP/dv), summed over the triangles a vertex shares… |
| remoteTextureCap() | Remote texture cap. |
| lodScreen() | The two numbers the budget needs, for any camera and target: pixels per world unit at one unit of depth, and… |
| instanceSpan() | The size, in tiles, a placed instance stands at: its largest span times its scale. |
| heldLobes() | The parts of a held thing that hang off its long axis on one side (a grip, a magazine, a stock's toe; on the… |
| heldSide() | A held thing seen from its side, as filled cells: columns along its long axis from the handle end, rows from… |
| gripSection() | Where fingers need thick (in the thing's own units) can take a gun's grip: the rows of the grip, from just un… |
| heldUnderside() | How far below its barrel's line a held thing's underside is, along it (a distance from its handle end), in it… |
| readHeldRig() | A held thing's own markers: a model.json rig of template blade or gun (markers only, in the model's frame), o… |
| heldMarkerDefaults() | Where a held thing's markers start, read from its own shape (the model's frame): what an author then nudges. |
| heldShape() | What a held model is shaped like, in its own frame: the long axis (a blade, a barrel) signed toward the thin… |
| heldMeasured() | Held measured. |
| groundAnimatedTemplate() | Stand an animated template on the pose it actually shows. |
| readGlbClips() | Parse glTF animation channels into THREE.AnimationClips. |
| instanceModelMaterial() | An instance's own copy of one of its template's materials: the light, the model marker and the surface data c… |
| cloneModelTemplate() | options.shareKey: instances cloned with the same key draw with the same materials until one of them needs its… |
| presetSkinnedBounds() | Preset skinned bounds. |
| skinGeometryAtRest() | Skin geometry at rest. |
| flattenModelWorld() | Flatten model world. |
| readModelAnimationRules() | Procedural model animation. |
| clipStateOf() | The movement state a clip's name says it is for, or null: { state, exact }. |
| ownClipAnimations() | Clip rules for the clips in a model's file that name a movement state its own animations leave open (list, th… |
| rigMotionPresets() | The rig presets (reactor_rig_motions.js), wherever this runs; null when absent. |
| motionLibrary() | The shared motion library (reactor_3d_motions.js, its data in reactor_3d_motions.bin beside it): the motion-c… |
| whenMotionLibrary() | Resolves once the motion library is in, or will not be, for a model.json whose rig is a humanoid's. |
| libraryRestSkeleton() | A rigged humanoid's skeleton at rest, as the motion library reads one: its joints in the root's frame (the ri… |
| libraryMotionRules() | The rules that play a model's library motions (attachLibraryMotions) in the states list leaves open. |
| clipNodeRef() | How a clip made here names a joint: by the joint's own name, as the file's own clips do, where that name find… |
| retargetLibraryMotion() | One library motion on a skeleton (libraryRestSkeleton): { duration, tracks: [{ joint | holder, path, times, v… |
| readModelParts() | Carved parts: a model.json "parts" list names regions of the model's geometry, selected in the Database 3D se… |
| readModelPivots() | Pivot overrides: model.json may carry pivots: { "<partName>": [x,y,z] } in model space, moving the point a pa… |
| compressTriRanges() | Sorted triangle ids -> compact [start,count] runs. |
| expandTriRanges() | Expand tri ranges. |
| carveTargetMeshes() | The meshes carve indices count over: every plain mesh in traversal order. |
| partitionCarveIndex() | Partition one mesh's triangles among carve definitions. |
| carveModelParts() | Split a model instance's geometry along its carved part definitions. |
| decodeRigBytes() | A rig authored in the editor: a bone skeleton fitted to a static model plus per-vertex skin weights, stored i… |
| readModelRig() | Read model rig. |
| normalizeBoneName() | A bone name with its namespace, case and punctuation stripped: "mixamorig:RightArm" reads "rightarm". |
| mapRigToSkeleton() | A model that already skins its meshes over the file's own skeleton keeps that skeleton: each rig bone names t… |
| rigFingerDefs() | The finger joints a rig's markers describe, in the model's frame; none without a base and a tip. |
| fingerBoneAliases() | How a file's own first finger bone is named (Mixamo, VRM, Blender), as normalizeBoneName reads it. |
| handGripLayout() | How a hand's fingers are laid out and how each may turn, from points in the hand joint's own frame (points[fi… |
| rigFingerJoints() | The finger joints a model's hands gained that are not in its file (they need skin of their own). |
| fingerSkinWeights() | Share a hand's skin among its finger joints. |
| fingerRegions() | Which finger each of a hand's vertices belongs to, from the mesh itself: the surface is walked outward from e… |
| skinRigFingers() | Bind new finger joints into a model's skinned meshes: each mesh keeps its bones and gains the finger joints a… |
| fingerSkinnedGeometry() | A copy of a skinned mesh's geometry wearing the fingers' share of its hands' skin; onSkin(geometry) runs once… |
| wearFingerSkin() | A finger-skinned geometry puts on its worked-out skin. |
| heldCloud() | A held model's surface as points in its own frame, one per small cell (a two-hundredth of its length), so fin… |
| solveGrip() | With thumbStays (a gun's grip) a thumb that lies against the thing when open stays open: closing would only s… |
| mantleHold() | How far toward the wall a body pulling itself up a ledge is drawn: its front against the wall's face, by how… |
| modelAnimationUrl() | Model animation url. |
| decodeRigWeightsBinary() | Decode the model.rig.bin weight container — the runtime mirror of ModelRigger.decodeWeightsBinary, parity-pin… |
| cameraInsideModel() | Camera inside model. |
| ragdollBasis() | A bone's frame from the points: along it, and across it where it has a width (hips, shoulders). |
| poseRagdoll() | Turn each driven bone, parent before child, so it lies along its points. |
| chestForward() | How far ahead of its feet a model's chest stands, in world tiles (0 when it has none). |
| rungReach() | How far ahead of a model's own origin the rungs must stand for its climb to take them, in tiles: where the mo… |
| climbGrip() | A climber's fingers: each hand closes while it is on its rung and opens as it reaches for the next, by the sa… |
| keepClipRest() | A model's clips name its bones in their own ways (the file's "mixamorigHips", the shared library's "Hips"), a… |
| rulesForPlacement() | The rules as one placement sees them: the animation a prop or event chose plays ON DEMAND for that instance,… |
| modelRuleDuration() | Model rule duration. |
| poseSettles() | Whether a keyed pose played once ends away from rest: its last key at the end and not at rest. |
| poseEase() | Smoothstep: pose blends accelerate in and settle out. |
| keyEase() | A step's progress (0..1) eased as ease says. |
| sampleModelKeys() | Sample a keyed pose timeline at progress p (0..1). |
| modelGlowValue() | A glow rule's frame: the share (min..max) of each reached material's own emissive intensity, or its emissive… |
| modelEffectsToFire() | Which of a rule's timed effects fire as the action clock moves from previousT (exclusive) to t (inclusive). |
| fireModelEffect() | Deliver one fired effect into the running game. |
| ownModelMaterials() | Before anything changes one instance's materials (a flash, a variant, a Transform 3D Model's look): its share… |
| modelInstanceKey() | Model instance key. |
| actorFaceState() | A face-slot binding renders the model's head into a 144×144 face bitmap, framed by the spec's view (zoom, hei… |
| battlerPictureRests() | Battler picture rests. |
| frameModelSprite() | Frame a model for its sprite: an orthographic camera pitched down like the map view, sized to the model's bou… |
| expandModelSpriteFrame() | Grow a flat sprite only when its posed parts leave the current frame. |
| flatModelLift() | Lift brings a model toward the pitched camera even as it moves upward on screen. |
| flatModelSortY() | Flat model sort y. |
| flatUnitFit() | What a flat map's picture of a model is scaled by while a battle runs on this map, so a fighter one tile big… |
| readScale() | A scale as authored: one number for proportional, [x, y, z] for free. |
| scaleAxes() | The three factors of an authored scale. |
| readModelSurface() | A model's surface (off unless a model has one): how much it reflects the world (0-1), how glossy it is (1 a m… |
| readVariantColor() | Read variant color. |
| readModelVariants() | A model's variants, validated, in file order; a name appears once. |
| modelVariant() | The variant a use names, or null for the model's own look. |
| modelLook() | The look a spec's variant gives a model: its color adjustment, texture and which model's folder the texture i… |
| adjustLookRgb() | A color adjusted as the shader adjusts a texel (sRGB in and out, 0-1): for flat material colors and the edito… |
| hexHueSaturation() | A "#rrggbb" as [hue 0-1, saturation 0-1] (HSL). |
| lookOf() | A material's color adjustment, or null: userData.rrLook holds the two uniform vectors. |
| injectLook() | The color adjustment in a material's program: the texel is adjusted before the material's own color multiplie… |
| lookMaterial() | A material that can carry a color adjustment whether or not it is lit: its own program key while it has one. |
| variantTexture() | A variant's replacement picture, loaded once per file and per way of reading it, shared by every instance. |
| variantSpecOf() | A character's spec with the variant a script gave it, built once per change. |
| readModelTransform() | Read model transform. |
| variantSurface() | The surface a use shows: its variant's own (or none, when the variant says so), else the model's. |
| modelAnimationSpeed() | Placement and event overrides are percentages; old maps default to 100. |
| modelPlaybackFrame() | Model playback frame. |
| advanceModelAction() | The same action clock drives map models in both renderers. |
| propAnimationList() | The animations a placed prop plays, in order: the list, or the one older files hold. |
| propEffectList() | The effects a placed prop plays, all at once: the list, or the one older files hold. |
| IDENTITY_TRANSFORM() | Transform 3D Model: an offset (tiles), a turn (degrees) and a scale (multipliers) laid over a model's placed… |
| liveTransformAt() | The transform a character shows this frame, eased between the one it had and the one it was given. |
| fallAxis() | The level axis a character goes over about when it falls along yaw (the angle on the map of the way it is thr… |
| transformModel() | Give a character's model a transform to ease to over duration frames (0: at once). |
| mapHasAboveEvents() | Whether any event page on the map is set "Above characters". |
| animationStride() | Animation stride. |
| inAnimationView() | Whether a model stands in the camera's view, with a body's height of margin all round. |
| animationDue() | Whether a placed model's motion is sampled this frame: the player's own body and one playing an action asked… |
| holdModelMatrices() | Hold model matrices. |
| sheetTextureFor() | One three texture per character sheet, uploaded once. |
| billboardView() | A billboard's frame lives in its texture's offset/repeat, and the sheet is shared, so each billboard reads th… |
| normalizeProp() | Normalize prop. |
| mapProps() | The map's props, validated, in sidecar order. |
| propModelSpec() | The model spec a prop binds its event to, in the sidecar's own shape. |
| propEvent() | The event a prop stands in the map as. |
| eventZAt() | Event z at. |
| eventSizeAt() | Event size at. |
| eventSizeCentered() | Whether the map's footprints are centred on their events. |
| eventFootprintOrigin() | The footprint's first tile, in tiles from the event's own (zero or less). |
| eventGraphicOffset() | Event graphic offset. |
| verticalCeiling() | The height a character may rise to: the room's ceiling, else a tall default. |
| characterHeightTiles() | How tall a character stands, in tiles: its model's height, else a sprite's tile and a half. |
| characterFeet() | Where a character's feet are, in tiles: the physics altitude when it has one (the ground, a roof, a ladder ru… |
| gaitPace() | How fast a character's gait clip plays against its own speed: a follower moving at another speed than the lea… |
| partyCharacter() | The player or a follower (their moves are tuned as they are). |
| charactersOverlapVertically() | Characters overlap vertically. |
Setup & Creation
loadDatabaseSidecar
static sourceReactor3D.loadDatabaseSidecar()
Loads the database sidecar.
loadLaterModels
static sourceReactor3D.loadLaterModels(specs)
Models fetched behind the map, one at a time, so they never share the line with what it is waiting for.
buildModelCollisionMask
static sourceReactor3D.buildModelCollisionMask(template, json, spec, height)
The mask itself, from a loaded template and its sidecar json; the editor builds one from its own copy.
Details
The mask itself, from a loaded template and its sidecar json; the editor
builds one from its own copy. height: how high its rigid meshes count
(a unit's body); without it, and for every skinned mesh, walking height.
loadModel
static sourceReactor3D.loadModel(name, ext, file, texture)
Loads the model.
buildMeshTemplate
static sourceReactor3D.buildMeshTemplate(mesh, baseUrl, textureFile)
Build mesh template.
buildGlbTemplate
static sourceReactor3D.buildGlbTemplate(json, bin, baseUrl, bitmaps, options)
Build glb template.
attachLodLevels
static sourceReactor3D.attachLodLevels(template, key, buffers)
Attach distance levels to a base template: buffers are the LOD GLBs' bytes in level order.
Details
Attach distance levels to a base template: buffers are the LOD GLBs'
bytes in level order. Levels whose flattened mesh count differs from the
base are refused. Idempotent per cache key.
buildAnimatedGlbTemplate
static sourceReactor3D.buildAnimatedGlbTemplate(json, bin, root, nodes, textures)
A GLB with embedded animations keeps its node hierarchy live instead of being baked flat: joints stay real objects, skinned meshes become GPU SkinnedMesh bound to a Skeleton, and every clip is parsed into a THREE.AnimationClip playable by name through a model.json "clip" rule.
attachLibraryMotions
static sourceReactor3D.attachLibraryMotions(root, rig)
Gives a rigged humanoid (applyModelRig) the library's motions as clips: one for each state the file's own clips are not named for, played there, and the rest for the model's own rules to name (library on a clip rule).
Details
Gives a rigged humanoid (applyModelRig) the library's motions as clips:
one for each state the file's own clips are not named for, played there,
and the rest for the model's own rules to name (library on a clip rule). A clip holds
no keys until it first plays (resolveLibraryMotion); readModelAnimationRules
plays each in its state where the model's own animations leave it open.
attachRigHands
static sourceReactor3D.attachRigHands(root, rig, bones)
Where a hand's palm and fingertips are, as points in the hand joint's own frame: from the rig's palm and fingertip markers when it has them, else a third and two thirds of a forearm past the wrist.
Details
Where a hand's palm and fingertips are, as points in the hand joint's own frame: from the rig's palm and fingertip markers when it has them, else a third and two thirds of a forearm past the wrist. Held things sit at the palm.
attachRigFingers
static sourceReactor3D.attachRigFingers(root, hand, side, points, palm)
Give a hand its finger joints: the file's own finger bones when it has them, else new joints at the marked bases and middles.
Details
Give a hand its finger joints: the file's own finger bones when it has
them, else new joints at the marked bases and middles. skinRigFingers
then lets the new ones carry the fingers' skin.
loadLodLevels
static sourceReactor3D.loadLodLevels(template, key, name, baseUrl)
Fetch the distance levels model.json lists for a loaded static template and attach them.
Details
Fetch the distance levels model.json lists for a loaded static template and attach them. Absent list, absent files: nothing is asked for, nothing is logged. Instances pick the levels up on their next frame.
loadModelSidecar
static sourceReactor3D.loadModelSidecar(name)
Loads the model sidecar.
loadModelAnimations
static sourceReactor3D.loadModelAnimations(name)
Loads the model animations.
prepareModelInstance
static sourceReactor3D.prepareModelInstance(object, clips)
Ready a cloned instance for animation: an inner group receives every child so whole-model rules can move the body under the pose the sync rewrites each frame, and each part-carrying mesh records the transform it stands at so rules compose against it and reset cleanly.
prepareFlatModelBounds
static sourceReactor3D.prepareFlatModelBounds(object)
Cache conservative skin bounds in each influencing bone's bind space.
Details
Cache conservative skin bounds in each influencing bone's bind space. Vertex data is read once per geometry/bind; moving frames only transform these small boxes. Weighted skin positions stay inside their union.
installProps
static sourceReactor3D.installProps(mapData)
Stand the map's props in it as model-bound events.
Details
Stand the map's props in it as model-bound events. Idempotent per map object; returns how many were placed.
installEventFootprints
static sourceReactor3D.installEventFootprints()
A sized event is at every tile of its footprint (triggers, the action button and collision all ask pos), and its sprite, with the balloon and animations that follow it, is drawn at the footprint's middle.
installVerticalMotion
static sourceReactor3D.installVerticalMotion()
Install vertical motion.
installRoomFloorPassage
static sourceReactor3D.installRoomFloorPassage()
In a room (reactor3d.room) the floor is the parallax plane, so a cell with no tile painted is still floor: RPG Maker's rule that an empty cell cannot be walked on kept the player a room's width from a model standing on bare floor.
installPropHooks
static sourceReactor3D.installPropHooks()
Install prop hooks.
Getting Information
pickLod
static sourceReactor3D.pickLod(object, size, eye, cacheKey, screen)
Pick lod.
measureSkinnedBox
static sourceReactor3D.measureSkinnedBox(root)
Measure skinned box.
resolveLibraryMotion
static sourceReactor3D.resolveLibraryMotion(clip)
Fills a library motion's clip with its keys the first time it plays: the library's motion made for this skeleton, each joint's turn carried into its own frame, worked out once for every copy of the model.
findHeadJoint
static sourceReactor3D.findHeadJoint(object)
The joint that carries a model's head, for the look to pitch: the rig's own Head joint first, then a joint named Head, then any head-named joint that is not a tip (head_end, headfront).
Details
The joint that carries a model's head, for the look to pitch: the rig's own Head joint first, then a joint named Head, then any head-named joint that is not a tip (head_end, headfront). A rig mapped onto a file's joints marks plain Groups as joints, so the test is isRigJoint, never isBone alone: on every bundled actor the head is a Group, and a Bone-only search found nothing and leaned the whole body instead.
listModelMaterial
static sourceReactor3D.listModelMaterial(scene, material)
A model's material on a scene's list, and on that scene's only: the scene that lists a material disposes of it as it goes, so a model carried to another scene (the party over a border, up a ladder) takes its materials with it (Reactor3D.Neighbors.carryParty).
Details
A model's material on a scene's list, and on that scene's only: the scene that lists a material disposes of it as
it goes, so a model carried to another scene (the party over a border, up a ladder) takes its materials with it
(Reactor3D.Neighbors.carryParty). Left on the list of the Reactor room a new game starts in, the party's were
disposed with that room when the map past the High Lake's border was entered after the climb, and the party was not
drawn until their programs were built again, a few frames, one member after another (owner, 2026-11-22).
Checks (True / False)
hasEventModels
static sourceReactor3D.hasEventModels(mapData)
Whether it has the event models.
isDatabaseSidecarReady
static sourceReactor3D.isDatabaseSidecarReady()
True once the sidecar has answered — instantly on NW.js, after one fetch in a browser.
Details
True once the sidecar has answered — instantly on NW.js, after one fetch in a browser. Callers that would fall back to 2D art must not commit while this is false: the fallback sheet may no longer exist.
hasCharacterModel
static sourceReactor3D.hasCharacterModel(character)
Whether it has the character model.
isRigJoint
static sourceReactor3D.isRigJoint(node)
A node that hinges like a bone: a THREE.Bone, or a file joint (often a plain Group) the rig names.
isClimbing
static sourceReactor3D.isClimbing(character)
Whether a character is climbing by the physics: on a ladder, or pulling itself up (or lowering itself down) beside a ledge.
isSwimming
static sourceReactor3D.isSwimming(character)
Whether a character is swimming by the physics.
isAirborne
static sourceReactor3D.isAirborne(character)
Whether a character is in the air by the physics (a jump, a fall).
isIdleState
static sourceReactor3D.isIdleState(state)
Standing still on the ground: not moving, in the air, in deep water, on a ladder or seated on a vehicle.
isBuilderGlb
static sourceReactor3D.isBuilderGlb(json)
Whether a GLB was saved by the Character Builder or the Prop Builder (they write the one generator).
isIdentityTransform
static sourceReactor3D.isIdentityTransform(transform)
Whether it is identity transform.
isPropEvent
static sourceReactor3D.isPropEvent(eventData)
Whether an event is a prop the sidecar stood in the map.
Actions
setEventModelSpec
static sourceReactor3D.setEventModelSpec(mapData, eventId, pageIndex, spec)
Sets the event model spec.
applyEventModelPose
static sourceReactor3D.applyEventModelPose(object, spec, direction, options)
Applies the event model pose.
applyGlbWrap
static sourceReactor3D.applyGlbWrap(texture, json, textureDef)
How a model's picture carries on past its edges, where the file says: repeated, mirrored or held at the edge pixels (a glTF sampler's wrapS / wrapT).
Details
How a model's picture carries on past its edges, where the file says: repeated, mirrored or held at the edge
pixels (a glTF sampler's wrapS / wrapT). A file that says nothing keeps the edge pixels, as every model was
drawn before 2026-11-12: the format's own default is to repeat, but a model that packs many pictures into one
sheet would then show seams where one edge blends into the opposite one.
markHeldShape
static sourceReactor3D.markHeldShape(shape, rig, cloud)
Lay a held thing's markers over what its shape was read as; they win.
Details
Lay a held thing's markers over what its shape was read as; they win.
A blade: the handle runs Grip bottom to Grip top and the fist takes it
with the index finger at Grip top; the length is out to Tip, and Edge
(off the grip-to-tip line) says which way the edge faces. A gun: the
barrel's line is Rear to Muzzle, the grip hangs from Grip top to Grip
bottom, and marks keeps Trigger, Fore grip and a Stock that lies well
behind Rear (a long gun's butt, for the shoulder).
releaseModelInstance
static sourceReactor3D.releaseModelInstance(object, template)
Free what an instance of template holds on the GPU of its own: carved part geometries and its skeletons' bone textures.
Details
Free what an instance of template holds on the GPU of its own: carved
part geometries and its skeletons' bone textures. On a shared renderer
nothing else frees them. A carved part draws from the template's vertex
buffers, which stay for every other copy; only its own index goes.
Materials are the caller's.
applyRestSkins
static sourceReactor3D.applyRestSkins(json, bin, root, nodes)
Applies the rest skins.
applyPivotOverrides
static sourceReactor3D.applyPivotOverrides(root, pivots)
Rewrite the recorded pivots of every part an override names, converting the model-space point into each mesh's local space.
Details
Rewrite the recorded pivots of every part an override names, converting the model-space point into each mesh's local space. Runs on a clone, after carving, before the binding is prepared.
applyModelRig
static sourceReactor3D.applyModelRig(root, rig)
Applies the model rig.
startRagdoll
static sourceReactor3D.startRagdoll(holder, character)
Starts the ragdoll.
runRagdoll
static sourceReactor3D.runRagdoll(holder, character)
Run ragdoll.
moveTriggerActive
static sourceReactor3D.moveTriggerActive(trigger, state)
Move trigger active.
applyModelGlow
static sourceReactor3D.applyModelGlow(binding, rule, index, state)
Applies the model glow.
applyModelAnimation
static sourceReactor3D.applyModelAnimation(binding, rules, state)
Applies the model animation.
releaseMapModelState
static sourceReactor3D.releaseMapModelState(state)
Unregister a replaced flat holder before its replacement loads.
playActorBattlerAnimation
static sourceReactor3D.playActorBattlerAnimation(actorId, name)
Plays the actor battler animation.
playBattlerAnimation
static sourceReactor3D.playBattlerAnimation(enemyId, name)
Queue a named action on a 3D enemy battler, by troop member index.
setMaterialShine
static sourceReactor3D.setMaterialShine(material, surface, studio)
Give one lit material a surface (or take it away), recompiling only when it starts or stops shining.
Details
Give one lit material a surface (or take it away), recompiling only when it
starts or stops shining. studio: it reflects the studio light only, as a
Builder's metal does in the Builder, and does not ask for the live capture
of the world (a cube face drawn every frame); one that something else asked
for, it shows too.
applyModelSurface
static sourceReactor3D.applyModelSurface(object, surface)
A model's surface on every lit material it has.
Details
A model's surface on every lit material it has. With none, nothing
reflects but a Builder's metal parts, each as its file says (glbShineOwn).
applyModelLook
static sourceReactor3D.applyModelLook(object, look)
Put a look (a variant's color adjustment and texture, or null for the model's own) on an instance's materials.
Details
Put a look (a variant's color adjustment and texture, or null for the model's own) on an instance's materials. What each material had is kept, so a look can change or go while the instance lives.
setModelVariant
static sourceReactor3D.setModelVariant(character, name)
Give a live character another of its model's variants ("" for the model's own look), from a script or a plugin.
Details
Give a live character another of its model's variants ("" for the model's own look), from a script or a plugin. Kept on the character, so it is saved with it; the model takes it on its next sync.
applyModelTransform
static sourceReactor3D.applyModelTransform(object, transform)
Put the base transform on an instance.
Details
Put the base transform on an instance. The children move onto a wrapper group the first time; later calls just set the wrapper, so the editor can slide the sliders live.
applyLookLean
static sourceReactor3D.applyLookLean(object, character)
In third person the player looks where the camera looks: the head joint pitches with the look when the model has one, else the body leans a little.
Details
In third person the player looks where the camera looks: the head joint pitches with the look when the model has one, else the body leans a little. Applied after the animation pass, on top of the joint's pose. The pitch turns about the model's own side axis, carried into the joint's parent frame, so a joint authored on any axis nods rather than rolls; and a joint no clip rewrote since last frame is put back before the new lean goes on, so an idle model does not wind its head up frame by frame.
setModelAnimationSpeed
static sourceReactor3D.setModelAnimationSpeed(character, percent)
Sets the model animation speed.
pauseModelPlayback
static sourceReactor3D.pauseModelPlayback(holder)
Pause model playback.
resumeModelPlayback
static sourceReactor3D.resumeModelPlayback(holder, character, frame)
Resume model playback.
playModelAnimation
static sourceReactor3D.playModelAnimation(character, name, options)
Queue a named action animation on a character's model.
playModelSequence
static sourceReactor3D.playModelSequence(character, names, repeat)
Play several animations one after another: a door's open, then its settle; a turret's raise, then its sweep.
Details
Play several animations one after another: a door's open, then its
settle; a turret's raise, then its sweep. repeat loops the whole list.
One name with repeat is the plain repeating play.
applyLiveTransform
static sourceReactor3D.applyLiveTransform(object, character)
Applies the live transform.
moveModelMaterials
static sourceReactor3D.moveModelMaterials(object, scene)
Every material of a model, moved to scene's list (Reactor3D.listModelMaterial).
releaseModelHolder
static sourceReactor3D.releaseModelHolder(holder)
A character model going for good: what its copy holds on the GPU goes with it (the renderer outlives map scenes).
turnCharacterBillboard
static sourceReactor3D.turnCharacterBillboard(object, radians, center)
The sprite's turn on its billboard (Rotate, Face Ceiling / Face Ground, a page's angle): rolled in the billboard's own plane, clockwise as the camera sees it, about its feet (the geometry's origin) or, center, about its middle, so it turns in place.
Details
The sprite's turn on its billboard (Rotate, Face Ceiling / Face Ground, a
page's angle): rolled in the billboard's own plane, clockwise as the camera
sees it, about its feet (the geometry's origin) or, center, about its
middle, so it turns in place. Upright (0) leaves the aimed billboard alone.
setEventZ
static sourceReactor3D.setEventZ(mapData, eventId, z)
Sets the event z.
setEventSize
static sourceReactor3D.setEventSize(mapData, eventId, size)
Sets the event size.
Updating & Drawing
stepRagdoll
static sourceReactor3D.stepRagdoll(holder, character)
Step ragdoll.
updateModelFlash
static sourceReactor3D.updateModelFlash(holder)
Updates the model flash each frame.
updateEnemyModelSprite
static sourceReactor3D.updateEnemyModelSprite(sprite)
3D enemy battlers, without touching the battle renderer: an enemy bound to a model in the database sidecar gets its battler bitmap from a live offscreen Three render, refreshed every frame.
Details
3D enemy battlers, without touching the battle renderer: an enemy bound to a model in the database sidecar gets its battler bitmap from a live offscreen Three render, refreshed every frame. The battle scene keeps compositing ordinary sprites — appear, collapse, flashes and plugin effects all still apply — while the bitmap underneath is a breathing, animated model driven by the same rule engine as the map.
updateActorModelSprite
static sourceReactor3D.updateActorModelSprite(sprite)
A battler-slot binding shows the actor as a live 3D render in side-view battles, exactly the way a bound enemy renders.
Details
A battler-slot binding shows the actor as a live 3D render in side-view battles, exactly the way a bound enemy renders. The stock motion cells do not apply: ambient rules and named actions drive it.
updateMapModelSprite
static sourceReactor3D.updateMapModelSprite(sprite)
A model-bound character on a map that is not rendered in 3D is still a sprite: an orthographic render of the model from the map's pitch, its footprint one size tiles across, its ground origin on the tile centre, turned with the character's direction and refreshed while its animation rules play.
Details
A model-bound character on a map that is not rendered in 3D is still a
sprite: an orthographic render of the model from the map's pitch, its
footprint one size tiles across, its ground origin on the tile centre,
turned with the character's direction and refreshed while its animation
rules play. The editor's Preview Event draws this same view.
refreshModelVariant
static sourceReactor3D.refreshModelVariant(holder, spec)
A live instance takes another variant of its model: its surface, color adjustment and texture change on the materials it has, and its media surfaces start again with the variant's pictures.
Other
splitModelRef
static sourceReactor3D.splitModelRef(named)
Split model ref.
modelSpecFromNote
static sourceReactor3D.modelSpecFromNote(note)
Model spec from note.
modelSourceName
static sourceReactor3D.modelSourceName(name, ext, file)
Model source name.
modelUrls
static sourceReactor3D.modelUrls(name, ext, file)
Model urls.
modelUrl
static sourceReactor3D.modelUrl(name, ext, file)
Model url.
modelTextureDir
static sourceReactor3D.modelTextureDir(name)
Model texture dir.
modelCacheKey
static sourceReactor3D.modelCacheKey(name, ext, file)
Model cache key.
eventModelSpec
static sourceReactor3D.eventModelSpec(mapData, eventId, pageIndex)
Event model spec.
normalizeModelSpec
static sourceReactor3D.normalizeModelSpec(spec)
One raw sidecar entry → the validated spec every consumer shares.
readModelFaces
static sourceReactor3D.readModelFaces(faces)
Read model faces.
characterModelSpec
static sourceReactor3D.characterModelSpec(character)
Character model spec.
databaseModelSpec
static sourceReactor3D.databaseModelSpec(section, id)
Database model spec.
actorEntrySlots
static sourceReactor3D.actorEntrySlots(entry)
Actor entry slots.
actorSlotSpec
static sourceReactor3D.actorSlotSpec(actorId, slot)
Actor slot spec.
collectMapModelSpecs
static sourceReactor3D.collectMapModelSpecs(mapData)
Every model a map can possibly show, before its first frame: the map sidecar's event specs plus each actor's character-slot binding (the player and any follower).
Details
Every model a map can possibly show, before its first frame: the map sidecar's event specs plus each actor's character-slot binding (the player and any follower). Deduped by cache key.
preloadMapModels
static sourceReactor3D.preloadMapModels(mapData)
Load every model the map references while its loading fade still hides the work, so nothing loads — or hitches — mid-play.
Details
Load every model the map references while its loading fade still hides the work, so nothing loads — or hitches — mid-play. Safe to call again (a model already asked for is not asked for twice) and for maps with nothing to load.
laterActorSpecs
static sourceReactor3D.laterActorSpecs(specs, mapData)
Of a map's specs, the actors' models no one in the party wears and no event of the map places: wanted only if an actor joins, or another player wears one.
Details
Of a map's specs, the actors' models no one in the party wears and no event of the map places: wanted only if an actor joins, or another player wears one. Without a party yet (a title map), none are put off.
laterModelsWanted
static sourceReactor3D.laterModelsWanted()
Whether other actors' models are worth having ahead: online, or loaded over the web.
boundModelTemplate
static sourceReactor3D.boundModelTemplate(template)
A loaded model's rest bounds, worked out while the map loads: every copy, finger skin and detail level takes them from the model's own geometry, and the first thing to ask for a missing box (the lit region, on the frame a battle's units appear) walked every vertex of it there and then.
collectMapPoseSpecs
static sourceReactor3D.collectMapPoseSpecs(mapData)
Every size and pose the map's events give their models, one spec for each (a footprint is kept per pose).
collectBattleModelSpecs
static sourceReactor3D.collectBattleModelSpecs(mapData)
The models a battle on this map will bring that the map itself does not place: the Database models of the records its unit events and Spawn Unit commands name (units), and the weapon models the party and those actors carry (held).
Details
The models a battle on this map will bring that the map itself does not
place: the Database models of the records its unit events and Spawn Unit
commands name (units), and the weapon models the party and those actors
carry (held). Deduped by cache key, each list on its own.
preloadBattleModels
static sourceReactor3D.preloadBattleModels(mapData)
Ready what a battle on this map will show, before one starts: the models loaded and built, their pictures queued for the GPU (prewarmTextures sends them through the warm-up's pump, a frame's budget at a time), and each weapon's held shape and surface measured (once per model for the session: heldMeasured).
Details
Ready what a battle on this map will show, before one starts: the models
loaded and built, their pictures queued for the GPU (prewarmTextures
sends them through the warm-up's pump, a frame's budget at a time), and
each weapon's held shape and surface measured (once per model for the
session: heldMeasured). All of it stood on the first frames of a battle
before: 52 ms to build a model, 22 to 40 to decode a picture, 60 to measure
a weapon for the first hand that took it.
prewarmTextures
static sourceReactor3D.prewarmTextures(renderer)
The pictures of the models readied for a battle go to the GPU ahead of it: one model a frame is handed to the warm-up, which decodes off the main thread where it can and uploads inside its per-frame budget.
warmLoadedTemplates
static sourceReactor3D.warmLoadedTemplates()
Shader compilation and texture upload happen on a model's first visible frame unless something asks earlier — this asks earlier.
Details
Shader compilation and texture upload happen on a model's first visible frame unless something asks earlier — this asks earlier. Every cached template not yet warmed joins a throwaway scene for one compile pass, and its textures upload, while the loading fade still covers the cost.
specCacheKey
static sourceReactor3D.specCacheKey(spec)
modelCacheKey for a spec, remembered beside it: asked per character sprite per frame, and building the string afresh made every lookup hash a new one.
Details
modelCacheKey for a spec, remembered beside it: asked per character
sprite per frame, and building the string afresh made every lookup hash
a new one. Checked against the three fields it is made of.
characterModelYaw
static sourceReactor3D.characterModelYaw(character, extra)
Character model yaw.
dir8Yaw
static sourceReactor3D.dir8Yaw(direction)
Dir8 yaw.
characterModelDir8
static sourceReactor3D.characterModelDir8(character)
Character model dir8.
eventModelFaceName
static sourceReactor3D.eventModelFaceName(direction)
Event model face name.
eventModelFaceTurn
static sourceReactor3D.eventModelFaceTurn(direction)
Event model face turn.
eventModelInterpolatedMark
static sourceReactor3D.eventModelInterpolatedMark(faces, direction)
Event model interpolated mark.
eventModelWorldYaw
static sourceReactor3D.eventModelWorldYaw(character, spec, direction)
The yaw the mesh actually stands at in the world: the authored spec rotation plus the front-mark aim, as applyEventModelPose computes it (a spec with face marks and no front mark is aimed there by its other marks, and here by the facing alone).
Details
The yaw the mesh actually stands at in the world: the authored spec
rotation plus the front-mark aim, as applyEventModelPose computes it
(a spec with face marks and no front mark is aimed there by its other
marks, and here by the facing alone). The collision footprint must rotate by THIS — rotating by
the facing alone left a model posed with an authored yaw (a motorcycle
turned 163 degrees in the picker) colliding crosswise to its visible
body, so a character clipped into the metal from one side and was
stopped short of it from another.
readModelCollision
static sourceReactor3D.readModelCollision(json)
How a model blocks: the shape of its mesh (default) or its bounding box (collision: "box", for a model whose geometry reads badly as a floor plan — a hollow shell, a cloud of leaves).
collisionKeysFor
static sourceReactor3D.collisionKeysFor(spec)
The model key and the mask's pose key for a spec.
Details
The model key and the mask's pose key for a spec. Collision asks for them for every model event several times a frame, and specs are stable objects, so both strings are kept beside the spec and rebuilt only when a field they are made from has changed.
modelHasRigidMesh
static sourceReactor3D.modelHasRigidMesh(template)
Whether a model has a mesh that is drawn where it was built (a hull, a turret).
Details
Whether a model has a mesh that is drawn where it was built (a hull, a turret). A skinned mesh is drawn where its animation puts it: only its stance, below walking height, is known from the file.
modelCollisionMask
static sourceReactor3D.modelCollisionMask(spec, unit)
Which tiles a model's mesh actually covers, in the body's own frame.
Details
Which tiles a model's mesh actually covers, in the body's own frame.
The triangles below walking height are projected onto the ground at the instance's size, base transform and pitch/roll (facing is applied by the caller, as for the box), and every cell a triangle touches is marked. So a reactor with a wide crown and a narrow stem blocks its stem, not the square its crown would draw; a table blocks under its top. Computed once per model and pose and kept.
With unit it is the footprint of the model worn by a unit: its rigid
meshes count up to a character's height (COLLISION_UNIT_HEIGHT), so a
tank's barrel and the nose under it are part of its body. A model of
skinned meshes alone has the one footprint.
blockedTilesFor
static sourceReactor3D.blockedTilesFor(template, json, spec, direction, px, py, unit)
The map tiles a placed model blocks: its mask (or, with collision: "box", its box) turned to its facing and laid over the tiles around (px, py), by the same rule the game walks against.
Details
The map tiles a placed model blocks: its mask (or, with collision:
"box", its box) turned to its facing and laid over the tiles around
(px, py), by the same rule the game walks against. For the editor's
footprint display; the game tests tiles as it goes. unit: the model is
worn by a unit, whose rigid meshes block to a character's height.
pointInTriangle2D
static sourceReactor3D.pointInTriangle2D(px, py, ax, ay, bx, by, cx, cy)
Point in triangle2 d.
eventModelFootprint
static sourceReactor3D.eventModelFootprint(character, spec, yaw, unit)
A model's footprint as it stands at yaw: its mask (or its box) and the bounds of it.
Details
A model's footprint as it stands at yaw: its mask (or its box) and the
bounds of it. unit: the footprint of the model as a unit's body, solid
to a character's height (modelCollisionMask(spec, true)); eventBody
asks for that one by itself.
eventModelContains
static sourceReactor3D.eventModelContains(character, foot, x, y)
Event model contains.
eventModelCanFace
static sourceReactor3D.eventModelCanFace(character, direction)
Event model can face.
eventModelWouldOverlap
static sourceReactor3D.eventModelWouldOverlap(character, x, y, other, direction)
Whether a character, stepping so its own tile is (x, y) and turning as a step in direction turns it, would put its body on other's: the two end shapes and what the turn sweeps between them, at the tile it leaves and the tile it enters (the body rule, for one pair).
eventModelWouldOverlapEvents
static sourceReactor3D.eventModelWouldOverlapEvents(character, x, y, direction)
Whether moving the model event's center to (x, y) would put its body on another solid event's (bodyMeetsEvents).
aimCharacterBillboard
static sourceReactor3D.aimCharacterBillboard(object, camera)
Aim character billboard.
characterIsBehindModel
static sourceReactor3D.characterIsBehindModel(character, event)
Character is behind model.
eventModelOccupies
static sourceReactor3D.eventModelOccupies(character, x, y)
Event model occupies.
bodyHas
static sourceReactor3D.bodyHas(shape, dx, dy)
Whether a shape covers the tile (dx, dy) away from the character's own.
eventIsUnit
static sourceReactor3D.eventIsUnit(character)
Whether an event is a battle unit (rrUnit, or a <unit: ...> note).
eventBody
static sourceReactor3D.eventBody(character)
The body of a character: the tiles it covers round its own, as a shape { ox, oy, w, h, cells, count, reach, model, sweep }: the rectangle's first tile from the character's own (ox, oy, zero or less), its size, and cells[j * w + i] === 1 for each tile covered (null: all of them; ask bodyHas).
Details
The body of a character: the tiles it covers round its own, as a shape
{ ox, oy, w, h, cells, count, reach, model, sweep }: the rectangle's
first tile from the character's own (ox, oy, zero or less), its size,
and cells[j * w + i] === 1 for each tile covered (null: all of them;
ask bodyHas). reach is the furthest covered tile from its own, in
tiles; sweep a model's corner radius. The shape is shared and must not
be changed.
What made it is kept beside the character and looked at again once a frame (and, within a frame, when the character has turned or changed page), so asking is a lookup.
eventBodyCovers
static sourceReactor3D.eventBodyCovers(character, x, y)
Whether a character's body is on tile (x, y).
Details
Whether a character's body is on tile (x, y). A model that is gliding between tiles is on the tiles it is going to and still on those it is leaving, and one easing into a new facing is on everything its corners swing over until the turn has played out.
bodyDepth
static sourceReactor3D.bodyDepth(shape, dx, dy)
How deep inside a shape a tile is: steps to the nearest tile the shape leaves free (1 at its edge), 0 when not covered.
eventIsFallen
static sourceReactor3D.eventIsFallen(event)
Whether an event is a unit that has fallen in the battle under way: it is still drawn while it fades, and stands in nobody's way.
bodyLetsOut
static sourceReactor3D.bodyLetsOut(mover, event, x, y)
A walker already standing inside an event's body (a unit placed or spawned over it, a battle begun where it stood) is not held there: a step that takes it nearer the body's edge is let through, one deeper in or along it is not.
modelCasterMoves
static sourceReactor3D.modelCasterMoves(character, rules)
Placed props with a continuous animation cast moving shadows, as walking events do.
bodyBlocksTile
static sourceReactor3D.bodyBlocksTile(mover, x, y, strict)
Body blocks tile.
bodyMeetsEvents
static sourceReactor3D.bodyMeetsEvents(mover, x, y, direction)
Whether an event, stepping so its own tile is (x, y) and turning as a step in direction turns it, would put its body on another event that stands in the way.
Details
Whether an event, stepping so its own tile is (x, y) and turning as a step
in direction turns it, would put its body on another event that stands
in the way. A body already on another (two units placed over each other)
may take a step that leaves fewer tiles shared, whatever its turn sweeps
of that body on the way.
bodyMeetsParty
static sourceReactor3D.bodyMeetsParty(mover, x, y, direction)
The same for the player and the followers who are not walked through: a body may not step, or turn, onto one of them.
bodyFits
static sourceReactor3D.bodyFits(character, x, y)
Whether an event's body, with its own tile at (x, y), is clear of every other body, the player and the followers: where a unit can be put down.
Details
Whether an event's body, with its own tile at (x, y), is clear of every other body, the player and the followers: where a unit can be put down. Nothing it stands on now is allowed for.
bodyTouchesPlayer
static sourceReactor3D.bodyTouchesPlayer(event, x, y)
Whether an event touches the player with a step it was refused: its body, with its own tile at (x, y) and turned as that step turns it, would be on the player.
Details
Whether an event touches the player with a step it was refused: its body, with its own tile at (x, y) and turned as that step turns it, would be on the player. What an Event Touch trigger asks.
eventBodyGap
static sourceReactor3D.eventBodyGap(character, wx, wz)
How far a point of the ground (tiles, as _realX + 0.5) is from a character's body: 0 on a tile it covers, else the distance to the nearest such tile's edge.
freePartyOfBodies
static sourceReactor3D.freePartyOfBodies()
Free party of bodies.
readGlb
static sourceReactor3D.readGlb(buffer)
Read glb.
modelRetryAllowed
static sourceReactor3D.modelRetryAllowed()
Only a game served over the web: from the disk nothing drops.
packJsonArrays
static sourceReactor3D.packJsonArrays(value)
A worker's message arrives with every array holey and generic, whatever it holds.
Details
A worker's message arrives with every array holey and generic, whatever it holds. A node's matrix read from one by three's math (Matrix4.fromArray) taught it to convert every array it reads to the generic kind, and from there every matrix in the game held its numbers boxed: a matrix product allocated 84 bytes. The parsed glTF's arrays of numbers are rebuilt packed.
parseGlbAsync
static sourceReactor3D.parseGlbAsync(buffer, options)
Parse glb async.
lowMemory
static sourceReactor3D.lowMemory()
Low memory.
textureCap
static sourceReactor3D.textureCap()
The largest side a model texture keeps on this machine.
modelAnisotropy
static sourceReactor3D.modelAnisotropy()
Model anisotropy.
capImage
static sourceReactor3D.capImage(image, own)
The main-thread twin of capBitmapSize for images decoded by the browser: a canvas at the capped size.
fitModelTexture
static sourceReactor3D.fitModelTexture(texture, image, own)
A model picture, decoded, onto its texture at no more than its cap (the machine's, or the texture's own: another player's character).
Details
A model picture, decoded, onto its texture at no more than its cap (the machine's, or the texture's own: another player's character). An oversized one is resized off the main thread first and the texture holds a one-pixel stand-in until then, so the full picture is never uploaded. capImage's way of leaving it to ShaderWarmup's decode did not hold for a GLB's own pictures: three uploaded them at full size the frame they were drawn, before any decode asked for them (2048 sheets on every tier, and video memory full in a crowd).
capBitmapSize
static sourceReactor3D.capBitmapSize(bitmap)
Cap bitmap size.
readModelAsync
static sourceReactor3D.readModelAsync(buffer, ext, baseUrl, texture, options)
Read model async.
readModel
static sourceReactor3D.readModel(buffer, ext, baseUrl, texture, options)
Read model.
readObj
static sourceReactor3D.readObj(buffer)
Read obj.
readStl
static sourceReactor3D.readStl(buffer)
Read stl.
readDxf
static sourceReactor3D.readDxf(buffer)
Read dxf.
readFbxAscii
static sourceReactor3D.readFbxAscii(text)
Read fbx ascii.
readFbxBinary
static sourceReactor3D.readFbxBinary(buffer)
Read fbx binary.
modelCost
static sourceReactor3D.modelCost(buffer, ext, textureFile)
What a model file costs, in the shape RRGlbOptimizer.analyze gives for a GLB: triangles, vertices, draw calls, materials, the pictures it names (by file, sized by the caller from disk), rig and animation counts.
Details
What a model file costs, in the shape RRGlbOptimizer.analyze gives for a GLB: triangles, vertices, draw calls, materials, the pictures it names (by file, sized by the caller from disk), rig and animation counts. An FBX is read in full; the other formats give one mesh and the sidecar's texture.
readFbx
static sourceReactor3D.readFbx(buffer)
Read fbx.
read3mf
static sourceReactor3D.read3mf(buffer)
Read3mf.
readUsdaMesh
static sourceReactor3D.readUsdaMesh(text)
Read usda mesh.
readUsdz
static sourceReactor3D.readUsdz(buffer)
Read usdz.
studioEnvMap
static sourceReactor3D.studioEnvMap()
Studio env map.
carrySurfaceData
static sourceReactor3D.carrySurfaceData(from, to)
What Material.clone loses of a model material's surface (it copies userData through JSON): its normal and emissive pictures, shared, and its glow, its own (so one instance's glow can be changed alone).
cloneSurfaceMaterial
static sourceReactor3D.cloneSurfaceMaterial(material)
Clone surface material.
hairStrandDirections
static sourceReactor3D.hairStrandDirections(geometry)
Per vertex, the way the picture's v runs over the surface (dP/dv), summed over the triangles a vertex shares and normalized: a hair card's strand direction, root to tip, smooth along the card.
Details
Per vertex, the way the picture's v runs over the surface (dP/dv), summed over the triangles a vertex shares and normalized: a hair card's strand direction, root to tip, smooth along the card. Zero where it cannot be told.
remoteTextureCap
static sourceReactor3D.remoteTextureCap()
Remote texture cap.
lodScreen
static sourceReactor3D.lodScreen(camera, width, height)
The two numbers the budget needs, for any camera and target: pixels per world unit at one unit of depth, and how many pixels there are to fill.
Details
The two numbers the budget needs, for any camera and target: pixels per world unit at one unit of depth, and how many pixels there are to fill.
Taken as an argument rather than read from the viewport, because the
editor's map view has neither — it builds its own THREE.WebGLRenderer
and camera and never creates a Reactor3D.Viewport. Reading the viewport
there returned nothing, the budget was skipped, and the editor drew every
prop at full detail while the game beside it drew a twentieth: 7.5M
triangles against 2.2M, which is why the editor felt heavier than play.
instanceSpan
static sourceReactor3D.instanceSpan(object)
The size, in tiles, a placed instance stands at: its largest span times its scale.
heldLobes
static sourceReactor3D.heldLobes(points, o)
The parts of a held thing that hang off its long axis on one side (a grip, a magazine, a stock's toe; on the other side a scope), read from its outline in K slices counted from the handle end.
Details
The parts of a held thing that hang off its long axis on one side (a grip,
a magazine, a stock's toe; on the other side a scope), read from its
outline in K slices counted from the handle end. points are in the
thing's frame; o gives the slicing (K, sliceK), the side (side 1
for down, -1 for the other), down, the barrel's own line across the
two axes others, and the length. Returns { list, drop, under, wide }:
each part as { from, to, centre, half, deep, wide, under } (slices;
where it is and half its depth front to back as fractions of the length;
how far it hangs, half its thickness and the frame's level just ahead of
it, in the thing's units), the outline itself, the barrel's own thickness
and each slice's half thickness below the barrel. Null when nothing hangs.
heldSide
static sourceReactor3D.heldSide(object)
A held thing seen from its side, as filled cells: columns along its long axis from the handle end, rows from above its barrel's line to its lowest hanging point.
Details
A held thing seen from its side, as filled cells: columns along its long
axis from the handle end, rows from above its barrel's line to its lowest
hanging point. { W, H, cell, lo, grid } (lo the first row's height
below the line, negative above it), or null. Read from its whole surface,
so a hole through it (a skeleton stock, a trigger guard) shows as one.
gripSection
static sourceReactor3D.gripSection(object, need)
Where fingers need thick (in the thing's own units) can take a gun's grip: the rows of the grip, from just under the frame (the trigger guard) down to its foot, where there is room for a finger in front of its front strap.
Details
Where fingers need thick (in the thing's own units) can take a gun's
grip: the rows of the grip, from just under the frame (the trigger guard)
down to its foot, where there is room for a finger in front of its front
strap. { top, foot, front, back, cell }: the heights below the barrel's
line of the highest place a finger fits and of the foot, and per row from
top how far along the thing the front strap and the back strap are. A
grip that is one side of a loop (a skeleton stock) is read as that side.
Null for a thing with no hanging grip.
heldUnderside
static sourceReactor3D.heldUnderside(object, along)
How far below its barrel's line a held thing's underside is, along it (a distance from its handle end), in its own units.
readHeldRig
static sourceReactor3D.readHeldRig(json)
A held thing's own markers: a model.json rig of template blade or gun (markers only, in the model's frame), or null.
Details
A held thing's own markers: a model.json rig of template blade or
gun (markers only, in the model's frame), or null. A blade has
gripTop, gripBottom, tip and edge; a gun gripTop, gripBottom,
trigger, muzzle, rear, foreGrip and stock.
heldMarkerDefaults
static sourceReactor3D.heldMarkerDefaults(object, template)
Where a held thing's markers start, read from its own shape (the model's frame): what an author then nudges.
Details
Where a held thing's markers start, read from its own shape (the model's
frame): what an author then nudges. template is blade or gun.
heldShape
static sourceReactor3D.heldShape(object)
What a held model is shaped like, in its own frame: the long axis (a blade, a barrel) signed toward the thin end (the tip, the muzzle), the side its bulk hangs off that axis (a grip, a magazine: "down"), and the handle end.
Details
What a held model is shaped like, in its own frame: the long axis (a blade, a barrel) signed toward the thin end (the tip, the muzzle), the side its bulk hangs off that axis (a grip, a magazine: "down"), and the handle end. A hand lays the long axis along the forearm, tip forward, bulk down, handle end in the fist, so no per-weapon turns are needed.
heldMeasured
static sourceReactor3D.heldMeasured(object)
Held measured.
groundAnimatedTemplate
static sourceReactor3D.groundAnimatedTemplate(template, sidecar)
Stand an animated template on the pose it actually shows.
Details
Stand an animated template on the pose it actually shows.
The loader grounds a rig on its rest pose, but what plays is a clip, and a clip can hold the whole body above (or below) where the rest pose put the feet — the Demo's mascot idled a sixth of a tile in the air. The clip the rules play at rest (the idle rule's, else an always rule's, else the first) is sampled across its length and the lowest point it reaches becomes the ground. Once per template; instances inherit it.
readGlbClips
static sourceReactor3D.readGlbClips(json, bin, nodes)
Parse glTF animation channels into THREE.AnimationClips.
instanceModelMaterial
static sourceReactor3D.instanceModelMaterial(mat)
An instance's own copy of one of its template's materials: the light, the model marker and the surface data carried over by hand, since Material.clone drops them.
cloneModelTemplate
static sourceReactor3D.cloneModelTemplate(template, options)
options.shareKey: instances cloned with the same key draw with the same materials until one of them needs its own (Reactor3D.ownModelMaterials).
Details
options.shareKey: instances cloned with the same key draw with the same materials until one of them
needs its own (Reactor3D.ownModelMaterials). Twenty copies of one character were twenty sets of
seventeen materials, and every draw switched material: 2.3 ms of a desktop GPU's frame went to it.
presetSkinnedBounds
static sourceReactor3D.presetSkinnedBounds(object)
Preset skinned bounds.
skinGeometryAtRest
static sourceReactor3D.skinGeometryAtRest(geometry, binds)
Skin geometry at rest.
flattenModelWorld
static sourceReactor3D.flattenModelWorld(root)
Flatten model world.
readModelAnimationRules
static sourceReactor3D.readModelAnimationRules(json, clips)
Procedural model animation.
Details
Procedural model animation. A model folder may carry model.json:
{ "animations": [ { name, part, type, axis, trigger, ... }, ... ],
"parts": [ { name, pivot, meshes }, ... ] }
type: "spin" (speed deg/sec, or perTile deg per tile travelled),
"swing" (degrees amplitude, period frames, cycles for actions),
"bob" (amount in tiles, period frames),
"pose" (rotate [x,y,z] degrees and move [x,y,z] tiles: ease to
that end pose while the trigger holds and back to rest when it
releases; an action pose plays in and out over its period),
"drive" (turns degrees times an input of the state, -1 to 1,
about axisVector: a steered part).
"glow" (a light that lives: the emissive of the part's materials —
or of materials named by material — breathes, flickers or
scrolls; mode "pulse" | "flicker" | "scroll", period frames,
min/max the share of the authored emissive intensity, uv
[u, v] emissive map turns per second for a scroll. Only uniforms
change: nothing is rebuilt or recompiled).
trigger: "always", "idle", "moving", or "action" — actions play on
demand by name (the Play Model Animation event command).
part: prefix of a named part recorded by the readers ("" = whole model);
rules turn parts about their own recorded pivots. "parts" entries carve
regions the source file never named into parts of their own — see
readModelParts/carveModelParts below.
clips (optional): the clips in the model's file (AnimationClips or
names); those named for a movement state play in it (ownClipAnimations).
clipStateOf
static sourceReactor3D.clipStateOf(name)
The movement state a clip's name says it is for, or null: { state, exact }.
Details
The movement state a clip's name says it is for, or null: { state, exact }. An exporter's
"Armature|" prefix, a trailing number ("Idle_9") and "loop" or "in place" are not part of the
name; exact is false when one of those was taken off.
ownClipAnimations
static sourceReactor3D.ownClipAnimations(list, clips, json)
Clip rules for the clips in a model's file that name a movement state its own animations leave open (list, the sidecar's), so a model with a "Walking" clip walks with it before anyone adds the clip.
Details
Clip rules for the clips in a model's file that name a movement state its
own animations leave open (list, the sidecar's), so a model with a
"Walking" clip walks with it before anyone adds the clip. An animation set
for the state wins over the clip, and the clip over the rig's default
motion. A clip named exactly wins over a numbered or "in place" one, then
the first in the file. A walk with no run beside it also plays while
dashing, unless the rig's default run does.
rigMotionPresets
static sourceReactor3D.rigMotionPresets()
The rig presets (reactor_rig_motions.js), wherever this runs; null when absent.
motionLibrary
static sourceReactor3D.motionLibrary()
The shared motion library (reactor_3d_motions.js, its data in reactor_3d_motions.bin beside it): the motion-captured walk, run, jump, swim, treading and ladder climb a rigged humanoid plays in each state it has no motion of its own for.
Details
The shared motion library (reactor_3d_motions.js, its data in reactor_3d_motions.bin beside it): the motion-captured walk, run, jump, swim, treading and ladder climb a rigged humanoid plays in each state it has no motion of its own for. Read from the disk the first time a rigged humanoid's model.json loads; a browser fetches it then (whenMotionLibrary). Null while it is not in.
whenMotionLibrary
static sourceReactor3D.whenMotionLibrary(json)
Resolves once the motion library is in, or will not be, for a model.json whose rig is a humanoid's.
libraryRestSkeleton
static sourceReactor3D.libraryRestSkeleton(root)
A rigged humanoid's skeleton at rest, as the motion library reads one: its joints in the root's frame (the rig's), in order, parents first, each one's parent the nearest joint above it the library moves.
Details
A rigged humanoid's skeleton at rest, as the motion library reads one:
its joints in the root's frame (the rig's), in order, parents first, each
one's parent the nearest joint above it the library moves. Besides the
rig's own joints, a file's collarbones, the joint between the spine and
the chest and the toes. holders are the file's other joints, which the
motions keep at rest. Null without the hips, an arm and a leg.
libraryMotionRules
static sourceReactor3D.libraryMotionRules(list, clips)
The rules that play a model's library motions (attachLibraryMotions) in the states list leaves open.
clipNodeRef
static sourceReactor3D.clipNodeRef(node, root)
How a clip made here names a joint: by the joint's own name, as the file's own clips do, where that name finds this very joint in its model; else by its uuid.
Details
How a clip made here names a joint: by the joint's own name, as the file's own clips do, where that name finds this very joint in its model; else by its uuid. The mixer keeps one blend per name it is given: a library motion that named a joint by uuid and the file's own Walking that named it "LeftLeg" were two blends on one joint, and the one that had faded out went on writing the joint's rest pose over the other. On a ladder come to at a run, the climber's left knee, left upper arm and right hand stayed at rest: a straight leg through the rungs (owner, 2026-11-14). With one name they are one blend, and a fade from one clip to the other is a fade.
retargetLibraryMotion
static sourceReactor3D.retargetLibraryMotion(library, skeleton, id)
One library motion on a skeleton (libraryRestSkeleton): { duration, tracks: [{ joint | holder, path, times, values }] }.
Details
One library motion on a skeleton (libraryRestSkeleton): { duration, tracks: [{ joint | holder, path, times, values }] }. The library turns joints that rest unturned; a joint of this skeleton turns by its parent's rest frame undone, the library's turn, then its own rest frame. The hips rise in their parent's frame.
readModelParts
static sourceReactor3D.readModelParts(json)
Carved parts: a model.json "parts" list names regions of the model's geometry, selected in the Database 3D section by dragging a box over the mesh.
Details
Carved parts: a model.json "parts" list names regions of the model's geometry, selected in the Database 3D section by dragging a box over the mesh. Each entry is { name, pivot: [x,y,z], meshes: { "<meshIndex>": [[tri,count], ...] } } with triangle runs against the source geometry's triangle order and the pivot in model space. carveModelParts splits those triangles into meshes of their own, registered exactly like reader-named parts, so every animation rule can hinge a jaw or wave a branch the source file shipped as one anonymous mesh.
readModelPivots
static sourceReactor3D.readModelPivots(json)
Pivot overrides: model.json may carry pivots: { "<partName>": [x,y,z] } in model space, moving the point a part hinges about — a turret turns from its ring, not the centre the exporter happened to record.
Details
Pivot overrides: model.json may carry pivots: { "<partName>": [x,y,z] }
in model space, moving the point a part hinges about — a turret turns
from its ring, not the centre the exporter happened to record. Keys
match part names exactly; carved and reader-named parts alike.
compressTriRanges
static sourceReactor3D.compressTriRanges(ids)
Sorted triangle ids -> compact [start,count] runs.
Details
Sorted triangle ids -> compact [start,count] runs. Duplicates collapse.
expandTriRanges
static sourceReactor3D.expandTriRanges(ranges)
Expand tri ranges.
carveTargetMeshes
static sourceReactor3D.carveTargetMeshes(root)
The meshes carve indices count over: every plain mesh in traversal order.
Details
The meshes carve indices count over: every plain mesh in traversal order. Skinned meshes follow bones, not carve rules, and are skipped — as are the editor's selection-highlight overlays, which live as children of the real meshes and must never shift this numbering. The editor's selection and the runtime's carve share this enumeration.
partitionCarveIndex
static sourceReactor3D.partitionCarveIndex(triCount, defs, vertexAt)
Partition one mesh's triangles among carve definitions.
Details
Partition one mesh's triangles among carve definitions. Pure index work: returns { remainder, groups: [{ defs, ids }] } where ids are vertex indices ready for a BufferGeometry index. A triangle may belong to several definitions — a cannon shaft selected inside a full turret — so triangles are grouped by the exact set of definitions claiming them and every group becomes one piece carrying ALL of its names: the turret's rule carries the cannon, the cannon's rule moves only itself. Out-of-range runs are clamped. At most 32 definitions per mesh.
carveModelParts
static sourceReactor3D.carveModelParts(root, parts)
Split a model instance's geometry along its carved part definitions.
Details
Split a model instance's geometry along its carved part definitions. Runs on a clone, never the template: the original meshes get a fresh geometry holding the remaining triangles (attributes stay shared), and each carved region becomes a sibling mesh carrying the part name and its pivot in mesh-local space, plus the source mesh's named ancestry so rules aimed at either still match.
decodeRigBytes
static sourceReactor3D.decodeRigBytes(text)
A rig authored in the editor: a bone skeleton fitted to a static model plus per-vertex skin weights, stored in model.json as rig: { bones: [{ name, parent, head, tail }], weights: { "<meshIndex>": { count, indices, weights } } } with positions in model space and weights base64 bytes (4 influences per vertex, indices Uint8, weights Uint8 summing 255).
Details
A rig authored in the editor: a bone skeleton fitted to a static model plus per-vertex skin weights, stored in model.json as rig: { bones: [{ name, parent, head, tail }], weights: { "<meshIndex>": { count, indices, weights } } } with positions in model space and weights base64 bytes (4 influences per vertex, indices Uint8, weights Uint8 summing 255). Mesh indices count over carveTargetMeshes' enumeration of the UNRIGGED model, which is also why a model carries a rig OR carved parts, never both.
readModelRig
static sourceReactor3D.readModelRig(json)
Read model rig.
normalizeBoneName
static sourceReactor3D.normalizeBoneName(name)
A bone name with its namespace, case and punctuation stripped: "mixamorig:RightArm" reads "rightarm".
mapRigToSkeleton
static sourceReactor3D.mapRigToSkeleton(root, rig)
A model that already skins its meshes over the file's own skeleton keeps that skeleton: each rig bone names the file's bone that stands where its head was fitted (a matching name counts for half the distance, so Mixamo's inverted Spine/Spine02 still lands by place), and that bone registers as the part.
Details
A model that already skins its meshes over the file's own skeleton
keeps that skeleton: each rig bone names the file's bone that stands
where its head was fitted (a matching name counts for half the
distance, so Mixamo's inverted Spine/Spine02 still lands by place), and
that bone registers as the part. A rig bone whose nearest bone went to
another takes the free bone of its own name, and the rig's root is a
bone that carries what its children took. The clips keep driving those bones;
a pose bends them from wherever the clip holds them. Returns false when
nothing under root is skinned, so the rig binds its own skeleton.
rigFingerDefs
static sourceReactor3D.rigFingerDefs(rig)
The finger joints a rig's markers describe, in the model's frame; none without a base and a tip.
fingerBoneAliases
static sourceReactor3D.fingerBoneAliases(side, finger)
How a file's own first finger bone is named (Mixamo, VRM, Blender), as normalizeBoneName reads it.
handGripLayout
static sourceReactor3D.handGripLayout(points, side, palm)
How a hand's fingers are laid out and how each may turn, from points in the hand joint's own frame (points[finger] = { base, tip }, the wrist at the origin).
Details
How a hand's fingers are laid out and how each may turn, from points in the
hand joint's own frame (points[finger] = { base, tip }, the wrist at the
origin). Pure numbers: the palm's frame (along wrist to knuckles,
across index to little finger, normal the way the palm faces), and for
each finger its base, middle and tip, the axis it closes about (toward the
palm; the thumb across it), how far it may open (straight, never behind the
palm) and close, and its thickness.
rigFingerJoints
static sourceReactor3D.rigFingerJoints(root)
The finger joints a model's hands gained that are not in its file (they need skin of their own).
fingerSkinWeights
static sourceReactor3D.fingerSkinWeights(count, position, read, weight, hands, triangles)
Share a hand's skin among its finger joints.
Details
Share a hand's skin among its finger joints. read(i, c) and weight(i, c)
give vertex i's four bone indices and weights; toHand maps a bind-pose
vertex into the hand joint's frame. A vertex the hand carries that lies
along a finger (within reach of its line, past its base) hands that share
to the finger's first joint, and past its middle to the second, easing over
the knuckle so the palm does not crease. Returns { index, weight } (four per
vertex) and how many vertices changed.
fingerRegions
static sourceReactor3D.fingerRegions(count, position, triangles, hand, skinIndex, skinWeight)
Which finger each of a hand's vertices belongs to, from the mesh itself: the surface is walked outward from each fingertip at once, across shared edges (vertices at one place count as one, so a seam does not stop it), and a vertex is the finger whose tip it is nearest along the surface, as far down as that finger's knuckle.
Details
Which finger each of a hand's vertices belongs to, from the mesh itself:
the surface is walked outward from each fingertip at once, across shared
edges (vertices at one place count as one, so a seam does not stop it),
and a vertex is the finger whose tip it is nearest along the surface, as
far down as that finger's knuckle. So a finger is all of its own surface,
however thick or curled, and nothing of its neighbour. Where neighbouring
fingers turn out to share triangles along their length (a mitten, fingers
only painted on), mitt says so: the four turn as one. triangles is the
geometry's index (or null for three vertices a triangle). Returns
{ label: Int8Array (finger index or -1), mitt, carrier, mittLine }.
skinRigFingers
static sourceReactor3D.skinRigFingers(root)
Bind new finger joints into a model's skinned meshes: each mesh keeps its bones and gains the finger joints after them, and wears a copy of its geometry that shares every attribute but the skin's.
Details
Bind new finger joints into a model's skinned meshes: each mesh keeps its bones and gains the finger joints after them, and wears a copy of its geometry that shares every attribute but the skin's. The copy is made once per geometry and shared by every instance; the file's own geometry is left as it was for whatever else draws it.
fingerSkinnedGeometry
static sourceReactor3D.fingerSkinnedGeometry(mesh, hands, onSkin)
A copy of a skinned mesh's geometry wearing the fingers' share of its hands' skin; onSkin(geometry) runs once the copy wears it (now, or when the finger skin worker answers: until then the copy wears the file's own skin).
wearFingerSkin
static sourceReactor3D.wearFingerSkin(geometry, skin, onSkin)
A finger-skinned geometry puts on its worked-out skin.
heldCloud
static sourceReactor3D.heldCloud(object)
A held model's surface as points in its own frame, one per small cell (a two-hundredth of its length), so fingers can close on it wherever its triangles are large or small.
Details
A held model's surface as points in its own frame, one per small cell
(a two-hundredth of its length), so fingers can close on it wherever its
triangles are large or small. { points: Float32Array, count, cell }, or
null for a thing with no geometry.
solveGrip
static sourceReactor3D.solveGrip(layout, cloud, count, pad, out, thumbStays)
With thumbStays (a gun's grip) a thumb that lies against the thing when open stays open: closing would only sink it in.
mantleHold
static sourceReactor3D.mantleHold(holder, character)
How far toward the wall a body pulling itself up a ledge is drawn: its front against the wall's face, by how far the physics says it leans.
modelAnimationUrl
static sourceReactor3D.modelAnimationUrl(name)
Model animation url.
decodeRigWeightsBinary
static sourceReactor3D.decodeRigWeightsBinary(buffer)
Decode the model.rig.bin weight container — the runtime mirror of ModelRigger.decodeWeightsBinary, parity-pinned by tests.
cameraInsideModel
static sourceReactor3D.cameraInsideModel(character, object)
Camera inside model.
ragdollBasis
static sourceReactor3D.ragdollBasis(points, bone)
A bone's frame from the points: along it, and across it where it has a width (hips, shoulders).
poseRagdoll
static sourceReactor3D.poseRagdoll(holder, doll)
Turn each driven bone, parent before child, so it lies along its points.
chestForward
static sourceReactor3D.chestForward(holder)
How far ahead of its feet a model's chest stands, in world tiles (0 when it has none).
rungReach
static sourceReactor3D.rungReach(holder)
How far ahead of a model's own origin the rungs must stand for its climb to take them, in tiles: where the motion library's Climb puts the hands (0.4 of the body's scale ahead of the hips, less the grip's own 0.02: climb in reactor_3d_motions.js), carried into the model's frame.
Details
How far ahead of a model's own origin the rungs must stand for its climb to take them, in tiles: where the
motion library's Climb puts the hands (0.4 of the body's scale ahead of the hips, less the grip's own 0.02:
climb in reactor_3d_motions.js), carried into the model's frame. Null for a model whose climb is not the
library's (a rig's own Climb pose, a file's clip): those hang by the chest (LADDER_CHEST_GAP). The chest gap
stood a library climber about a fifth of a tile nearer the ladder than its hands and feet were aimed, and they
went through the rungs (owner, 2026-11-14).
climbGrip
static sourceReactor3D.climbGrip(holder, height)
A climber's fingers: each hand closes while it is on its rung and opens as it reaches for the next, by the same cycle the climb's arms keep (one a CLIMB_CYCLE of height, the right hand first, the left half a cycle on).
Details
A climber's fingers: each hand closes while it is on its rung and opens as it reaches for the next, by the same cycle the climb's arms keep (one a CLIMB_CYCLE of height, the right hand first, the left half a cycle on). The hands had finger joints and the climb never asked them to close: open hands laid on the rungs (owner, 2026-11-14). A hand with no finger joints (no markers, no finger bones) is left as it is. Returns the hands closed.
keepClipRest
static sourceReactor3D.keepClipRest(root)
A model's clips name its bones in their own ways (the file's "mixamorigHips", the shared library's "Hips"), and three keeps a binding, with an original value to fall back to, for each name.
Details
A model's clips name its bones in their own ways (the file's "mixamorigHips", the shared library's "Hips"),
and three keeps a binding, with an original value to fall back to, for each name. A binding made while
another clip held the bone took that pose as its original: a party member who climbed out of the water
started its run clip there for the first time, and from then on every fade of the run went back to the
swim's tilt, and with no idle clip it stood (or floated) in it (2026-11-07). Under root, every binding's
original is the value the bone had the first time any binding of it was made: before anything moved it.
rulesForPlacement
static sourceReactor3D.rulesForPlacement(rules, animation, repeat)
The rules as one placement sees them: the animation a prop or event chose plays ON DEMAND for that instance, whatever trigger it was authored with — a map placement picking "MonitorArmExtend" (authored Always) fires it, and its Repeat loops it.
Details
The rules as one placement sees them: the animation a prop or event chose plays ON DEMAND for that instance, whatever trigger it was authored with — a map placement picking "MonitorArmExtend" (authored Always) fires it, and its Repeat loops it. Other rules keep their authored triggers.
modelRuleDuration
static sourceReactor3D.modelRuleDuration(rule, clips)
Model rule duration.
poseSettles
static sourceReactor3D.poseSettles(rule)
Whether a keyed pose played once ends away from rest: its last key at the end and not at rest.
Details
Whether a keyed pose played once ends away from rest: its last key at the end and not at rest. Its timeline stops on that pose (the motion ends where its author left it), and the part eases back to rest over POSE_SETTLE_FRAMES after, rather than jumping there when the action ends.
poseEase
static sourceReactor3D.poseEase(blend)
Smoothstep: pose blends accelerate in and settle out.
keyEase
static sourceReactor3D.keyEase(ease, t)
A step's progress (0..1) eased as ease says.
sampleModelKeys
static sourceReactor3D.sampleModelKeys(rule, p)
Sample a keyed pose timeline at progress p (0..1).
Details
Sample a keyed pose timeline at progress p (0..1). The timeline starts at rest and returns to rest at the end unless the final key sits at 1. Between stops it follows a monotone cubic through them, per euler component: it slows to a stop only where the motion turns back or holds, never overshoots a stop, and passes through every other stop at speed. Easing in and out of every stop made a swing sampled into keys (a breath, a stride) stop dead at each one, a visible judder. The first and last stops ease from and to stillness; a looping timeline (any trigger but an action) whose ends meet runs through the seam instead, a rotation meeting itself a whole turn on.
modelGlowValue
static sourceReactor3D.modelGlowValue(rule, frame)
A glow rule's frame: the share (min..max) of each reached material's own emissive intensity, or its emissive map's offset for a scroll.
Details
A glow rule's frame: the share (min..max) of each reached material's own emissive intensity, or its emissive map's offset for a scroll. The materials are found once per binding and made the instance's own (a shallow clone: same program, same texture source), so one model's lights never drive another's; after that a frame writes two numbers per material. An inactive trigger puts the authored values back.
modelEffectsToFire
static sourceReactor3D.modelEffectsToFire(rule, duration, previousT, t)
Which of a rule's timed effects fire as the action clock moves from previousT (exclusive) to t (inclusive).
Details
Which of a rule's timed effects fire as the action clock moves from previousT (exclusive) to t (inclusive). Pure, so the window logic is testable; each effect fires exactly once per play.
fireModelEffect
static sourceReactor3D.fireModelEffect(effect, character, holder)
Deliver one fired effect into the running game.
ownModelMaterials
static sourceReactor3D.ownModelMaterials(holder)
Before anything changes one instance's materials (a flash, a variant, a Transform 3D Model's look): its shared ones are swapped for copies of its own, made from the template's and given the instance's surface and look again, so it looks exactly as it did.
modelInstanceKey
static sourceReactor3D.modelInstanceKey(character)
Model instance key.
actorFaceState
static sourceReactor3D.actorFaceState(actorId)
A face-slot binding renders the model's head into a 144×144 face bitmap, framed by the spec's view (zoom, height fraction).
Details
A face-slot binding renders the model's head into a 144×144 face bitmap, framed by the spec's view (zoom, height fraction). The render is a still: it happens once when the model finishes loading, and any window that asked before then is refreshed after.
battlerPictureRests
static sourceReactor3D.battlerPictureRests(state, sprite)
Battler picture rests.
frameModelSprite
static sourceReactor3D.frameModelSprite(object, unit, camera, pitchDegrees)
Frame a model for its sprite: an orthographic camera pitched down like the map view, sized to the model's bounding sphere about its ground origin so the frame stays the same however the model turns.
Details
Frame a model for its sprite: an orthographic camera pitched down like the
map view, sized to the model's bounding sphere about its ground origin so
the frame stays the same however the model turns. unit is the pixel size
of one model unit (the footprint). Returns the sizes and where the ground
origin lands in the frame, as anchors.
expandModelSpriteFrame
static sourceReactor3D.expandModelSpriteFrame(state)
Grow a flat sprite only when its posed parts leave the current frame.
Details
Grow a flat sprite only when its posed parts leave the current frame. The ground anchor and pixels per model unit stay fixed, so growth neither shifts the sprite nor shrinks its art. Frames never oscillate in size.
flatModelLift
static sourceReactor3D.flatModelLift(character)
Lift brings a model toward the pitched camera even as it moves upward on screen.
Details
Lift brings a model toward the pitched camera even as it moves upward on screen. Never use that lifted screen Y as its drawing depth.
flatModelSortY
static sourceReactor3D.flatModelSortY(character)
Flat model sort y.
flatUnitFit
static sourceReactor3D.flatUnitFit(sprite, character)
What a flat map's picture of a model is scaled by while a battle runs on this map, so a fighter one tile big stands no taller than a unit's picture (ReactorFightLook.modelFit): the map's units and the party, who are all the same size as each other with a battle or without.
Details
What a flat map's picture of a model is scaled by while a battle runs on this map, so a fighter one tile big stands no taller than a unit's picture (ReactorFightLook.modelFit): the map's units and the party, who are all the same size as each other with a battle or without. 1 with no battle here, for anyone who is no fighter, and for a body bigger than its tile (Reactor3D.eventBody), which is drawn as big as it is. Who is a fighter is read as a battle starts or ends and again on the look's beat; the size is eased, so nobody jumps.
readScale
static sourceReactor3D.readScale(raw, fallback)
A scale as authored: one number for proportional, [x, y, z] for free.
scaleAxes
static sourceReactor3D.scaleAxes(scale)
The three factors of an authored scale.
readModelSurface
static sourceReactor3D.readModelSurface(json)
A model's surface (off unless a model has one): how much it reflects the world (0-1), how glossy it is (1 a mirror, lower blurs the reflection), how metal (1 reflects as strongly face on as at an angle, as chrome does; 0 only at glancing angles, as paint or plastic does) and the reflection's tint (white for chrome, yellow for gold).
Details
A model's surface (off unless a model has one): how much it reflects the world (0-1), how glossy it is (1 a mirror, lower blurs the reflection), how metal (1 reflects as strongly face on as at an angle, as chrome does; 0 only at glancing angles, as paint or plastic does) and the reflection's tint (white for chrome, yellow for gold). Null when the model has none (its file's own metal, if any, stands).
readVariantColor
static sourceReactor3D.readVariantColor(raw)
Read variant color.
readModelVariants
static sourceReactor3D.readModelVariants(json)
A model's variants, validated, in file order; a name appears once.
modelVariant
static sourceReactor3D.modelVariant(json, name)
The variant a use names, or null for the model's own look.
Details
The variant a use names, or null for the model's own look. A name the model no longer has is said once and falls back to the model's own.
modelLook
static sourceReactor3D.modelLook(json, spec)
The look a spec's variant gives a model: its color adjustment, texture and which model's folder the texture is in.
adjustLookRgb
static sourceReactor3D.adjustLookRgb(rgb, color)
A color adjusted as the shader adjusts a texel (sRGB in and out, 0-1): for flat material colors and the editor's swatches.
hexHueSaturation
static sourceReactor3D.hexHueSaturation(hex)
A "#rrggbb" as [hue 0-1, saturation 0-1] (HSL).
lookOf
static sourceReactor3D.lookOf(material)
A material's color adjustment, or null: userData.rrLook holds the two uniform vectors.
injectLook
static sourceReactor3D.injectLook(material, shader)
The color adjustment in a material's program: the texel is adjusted before the material's own color multiplies it, so a flash or the ambient over the material is not recolored.
Details
The color adjustment in a material's program: the texel is adjusted before
the material's own color multiplies it, so a flash or the ambient over the
material is not recolored. Called last in a lit material's chain
(litMaterial) and by lookMaterial for one that is not lit.
lookMaterial
static sourceReactor3D.lookMaterial(material)
A material that can carry a color adjustment whether or not it is lit: its own program key while it has one.
variantTexture
static sourceReactor3D.variantTexture(model, file, like)
A variant's replacement picture, loaded once per file and per way of reading it, shared by every instance.
variantSpecOf
static sourceReactor3D.variantSpecOf(character, spec)
A character's spec with the variant a script gave it, built once per change.
readModelTransform
static sourceReactor3D.readModelTransform(json, spec)
Read model transform.
variantSurface
static sourceReactor3D.variantSurface(json, spec)
The surface a use shows: its variant's own (or none, when the variant says so), else the model's.
modelAnimationSpeed
static sourceReactor3D.modelAnimationSpeed(character)
Placement and event overrides are percentages; old maps default to 100.
modelPlaybackFrame
static sourceReactor3D.modelPlaybackFrame(holder, character, frame)
Model playback frame.
advanceModelAction
static sourceReactor3D.advanceModelAction(holder, character, frame)
The same action clock drives map models in both renderers.
propAnimationList
static sourceReactor3D.propAnimationList(prop)
The animations a placed prop plays, in order: the list, or the one older files hold.
propEffectList
static sourceReactor3D.propEffectList(prop)
The effects a placed prop plays, all at once: the list, or the one older files hold.
IDENTITY_TRANSFORM
static sourceReactor3D.IDENTITY_TRANSFORM()
Transform 3D Model: an offset (tiles), a turn (degrees) and a scale (multipliers) laid over a model's placed pose, eased there over a number of frames.
Details
Transform 3D Model: an offset (tiles), a turn (degrees) and a scale (multipliers) laid over a model's placed pose, eased there over a number of frames. Kept on the character (so it survives the sprite and the save) and applied after the pose every frame; the footprint the game walks against stays where the model was placed.
liveTransformAt
static sourceReactor3D.liveTransformAt(state, frame)
The transform a character shows this frame, eased between the one it had and the one it was given.
fallAxis
static sourceReactor3D.fallAxis(yaw)
The level axis a character goes over about when it falls along yaw (the angle on the map of the way it is thrown, 0 down the map: ReactorFight.fallYaw), or null when it has none.
Details
The level axis a character goes over about when it falls along yaw (the angle on the map of the way it is
thrown, 0 down the map: ReactorFight.fallYaw), or null when it has none. One shared vector: read it at once.
transformModel
static sourceReactor3D.transformModel(character, target, duration)
Give a character's model a transform to ease to over duration frames (0: at once).
mapHasAboveEvents
static sourceReactor3D.mapHasAboveEvents(mapData)
Whether any event page on the map is set "Above characters".
Details
Whether any event page on the map is set "Above characters". Read from the raw data — every page, not only the active ones — because the above render pass is created once at scene build and a page switch must not need it to appear later.
animationStride
static sourceReactor3D.animationStride(x, y, z, span, camera)
Animation stride.
inAnimationView
static sourceReactor3D.inAnimationView(object, span, camera)
Whether a model stands in the camera's view, with a body's height of margin all round.
Details
Whether a model stands in the camera's view, with a body's height of margin all round. The frustum is made once a frame.
animationDue
static sourceReactor3D.animationDue(holder, character, object, camera)
Whether a placed model's motion is sampled this frame: the player's own body and one playing an action asked of it always are; the rest by their stride, each on its own frame of it so a crowd's samples are spread.
holdModelMatrices
static sourceReactor3D.holdModelMatrices(holder, character, object)
Hold model matrices.
sheetTextureFor
static sourceReactor3D.sheetTextureFor(bitmap)
One three texture per character sheet, uploaded once.
Details
One three texture per character sheet, uploaded once. Keyed by the bitmap; a sheet whose pixels are replaced (it finished loading) gets a fresh texture.
billboardView
static sourceReactor3D.billboardView(holder, sheet)
A billboard's frame lives in its texture's offset/repeat, and the sheet is shared, so each billboard reads the sheet through a clone that shares the sheet's image.
Details
A billboard's frame lives in its texture's offset/repeat, and the sheet is shared, so each billboard reads the sheet through a clone that shares the sheet's image. three keys GL uploads by the image's source, so the clones cost one upload between them; a frame change is two uniforms.
normalizeProp
static sourceReactor3D.normalizeProp(raw, mapData)
Normalize prop.
mapProps
static sourceReactor3D.mapProps(mapData)
The map's props, validated, in sidecar order.
propModelSpec
static sourceReactor3D.propModelSpec(prop)
The model spec a prop binds its event to, in the sidecar's own shape.
propEvent
static sourceReactor3D.propEvent(prop)
The event a prop stands in the map as.
eventZAt
static sourceReactor3D.eventZAt(mapData, eventId)
Event z at.
eventSizeAt
static sourceReactor3D.eventSizeAt(mapData, eventId)
Event size at.
eventSizeCentered
static sourceReactor3D.eventSizeCentered(mapData)
Whether the map's footprints are centred on their events.
eventFootprintOrigin
static sourceReactor3D.eventFootprintOrigin(mapData, eventId)
The footprint's first tile, in tiles from the event's own (zero or less).
eventGraphicOffset
static sourceReactor3D.eventGraphicOffset(character)
Event graphic offset.
verticalCeiling
static sourceReactor3D.verticalCeiling()
The height a character may rise to: the room's ceiling, else a tall default.
characterHeightTiles
static sourceReactor3D.characterHeightTiles(character)
How tall a character stands, in tiles: its model's height, else a sprite's tile and a half.
characterFeet
static sourceReactor3D.characterFeet(c)
Where a character's feet are, in tiles: the physics altitude when it has one (the ground, a roof, a ladder rung), else its scripted lift.
Details
Where a character's feet are, in tiles: the physics altitude when it has one (the ground, a roof, a ladder rung), else its scripted lift. A player on a roof 120 up is not in the way of a tree standing on the ground below it.
gaitPace
static sourceReactor3D.gaitPace(character)
How fast a character's gait clip plays against its own speed: a follower moving at another speed than the leader whose gait it takes (a notch faster while it catches up, Game_Followers.rrPace) steps in proportion; anyone else, 1.
partyCharacter
static sourceReactor3D.partyCharacter(character)
The player or a follower (their moves are tuned as they are).
charactersOverlapVertically
static sourceReactor3D.charactersOverlapVertically(a, b, at)
Characters overlap vertically.