Namespace in reactor_3d_models.js

Reactor3D

335 functions in 6 groups · hide internal

Characters made in the 3D Character Builder.

Quick Reference

Setup & Creation 23

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.
_ensureParseWorker() Ensure parse worker.
buildMeshTemplate() Build mesh template.
_loadGlbTexture() Loads the glb texture.
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 6

_sizeBody() The rectangle of a typed size, centred on the event when the map says so, else counted right and down from it.
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) 12

hasEventModels() Whether it has the event models.
_hasEventModelsNow() Whether it has the event models now.
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 34

setEventModelSpec() Sets the event model spec.
_markModelBody() Marks the tiles under a model's footprint turned to yaw, by the rule eventModelContains walks against: the me…
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 254

splitModelRef() Split model ref.
modelSpecFromNote() Model spec from note.
_parseModelSpecFromNote() Parse 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.
_normalizeModelSpecNow() Normalize model spec now.
readModelFaces() Read model faces.
characterModelSpec() Character model spec.
_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.
_bodyTurnStrikes() Whether a turn in place swings the body onto a party member who is not under it already.
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.
_bodyShapeAt() A shape kept under key; null when none is.
_bodyFromMarks() The shape of marks on a square of side tiles whose middle tile is the character's own.
_modelBodySide() The square of tiles a model can reach from its own at any facing, as a side length; and its corner radius.
_modelBody() The shape of a model standing at yaw.
_sweepBody() Every tile a model passes over as it turns from one yaw to another the short way round, as the drawn turn goe…
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…
_bodyRead() Body read.
_bodyOf() Body of.
_heldSweep() What a model sweeps turning from one facing to another, kept beside the character by the pair of facings.
eventBodyCovers() Whether a character's body is on tile (x, y).
_bodyCovers() Body covers.
_bodySwings() Whether a body is still swinging into a facing it turned to, while the drawn turn plays out.
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.
_bodyHeights() Whether two characters are within each other's height, as collision counts it.
_bodyFar() Body far.
_bodyStops() Whether other can stand in the way of a one-tile walker.
bodyBlocksTile() Body blocks tile.
_bodyOverlap() How many tiles of shape mine, its own tile at (mx, my), lie on another event's body.
_bodyStepOf() Body step of.
bodyMeetsEvents() Whether an event, stepping so its own tile is (x, y) and turning as a step in direction turns it, would put i…
_bodyMeetsEvents() Body meets events.
bodyMeetsParty() The same for the player and the followers who are not walked through: a body may not step, or turn, onto one…
_bodyMeetsParty() Body meets party.
_bodyMeetsOne() Whether a step would put the body on one party member.
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.
_glbWorkerSource() The worker splits the container and parses its JSON.
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.
_modelText() Model text.
_zipFiles() Zip files.
readObj() Read obj.
readStl() Read stl.
readDxf() Read dxf.
_fbxPolygons() Fbx polygons.
readFbxAscii() Read fbx ascii.
readFbxBinary() Read fbx binary.
_fbxTree() The whole node tree of a binary FBX: every node as {name, props, children}, numbers as numbers, 64-bit ids as…
_fbxScene() The meshes of an FBX scene as one unwelded triangle list: positions and UVs per corner, a group per model par…
modelCost() What a model file costs, in the shape RRGlbOptimizer.analyze gives for a GLB: triangles, vertices, draw calls…
readFbx() Read fbx.
_xmlAttr() Xml attr.
read3mf() Read3mf.
readUsdaMesh() Read usda mesh.
readUsdz() Read usdz.
_glbAccessor() Glb accessor.
studioEnvMap() Studio env map.
_glbImageUrl() Glb image url.
_glbImageBlob() An embedded picture's bytes as a Blob: the one the GLB worker made, else cut from the binary chunk.
_glbSparseAccessor() Glb sparse accessor.
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.
_levelTriangles() Triangles in one built level, counted once and kept on the entry.
lodScreen() The two numbers the budget needs, for any camera and target: pixels per world unit at one unit of depth, and…
_lodScreenFactor() Lod screen factor.
_lodScreenPixels() Pixels in the pass being drawn, read alongside the factor above.
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…
_gripPlace() The four places a finger is tested, with its joints at t1 and t2: along and at the end of each segment.
_gripCells() A held thing's points sorted into cells size wide or wider, so a finger's place is tested against the points…
_gripTouches() Whether tested place k of the finger is against the thing (or, for the thumb, a closed finger).
_gripMeets() 1 when the first segment meets the thing at these angles, 2 when the second does, 3 both; places already agai…
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).
_sampleModelKeysInto() Sample model keys into.
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.
_liveTransformInto() liveTransformAt into the caller's record: the placement asks every frame.
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 source
Reactor3D.loadDatabaseSidecar()

