chore: add eslint, remove dead variables, pin line endings (P0-4)
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
}
|
||||
const saw = (x, z, phase) => ({ x, z, r: 0.95, period: 6, on: 2.2, phase });
|
||||
const flame = (x, z, phase) => ({ x, z, hw: 0.9, hd: 0.9, period: 7, on: 1.8, phase });
|
||||
const saw2 = saw, flame2 = flame;
|
||||
const block = (kind, x, z, hw, hd, h2) => ({ kind, x, z, hw, hd, h: h2 || 0.8 });
|
||||
const belt = (x, z, hw, hd, ax, az, force) => ({ x, z, hw, hd, ax, az, force });
|
||||
const ram = (x, z, hw, hd, nx, nz, phase) => ({ x, z, hw, hd, nx, nz, period: 5, on: 1.3, phase });
|
||||
|
||||
@@ -661,7 +661,6 @@
|
||||
|
||||
// per-frame robot animation from the combat state
|
||||
function poseRobot(R, r, dt) {
|
||||
const w = R.st.weapon;
|
||||
R.root.position.set(r.x, r.y, r.z);
|
||||
R.root.rotation.y = -r.a;
|
||||
// upside down when flipped
|
||||
@@ -759,7 +758,7 @@
|
||||
const scene_add = o => group.add(o);
|
||||
scene.background = new T.Color(th.bg);
|
||||
scene.fog = new T.Fog(th.fog, half * 3, half * 5.5);
|
||||
const { key, rimA, rimB, flashLight } = out.lights;
|
||||
const { key, rimA, rimB } = out.lights;
|
||||
const sc = Math.max(11, half + 3);
|
||||
Object.assign(key.shadow.camera, { left: -sc, right: sc, top: sc, bottom: -sc }); key.shadow.camera.updateProjectionMatrix();
|
||||
rimA.color.setHex(th.rimA); rimA.position.set(-half - 1, 5, half + 1); rimA.distance = half * 2.6;
|
||||
@@ -1343,7 +1342,6 @@
|
||||
|
||||
// ---- intro: dark arena -> floodlights flicker on -> camera sweeps up -> two robots are lowered in
|
||||
const INTRO_END = RC.INTRO_END = 5.2;
|
||||
const ease = u => (u < 0.5 ? 2 * u * u : 1 - Math.pow(-2 * u + 2, 2) / 2);
|
||||
function lightsOn(k) {
|
||||
const L = arena.lights;
|
||||
L.key.intensity = 1.25 * k; L.rimA.intensity = 1.1 * k; L.rimB.intensity = 0.9 * k;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
// ready-made [body, accent] combinations
|
||||
RC.SCHEMES = [[0xff7a1a, 0x15171b], [0x15171b, 0xff7a1a], [0x2a6fd8, 0xe6e6e6], [0xd8452b, 0xf2c230],
|
||||
[0x5fae3b, 0x15171b], [0x6a3fb0, 0xf2c230], [0xe6e6e6, 0xd8452b], [0x3a3d44, 0x2e9c8f]];
|
||||
const hex = n => '#' + (n >>> 0).toString(16).padStart(6, '0');
|
||||
const SELL = 0.5;
|
||||
const HOTKEY = { weapon: 'hk_weapon', tower: 'hk_tower', gadget: 'hk_gadget' };
|
||||
const GLYPH = { chassis: '🧱', motor: '⚙️', wheels: '🛞', battery: '🔋', armour: '🛡️', weapon: '🪓', tower: '🔥', gadget: '🧰' };
|
||||
|
||||
Reference in New Issue
Block a user