@korial29/tiny-fps 0.145.0 → 0.146.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +16 -16
- package/dist/local.js +1 -1
- package/dist/server.js +65 -25
- package/dist/types/client/armor.d.ts +15 -1
- package/dist/types/client/beams.d.ts +2 -1
- package/dist/types/client/body.d.ts +4 -3
- package/dist/types/client/buckle.d.ts +2 -1
- package/dist/types/client/craft.d.ts +2 -1
- package/dist/types/client/doors.d.ts +3 -2
- package/dist/types/client/drops.d.ts +2 -1
- package/dist/types/client/dust.d.ts +2 -1
- package/dist/types/client/flag.d.ts +8 -5
- package/dist/types/client/gun.d.ts +3 -2
- package/dist/types/client/hair.d.ts +2 -1
- package/dist/types/client/helm.d.ts +2 -1
- package/dist/types/client/helmet.d.ts +5 -4
- package/dist/types/client/hud.d.ts +3 -2
- package/dist/types/client/katana.d.ts +4 -3
- package/dist/types/client/limbs.d.ts +2 -1
- package/dist/types/client/mask.d.ts +5 -2
- package/dist/types/client/mesh.d.ts +4 -3
- package/dist/types/client/moonbase.d.ts +6 -5
- package/dist/types/client/pack.d.ts +4 -3
- package/dist/types/client/pads.d.ts +5 -2
- package/dist/types/client/pouch.d.ts +2 -1
- package/dist/types/client/props.d.ts +8 -5
- package/dist/types/client/render.d.ts +2 -1
- package/dist/types/client/rover.d.ts +3 -2
- package/dist/types/client/skin.d.ts +2 -1
- package/dist/types/client/soldier.d.ts +3 -2
- package/dist/types/client/traffic.d.ts +2 -1
- package/dist/types/client/trail.d.ts +2 -1
- package/dist/types/client/verts.d.ts +26 -0
- package/dist/types/client/vision.d.ts +2 -1
- package/dist/types/client/wreck.d.ts +3 -2
- package/dist/types/shared/constants.d.ts +10 -3
- package/dist/types/shared/physics.d.ts +1 -0
- package/dist/types/shared/room.d.ts +9 -8
- package/dist/types/shared/types.d.ts +4 -2
- package/dist/types/shared/world.d.ts +2 -0
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -788,7 +788,8 @@ var STILL = {
|
|
|
788
788
|
coyote: 6,
|
|
789
789
|
buffer: 0,
|
|
790
790
|
held: 0,
|
|
791
|
-
hp:
|
|
791
|
+
hp: 8,
|
|
792
|
+
armor: 0,
|
|
792
793
|
ammo: -1,
|
|
793
794
|
cool: 0,
|
|
794
795
|
mag: 0,
|
|
@@ -2608,6 +2609,23 @@ var HIGHLINE = {
|
|
|
2608
2609
|
ZED$1 / 2
|
|
2609
2610
|
]
|
|
2610
2611
|
],
|
|
2612
|
+
vests: [
|
|
2613
|
+
[
|
|
2614
|
+
36,
|
|
2615
|
+
17.2,
|
|
2616
|
+
ZED$1 / 2
|
|
2617
|
+
],
|
|
2618
|
+
[
|
|
2619
|
+
23,
|
|
2620
|
+
26,
|
|
2621
|
+
136
|
|
2622
|
+
],
|
|
2623
|
+
[
|
|
2624
|
+
23,
|
|
2625
|
+
26,
|
|
2626
|
+
104
|
|
2627
|
+
]
|
|
2628
|
+
],
|
|
2611
2629
|
floor: -25,
|
|
2612
2630
|
sun: {
|
|
2613
2631
|
dir: [
|
|
@@ -4210,6 +4228,15 @@ var MOON = {
|
|
|
4210
4228
|
0,
|
|
4211
4229
|
140
|
|
4212
4230
|
]),
|
|
4231
|
+
vests: both([[
|
|
4232
|
+
107,
|
|
4233
|
+
5,
|
|
4234
|
+
200
|
|
4235
|
+
]], [
|
|
4236
|
+
132.5,
|
|
4237
|
+
2.4,
|
|
4238
|
+
140
|
|
4239
|
+
]),
|
|
4213
4240
|
floor: -26,
|
|
4214
4241
|
relief: {
|
|
4215
4242
|
hole: [
|
|
@@ -6345,16 +6372,16 @@ var encodeSnapshot = (s) => {
|
|
|
6345
6372
|
v.setUint8(o + 37, p.dash | (p.by >> 2 & 3) << 6);
|
|
6346
6373
|
v.setUint8(o + 38, p.coyote & 7 | (p.buffer & 7) << 3 | (p.held & KEY.JUMP ? 64 : 0) | (p.held & KEY.DASH ? 128 : 0));
|
|
6347
6374
|
v.setUint8(o + 39, p.stun | (p.by & 3) << 6);
|
|
6348
|
-
const gun = p.hp | (p.cool & 7) << 3 | (p.ammo < 0 ? NO_GUN : p.ammo) << 6 | p.down << 13 | +!!p.rack << 20 | +!!p.blade << 21 | +!!p.wield << 22 | +!!p.zap << 23;
|
|
6375
|
+
const gun = p.hp & 7 | (p.cool & 7) << 3 | (p.ammo < 0 ? NO_GUN : p.ammo) << 6 | p.down << 13 | +!!p.rack << 20 | +!!p.blade << 21 | +!!p.wield << 22 | +!!p.zap << 23;
|
|
6349
6376
|
v.setUint8(o + 40, gun >> 16);
|
|
6350
6377
|
v.setUint16(o + 41, gun & 65535);
|
|
6351
6378
|
v.setUint8(o + 43, p.shots);
|
|
6352
6379
|
v.setUint8(o + 44, p.hits);
|
|
6353
6380
|
v.setUint8(o + 45, (p.swing ?? 0) & 63 | ((p.cut ?? 0) & 3) << 6);
|
|
6354
|
-
v.setUint8(o + 46, (p.lost ?? 0) & 7 | ((p.cut ?? 0) & 4) << 1 | (p.fried ? 16 : 0) | (p.heavy ? 32 : 0));
|
|
6381
|
+
v.setUint8(o + 46, (p.lost ?? 0) & 7 | ((p.cut ?? 0) & 4) << 1 | (p.fried ? 16 : 0) | (p.heavy ? 32 : 0) | (p.armor ?? 0) << 6);
|
|
6355
6382
|
v.setUint8(o + 47, p.down ? p.fell ?? 0 : p.charge ?? 0);
|
|
6356
6383
|
v.setUint8(o + 48, p.lock ?? 0);
|
|
6357
|
-
v.setUint8(o + 49, (p.foe ?? 0) & 15 | (p.dashes & 2) << 3 | (p.pressed ? 128 : 0));
|
|
6384
|
+
v.setUint8(o + 49, (p.foe ?? 0) & 15 | (p.dashes & 2) << 3 | (p.hp & 8) << 2 | (p.pressed ? 128 : 0));
|
|
6358
6385
|
v.setUint8(o + 50, p.pushes ?? 0);
|
|
6359
6386
|
v.setUint8(o + 51, p.away ?? 0);
|
|
6360
6387
|
v.setUint8(o + 52, (p.rail ?? -1) + 1);
|
|
@@ -7795,13 +7822,14 @@ var Room = class {
|
|
|
7795
7822
|
this.rearm = [];
|
|
7796
7823
|
this.wear = this.rovers.map(() => ({ ...NEW }));
|
|
7797
7824
|
}
|
|
7798
|
-
/** The health, ammo and cell packs of the map, all there (0 ticks before each is back). */
|
|
7825
|
+
/** The health, ammo and cell packs and the armours of the map, all there (0 ticks before each is back). */
|
|
7799
7826
|
spots() {
|
|
7800
|
-
const { packs = [], ammo = [], cells = [] } = this.world.def;
|
|
7827
|
+
const { packs = [], ammo = [], cells = [], vests = [] } = this.world.def;
|
|
7801
7828
|
return [
|
|
7802
7829
|
...packs,
|
|
7803
7830
|
...ammo,
|
|
7804
|
-
...cells
|
|
7831
|
+
...cells,
|
|
7832
|
+
...vests
|
|
7805
7833
|
].map(() => 0);
|
|
7806
7834
|
}
|
|
7807
7835
|
/** The host: the player in the room the longest. */
|
|
@@ -8128,13 +8156,15 @@ var Room = class {
|
|
|
8128
8156
|
return bank >= 2 && this.harm(foe, Math.floor(bank / 2), by, how, felled(FALL$1.SHOT, dx, dz));
|
|
8129
8157
|
}
|
|
8130
8158
|
/**
|
|
8131
|
-
* `hp` of damage to `foe
|
|
8132
|
-
*
|
|
8133
|
-
*
|
|
8134
|
-
* is how he falls (felled()).
|
|
8159
|
+
* `hp` of damage to `foe`, his armour taking it first (Infinity goes through it); the last one
|
|
8160
|
+
* puts him down: he lies where he fell, without the gun, the katana or armour, a flag he carries
|
|
8161
|
+
* drops with the lock, and `lost` is NONE (a cut sets it after). True when he went down: an enemy
|
|
8162
|
+
* `by` scores a frag made `how` (FRAG), told to everyone. `fell` is how he falls (felled()).
|
|
8135
8163
|
*/
|
|
8136
8164
|
harm(foe, hp, by, how = FRAG.GUN, fell = 0) {
|
|
8137
|
-
|
|
8165
|
+
const armor = foe.state.armor ?? 0;
|
|
8166
|
+
foe.state.armor = Math.max(0, armor - hp);
|
|
8167
|
+
if ((foe.state.hp -= Math.max(0, hp - armor)) > 0) return false;
|
|
8138
8168
|
[foe.graze, foe.bruise, foe.blows, foe.halves] = [
|
|
8139
8169
|
0,
|
|
8140
8170
|
0,
|
|
@@ -8144,6 +8174,7 @@ var Room = class {
|
|
|
8144
8174
|
if (foe.state.mode === MODE.RIDE) this.unseat(foe);
|
|
8145
8175
|
Object.assign(foe.state, {
|
|
8146
8176
|
hp: 0,
|
|
8177
|
+
armor: 0,
|
|
8147
8178
|
down: 120,
|
|
8148
8179
|
ammo: -1,
|
|
8149
8180
|
cool: 0,
|
|
@@ -8427,42 +8458,51 @@ var Room = class {
|
|
|
8427
8458
|
}
|
|
8428
8459
|
}
|
|
8429
8460
|
/**
|
|
8430
|
-
* The packs, health ones first, then the ammo ones, then the rail cells
|
|
8431
|
-
* back after PACK_BACK s, an ammo pack after AMMO_BACK s
|
|
8461
|
+
* The packs, health ones first, then the ammo ones, then the rail cells, then the armours: one
|
|
8462
|
+
* that is gone comes back after PACK_BACK s, an ammo pack after AMMO_BACK s, an armour after
|
|
8463
|
+
* ARMOR_BACK s. A health pack goes to a hurt player standing at it, an ammo pack to one
|
|
8432
8464
|
* with the gun short of AMMO_MAX or the laser rifle short of RIFLE_MAX (RIFLE_CLIP more rounds), a rail cell to one with the rail gun and less than
|
|
8433
|
-
* RAIL_MAX of lightning.
|
|
8465
|
+
* RAIL_MAX of lightning, an armour to one short of ARMOR_MAX. All change the state between two inputs, like a hit: the snapshot
|
|
8434
8466
|
* carries the result and the predictor replays its unacked inputs on it.
|
|
8435
8467
|
*/
|
|
8436
8468
|
heal(players) {
|
|
8437
|
-
const { packs = [], ammo = [], cells = [] } = this.world.def;
|
|
8469
|
+
const { packs = [], ammo = [], cells = [], vests = [] } = this.world.def;
|
|
8438
8470
|
[
|
|
8439
8471
|
...packs,
|
|
8440
8472
|
...ammo,
|
|
8441
|
-
...cells
|
|
8473
|
+
...cells,
|
|
8474
|
+
...vests
|
|
8442
8475
|
].forEach((at, k) => {
|
|
8443
8476
|
if (this.gone[k] > 0) {
|
|
8444
8477
|
this.gone[k]--;
|
|
8445
8478
|
return;
|
|
8446
8479
|
}
|
|
8447
|
-
const kind = +(k >= packs.length) + +(k >= packs.length + ammo.length);
|
|
8480
|
+
const kind = +(k >= packs.length) + +(k >= packs.length + ammo.length) + +(k >= packs.length + ammo.length + cells.length);
|
|
8448
8481
|
const wants = ({ state: q, info }) => {
|
|
8449
8482
|
const kit = kitOf(info.role, this.world.def);
|
|
8450
8483
|
return [
|
|
8451
|
-
q.hp <
|
|
8484
|
+
q.hp < 8,
|
|
8452
8485
|
q.ammo >= 0 && q.ammo < kit.ammo || (q.rifle ?? -1) >= 0 && q.rifle < kit.rifle,
|
|
8453
|
-
(q.rail ?? -1) >= 0 && q.rail < kit.rail
|
|
8486
|
+
(q.rail ?? -1) >= 0 && q.rail < kit.rail,
|
|
8487
|
+
(q.armor ?? 0) < 3
|
|
8454
8488
|
][kind];
|
|
8455
8489
|
};
|
|
8456
8490
|
const p = players.find((o) => !o.state.down && wants(o) && within(o.state, at, .9));
|
|
8457
8491
|
if (p) {
|
|
8458
8492
|
const q = p.state;
|
|
8459
8493
|
const kit = kitOf(p.info.role, this.world.def);
|
|
8460
|
-
if (kind == 0) q.hp = Math.min(
|
|
8494
|
+
if (kind == 0) q.hp = Math.min(8, q.hp + 2);
|
|
8461
8495
|
else if (kind == 1) {
|
|
8462
8496
|
q.ammo = q.ammo < 0 ? -1 : Math.min(kit.ammo, q.ammo + 20);
|
|
8463
8497
|
q.rifle = (q.rifle ?? -1) < 0 ? -1 : Math.min(kit.rifle, q.rifle + 60);
|
|
8464
|
-
} else q.rail = Math.min(kit.rail, q.rail + 80);
|
|
8465
|
-
|
|
8498
|
+
} else if (kind == 2) q.rail = Math.min(kit.rail, q.rail + 80);
|
|
8499
|
+
else q.armor = 3;
|
|
8500
|
+
this.gone[k] = [
|
|
8501
|
+
20,
|
|
8502
|
+
10,
|
|
8503
|
+
20,
|
|
8504
|
+
10
|
|
8505
|
+
][kind] * 60;
|
|
8466
8506
|
}
|
|
8467
8507
|
});
|
|
8468
8508
|
}
|
|
@@ -8669,7 +8709,7 @@ var Room = class {
|
|
|
8669
8709
|
if (r.ship) r.nades = 0;
|
|
8670
8710
|
this.wear[this.rovers.indexOf(r)] = { ...NEW };
|
|
8671
8711
|
const killer = this.players().find((q) => q.info.id === by);
|
|
8672
|
-
for (const q of crew) this.harm(q,
|
|
8712
|
+
for (const q of crew) this.harm(q, Infinity, killer, FRAG.VEHICLE);
|
|
8673
8713
|
const hit = this.boom([
|
|
8674
8714
|
r.x,
|
|
8675
8715
|
r.y,
|
|
@@ -8721,7 +8761,7 @@ var Room = class {
|
|
|
8721
8761
|
foe.run = this.ticks;
|
|
8722
8762
|
p.state.hits = p.state.hits + 1 & 255;
|
|
8723
8763
|
const fell = felled(FALL$1.SHOT, r.vx, r.vz);
|
|
8724
|
-
const hp = closing < ROVER.SPLAT_KILL ? 1 :
|
|
8764
|
+
const hp = closing < ROVER.SPLAT_KILL ? 1 : Infinity;
|
|
8725
8765
|
if (!this.harm(foe, hp, p, FRAG.VEHICLE, fell)) {
|
|
8726
8766
|
const v = len(r.vx, r.vz);
|
|
8727
8767
|
stumble(foe.state, r.vx / v, r.vz / v);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Skin } from './skin';
|
|
2
|
+
import type { Out } from './verts';
|
|
2
3
|
/**
|
|
3
4
|
* A plate's region on the body at rest (metres, -z the front, +x the right): the part it is on,
|
|
4
5
|
* the heights it spans, and the angles round
|
|
@@ -235,6 +236,17 @@ export declare const REGIONS: Region[];
|
|
|
235
236
|
type Corner = number[];
|
|
236
237
|
/** The scratches' colours on coloured plates: the white under the paint, and paler. */
|
|
237
238
|
export declare const SCRATCHED: number[][];
|
|
239
|
+
/**
|
|
240
|
+
* A recipe: triangles of corners, each [skin triangle, its three weights, how far off the skin,
|
|
241
|
+
* the slope of the swell at rest (x, y, z), the normal at rest (x, y, z)], and per triangle its
|
|
242
|
+
* colour, layer, whether it is a wall (its normal its own, flat) and its region (-1: a scratch).
|
|
243
|
+
*/
|
|
244
|
+
interface Recipe {
|
|
245
|
+
c: number[];
|
|
246
|
+
t: number[];
|
|
247
|
+
/** The triangles each kind of wearer has (armor()'s `ninja`, astronaut and `bare` bits), listed on first use. */
|
|
248
|
+
k?: Int32Array[];
|
|
249
|
+
}
|
|
238
250
|
/**
|
|
239
251
|
* Her breasts on the shell (the user, 2026-11-12: a uniform dome each, a little bigger): a round
|
|
240
252
|
* dome each side, `h` out at its middle (x, y) and falling to nothing `r` away, smooth at its rim;
|
|
@@ -299,6 +311,8 @@ export declare const NINJA_DETAILS: number[][];
|
|
|
299
311
|
* down the front of each thigh plate.
|
|
300
312
|
*/
|
|
301
313
|
export declare const ASTRO_DETAILS: number[][];
|
|
314
|
+
/** The armour's recipe on the skin `s`, `fine` or not (armor()), made now if it is not yet: the close one takes a quarter of a second. */
|
|
315
|
+
export declare const prepare: (s: Skin, fine: boolean) => Recipe;
|
|
302
316
|
/**
|
|
303
317
|
* Appends the armour cut out of the skin `s` drawn into `out` from the float `from` on (skin()
|
|
304
318
|
* writes three vertices per triangle of s.t, in order). Not `fine` (a runner not close by), curved
|
|
@@ -306,5 +320,5 @@ export declare const ASTRO_DETAILS: number[][];
|
|
|
306
320
|
* plates' colour (their walls a shade darker): white when absent, the astronaut's, who has his own
|
|
307
321
|
* details in his team's colour `accent` too. The `ninja` wears his own armour.
|
|
308
322
|
*/
|
|
309
|
-
export declare const armor: (out:
|
|
323
|
+
export declare const armor: (out: Out, from: number, s: Skin, fine?: boolean, plate?: number[], ninja?: boolean, accent?: number[], bare?: boolean) => void;
|
|
310
324
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Light } from './lights';
|
|
2
2
|
import type { Vec3 } from './mesh';
|
|
3
|
+
import type { Out } from './verts';
|
|
3
4
|
/** A ball as drawn this frame: its centre, its unit direction, and the metres of trail behind it. */
|
|
4
5
|
export interface Orb {
|
|
5
6
|
p: Vec3;
|
|
@@ -52,7 +53,7 @@ export interface Tracer {
|
|
|
52
53
|
/** Ages everything by dt seconds and drops what is over. */
|
|
53
54
|
update(dt: number): void;
|
|
54
55
|
/** Appends the balls, the flashes, the bolts and the sparks, turned to the camera at `eye`. */
|
|
55
|
-
draw(out:
|
|
56
|
+
draw(out: Out, eye: Vec3): void;
|
|
56
57
|
/** The lights of the flashes, the splashes, the bolts and the nearest balls, for gather(). */
|
|
57
58
|
lights(): Light[];
|
|
58
59
|
}
|
|
@@ -3,6 +3,7 @@ import type { World } from '../shared/world';
|
|
|
3
3
|
import type { Vec3 } from './mesh';
|
|
4
4
|
import { solve } from './rig';
|
|
5
5
|
import type { Pose, Quat } from './rig';
|
|
6
|
+
import type { Out } from './verts';
|
|
6
7
|
export type Solved = ReturnType<typeof solve>;
|
|
7
8
|
export interface Body {
|
|
8
9
|
/** The own player's id, -1 before the first snapshot. */
|
|
@@ -24,7 +25,7 @@ export interface Body {
|
|
|
24
25
|
/** The joints for a camera at `eye`; undefined without a player, or with the camera away from the body. */
|
|
25
26
|
pose(eye: Vec3, yaw: number, pitch: number, roll?: number): Solved | undefined;
|
|
26
27
|
/** Appends the body's vertices (see STRIDE) in the jacket `color`; nothing when pose() has none. */
|
|
27
|
-
draw(out:
|
|
28
|
+
draw(out: Out, eye: Vec3, yaw: number, pitch: number, roll?: number, color?: number[]): void;
|
|
28
29
|
/** The own player's character (BUILD in rig.ts, PlayerInfo.body): the woman's arms are slimmer and her hands smaller, on the same grips; `tone` the skin he picked (the default's when absent). */
|
|
29
30
|
wear(build: number, tone?: number[], ninja?: boolean): void;
|
|
30
31
|
}
|
|
@@ -113,7 +114,7 @@ export declare const phalanges: (curl: number, i: number) => [Vec3, Vec3, Vec3];
|
|
|
113
114
|
* detail): fingerless from halfway along the middle phalanx, the bare tips in `bare` with a nail
|
|
114
115
|
* each; a hard shell over the knuckles, a padded plate on the back, a strap round the wrist.
|
|
115
116
|
*/
|
|
116
|
-
export declare const hand: (out:
|
|
117
|
+
export declare const hand: (out: Out, end: Vec3, f: Vec3, u: Vec3, th: Vec3, curl: number, tint: number[], point?: number, push?: number, to?: Vec3, bare?: number[],
|
|
117
118
|
/** 0 to 1: the thumb out of the fist to CUP, up the side of what the palm carries. */
|
|
118
119
|
cup?: number,
|
|
119
120
|
/** A near runner's hand: fewer sides, on the near sleeve's cuff, and none of the glove's small parts. */
|
|
@@ -131,7 +132,7 @@ export interface Grip {
|
|
|
131
132
|
* body and the runners share it, so a runner's fist closes on a grip as the own one does. `lite` is
|
|
132
133
|
* a near runner's hand, `skip` a hand not drawn (the one a cut took off with its arm).
|
|
133
134
|
*/
|
|
134
|
-
export declare const hands: (out:
|
|
135
|
+
export declare const hands: (out: Out, s: Solved, build: number, curls: number[], glove: number[], bare: number[], { point, push, to, cup }?: Grip, lite?: boolean, skip?: number) => void;
|
|
135
136
|
/** On a wall run the rail gun is put away, unless its bolt is going out. */
|
|
136
137
|
export declare const stowed: (p: PlayerState) => boolean;
|
|
137
138
|
export declare const createBody: (world?: World) => Body;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Vec3 } from './mesh';
|
|
2
2
|
import type { Quat } from './rig';
|
|
3
|
+
import type { Out } from './verts';
|
|
3
4
|
/** The height of its middle at rest, on the middle of the belt (0.99 to 1.03 m). */
|
|
4
5
|
export declare const BUCKLE_Y = 1.008;
|
|
5
6
|
/** Its radius and depth (m). */
|
|
6
7
|
export declare const BUCKLE: number[];
|
|
7
8
|
/** Appends the buckle for build b's pelvis at `at` turned by `q`, its middle in `team`. */
|
|
8
|
-
export declare const buckle: (out:
|
|
9
|
+
export declare const buckle: (out: Out, at: Vec3, q: Quat, b: number, team: number[]) => void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Rover } from '../shared/types';
|
|
2
2
|
import { WING } from '../shared/ship';
|
|
3
3
|
import type { Vec3 } from './mesh';
|
|
4
|
+
import type { Out } from './verts';
|
|
4
5
|
/**
|
|
5
6
|
* The ship's lines, metres ahead of the centre: the nose's tip and where its sensor starts, the
|
|
6
7
|
* foot of the windscreen (the nose ends there), the canopy's two arches, where the spine ends, and
|
|
@@ -44,4 +45,4 @@ export declare const legs: (r: Rover) => number;
|
|
|
44
45
|
* among the map's vehicles): scorched where it arcs; a wreck on its belly, its legs gone, charred,
|
|
45
46
|
* no light on it, falling apart at the end.
|
|
46
47
|
*/
|
|
47
|
-
export declare const craft: (out:
|
|
48
|
+
export declare const craft: (out: Out, state: Rover, rgb: number[], t: number, lod?: number, n?: number) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Door, World } from '../shared/world';
|
|
2
2
|
import type { Vec3 } from './mesh';
|
|
3
|
+
import type { Out } from './verts';
|
|
3
4
|
/** The strip of light: shut, then opening or open. */
|
|
4
5
|
export declare const LIGHT: number[][];
|
|
5
6
|
/**
|
|
@@ -7,7 +8,7 @@ export declare const LIGHT: number[][];
|
|
|
7
8
|
* a header, proud of the panels on both faces), and the two panels, each slid `open` of its width
|
|
8
9
|
* into the wall beside it.
|
|
9
10
|
*/
|
|
10
|
-
export declare const panels: (o:
|
|
11
|
+
export declare const panels: (o: Out, { min, max }: Door, open: number) => void;
|
|
11
12
|
export interface Doors {
|
|
12
13
|
/**
|
|
13
14
|
* The doors of a snapshot (Snapshot.doors): kept for the drawing and for the world's ray(), so an
|
|
@@ -18,7 +19,7 @@ export interface Doors {
|
|
|
18
19
|
at: Vec3;
|
|
19
20
|
}[];
|
|
20
21
|
/** The doors near `eye`, `dt` seconds after the last frame: each follows its snapshot's state. */
|
|
21
|
-
draw(o:
|
|
22
|
+
draw(o: Out, eye: Vec3, dt: number): void;
|
|
22
23
|
/** How far each is drawn open. */
|
|
23
24
|
shown(): number[];
|
|
24
25
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Vec3 } from './mesh';
|
|
2
|
+
import type { Out } from './verts';
|
|
2
3
|
/** Seconds a drop lies about, and the last of them it shrinks away in. */
|
|
3
4
|
export declare const LIFE: number, GONE: number;
|
|
4
5
|
/** Throws out `model`, its foot at `foot` with axes `ax` (as place() takes them), at speed `v` spinning by `w`, to fall to `floor`. */
|
|
@@ -8,6 +9,6 @@ export declare const drops: () => number;
|
|
|
8
9
|
/** Moves the drops on by `dt` seconds: falling, spinning, bouncing and settling on their floor. */
|
|
9
10
|
export declare const fall: (dt: number) => void;
|
|
10
11
|
/** Appends the drops, each shrinking away in its last GONE seconds. */
|
|
11
|
-
export declare const drawDrops: (out:
|
|
12
|
+
export declare const drawDrops: (out: Out) => void;
|
|
12
13
|
/** Forgets every drop (a new world). */
|
|
13
14
|
export declare const clearDrops: () => number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Rover } from '../shared/types';
|
|
2
2
|
import type { World } from '../shared/world';
|
|
3
3
|
import type { Vec3 } from './mesh';
|
|
4
|
+
import type { Out } from './verts';
|
|
4
5
|
/** Metres a second along the ground from which the wheels raise dust, and across the nose (a slide) from which they do at any speed. */
|
|
5
6
|
export declare const DUST_SPEED = 6;
|
|
6
7
|
export declare const DUST_SLIP = 2.5;
|
|
@@ -14,7 +15,7 @@ export interface Dust {
|
|
|
14
15
|
/** Moves the puffs by dt seconds, then lets the rovers' wheels throw new ones. */
|
|
15
16
|
update(rovers: Rover[], world: World, dt: number, eye?: Vec3): void;
|
|
16
17
|
/** Appends the puffs: each swells and thins as it flies. */
|
|
17
|
-
draw(out:
|
|
18
|
+
draw(out: Out): void;
|
|
18
19
|
/** Puffs in flight. */
|
|
19
20
|
readonly count: number;
|
|
20
21
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { FlagState, PlayerState } from '../shared/types';
|
|
2
2
|
import type { Vec3 } from './mesh';
|
|
3
3
|
import type { Quat } from './rig';
|
|
4
|
+
import type { Out } from './verts';
|
|
4
5
|
/** One flag to draw. */
|
|
5
6
|
export interface FlagDraw {
|
|
6
7
|
/** The team the flag belongs to: its colour. */
|
|
@@ -40,21 +41,23 @@ export interface CtfScene {
|
|
|
40
41
|
ammo?: readonly Vec3[];
|
|
41
42
|
/** The rail cells that are there to take. */
|
|
42
43
|
cells?: readonly Vec3[];
|
|
44
|
+
/** The armours that are there to take. */
|
|
45
|
+
vests?: readonly Vec3[];
|
|
43
46
|
}
|
|
44
47
|
/** The flags to draw from a snapshot: each at its base, where it lies, or on the back of its carrier (none if he is not drawn). */
|
|
45
48
|
export declare const flagDraws: (flags: readonly FlagState[], bases: readonly Vec3[], who: (id: number) => PlayerState | undefined) => FlagDraw[];
|
|
46
49
|
/** Makes the vertices from `from` on glow: the colour gets brighter by `k` and loses its shading. */
|
|
47
|
-
export declare const glow: (out:
|
|
50
|
+
export declare const glow: (out: Out, from: number, k: number) => void;
|
|
48
51
|
/** A triangle with its flat normal, of one colour (r, g, b). */
|
|
49
|
-
export declare const tri: (out:
|
|
52
|
+
export declare const tri: (out: Out, a: Vec3, b: Vec3, c: Vec3, [r, g, bl]: number[]) => void;
|
|
50
53
|
/** A ring between the radii r0 and r1 on the horizontal at `at`, facing up: SIDES quads. */
|
|
51
|
-
export declare const ring: (out:
|
|
54
|
+
export declare const ring: (out: Out, at: Vec3, r0: number, r1: number, rgb: number[]) => void;
|
|
52
55
|
/**
|
|
53
56
|
* A team's base at `at`: a low pad of the team colour under a glowing ring of FLAG_REACH, the
|
|
54
57
|
* radius within which a flag is touched and a capture counts. `t` is the clock in seconds: the
|
|
55
58
|
* ring pulses.
|
|
56
59
|
*/
|
|
57
|
-
export declare const base: (out:
|
|
60
|
+
export declare const base: (out: Out, at: Vec3, rgb: number[], t: number) => void;
|
|
58
61
|
/**
|
|
59
62
|
* A flag. At rest on its base it stands upright with the cloth blowing out to one side. On a
|
|
60
63
|
* carrier it is strapped to his back, from the belt up over his head, and leans and turns with
|
|
@@ -63,4 +66,4 @@ export declare const base: (out: number[], at: Vec3, rgb: number[], t: number) =
|
|
|
63
66
|
* Dropped, it lies on the ground, the pole leaning, with a ring on the ground where it is to be
|
|
64
67
|
* touched. `t` is the clock in seconds.
|
|
65
68
|
*/
|
|
66
|
-
export declare const flag: (out:
|
|
69
|
+
export declare const flag: (out: Out, f: FlagDraw, rgb: number[], t: number, chest?: [Vec3, Quat]) => void;
|
|
@@ -2,6 +2,7 @@ import type { PlayerState } from '../shared/types';
|
|
|
2
2
|
import type { World } from '../shared/world';
|
|
3
3
|
import type { Vec3 } from './mesh';
|
|
4
4
|
import type { Quat } from './rig';
|
|
5
|
+
import type { Out } from './verts';
|
|
5
6
|
/**
|
|
6
7
|
* The back of the body and the muzzle, the tip of the nose, in model space (the tail and the front of
|
|
7
8
|
* the emitter): the line through them is the gun's long axis, the way it points and the way the
|
|
@@ -133,7 +134,7 @@ export declare const thumbTo: (kind: number) => Vec3;
|
|
|
133
134
|
/** Weapon `kind`'s button for a model at `at` with axes [right, up, forward] (model -z forward): its top, and the way it faces. */
|
|
134
135
|
export declare const buttonAt: (kind: number, at: Vec3, [r, u, f]: Vec3[]) => Vec3[];
|
|
135
136
|
/** Appends weapon `kind`'s button in model space, pushed in by `push` (0 to 1) of 1.5 mm, its glow `rgb` lit by `light`. */
|
|
136
|
-
export declare const button: (out:
|
|
137
|
+
export declare const button: (out: Out, kind: number, push: number, light: number, rgb: number[]) => void;
|
|
137
138
|
/** When, in the swap of the gun or the rifle, the palm slaps the new battery home: it clicks then. */
|
|
138
139
|
export declare const TAP = 0.76;
|
|
139
140
|
/**
|
|
@@ -253,7 +254,7 @@ export declare const cellsOf: (p: Pick<PlayerState, "rail" | "cap">) => number[]
|
|
|
253
254
|
* given, and the charge gauge at `level`; its battery (capsule) where the swap has it, its glow and
|
|
254
255
|
* its counter dimmed with `light`, and the spark only when it is all on.
|
|
255
256
|
*/
|
|
256
|
-
export declare const held: (out:
|
|
257
|
+
export declare const held: (out: Out, pos: Vec3, q: Quat, lod: number, k?: number, ammo?: number, level?: number, kind?: boolean | number, t?: number, { light, swap, empty, screen, digits, cells, heat, hot, press, tune, nades, id, floor, vel, carry, }?: Lit) => void;
|
|
257
258
|
/** The muzzle of a gun (the rail gun's or the rifle's by `kind`) whose grip is at `at` and whose axes are [right, up, forward]. */
|
|
258
259
|
export declare const tip: (at: Vec3, [, u, f]: Vec3[], kind?: boolean | number) => Vec3;
|
|
259
260
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Quat } from './rig';
|
|
2
2
|
import type { Vec3 } from './mesh';
|
|
3
|
+
import type { Out } from './verts';
|
|
3
4
|
export declare const STYLE: {
|
|
4
5
|
readonly PONYTAIL: 0;
|
|
5
6
|
readonly BOB: 1;
|
|
@@ -26,4 +27,4 @@ export declare const sway: (phase: number, speed: number, t: number) => Vec3;
|
|
|
26
27
|
* Appends the hair `style` in `rgb` on the woman's head joint at `at` turned by `q` (see solve()),
|
|
27
28
|
* at level of detail `lod` (0 far), its loose end moved by `swing` (sway()).
|
|
28
29
|
*/
|
|
29
|
-
export declare const hair: (out:
|
|
30
|
+
export declare const hair: (out: Out, at: Vec3, q: Quat, style: number, rgb: number[], lod: number, swing?: Vec3) => void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Spot } from './helmet';
|
|
2
2
|
import type { Vec3 } from './mesh';
|
|
3
3
|
import type { Quat } from './rig';
|
|
4
|
+
import type { Out } from './verts';
|
|
4
5
|
/**
|
|
5
6
|
* The dome: its middle (the widest ring, level with the brow), its half width, height over the
|
|
6
7
|
* middle and depth, how square it is seen from above, how flat on top, and the height of its lip
|
|
@@ -84,4 +85,4 @@ export declare const PIT: {
|
|
|
84
85
|
* `at` turned by `q`, the frame of its T in `rgb`, the team's colour (0 to 1). The far one has no
|
|
85
86
|
* ear caps and no cheek plates.
|
|
86
87
|
*/
|
|
87
|
-
export declare const helm: (out:
|
|
88
|
+
export declare const helm: (out: Out, at: Vec3, q: Quat, rgb: number[], lod: number) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Vec3 } from './mesh';
|
|
2
2
|
import type { Quat } from './rig';
|
|
3
|
+
import type { Out } from './verts';
|
|
3
4
|
/**
|
|
4
5
|
* The shell, a superellipsoid in the head joint's frame: its centre and half width, height and
|
|
5
6
|
* depth, its exponents across (square seen from above) and up (flat on top), and its rim, the
|
|
@@ -47,14 +48,14 @@ export declare const unit: (v: Vec3) => Vec3;
|
|
|
47
48
|
/** A signed power: the superellipse's |t|^p keeping t's sign. */
|
|
48
49
|
export declare const pow: (t: number, p: number) => number;
|
|
49
50
|
/** A triangle over `p`, wound as its first normal faces, in `col` on `layer`; none if it has no area. */
|
|
50
|
-
export declare const face: (out:
|
|
51
|
+
export declare const face: (out: Out, col: number[], layer: number, p: Spot[]) => void;
|
|
51
52
|
/**
|
|
52
53
|
* Triangles between the rows of points `rows`, each a closed ring of n (the first and the last may
|
|
53
54
|
* be one point), in `col` on `layer`; wound as the normals face. Triangles of no area are left out.
|
|
54
55
|
*/
|
|
55
|
-
export declare const sheet: (rows: Spot[][], col: number[], layer: number, out?:
|
|
56
|
+
export declare const sheet: <T extends Out = number[]>(rows: Spot[][], col: number[], layer: number, out?: T) => T;
|
|
56
57
|
/** A flat quad over the corners `q` (in turn round it), facing `m`, in `col` on `layer`. */
|
|
57
|
-
export declare const quad: (out:
|
|
58
|
+
export declare const quad: (out: Out, q: Vec3[], m: Vec3, col: number[], layer?: number) => void;
|
|
58
59
|
/**
|
|
59
60
|
* A closed loft: `f(t, s)` the point at the turn t (0 to 1 round) of its ring s (0 to 1 along),
|
|
60
61
|
* `n` points round and the rows at `along`; the ends closed by a point at `ends` (its first and
|
|
@@ -72,4 +73,4 @@ export declare const inside: (u: number, y: number, k?: number) => boolean;
|
|
|
72
73
|
* `at` turned by `q` (see solve() in rig.ts), in `rgb`, the team's colour (0 to 1): the strips on
|
|
73
74
|
* the ear plates, which glow. The far helmet is the shell and the visor.
|
|
74
75
|
*/
|
|
75
|
-
export declare const helmet: (out:
|
|
76
|
+
export declare const helmet: (out: Out, at: Vec3, q: Quat, rgb: number[], lod: number) => void;
|
|
@@ -85,9 +85,10 @@ export interface Hud {
|
|
|
85
85
|
* holds, in the same count: big, with the rest after it as the magazines it makes (an open one for
|
|
86
86
|
* a part) over its count; faded while `swapping` it. `rifle` is the
|
|
87
87
|
* laser rifle's rounds (-1 none), shown with the glyph in red when `rifled` (slot 4), with the
|
|
88
|
-
* `nades` left in its launcher as dots after the count, hollow for the ones spent.
|
|
88
|
+
* `nades` left in its launcher as dots after the count, hollow for the ones spent. `armor` shows
|
|
89
|
+
* as gold pips after the health's, only the ones he has.
|
|
89
90
|
*/
|
|
90
|
-
vitals(hp: number, ammo: number, blade?: boolean, wield?: boolean, rail?: number, railed?: boolean, loaded?: number, swapping?: boolean, rifle?: number, rifled?: boolean, nades?: number): void;
|
|
91
|
+
vitals(hp: number, ammo: number, blade?: boolean, wield?: boolean, rail?: number, railed?: boolean, loaded?: number, swapping?: boolean, rifle?: number, rifled?: boolean, nades?: number, armor?: number): void;
|
|
91
92
|
/** A hit marker on the crosshair for a moment: a ball or a cut of the own player hit. */
|
|
92
93
|
hit(): void;
|
|
93
94
|
/** The face over the health, frame `n` of face.ts (-1 hides it). */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PlayerState } from '../shared/types';
|
|
2
2
|
import type { Vec3 } from './mesh';
|
|
3
3
|
import type { Quat } from './rig';
|
|
4
|
+
import type { Out } from './verts';
|
|
4
5
|
/** Where the blade starts and ends along the model's forward axis, metres from the right hand: a metre from the guard to the point. */
|
|
5
6
|
export declare const BASE: number, TIP: number;
|
|
6
7
|
/** The left hand grips this far behind the right one: a gap between the two fists. */
|
|
@@ -14,12 +15,12 @@ export declare const S: number, C: number;
|
|
|
14
15
|
*/
|
|
15
16
|
export declare const katana: (lod: number) => number[];
|
|
16
17
|
/** Appends arcs of lightning flickering along the blade at the clock `t` (s): a few zigzags of thin crossed ribbons, each new every 70 ms. */
|
|
17
|
-
export declare const arcs: (out:
|
|
18
|
+
export declare const arcs: (out: Out, at: Vec3, [r, u, f]: Vec3[], t: number, lod: number, k?: number) => void;
|
|
18
19
|
/**
|
|
19
20
|
* Appends the katana with its right-hand grip at `at`, axes `[right, up, forward]`, `k` times its
|
|
20
21
|
* size; with the clock `t` (s) it crackles, once its glow is all on (`light`, 0 off to 1).
|
|
21
22
|
*/
|
|
22
|
-
export declare const sword: (out:
|
|
23
|
+
export declare const sword: (out: Out, at: Vec3, ax: Vec3[], lod: number, t?: number, k?: number, light?: number, press?: number) => void;
|
|
23
24
|
/** The sword's axes [right, up, forward] for a hand turned by `q` (see body.ts): the back of the hand to its right, the blade off the thumb toward the fingers. */
|
|
24
25
|
export declare const axes: (q: Quat) => Vec3[];
|
|
25
26
|
/** Where the fingers point for a sword with axes `ax`: the inverse of axes(). */
|
|
@@ -27,7 +28,7 @@ export declare const fingers: ([, u, f]: Vec3[]) => Vec3;
|
|
|
27
28
|
/** The right and the left wrist for a sword with its right-hand grip at `at`: the left hand is BEHIND the right one, mirrored. */
|
|
28
29
|
export declare const wrists: (at: Vec3, ax: Vec3[]) => Vec3[];
|
|
29
30
|
/** Appends the katana held in the right hand at `pos` turned by `q`. */
|
|
30
|
-
export declare const held: (out:
|
|
31
|
+
export declare const held: (out: Out, pos: Vec3, q: Quat, lod: number, t?: number, k?: number, light?: number, press?: number) => void;
|
|
31
32
|
/** The root of the blade and its point, in the world, for the hand at `pos` turned by `q`. */
|
|
32
33
|
export declare const ends: (pos: Vec3, q: Quat) => Vec3[];
|
|
33
34
|
/**
|
|
@@ -5,6 +5,7 @@ import type { Gait } from './gait';
|
|
|
5
5
|
import type { Vec3 } from './mesh';
|
|
6
6
|
import { solve } from './rig';
|
|
7
7
|
import type { Quat } from './rig';
|
|
8
|
+
import type { Out } from './verts';
|
|
8
9
|
/** How closed the hand of an arm cut off is (hand() in body.ts). */
|
|
9
10
|
export declare const LIMP = 0.35;
|
|
10
11
|
/** The height of the floor under (x, z) for something whose middle is at height y. */
|
|
@@ -55,4 +56,4 @@ export declare const track: (r: {
|
|
|
55
56
|
* Appends the piece at level of detail `lod`, in `colors` (see palette()), sunk by `sink` metres with
|
|
56
57
|
* the body; an arm with its hand, limp, in a space suit's glove on `suit`.
|
|
57
58
|
*/
|
|
58
|
-
export declare const piece: (out:
|
|
59
|
+
export declare const piece: (out: Out, c: Piece, colors: number[][], lod: number, sink: number, face?: ArrayLike<number>, suit?: boolean) => void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Quat } from './rig';
|
|
2
2
|
import type { Vec3 } from './mesh';
|
|
3
3
|
import type { Skin } from './skin';
|
|
4
|
+
import type { Out } from './verts';
|
|
4
5
|
/** The suit's and the hood's black, a touch of blue in it; the guard's rim, a shade lighter; the disc's ink. */
|
|
5
6
|
export declare const CLOTH: number[];
|
|
6
7
|
/**
|
|
@@ -20,6 +21,8 @@ export declare const MOUTH: {
|
|
|
20
21
|
* the neck and the skin at the neck's foot, but the opening round the eyes, soft at its edge), and
|
|
21
22
|
* the face under the guard pressed in behind it.
|
|
22
23
|
*/
|
|
23
|
-
export declare const dress: (out:
|
|
24
|
+
export declare const dress: (out: Out, from: number, s: Skin, at: Vec3, q: Quat, build?: number) => void;
|
|
24
25
|
/** Appends the guard and the ideograms on the head joint at `at` turned by `q` (see solve()), on the woman's smaller head with `build`, in the team's `color`. */
|
|
25
|
-
export declare const mask: (out:
|
|
26
|
+
export declare const mask: (out: Out, at: Vec3, q: Quat, build?: number, color?: number[],
|
|
27
|
+
/** A far runner's: fewer quads. */
|
|
28
|
+
far?: boolean) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Out } from './verts';
|
|
1
2
|
export type Vec3 = [number, number, number];
|
|
2
3
|
export declare const sub: (a: Vec3, b: Vec3) => Vec3;
|
|
3
4
|
export declare const add: (a: Vec3, b: Vec3) => Vec3;
|
|
@@ -67,9 +68,9 @@ export declare const solid: (lod: number, len: number, radii: number[], ends?: [
|
|
|
67
68
|
* so an ellipsoid made of a sphere shades like one. Written without allocations: a body is placed
|
|
68
69
|
* a thousand vertices at a time.
|
|
69
70
|
*/
|
|
70
|
-
export declare const place: (out:
|
|
71
|
+
export declare const place: (out: Out, src: number[], eye: Vec3, [r, u, f]: Vec3[], off: Vec3, k: number | Vec3, tint?: number[]) => void;
|
|
71
72
|
/** Dims by `k` the glow (layer -2) of the vertices of `out` from the float `from` on: a light that is off, or coming on. */
|
|
72
|
-
export declare const dim: (out:
|
|
73
|
+
export declare const dim: (out: Out, from: number, k: number) => void;
|
|
73
74
|
/**
|
|
74
75
|
* Axes [r, u, f] with f along the unit vector `to` and r as near `side` as it can be: the frame of
|
|
75
76
|
* a bone, which `place` takes. Right-handed like `basis`.
|
|
@@ -80,4 +81,4 @@ export declare const aim: (to: Vec3, side: Vec3) => [Vec3, Vec3, Vec3];
|
|
|
80
81
|
* them, `k` wide (a number, or across `side` and across the other way), `side` being where
|
|
81
82
|
* its x axis points as near as it can.
|
|
82
83
|
*/
|
|
83
|
-
export declare const segment: (out:
|
|
84
|
+
export declare const segment: (out: Out, src: number[], a: Vec3, b: Vec3, side: Vec3, len: number, k?: number | [number, number], tint?: number[]) => void;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import type { Brush, WorldDef } from '../shared/world';
|
|
2
2
|
import type { Vec3 } from './mesh';
|
|
3
|
+
import type { Out } from './verts';
|
|
3
4
|
/** A model whose length runs up (y): the frame place() takes. */
|
|
4
5
|
export declare const UP: Vec3[];
|
|
5
6
|
export declare const cross: (u: Vec3, v: Vec3) => Vec3;
|
|
6
7
|
/** A convex polygon of one colour, wound so that it faces away from `away` when given. */
|
|
7
|
-
export declare const face: (o:
|
|
8
|
+
export declare const face: (o: Out, p: Vec3[], rgb: number[], away?: Vec3) => void;
|
|
8
9
|
/** A box of one colour between two corners, its faces outward, less those whose bit is in `skip`: 1 and 2 its low and high z, 4 and 8 y, 16 and 32 x. */
|
|
9
|
-
export declare const box: (o:
|
|
10
|
+
export declare const box: (o: Out, lo: Vec3, hi: Vec3, rgb: number[], skip?: number) => void;
|
|
10
11
|
/** Carries a model's vertices to (x, y, z), turned by `yaw` about y. */
|
|
11
|
-
export declare const put: (o:
|
|
12
|
+
export declare const put: (o: Out, v: number[], [x, y, z]: Vec3, yaw?: number) => void;
|
|
12
13
|
/** What `make` adds to `o` glows, k times its colour. */
|
|
13
|
-
export declare const lit: (o:
|
|
14
|
+
export declare const lit: (o: Out, k: number, make: () => void) => void;
|
|
14
15
|
/** The beams over the doorways of the modules. */
|
|
15
16
|
export declare const LINTELS: Brush[];
|
|
16
17
|
/**
|
|
@@ -23,7 +24,7 @@ export declare const INDOORS: number[];
|
|
|
23
24
|
/** The openings of the drawn drum, as angles about the centre and a height: the door, and the tubes' boxes where they come through. */
|
|
24
25
|
export declare const GAPS: number[][];
|
|
25
26
|
/** Red's half of the base: the dome, its hall, the tubes and the modules, a metal floor in the last two, a lit frame in each of their doorways. */
|
|
26
|
-
export declare const moonbase: (o:
|
|
27
|
+
export declare const moonbase: (o: Out) => void;
|
|
27
28
|
/**
|
|
28
29
|
* The base's furnishing, both halves, which render.ts draws beside the scenery: the flags' daises
|
|
29
30
|
* (the ghosts with a team tint, shared/moon.ts) as the hall's fittings but in their tint, `keys`
|