Namespace in reactor_fight_tactical.js
View
35 public functions in 5 groups · show internal (_) functions
Quick Reference
Checks (True / False) 1
| isVisiting() | Whether the view is away showing someone (a unit that joined, whoever speaks) and not where the battle looks. |
Actions 8
| resume() | Resume. |
| start() | Start. |
| endVisit() | The view stops showing whoever it went to (the player pointed somewhere); a speaker is not gone back to. |
| apply() | Apply. |
| end() | End. |
| showCursor() | The cursor went to a place on a roof this quarter hides: the view turns to the nearest quarter that shows it. |
| openAt() | For whoever asks what the view shows: the height everything built on a tile is cut away above (a huge number… |
| closeOpenings() | Everything opened shuts (the view is somewhere else, the battle is over): over a few frames, or at once with… |
Events, Commands & Input 1
| onRoof() | Whether a height on a cell is on something built over the ground there (a roof, a deck), not the ground itsel… |
Updating & Drawing 4
| update() | Update. |
| refreshOpenings() | Works out what is in the way now and what each opening is: called when something changed, never per frame. |
| refreshScenery() | Scenery in the way (a tree, a prop: never a character) is cut off above its foot, and whole again when it is… |
| updateOpenings() | Each frame the map's cutaway is asked for: own, the tactical camera looks and the openings follow what must b… |
Other 21
| live() | The 3D view the map scene draws with, or null (a 2D map, no scene yet). |
| active() | Active. |
| suspend() | A director takes the camera for a shot, and gives it back. |
| direction() | Direction. |
| hides() | Whether a roof, a wall or the land stands between the tactical camera at yaw and a place. |
| opening() | The battle's first view: the middle of the player's units and the nearest enemies, from the quarter that show… |
| visit() | The view goes to a place for frames and then back to where the battle looks. |
| visitUnit() | The view goes to a unit; several in the same moment (reinforcements) are looked at together. |
| speaker() | The unit a message's speaker name means: its battler's name, or the first word or words of it ("Rhea" for "Rh… |
| landHides() | Whether the land itself (a hill, a cliff, a rock: nothing the view opens) stands between the camera at yaw an… |
| unblock() | As a unit's turn begins: if a hill hides it from this side, the camera turns to the nearest quarter that sees… |
| rotate() | Turn the tactical camera a quarter (step 1 or -1). |
| faces() | How squarely a place on a level faces the tactical camera at yaw: over 0 it is seen, at or under 0 it is edge… |
| quarterFor() | The quarter that shows a place best, when the one in use hides it; the yaw in use otherwise. |
| zoom() | Zoom. |
| cursorStep() | The cell a direction key moves the cursor to, as the screen shows it: Up is away from the camera. |
| cutRegion() | The battle's ground, as a box of the map: every unit, the cursor and every marked cell (ReactorFight.Marks),… |
| openings() | What is open now, for whoever asks (a script, a test): buildings, each with its box of tiles, the level its s… |
| interiorSubject() | The controlled unit actually inside a room, never its cursor or destination. |
| slide() | Move where the view looks across the screen: right and ahead are -1, 0 or 1, as the screen shows them at any… |
| pan() | Move where the view looks by a screen direction (2/4/6/8), a little each frame: the pointer at the screen's e… |
Checks (True / False)
isVisiting
static sourceView.isVisiting(fight)
Whether the view is away showing someone (a unit that joined, whoever speaks) and not where the battle looks.
Actions
resume
static sourceView.resume()
Resume.
start
static sourceView.start(fight, mode)
Start.
endVisit
static sourceView.endVisit()
The view stops showing whoever it went to (the player pointed somewhere); a speaker is not gone back to.
apply
static sourceView.apply(fight, frames)
Apply.
end
static sourceView.end(fight)
End.
showCursor
static sourceView.showCursor(fight)
The cursor went to a place on a roof this quarter hides: the view turns to the nearest quarter that shows it.
openAt
static sourceView.openAt(x, y)
For whoever asks what the view shows: the height everything built on a tile is cut away above (a huge number when it is whole).
closeOpenings
static sourceView.closeOpenings(scene, now)
Everything opened shuts (the view is somewhere else, the battle is over): over a few frames, or at once with now.
Events, Commands & Input
onRoof
static sourceView.onRoof(x, y, height)
Whether a height on a cell is on something built over the ground there (a roof, a deck), not the ground itself.
Updating & Drawing
update
static sourceView.update(fight)
Update.
refreshOpenings
static sourceView.refreshOpenings(fight, frame)
Works out what is in the way now and what each opening is: called when something changed, never per frame.
Details
Works out what is in the way now and what each opening is: called when something changed, never per frame. A building in the way is opened for the lowest floor asked about, but never under someone who stands in or on it higher up: nothing a unit stands on is taken from under it.
refreshScenery
static sourceView.refreshScenery(fight, frame)
Scenery in the way (a tree, a prop: never a character) is cut off above its foot, and whole again when it is not.
Details
Scenery in the way (a tree, a prop: never a character) is cut off above its foot, and whole again when it is not. Returns whether anything is coming or going.
updateOpenings
static sourceView.updateOpenings(scene, camera, own, keep, changed)
Each frame the map's cutaway is asked for: own, the tactical camera looks and the openings follow what must be seen; keep, a director's shot keeps them as they were; neither, they shut.
Details
Each frame the map's cutaway is asked for: own, the tactical camera looks and the openings follow what
must be seen; keep, a director's shot keeps them as they were; neither, they shut. changed: the marks
or the battle did.
Other
live
static sourceView.live()
The 3D view the map scene draws with, or null (a 2D map, no scene yet).
active
static sourceView.active()
Active.
suspend
static sourceView.suspend()
A director takes the camera for a shot, and gives it back.
Details
A director takes the camera for a shot, and gives it back. The view leaves the camera and the display alone between.
direction
static sourceView.direction(yaw)
Direction.
hides
static sourceView.hides(x, y, height, yaw, box)
Whether a roof, a wall or the land stands between the tactical camera at yaw and a place.
Details
Whether a roof, a wall or the land stands between the tactical camera at yaw and a place. The camera is
above everything, so the highest thing on a cell being over the sight line there is enough. Inside box
([x0, y0, x1, y1]: the ground the battle's cutaway keeps open) only the land counts.
opening
static sourceView.opening(fight)
The battle's first view: the middle of the player's units and the nearest enemies, from the quarter that shows them with the least built or raised in the way (the one that looks from the party toward the enemy when two are as clear), near enough to read them and far enough to hold them all.
Details
The battle's first view: the middle of the player's units and the nearest enemies, from the quarter that shows them with the least built or raised in the way (the one that looks from the party toward the enemy when two are as clear), near enough to read them and far enough to hold them all. False when there is nobody to look at or the battle keeps the map's camera.
visit
static sourceView.visit(fight, x, y, h, frames)
The view goes to a place for frames and then back to where the battle looks.
visitUnit
static sourceView.visitUnit(fight, unit)
The view goes to a unit; several in the same moment (reinforcements) are looked at together.
speaker
static sourceView.speaker(fight, name)
The unit a message's speaker name means: its battler's name, or the first word or words of it ("Rhea" for "Rhea Voss").
landHides
static sourceView.landHides(x, y, height, yaw)
Whether the land itself (a hill, a cliff, a rock: nothing the view opens) stands between the camera at yaw and a point.
unblock
static sourceView.unblock(fight, x, y, height)
As a unit's turn begins: if a hill hides it from this side, the camera turns to the nearest quarter that sees it.
rotate
static sourceView.rotate(step)
Turn the tactical camera a quarter (step 1 or -1).
Details
Turn the tactical camera a quarter (step 1 or -1). False when it is not in charge.
faces
static sourceView.faces(x, y, h, yaw)
How squarely a place on a level faces the tactical camera at yaw: over 0 it is seen, at or under 0 it is edge-on or turned away (a roof's pitch facing the other way).
Details
How squarely a place on a level faces the tactical camera at yaw: over 0 it is seen, at or under 0 it is
edge-on or turned away (a roof's pitch facing the other way). Level ground is 1 from every quarter.
quarterFor
static sourceView.quarterFor(x, y, h, yaw)
The quarter that shows a place best, when the one in use hides it; the yaw in use otherwise.
zoom
static sourceView.zoom(direction)
Zoom.
cursorStep
static sourceView.cursorStep(d)
The cell a direction key moves the cursor to, as the screen shows it: Up is away from the camera.
cutRegion
static sourceView.cutRegion(fight, on)
The battle's ground, as a box of the map: every unit, the cursor and every marked cell (ReactorFight.Marks), with the ground it lies on and the height a wall keeps over it.
Details
The battle's ground, as a box of the map: every unit, the cursor and every marked cell (ReactorFight.Marks), with the ground it lies on and the height a wall keeps over it. The pointer asks it what it looks through and a number over a unit whether it shows (Reactor3D.cutawayShows). Made again when the marks or a unit change, never per frame; off outside the tactical view and during a director's shot. Returns whether it was made again.
openings
static sourceView.openings()
What is open now, for whoever asks (a script, a test): buildings, each with its box of tiles, the level its storey is cut at, the level its walls in the way are cut at, how many tiles of them (lows) in how many runs (runs), how many runs wait standing for want of room (uncut), and how far it has come (e, 0 to 1) toward goal; scenery, how many models are cut off; boxes, how many the shaders are to…
Details
What is open now, for whoever asks (a script, a test): buildings, each with its box of tiles, the level its
storey is cut at, the level its walls in the way are cut at, how many tiles of them (lows) in how many
runs (runs), how many runs wait standing for want of room (uncut), and how far it has come (e, 0 to 1)
toward goal; scenery, how many models are cut off; boxes, how many the shaders are told.
interiorSubject
static sourceView.interiorSubject(fight, grid)
The controlled unit actually inside a room, never its cursor or destination.
slide
static sourceView.slide(fight, right, ahead, amount, yaw)
Move where the view looks across the screen: right and ahead are -1, 0 or 1, as the screen shows them at any turn of the view (yaw, degrees: the camera's own when not given, none on a 2D map).
Details
Move where the view looks across the screen: right and ahead are -1, 0 or 1, as the screen shows them
at any turn of the view (yaw, degrees: the camera's own when not given, none on a 2D map).
pan
static sourceView.pan(fight, d, amount)
Move where the view looks by a screen direction (2/4/6/8), a little each frame: the pointer at the screen's edge.