Loads the database sidecar.

loadLaterModels

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.loadModel(name, ext, file, texture)

Loads the model.

_ensureParseWorker

static internal source
Reactor3D._ensureParseWorker()

Ensure parse worker.

buildMeshTemplate

static source
Reactor3D.buildMeshTemplate(mesh, baseUrl, textureFile)

Build mesh template.

_loadGlbTexture

static internal source
Reactor3D._loadGlbTexture(json, bin, texInfo, baseUrl, textures, bitmaps, usedBitmaps)

Loads the glb texture.

buildGlbTemplate

static source
Reactor3D.buildGlbTemplate(json, bin, baseUrl, bitmaps, options)

Build glb template.

attachLodLevels

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.loadModelSidecar(name)

Loads the model sidecar.

loadModelAnimations

static source
Reactor3D.loadModelAnimations(name)

Loads the model animations.

prepareModelInstance

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.installVerticalMotion()

Install vertical motion.

installRoomFloorPassage

static source
Reactor3D.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 source
Reactor3D.installPropHooks()

Install prop hooks.

Getting Information

_sizeBody

static internal source
Reactor3D._sizeBody(w, h, centered)

The rectangle of a typed size, centred on the event when the map says so, else counted right and down from it.

pickLod

static source
Reactor3D.pickLod(object, size, eye, cacheKey, screen)

Pick lod.

measureSkinnedBox

static source
Reactor3D.measureSkinnedBox(root)

Measure skinned box.

resolveLibraryMotion

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.hasEventModels(mapData)

Whether it has the event models.

_hasEventModelsNow

static internal source
Reactor3D._hasEventModelsNow(mapData)

Whether it has the event models now.

isDatabaseSidecarReady

static source
Reactor3D.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 source
Reactor3D.hasCharacterModel(character)

Whether it has the character model.

isRigJoint

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.isSwimming(character)

Whether a character is swimming by the physics.

isAirborne

static source
Reactor3D.isAirborne(character)

Whether a character is in the air by the physics (a jump, a fall).

isIdleState

static source
Reactor3D.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 source
Reactor3D.isBuilderGlb(json)

Whether a GLB was saved by the Character Builder or the Prop Builder (they write the one generator).

isIdentityTransform

static source
Reactor3D.isIdentityTransform(transform)

Whether it is identity transform.

isPropEvent

static source
Reactor3D.isPropEvent(eventData)

Whether an event is a prop the sidecar stood in the map.

Actions

setEventModelSpec

static source
Reactor3D.setEventModelSpec(mapData, eventId, pageIndex, spec)

Sets the event model spec.

_markModelBody

static internal source
Reactor3D._markModelBody(marks, side, foot, yaw, fx, fy)

Marks the tiles under a model's footprint turned to yaw, by the rule eventModelContains walks against: the mesh's own mask where it has one, else its box.

Details

Marks the tiles under a model's footprint turned to yaw, by the rule eventModelContains walks against: the mesh's own mask where it has one, else its box. (fx, fy) is how far off its tile's middle the model stands (a prop placed between tiles).

applyEventModelPose

static source
Reactor3D.applyEventModelPose(object, spec, direction, options)

Applies the event model pose.

applyGlbWrap

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.applyRestSkins(json, bin, root, nodes)

Applies the rest skins.

applyPivotOverrides

static source
Reactor3D.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 source
Reactor3D.applyModelRig(root, rig)

Applies the model rig.

startRagdoll

static source
Reactor3D.startRagdoll(holder, character)

