Namespace in reactor_speaker_face.js

S

23 public functions in 4 groups · show internal (_) functions

A message window with the speaker's name and face.

Quick Reference

Setup & Creation 2

buildScene() A loaded model, dressed as spec wears it and stood before a camera: { scene, camera, object, head }.
install() The hooks, put on once every plugin has loaded so they sit outside whatever a plugin did to the same function…

Checks (True / False) 3

isOn() Whether it is on.
isReservedFace() Whether it is reserved face.
hasFaceFile() Whether img/faces holds a file of this name.

Actions 1

forget() Every portrait goes (another project's models, a test).

Other 17

choiceOf() A Show Text command's own choice: "auto", "none", or "" when it does not say.
wantsFace() Whether a Show Text with no face picture shows its speaker's face.
plainName() A speaker name as the player reads it: \V[n], \N[n], \P[n] and \G replaced through lookup (variable, actorNam…
directActor() The actor a name names outright: it is one \N[n], or one \P[n] (through lookup.partyMemberId), and nothing el…
whoSpeaks() Who a Show Text's speaker is.
headOf() The head of a posed model: { eyes, chin, height } in world space, or null when it has none to frame (a vehicl…
aimAtHead() Aim at a head: head and shoulders, turned a little toward the text, lit from beside the camera.
aimAtWhole() Aim at the whole of a model with no head: from the front quarter, as close as keeps every corner of its box i…
bitmapFor() The picture behind a reserved face name: its portrait, or a clear one when that portrait is no longer kept.
modelFace() The face of a model and look: { name, state } with state "making", "ready" or "failed", or null when no portr…
cached() Cached.
actorPicture() An actor's picture: its face picture, else the model it wears.
eventPicture() An event's picture: the model it wears, else the face file named as its character sheet.
pictureOf() The picture of whoever who is (S.whoSpeaks), or null.
faceFor() The face a Show Text's speaker gets: { name, index } to set on the message, or null for none.
prewarmList() The commands an event is about to run (the first 200, as the stock preload reads them).
prewarmMap() A map that has just loaded: the speakers of every page of every event are looked up once, and the first few p…

Setup & Creation

buildScene

static source
S.buildScene(R, T, template, sidecar, spec)

A loaded model, dressed as spec wears it and stood before a camera: { scene, camera, object, head }.

Details

A loaded model, dressed as spec wears it and stood before a camera: { scene, camera, object, head }. head is true for a head-and-shoulders picture, false for the whole of a model that has no head.

install

static source
S.install()

The hooks, put on once every plugin has loaded so they sit outside whatever a plugin did to the same functions.

Details

The hooks, put on once every plugin has loaded so they sit outside whatever a plugin did to the same functions. With the project's switch off and no choice of its own on the command, a Show Text runs the command below untouched: one test of the switch and one of the command.

Checks (True / False)

isOn

static source
S.isOn(system)

Whether it is on.

isReservedFace

static source
S.isReservedFace(name)

Whether it is reserved face.

hasFaceFile

static source
S.hasFaceFile(name)

Whether img/faces holds a file of this name.

Details

Whether img/faces holds a file of this name. Asked of the disk where there is one (a face the project never shipped must not be requested: a missing image stops the game); in a browser it is asked once in the background and is false until the answer is in.

Actions

forget

static source
S.forget()

Every portrait goes (another project's models, a test).

Other

choiceOf

static source
S.choiceOf(command)

A Show Text command's own choice: "auto", "none", or "" when it does not say.

wantsFace

static source
S.wantsFace(system, command)

Whether a Show Text with no face picture shows its speaker's face.

plainName

static source
S.plainName(text, lookup)

A speaker name as the player reads it: \V[n], \N[n], \P[n] and \G replaced through lookup (variable, actorName, partyMemberName, currency), every other code removed.

Details

A speaker name as the player reads it: \V[n], \N[n], \P[n] and \G replaced through lookup (variable, actorName, partyMemberName, currency), every other code removed. known is false when a value was needed that lookup could not give (the editor has no variables).

directActor

static source
S.directActor(text, lookup)

The actor a name names outright: it is one \N[n], or one \P[n] (through lookup.partyMemberId), and nothing else that shows.

Details

The actor a name names outright: it is one \N[n], or one \P[n] (through lookup.partyMemberId), and nothing else that shows. 0 when not.

whoSpeaks

static source
S.whoSpeaks(name, world)

Who a Show Text's speaker is.

Details

Who a Show Text's speaker is.

world: { actors: [{ id, name }], party: [actorId], events: [{ id, name }], runningEventId, lookup }. Returns one of { kind: "actor", id, rule: "code" | "actor" } { kind: "event", id, rule: "name" | "prefix" | "running" } { kind: "events", ids, rule } several events share the name and none of them runs the command { kind: "none", why: "unknown" | "noEvent" | "nobody" }

headOf

static source
S.headOf(R, T, object, rig, sidecar, box)

The head of a posed model: { eyes, chin, height } in world space, or null when it has none to frame (a vehicle, a prop).

Details

The head of a posed model: { eyes, chin, height } in world space, or null when it has none to frame (a vehicle, a prop). The size comes from the rig's head-top and chin markers, else from the model's height; the anchor is the model's eyes point when it has one.

aimAtHead

static source
S.aimAtHead(T, head, camera, sun)

Aim at a head: head and shoulders, turned a little toward the text, lit from beside the camera.

aimAtWhole

static source
S.aimAtWhole(T, box, camera, sun)

Aim at the whole of a model with no head: from the front quarter, as close as keeps every corner of its box in the picture.

bitmapFor

static source
S.bitmapFor(name)

The picture behind a reserved face name: its portrait, or a clear one when that portrait is no longer kept.

modelFace

static source
S.modelFace(spec)

The face of a model and look: { name, state } with state "making", "ready" or "failed", or null when no portrait can be made here (no 3D).

Details

The face of a model and look: { name, state } with state "making", "ready" or "failed", or null when no portrait can be made here (no 3D). The first call for a model starts its portrait.

cached

static source
S.cached()

Cached.

actorPicture

static source
S.actorPicture(actorId)

An actor's picture: its face picture, else the model it wears.

Details

An actor's picture: its face picture, else the model it wears. The one result object is written again by the next call.

eventPicture

static source
S.eventPicture(event)

An event's picture: the model it wears, else the face file named as its character sheet.

pictureOf

static source
S.pictureOf(who)

The picture of whoever who is (S.whoSpeaks), or null.

Details

The picture of whoever who is (S.whoSpeaks), or null. Several events of one name: those that have a look must all look alike (one that shows nothing is not the one the player sees).

faceFor

static source
S.faceFor(speakerName, runningEventId, out)

The face a Show Text's speaker gets: { name, index } to set on the message, or null for none.

Details

The face a Show Text's speaker gets: { name, index } to set on the message, or null for none. out is written and returned.

prewarmList

static source
S.prewarmList(list, runningEventId)

The commands an event is about to run (the first 200, as the stock preload reads them).

prewarmMap

static source
S.prewarmMap()

A map that has just loaded: the speakers of every page of every event are looked up once, and the first few portraits they need are started, so that talking to someone finds the face made.

Details

A map that has just loaded: the speakers of every page of every event are looked up once, and the first few portraits they need are started, so that talking to someone finds the face made. A speaker whose model belongs to another page of its event is found when that event runs.