refactor: tsconfig paths

This commit is contained in:
Dan Finch 2026-08-24 15:54:44 +02:00
parent acbb4e9d98
commit 85a44235d3
25 changed files with 108 additions and 108 deletions

View file

@ -1,11 +1,11 @@
import { Terrain, type Terrain as Ground } from "../../../engine/world/Terrain"
import { Mesh, type Mesh as Geometry } from "../../../engine/scene/Mesh"
import type { Material } from "../../../engine/render/Material"
import type { ActorDefinition } from "../../../engine/scene/Actor"
import { Mob, type MobState } from "../Mob"
import { Terrain } from "engine/world/Terrain"
import { Mesh, type Mesh as Geometry } from "engine/scene/Mesh"
import type { Material } from "engine/render/Material"
import type { ActorDefinition } from "engine/scene/Actor"
import { Mob, type MobState } from "game/actors/Mob"
import { ellipsoid, nextRand, ovoidZ, wanderHeading, wing } from "./mobkit"
export type Bee = ActorDefinition<MobState, Ground>
export type Bee = ActorDefinition<MobState, Terrain>
export namespace Bee {
export function create(material: Material): Bee {
@ -43,7 +43,7 @@ function build(mesh: Geometry): void {
wing(mesh, -1, 0.83, 0.99, 0, 1)
}
function update(mob: MobState, dt: number, terrain: Ground): void {
function update(mob: MobState, dt: number, terrain: Terrain): void {
mob.phase += dt
mob.timer -= dt
if (mob.timer <= 0) {

View file

@ -1,13 +1,13 @@
import { Terrain, type Terrain as Ground } from "../../../engine/world/Terrain"
import { Mesh, type Mesh as Geometry } from "../../../engine/scene/Mesh"
import type { Material } from "../../../engine/render/Material"
import type { ActorDefinition } from "../../../engine/scene/Actor"
import { Mob, type MobState } from "../Mob"
import { Terrain } from "engine/world/Terrain"
import { Mesh, type Mesh as Geometry } from "engine/scene/Mesh"
import type { Material } from "engine/render/Material"
import type { ActorDefinition } from "engine/scene/Actor"
import { Mob, type MobState } from "game/actors/Mob"
import { ellipsoid, nextRand, wanderHeading } from "./mobkit"
// Everything about the frog: squat, ground-bound, sits then springs a ballistic hop.
export type Frog = ActorDefinition<MobState, Ground>
export type Frog = ActorDefinition<MobState, Terrain>
export namespace Frog {
export function create(material: Material): Frog {
@ -44,7 +44,7 @@ function build(mesh: Geometry): void {
ellipsoid(mesh, -0.3, 0.2, -0.26, 0.2, 0.2, 0.26, 4, 3, 0, 0.68, 0, 1)
}
function update(mob: MobState, dt: number, terrain: Ground): void {
function update(mob: MobState, dt: number, terrain: Terrain): void {
if (mob.grounded) {
mob.timer -= dt
mob.position.y = Terrain.height(terrain, mob.position.x, mob.position.z)

View file

@ -1,14 +1,14 @@
import { Terrain, type Terrain as Ground } from "../../../engine/world/Terrain"
import { Mesh, type Mesh as Geometry } from "../../../engine/scene/Mesh"
import type { Material } from "../../../engine/render/Material"
import type { ActorDefinition } from "../../../engine/scene/Actor"
import { Terrain } from "engine/world/Terrain"
import { Mesh, type Mesh as Geometry } from "engine/scene/Mesh"
import type { Material } from "engine/render/Material"
import type { ActorDefinition } from "engine/scene/Actor"
import { Mob, type MobState } from "../Mob"
import { ellipsoid, nextRand, wanderHeading } from "./mobkit"
// Everything about the robin: round red-breasted bird that mostly hops like a frog
// but now and then takes a short powered flight to a new perch.
export type Robin = ActorDefinition<MobState, Ground>
export type Robin = ActorDefinition<MobState, Terrain>
export namespace Robin {
export function create(material: Material): Robin {
@ -53,7 +53,7 @@ function build(mesh: Geometry): void {
ellipsoid(mesh, 0, 0.26, -0.32, 0.09, 0.05, 0.16, 4, 2, 0, 0.38, 0, 1) // tail (brown)
}
function update(mob: MobState, dt: number, terrain: Ground): void {
function update(mob: MobState, dt: number, terrain: Terrain): void {
if (mob.grounded) {
mob.timer -= dt
mob.position.y = Terrain.height(terrain, mob.position.x, mob.position.z)

View file

@ -1,5 +1,5 @@
import type { MobState } from "../Mob"
import { STRIDE, type Mesh } from "../../../engine/scene/Mesh"
import { STRIDE, type Mesh } from "engine/scene/Mesh"
// Shared building blocks for concrete mob definitions: faceted geometry primitives
// and deterministic wander helpers.