Starts the ragdoll.

runRagdoll

static source
Reactor3D.runRagdoll(holder, character)

Run ragdoll.

moveTriggerActive

static source
Reactor3D.moveTriggerActive(trigger, state)

Move trigger active.

applyModelGlow

static source
Reactor3D.applyModelGlow(binding, rule, index, state)

Applies the model glow.

applyModelAnimation

static source
Reactor3D.applyModelAnimation(binding, rules, state)

Applies the model animation.

releaseMapModelState

static source
Reactor3D.releaseMapModelState(state)

Unregister a replaced flat holder before its replacement loads.

playActorBattlerAnimation

static source
Reactor3D.playActorBattlerAnimation(actorId, name)

Plays the actor battler animation.

playBattlerAnimation

static source
Reactor3D.playBattlerAnimation(enemyId, name)

Queue a named action on a 3D enemy battler, by troop member index.

setMaterialShine

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.setModelAnimationSpeed(character, percent)

Sets the model animation speed.

pauseModelPlayback

static source
Reactor3D.pauseModelPlayback(holder)

Pause model playback.

resumeModelPlayback

static source
Reactor3D.resumeModelPlayback(holder, character, frame)

Resume model playback.

playModelAnimation

static source
Reactor3D.playModelAnimation(character, name, options)

Queue a named action animation on a character's model.

playModelSequence

static source
Reactor3D.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 source
Reactor3D.applyLiveTransform(object, character)

Applies the live transform.

moveModelMaterials

static source
Reactor3D.moveModelMaterials(object, scene)

Every material of a model, moved to scene's list (Reactor3D.listModelMaterial).

releaseModelHolder

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.setEventZ(mapData, eventId, z)

Sets the event z.

setEventSize

static source
Reactor3D.setEventSize(mapData, eventId, size)

Sets the event size.

Updating & Drawing

stepRagdoll

static source
Reactor3D.stepRagdoll(holder, character)

Step ragdoll.

updateModelFlash

static source
Reactor3D.updateModelFlash(holder)

Updates the model flash each frame.

updateEnemyModelSprite

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.splitModelRef(named)

Split model ref.

modelSpecFromNote

static source
Reactor3D.modelSpecFromNote(note)

Model spec from note.

_parseModelSpecFromNote

static internal source
Reactor3D._parseModelSpecFromNote(note)

Parse model spec from note.

modelSourceName

static source
Reactor3D.modelSourceName(name, ext, file)

Model source name.

modelUrls

static source
Reactor3D.modelUrls(name, ext, file)

Model urls.

modelUrl

static source
Reactor3D.modelUrl(name, ext, file)

Model url.

modelTextureDir

static source
Reactor3D.modelTextureDir(name)

Model texture dir.

modelCacheKey

static source
Reactor3D.modelCacheKey(name, ext, file)

Model cache key.

eventModelSpec

static source
Reactor3D.eventModelSpec(mapData, eventId, pageIndex)

Event model spec.

normalizeModelSpec

static source
Reactor3D.normalizeModelSpec(spec)

One raw sidecar entry → the validated spec every consumer shares.

_normalizeModelSpecNow

static internal source
Reactor3D._normalizeModelSpecNow(spec)

Normalize model spec now.

readModelFaces

static source
Reactor3D.readModelFaces(faces)

Read model faces.

characterModelSpec

static source
Reactor3D.characterModelSpec(character)

Character model spec.

_characterModelSpec

static internal source
Reactor3D._characterModelSpec(character)

Character model spec.

databaseModelSpec

static source
Reactor3D.databaseModelSpec(section, id)

Database model spec.

actorEntrySlots

static source
Reactor3D.actorEntrySlots(entry)

Actor entry slots.

actorSlotSpec

static source
Reactor3D.actorSlotSpec(actorId, slot)

Actor slot spec.

collectMapModelSpecs

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.laterModelsWanted()

Whether other actors' models are worth having ahead: online, or loaded over the web.

boundModelTemplate

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.characterModelYaw(character, extra)

Character model yaw.

dir8Yaw

static source
Reactor3D.dir8Yaw(direction)

Dir8 yaw.

characterModelDir8

static source
Reactor3D.characterModelDir8(character)

Character model dir8.

eventModelFaceName

static source
Reactor3D.eventModelFaceName(direction)

Event model face name.

eventModelFaceTurn

static source
Reactor3D.eventModelFaceTurn(direction)

Event model face turn.

eventModelInterpolatedMark

static source
Reactor3D.eventModelInterpolatedMark(faces, direction)

Event model interpolated mark.

eventModelWorldYaw

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.pointInTriangle2D(px, py, ax, ay, bx, by, cx, cy)

Point in triangle2 d.

eventModelFootprint

static source
Reactor3D.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 source
Reactor3D.eventModelContains(character, foot, x, y)

Event model contains.

eventModelCanFace

static source
Reactor3D.eventModelCanFace(character, direction)

Event model can face.

_bodyTurnStrikes

static internal source
Reactor3D._bodyTurnStrikes(character, shape, swept, member)

Whether a turn in place swings the body onto a party member who is not under it already.

eventModelWouldOverlap

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.aimCharacterBillboard(object, camera)

Aim character billboard.

characterIsBehindModel

static source
Reactor3D.characterIsBehindModel(character, event)

Character is behind model.

eventModelOccupies

static source
Reactor3D.eventModelOccupies(character, x, y)

Event model occupies.

bodyHas

static source
Reactor3D.bodyHas(shape, dx, dy)

Whether a shape covers the tile (dx, dy) away from the character's own.

_bodyShapeAt

static internal source
Reactor3D._bodyShapeAt(key)

A shape kept under key; null when none is.

Details

A shape kept under key; null when none is. They are few (one per model, size and facing), so the table is small.

_bodyFromMarks

static internal source
Reactor3D._bodyFromMarks(marks, side, sweep)

The shape of marks on a square of side tiles whose middle tile is the character's own.

_modelBodySide

static internal source
Reactor3D._modelBodySide(foot)

The square of tiles a model can reach from its own at any facing, as a side length; and its corner radius.

_modelBody

static internal source
Reactor3D._modelBody(character, spec, pose, state, yaw, fx, fy, unit)

The shape of a model standing at yaw.

Details

The shape of a model standing at yaw. state says what the footprint was read from ("m" the mesh's mask, "b" its box, "u" a model not loaded yet), so a shape taken before the model came in is not kept for it after. A unit always covers its own tile, whatever its mesh leaves open there.

_sweepBody

static internal source
Reactor3D._sweepBody(character, spec, pose, state, fromYaw, toYaw, unit)

Every tile a model passes over as it turns from one yaw to another the short way round, as the drawn turn goes: the two end shapes and what the corners sweep between them.

eventIsUnit

static source
Reactor3D.eventIsUnit(character)

Whether an event is a battle unit (rrUnit, or a <unit: ...> note).

eventBody

static source
Reactor3D.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.

_bodyRead

static internal source
Reactor3D._bodyRead()

Body read.

_bodyOf

static internal source
Reactor3D._bodyOf(character, frame, map)

Body of.

_heldSweep

static internal source
Reactor3D._heldSweep(character, held, fromDir, fromYaw, toDir, toYaw)

What a model sweeps turning from one facing to another, kept beside the character by the pair of facings.

eventBodyCovers

static source
Reactor3D.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.

_bodyCovers

static internal source
Reactor3D._bodyCovers(character, x, y, now)

Body covers.

_bodySwings

static internal source
Reactor3D._bodySwings(character, held, now)

Whether a body is still swinging into a facing it turned to, while the drawn turn plays out.

Details

Whether a body is still swinging into a facing it turned to, while the drawn turn plays out. Only a turn the body was seen to make: the facing a page gives an event as the map is set up is the one its model is first drawn at, and nothing swings.

bodyDepth

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.modelCasterMoves(character, rules)

Placed props with a continuous animation cast moving shadows, as walking events do.

_bodyHeights

static internal source
Reactor3D._bodyHeights(a, b, at)

Whether two characters are within each other's height, as collision counts it.

Details

Whether two characters are within each other's height, as collision counts it. A battle sequence lifts a character it has taken (a leap, a float) by drawing it higher; it still stands where it stood, so that lift is left out.

_bodyFar

static internal source
Reactor3D._bodyFar(event, x, y, margin, now)

Body far.

_bodyStops

static internal source
Reactor3D._bodyStops(mover, other, strict)

Whether other can stand in the way of a one-tile walker.

Details

Whether other can stand in the way of a one-tile walker. As MZ's Game_Event.isCollidedWithEvents: a moving event is stopped by any event that is not Through, below and above the characters included (a wandering NPC does not step onto a Quick Event transfer); the player and followers only by normal-priority ones. Where a unit can be put down (strict) keeps to normal priority. A hull with a body of its own is not asked (_bodyMeetsEvents). Such an event stops a walker only on its own tile (bodyBlocksTile), not over its model's footprint.

bodyBlocksTile

static source
Reactor3D.bodyBlocksTile(mover, x, y, strict)

Body blocks tile.

_bodyOverlap

static internal source
Reactor3D._bodyOverlap(mine, mx, my, other, now)

How many tiles of shape mine, its own tile at (mx, my), lie on another event's body.

_bodyStepOf

static internal source
Reactor3D._bodyStepOf(mover, direction)

Body step of.

bodyMeetsEvents

static source
Reactor3D.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.

_bodyMeetsEvents

static internal source
Reactor3D._bodyMeetsEvents(mover, x, y, direction, strict)

Body meets events.

bodyMeetsParty

static source
Reactor3D.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.

_bodyMeetsParty

static internal source
Reactor3D._bodyMeetsParty(mover, x, y, direction, strict)

Body meets party.

_bodyMeetsOne

static internal source
Reactor3D._bodyMeetsOne(mover, step, x, y, member, strict)

Whether a step would put the body on one party member.

Details

Whether a step would put the body on one party member. A member already under it (a unit placed over the party) is in the way only of a step that leaves it there.

bodyFits

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.freePartyOfBodies()

Free party of bodies.

readGlb

static source
Reactor3D.readGlb(buffer)

Read glb.

modelRetryAllowed

static source
Reactor3D.modelRetryAllowed()

Only a game served over the web: from the disk nothing drops.

_glbWorkerSource

static internal source
Reactor3D._glbWorkerSource()

The worker splits the container and parses its JSON.

Details

The worker splits the container and parses its JSON. A model's pictures are not decoded here: each one is decoded when it is first drawn (ShaderWarmup), at this machine's size, and that copy is closed once it is on the GPU. Asked to (decode: the largest side), it decodes them too, at no more than that side, and hands them back as bitmaps: a character made in the game, whose pictures are all read at once when its parts are merged (LayeredParts). Decoded on the main thread, a crowd arriving in North Haven's square spent a sixth of its first half minute there, at 11 to 80 frames a second.

packJsonArrays

static source
Reactor3D.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 source
Reactor3D.parseGlbAsync(buffer, options)

Parse glb async.

lowMemory

static source
Reactor3D.lowMemory()

Low memory.

textureCap

static source
Reactor3D.textureCap()

The largest side a model texture keeps on this machine.

modelAnisotropy

static source
Reactor3D.modelAnisotropy()

Model anisotropy.

capImage

static source
Reactor3D.capImage(image, own)

The main-thread twin of capBitmapSize for images decoded by the browser: a canvas at the capped size.

fitModelTexture

static source
Reactor3D.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 source
Reactor3D.capBitmapSize(bitmap)

Cap bitmap size.

readModelAsync

static source
Reactor3D.readModelAsync(buffer, ext, baseUrl, texture, options)

Read model async.

readModel

static source
Reactor3D.readModel(buffer, ext, baseUrl, texture, options)

Read model.

_modelText

static internal source
Reactor3D._modelText(buffer)

Model text.

_zipFiles

static internal source
Reactor3D._zipFiles(buffer)

Zip files.

readObj

static source
Reactor3D.readObj(buffer)

Read obj.

readStl

static source
Reactor3D.readStl(buffer)

Read stl.

readDxf

static source
Reactor3D.readDxf(buffer)

Read dxf.

_fbxPolygons

static internal source
Reactor3D._fbxPolygons(vertices, indices)

Fbx polygons.

readFbxAscii

static source
Reactor3D.readFbxAscii(text)

Read fbx ascii.

readFbxBinary

static source
Reactor3D.readFbxBinary(buffer)

Read fbx binary.

_fbxTree

static internal source
Reactor3D._fbxTree(buffer)

The whole node tree of a binary FBX: every node as {name, props, children}, numbers as numbers, 64-bit ids as decimal strings, strings decoded (the "\0" of a typed name reads as "::"), raw data as bytes, and arrays as typed arrays, inflated through pako when the file compressed them.

_fbxScene

static internal source
Reactor3D._fbxScene(roots)

The meshes of an FBX scene as one unwelded triangle list: positions and UVs per corner, a group per model part and material, and the materials with their colour, opacity and colour map (a file name beside the model, or bytes embedded in the file).

Details

The meshes of an FBX scene as one unwelded triangle list: positions and UVs per corner, a group per model part and material, and the materials with their colour, opacity and colour map (a file name beside the model, or bytes embedded in the file). Each part is placed by its model transforms.

modelCost

static source
Reactor3D.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 source
Reactor3D.readFbx(buffer)

Read fbx.

_xmlAttr

static internal source
Reactor3D._xmlAttr(tag, name)

Xml attr.

read3mf

static source
Reactor3D.read3mf(buffer)

Read3mf.

readUsdaMesh

static source
Reactor3D.readUsdaMesh(text)

Read usda mesh.

readUsdz

static source
Reactor3D.readUsdz(buffer)

Read usdz.

_glbAccessor

static internal source
Reactor3D._glbAccessor(json, bin, index)

Glb accessor.

studioEnvMap

static source
Reactor3D.studioEnvMap()

Studio env map.

_glbImageUrl

static internal source
Reactor3D._glbImageUrl(json, bin, image, baseUrl)

Glb image url.

_glbImageBlob

static internal source
Reactor3D._glbImageBlob(json, bin, image)

An embedded picture's bytes as a Blob: the one the GLB worker made, else cut from the binary chunk.

Details

An embedded picture's bytes as a Blob: the one the GLB worker made, else cut from the binary chunk. The worker's Blob serves every texture that names the picture (materials sharing one sheet): a compacted chunk no longer holds those bytes.

_glbSparseAccessor

static internal source
Reactor3D._glbSparseAccessor(json, bin, accessor)

Glb sparse accessor.

carrySurfaceData

static source
Reactor3D.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 source
Reactor3D.cloneSurfaceMaterial(material)

Clone surface material.

hairStrandDirections

static source
Reactor3D.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 source
Reactor3D.remoteTextureCap()

Remote texture cap.

_levelTriangles

static internal source
Reactor3D._levelTriangles(entry, index)

Triangles in one built level, counted once and kept on the entry.

lodScreen

static source
Reactor3D.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.

_lodScreenFactor

static internal source
Reactor3D._lodScreenFactor()

Lod screen factor.

_lodScreenPixels

static internal source
Reactor3D._lodScreenPixels()

Pixels in the pass being drawn, read alongside the factor above.

instanceSpan

static source
Reactor3D.instanceSpan(object)

The size, in tiles, a placed instance stands at: its largest span times its scale.

heldLobes

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.heldMeasured(object)

Held measured.

groundAnimatedTemplate

static source
Reactor3D.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 source
Reactor3D.readGlbClips(json, bin, nodes)

Parse glTF animation channels into THREE.AnimationClips.

instanceModelMaterial

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.presetSkinnedBounds(object)

Preset skinned bounds.

skinGeometryAtRest

static source
Reactor3D.skinGeometryAtRest(geometry, binds)

Skin geometry at rest.

flattenModelWorld

static source
Reactor3D.flattenModelWorld(root)

Flatten model world.

readModelAnimationRules

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.rigMotionPresets()

The rig presets (reactor_rig_motions.js), wherever this runs; null when absent.

motionLibrary

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.libraryMotionRules(list, clips)

The rules that play a model's library motions (attachLibraryMotions) in the states list leaves open.

clipNodeRef

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.compressTriRanges(ids)

Sorted triangle ids -> compact [start,count] runs.

Details

Sorted triangle ids -> compact [start,count] runs. Duplicates collapse.

expandTriRanges

static source
Reactor3D.expandTriRanges(ranges)

Expand tri ranges.

carveTargetMeshes

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.readModelRig(json)

Read model rig.

normalizeBoneName

static source
Reactor3D.normalizeBoneName(name)

A bone name with its namespace, case and punctuation stripped: "mixamorig:RightArm" reads "rightarm".

mapRigToSkeleton

static source
Reactor3D.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 source
Reactor3D.rigFingerDefs(rig)

The finger joints a rig's markers describe, in the model's frame; none without a base and a tip.

fingerBoneAliases

static source
Reactor3D.fingerBoneAliases(side, finger)

How a file's own first finger bone is named (Mixamo, VRM, Blender), as normalizeBoneName reads it.

handGripLayout

static source
Reactor3D.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 source
Reactor3D.rigFingerJoints(root)

The finger joints a model's hands gained that are not in its file (they need skin of their own).

fingerSkinWeights

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.wearFingerSkin(geometry, skin, onSkin)

A finger-skinned geometry puts on its worked-out skin.

heldCloud

static source
Reactor3D.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 source
Reactor3D.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.

_gripPlace

static internal source
Reactor3D._gripPlace(S, t1, t2)

The four places a finger is tested, with its joints at t1 and t2: along and at the end of each segment.

_gripCells

static internal source
Reactor3D._gripCells(S, cloud, count, size)

A held thing's points sorted into cells size wide or wider, so a finger's place is tested against the points of the cells round it and not against every point of the thing.

Details

A held thing's points sorted into cells size wide or wider, so a finger's place is tested against the points of the cells round it and not against every point of the thing. (Every point, for every place of every finger at every step of its closing, was 20 to 77 ms a solve on a long gun or a detailed sword, and a thing that moves in the hand is solved again each update: a battler's whole action at 10 to 25 pictures a second, 2026-11-13.)

_gripTouches

static internal source
Reactor3D._gripTouches(S, k)

Whether tested place k of the finger is against the thing (or, for the thumb, a closed finger).

_gripMeets

static internal source
Reactor3D._gripMeets(S, t1, t2)

1 when the first segment meets the thing at these angles, 2 when the second does, 3 both; places already against it when open do not count.

mantleHold

static source
Reactor3D.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 source
Reactor3D.modelAnimationUrl(name)

Model animation url.

decodeRigWeightsBinary

static source
Reactor3D.decodeRigWeightsBinary(buffer)

Decode the model.rig.bin weight container — the runtime mirror of ModelRigger.decodeWeightsBinary, parity-pinned by tests.

cameraInsideModel

static source
Reactor3D.cameraInsideModel(character, object)

Camera inside model.

ragdollBasis

static source
Reactor3D.ragdollBasis(points, bone)

A bone's frame from the points: along it, and across it where it has a width (hips, shoulders).

poseRagdoll

static source
Reactor3D.poseRagdoll(holder, doll)

Turn each driven bone, parent before child, so it lies along its points.

chestForward

static source
Reactor3D.chestForward(holder)

How far ahead of its feet a model's chest stands, in world tiles (0 when it has none).

rungReach

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.modelRuleDuration(rule, clips)

Model rule duration.

poseSettles

static source
Reactor3D.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 source
Reactor3D.poseEase(blend)

Smoothstep: pose blends accelerate in and settle out.

keyEase

static source
Reactor3D.keyEase(ease, t)

A step's progress (0..1) eased as ease says.

sampleModelKeys

static source
Reactor3D.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.

_sampleModelKeysInto

static internal source
Reactor3D._sampleModelKeysInto(rule, p, out)

Sample model keys into.

modelGlowValue

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.fireModelEffect(effect, character, holder)

Deliver one fired effect into the running game.

ownModelMaterials

static source
Reactor3D.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 source
Reactor3D.modelInstanceKey(character)

Model instance key.

actorFaceState

static source
Reactor3D.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 source
Reactor3D.battlerPictureRests(state, sprite)

Battler picture rests.

frameModelSprite

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.flatModelSortY(character)

Flat model sort y.

flatUnitFit

static source
Reactor3D.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 source
Reactor3D.readScale(raw, fallback)

A scale as authored: one number for proportional, [x, y, z] for free.

scaleAxes

static source
Reactor3D.scaleAxes(scale)

The three factors of an authored scale.

readModelSurface

static source
Reactor3D.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 source
Reactor3D.readVariantColor(raw)

Read variant color.

readModelVariants

static source
Reactor3D.readModelVariants(json)

A model's variants, validated, in file order; a name appears once.

modelVariant

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.hexHueSaturation(hex)

A "#rrggbb" as [hue 0-1, saturation 0-1] (HSL).

lookOf

static source
Reactor3D.lookOf(material)

A material's color adjustment, or null: userData.rrLook holds the two uniform vectors.

injectLook

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.variantSpecOf(character, spec)

A character's spec with the variant a script gave it, built once per change.

readModelTransform

static source
Reactor3D.readModelTransform(json, spec)

Read model transform.

variantSurface

static source
Reactor3D.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 source
Reactor3D.modelAnimationSpeed(character)

Placement and event overrides are percentages; old maps default to 100.

modelPlaybackFrame

static source
Reactor3D.modelPlaybackFrame(holder, character, frame)

Model playback frame.

advanceModelAction

static source
Reactor3D.advanceModelAction(holder, character, frame)

The same action clock drives map models in both renderers.

propAnimationList

static source
Reactor3D.propAnimationList(prop)

The animations a placed prop plays, in order: the list, or the one older files hold.

propEffectList

static source
Reactor3D.propEffectList(prop)

The effects a placed prop plays, all at once: the list, or the one older files hold.

IDENTITY_TRANSFORM

static source
Reactor3D.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 source
Reactor3D.liveTransformAt(state, frame)

The transform a character shows this frame, eased between the one it had and the one it was given.

_liveTransformInto

static internal source
Reactor3D._liveTransformInto(state, frame, out)

liveTransformAt into the caller's record: the placement asks every frame.

fallAxis

static source
Reactor3D.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 source
Reactor3D.transformModel(character, target, duration)

Give a character's model a transform to ease to over duration frames (0: at once).

mapHasAboveEvents

static source
Reactor3D.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 source
Reactor3D.animationStride(x, y, z, span, camera)

Animation stride.

inAnimationView

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.holdModelMatrices(holder, character, object)

Hold model matrices.

sheetTextureFor

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.normalizeProp(raw, mapData)

Normalize prop.

mapProps

static source
Reactor3D.mapProps(mapData)

The map's props, validated, in sidecar order.

propModelSpec

static source
Reactor3D.propModelSpec(prop)

The model spec a prop binds its event to, in the sidecar's own shape.

propEvent

static source
Reactor3D.propEvent(prop)

The event a prop stands in the map as.

eventZAt

static source
Reactor3D.eventZAt(mapData, eventId)

Event z at.

eventSizeAt

static source
Reactor3D.eventSizeAt(mapData, eventId)

Event size at.

eventSizeCentered

static source
Reactor3D.eventSizeCentered(mapData)

Whether the map's footprints are centred on their events.

eventFootprintOrigin

static source
Reactor3D.eventFootprintOrigin(mapData, eventId)

The footprint's first tile, in tiles from the event's own (zero or less).

eventGraphicOffset

static source
Reactor3D.eventGraphicOffset(character)

Event graphic offset.

verticalCeiling

static source
Reactor3D.verticalCeiling()

The height a character may rise to: the room's ceiling, else a tall default.

characterHeightTiles

static source
Reactor3D.characterHeightTiles(character)

How tall a character stands, in tiles: its model's height, else a sprite's tile and a half.

characterFeet

static source
Reactor3D.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 source
Reactor3D.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 source
Reactor3D.partyCharacter(character)

The player or a follower (their moves are tuned as they are).

charactersOverlapVertically

static source
Reactor3D.charactersOverlapVertically(a, b, at)

Characters overlap vertically.