refactor: tsconfig paths
This commit is contained in:
parent
acbb4e9d98
commit
85a44235d3
25 changed files with 108 additions and 108 deletions
|
|
@ -1,20 +1,20 @@
|
||||||
import type { Texture } from "../engine/render/Texture"
|
import type { Texture } from "engine/render/Texture"
|
||||||
import type { Textures } from "../game/textures"
|
import type { Textures } from "game/textures"
|
||||||
import barkUrl from "../assets/bark.png"
|
import barkUrl from "assets/bark.png"
|
||||||
import beeUrl from "../assets/bee.png"
|
import beeUrl from "assets/bee.png"
|
||||||
import birchUrl from "../assets/birch.png"
|
import birchUrl from "assets/birch.png"
|
||||||
import crateUrl from "../assets/crate.png"
|
import crateUrl from "assets/crate.png"
|
||||||
import floorUrl from "../assets/floor.png"
|
import floorUrl from "assets/floor.png"
|
||||||
import flowerUrl from "../assets/flower.png"
|
import flowerUrl from "assets/flower.png"
|
||||||
import frogUrl from "../assets/frog.png"
|
import frogUrl from "assets/frog.png"
|
||||||
import grassUrl from "../assets/grass.png"
|
import grassUrl from "assets/grass.png"
|
||||||
import leafUrl from "../assets/leaf.png"
|
import leafUrl from "assets/leaf.png"
|
||||||
import needleUrl from "../assets/needle.png"
|
import needleUrl from "assets/needle.png"
|
||||||
import npcUrl from "../assets/npc.png"
|
import npcUrl from "assets/npc.png"
|
||||||
import robinUrl from "../assets/robin.png"
|
import robinUrl from "assets/robin.png"
|
||||||
import rockUrl from "../assets/rock.png"
|
import rockUrl from "assets/rock.png"
|
||||||
import skyboxUrl from "../assets/rockies.skybox.png"
|
import skyboxUrl from "assets/rockies.skybox.png"
|
||||||
import wallUrl from "../assets/wall.png"
|
import wallUrl from "assets/wall.png"
|
||||||
|
|
||||||
/** Load every game texture up front. Call once before starting the loop. */
|
/** Load every game texture up front. Call once before starting the loop. */
|
||||||
export async function loadTextures(): Promise<Textures> {
|
export async function loadTextures(): Promise<Textures> {
|
||||||
|
|
|
||||||
14
app/main.ts
14
app/main.ts
|
|
@ -1,14 +1,14 @@
|
||||||
import { RenderConfig } from "../engine/render/RenderConfig"
|
import { RenderConfig } from "engine/render/RenderConfig"
|
||||||
import { RenderScene, type RenderInstance } from "../engine/render/RenderScene"
|
import { RenderScene, type RenderInstance } from "engine/render/RenderScene"
|
||||||
import { Camera } from "../engine/scene/Camera"
|
import { Camera } from "engine/scene/Camera"
|
||||||
import {
|
import {
|
||||||
CharacterController,
|
CharacterController,
|
||||||
type CharacterInput,
|
type CharacterInput,
|
||||||
} from "../engine/world/CharacterController"
|
} from "engine/world/CharacterController"
|
||||||
import { Level } from "../engine/world/Level"
|
import { Level } from "engine/world/Level"
|
||||||
import { loadTextures } from "./assets"
|
import { loadTextures } from "./assets"
|
||||||
import { buildLevel } from "../game/level"
|
import { buildLevel } from "game/level"
|
||||||
import { Player, type Player as PlayerState } from "../game/player"
|
import { Player, type Player as PlayerState } from "game/player"
|
||||||
import { createRenderer } from "./renderer"
|
import { createRenderer } from "./renderer"
|
||||||
|
|
||||||
const FOV_DEGREES = 75
|
const FOV_DEGREES = 75
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { Framebuffer } from "../engine/render/Framebuffer"
|
import type { Framebuffer } from "engine/render/Framebuffer"
|
||||||
import { RenderProtocol, type RenderWorkerInit } from "../engine/render/RenderProtocol"
|
import { RenderProtocol, type RenderWorkerInit } from "engine/render/RenderProtocol"
|
||||||
import { RenderScene, type RenderInstance } from "../engine/render/RenderScene"
|
import { RenderScene, type RenderInstance } from "engine/render/RenderScene"
|
||||||
|
|
||||||
const ctx = globalThis as unknown as {
|
const ctx = globalThis as unknown as {
|
||||||
addEventListener: (
|
addEventListener: (
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import { Framebuffer } from "../engine/render/Framebuffer"
|
import { Framebuffer } from "engine/render/Framebuffer"
|
||||||
import type { RenderConfig } from "../engine/render/RenderConfig"
|
import type { RenderConfig } from "engine/render/RenderConfig"
|
||||||
import type { Mat4 } from "../engine/math/Mat4"
|
import type { Mat4 } from "engine/math/Mat4"
|
||||||
import type { Camera } from "../engine/scene/Camera"
|
import type { Camera } from "engine/scene/Camera"
|
||||||
import { RenderProtocol, type RenderWorkerInit } from "../engine/render/RenderProtocol"
|
import { RenderProtocol, type RenderWorkerInit } from "engine/render/RenderProtocol"
|
||||||
import { RenderScene, type RenderInstance } from "../engine/render/RenderScene"
|
import { RenderScene, type RenderInstance } from "engine/render/RenderScene"
|
||||||
|
|
||||||
/** Clouds are drawn at 1/SKY_STEP resolution (the sky base + sun stay per-pixel);
|
/** Clouds are drawn at 1/SKY_STEP resolution (the sky base + sun stay per-pixel);
|
||||||
* band splits align to it so the cloud block grid stays seamless across workers. */
|
* band splits align to it so the cloud block grid stays seamless across workers. */
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { Vec3 } from "../../engine/math/Vec3"
|
import type { Vec3 } from "engine/math/Vec3"
|
||||||
import { STRIDE, type Mesh } from "../../engine/scene/Mesh"
|
import { STRIDE, type Mesh } from "engine/scene/Mesh"
|
||||||
import type { Material } from "../../engine/render/Material"
|
import type { Material } from "engine/render/Material"
|
||||||
import type { Prefab } from "../../engine/scene/Prefab"
|
import type { Prefab } from "engine/scene/Prefab"
|
||||||
|
|
||||||
const TAU = Math.PI * 2
|
const TAU = Math.PI * 2
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { Vec3 } from "../../engine/math/Vec3"
|
import type { Vec3 } from "engine/math/Vec3"
|
||||||
import { STRIDE, type Mesh } from "../../engine/scene/Mesh"
|
import { STRIDE, type Mesh } from "engine/scene/Mesh"
|
||||||
import type { Material } from "../../engine/render/Material"
|
import type { Material } from "engine/render/Material"
|
||||||
import type { Prefab } from "../../engine/scene/Prefab"
|
import type { Prefab } from "engine/scene/Prefab"
|
||||||
|
|
||||||
const TAU = Math.PI * 2
|
const TAU = Math.PI * 2
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { Vec3 } from "../../engine/math/Vec3"
|
import type { Vec3 } from "engine/math/Vec3"
|
||||||
import { Mesh } from "../../engine/scene/Mesh"
|
import { Mesh } from "engine/scene/Mesh"
|
||||||
import type { Material } from "../../engine/render/Material"
|
import type { Material } from "engine/render/Material"
|
||||||
import type { Prefab } from "../../engine/scene/Prefab"
|
import type { Prefab } from "engine/scene/Prefab"
|
||||||
|
|
||||||
const TAU = Math.PI * 2
|
const TAU = Math.PI * 2
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import type { Vec3 } from "../../engine/math/Vec3"
|
import type { Vec3 } from "engine/math/Vec3"
|
||||||
import type { Actor } from "../../engine/scene/Actor"
|
import type { Actor } from "engine/scene/Actor"
|
||||||
import type { RenderTransform } from "../../engine/render/RenderScene"
|
import type { RenderTransform } from "engine/render/RenderScene"
|
||||||
import type { BoxCollider } from "../../engine/world/Collider"
|
import type { BoxCollider } from "engine/world/Collider"
|
||||||
import type { Terrain } from "../../engine/world/Terrain"
|
import type { Terrain } from "engine/world/Terrain"
|
||||||
|
|
||||||
/** Runtime actor using shared roaming-creature state. Concrete definitions are
|
/** Runtime actor using shared roaming-creature state. Concrete definitions are
|
||||||
* direct object references supplied by Frog, Bee, Robin, or future content. */
|
* direct object references supplied by Frog, Bee, Robin, or future content. */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import type { Vec3 } from "../../engine/math/Vec3"
|
import type { Vec3 } from "engine/math/Vec3"
|
||||||
|
|
||||||
/** One procedural tree instance. `growth` 0..1 runs sapling -> full grown: it scales
|
/** One procedural tree instance. `growth` 0..1 runs sapling -> full grown: it scales
|
||||||
* height and girth and adds canopy blobs / tiers. `seed` drives the per-tree random
|
* height and girth and adds canopy blobs / tiers. `seed` drives the per-tree random
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
import { Terrain, type Terrain as Ground } from "../../../engine/world/Terrain"
|
import { Terrain } from "engine/world/Terrain"
|
||||||
import { Mesh, type Mesh as Geometry } from "../../../engine/scene/Mesh"
|
import { Mesh, type Mesh as Geometry } from "engine/scene/Mesh"
|
||||||
import type { Material } from "../../../engine/render/Material"
|
import type { Material } from "engine/render/Material"
|
||||||
import type { ActorDefinition } from "../../../engine/scene/Actor"
|
import type { ActorDefinition } from "engine/scene/Actor"
|
||||||
import { Mob, type MobState } from "../Mob"
|
import { Mob, type MobState } from "game/actors/Mob"
|
||||||
import { ellipsoid, nextRand, ovoidZ, wanderHeading, wing } from "./mobkit"
|
import { ellipsoid, nextRand, ovoidZ, wanderHeading, wing } from "./mobkit"
|
||||||
|
|
||||||
export type Bee = ActorDefinition<MobState, Ground>
|
export type Bee = ActorDefinition<MobState, Terrain>
|
||||||
|
|
||||||
export namespace Bee {
|
export namespace Bee {
|
||||||
export function create(material: Material): 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)
|
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.phase += dt
|
||||||
mob.timer -= dt
|
mob.timer -= dt
|
||||||
if (mob.timer <= 0) {
|
if (mob.timer <= 0) {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
import { Terrain, type Terrain as Ground } from "../../../engine/world/Terrain"
|
import { Terrain } from "engine/world/Terrain"
|
||||||
import { Mesh, type Mesh as Geometry } from "../../../engine/scene/Mesh"
|
import { Mesh, type Mesh as Geometry } from "engine/scene/Mesh"
|
||||||
import type { Material } from "../../../engine/render/Material"
|
import type { Material } from "engine/render/Material"
|
||||||
import type { ActorDefinition } from "../../../engine/scene/Actor"
|
import type { ActorDefinition } from "engine/scene/Actor"
|
||||||
import { Mob, type MobState } from "../Mob"
|
import { Mob, type MobState } from "game/actors/Mob"
|
||||||
import { ellipsoid, nextRand, wanderHeading } from "./mobkit"
|
import { ellipsoid, nextRand, wanderHeading } from "./mobkit"
|
||||||
|
|
||||||
// Everything about the frog: squat, ground-bound, sits then springs a ballistic hop.
|
// 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 namespace Frog {
|
||||||
export function create(material: Material): 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)
|
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) {
|
if (mob.grounded) {
|
||||||
mob.timer -= dt
|
mob.timer -= dt
|
||||||
mob.position.y = Terrain.height(terrain, mob.position.x, mob.position.z)
|
mob.position.y = Terrain.height(terrain, mob.position.x, mob.position.z)
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
import { Terrain, type Terrain as Ground } from "../../../engine/world/Terrain"
|
import { Terrain } from "engine/world/Terrain"
|
||||||
import { Mesh, type Mesh as Geometry } from "../../../engine/scene/Mesh"
|
import { Mesh, type Mesh as Geometry } from "engine/scene/Mesh"
|
||||||
import type { Material } from "../../../engine/render/Material"
|
import type { Material } from "engine/render/Material"
|
||||||
import type { ActorDefinition } from "../../../engine/scene/Actor"
|
import type { ActorDefinition } from "engine/scene/Actor"
|
||||||
import { Mob, type MobState } from "../Mob"
|
import { Mob, type MobState } from "../Mob"
|
||||||
import { ellipsoid, nextRand, wanderHeading } from "./mobkit"
|
import { ellipsoid, nextRand, wanderHeading } from "./mobkit"
|
||||||
|
|
||||||
// Everything about the robin: round red-breasted bird that mostly hops like a frog
|
// 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.
|
// 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 namespace Robin {
|
||||||
export function create(material: Material): 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)
|
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) {
|
if (mob.grounded) {
|
||||||
mob.timer -= dt
|
mob.timer -= dt
|
||||||
mob.position.y = Terrain.height(terrain, mob.position.x, mob.position.z)
|
mob.position.y = Terrain.height(terrain, mob.position.x, mob.position.z)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import type { MobState } from "../Mob"
|
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
|
// Shared building blocks for concrete mob definitions: faceted geometry primitives
|
||||||
// and deterministic wander helpers.
|
// and deterministic wander helpers.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Vec3 } from "../../../engine/math/Vec3"
|
import { Vec3 } from "engine/math/Vec3"
|
||||||
import type { Mesh } from "../../../engine/scene/Mesh"
|
import type { Mesh } from "engine/scene/Mesh"
|
||||||
import type { Material } from "../../../engine/render/Material"
|
import type { Material } from "engine/render/Material"
|
||||||
import type { Prefab } from "../../../engine/scene/Prefab"
|
import type { Prefab } from "engine/scene/Prefab"
|
||||||
import type { Tree } from "../Tree"
|
import type { Tree } from "../Tree"
|
||||||
import { blob, lerp, limb, TAU, rng } from "./treekit"
|
import { blob, lerp, limb, TAU, rng } from "./treekit"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Vec3 } from "../../../engine/math/Vec3"
|
import { Vec3 } from "engine/math/Vec3"
|
||||||
import type { Mesh } from "../../../engine/scene/Mesh"
|
import type { Mesh } from "engine/scene/Mesh"
|
||||||
import type { Material } from "../../../engine/render/Material"
|
import type { Material } from "engine/render/Material"
|
||||||
import type { Prefab } from "../../../engine/scene/Prefab"
|
import type { Prefab } from "engine/scene/Prefab"
|
||||||
import type { Tree } from "../Tree"
|
import type { Tree } from "../Tree"
|
||||||
import { blob, lerp, limb, TAU, rng } from "./treekit"
|
import { blob, lerp, limb, TAU, rng } from "./treekit"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { Mesh } from "../../../engine/scene/Mesh"
|
import type { Mesh } from "engine/scene/Mesh"
|
||||||
import type { Material } from "../../../engine/render/Material"
|
import type { Material } from "engine/render/Material"
|
||||||
import type { Prefab } from "../../../engine/scene/Prefab"
|
import type { Prefab } from "engine/scene/Prefab"
|
||||||
import type { Tree } from "../Tree"
|
import type { Tree } from "../Tree"
|
||||||
import { cone, lerp, limb, rng } from "./treekit"
|
import { cone, lerp, limb, rng } from "./treekit"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { Vec3 } from "../../../engine/math/Vec3"
|
import { Vec3 } from "engine/math/Vec3"
|
||||||
import { STRIDE, type Mesh } from "../../../engine/scene/Mesh"
|
import { STRIDE, type Mesh } from "engine/scene/Mesh"
|
||||||
|
|
||||||
// Shared faceted-geometry primitives + the per-tree RNG used by concrete tree
|
// Shared faceted-geometry primitives + the per-tree RNG used by concrete tree
|
||||||
// prefab modules.
|
// prefab modules.
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
import { Color } from "../engine/render/Color"
|
import { Color } from "engine/render/Color"
|
||||||
import type { Material } from "../engine/render/Material"
|
import type { Material } from "engine/render/Material"
|
||||||
import type { CloudLayer, SkyConfig } from "../engine/render/Sky"
|
import type { CloudLayer, SkyConfig } from "engine/render/Sky"
|
||||||
import { ChunkBuilder } from "../engine/render/ChunkBuilder"
|
import { ChunkBuilder } from "engine/render/ChunkBuilder"
|
||||||
import { Actor, type ActorDefinition } from "../engine/scene/Actor"
|
import { Actor, type ActorDefinition } from "engine/scene/Actor"
|
||||||
import { Mesh } from "../engine/scene/Mesh"
|
import { Mesh } from "engine/scene/Mesh"
|
||||||
import { MeshBuilder } from "../engine/scene/MeshBuilder"
|
import { MeshBuilder } from "engine/scene/MeshBuilder"
|
||||||
import {
|
import {
|
||||||
Prefab,
|
Prefab,
|
||||||
type PlacedPrefab,
|
type PlacedPrefab,
|
||||||
type Prefab as PrefabDefinition,
|
type Prefab as PrefabDefinition,
|
||||||
} from "../engine/scene/Prefab"
|
} from "engine/scene/Prefab"
|
||||||
import type { BoxCollider, Collider } from "../engine/world/Collider"
|
import type { BoxCollider, Collider } from "engine/world/Collider"
|
||||||
import { Level, type Level as RuntimeLevel } from "../engine/world/Level"
|
import { Level, type Level as RuntimeLevel } from "engine/world/Level"
|
||||||
import {
|
import {
|
||||||
Terrain,
|
Terrain,
|
||||||
type RollingTerrainConfig,
|
type RollingTerrainConfig,
|
||||||
type Terrain as Ground,
|
type Terrain as Ground,
|
||||||
} from "../engine/world/Terrain"
|
} from "engine/world/Terrain"
|
||||||
import { Boulder } from "./actors/Boulder"
|
import { Boulder } from "./actors/Boulder"
|
||||||
import { Bush } from "./actors/Bush"
|
import { Bush } from "./actors/Bush"
|
||||||
import { Flower, type FlowerStyle } from "./actors/Flower"
|
import { Flower, type FlowerStyle } from "./actors/Flower"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type {
|
import type {
|
||||||
Character,
|
Character,
|
||||||
CharacterConfig,
|
CharacterConfig,
|
||||||
} from "../engine/world/CharacterController"
|
} from "engine/world/CharacterController"
|
||||||
|
|
||||||
export type Player = Character & {
|
export type Player = Character & {
|
||||||
pitch: number
|
pitch: number
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import type { Texture } from "../engine/render/Texture"
|
import type { Texture } from "engine/render/Texture"
|
||||||
|
|
||||||
/** The game's texture palette -- the named surfaces content refers to (materials,
|
/** The game's texture palette -- the named surfaces content refers to (materials,
|
||||||
* mobs, room). `app/assets.ts` loads the actual pixels via the DOM; this is the
|
* mobs, room). `app/assets.ts` loads the actual pixels via the DOM; this is the
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,6 @@
|
||||||
{
|
{
|
||||||
"name": "meat",
|
"name": "meat",
|
||||||
"path": "."
|
"path": "."
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "../meat.project"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { expect, test } from "bun:test"
|
import { expect, test } from "bun:test"
|
||||||
import { Actor, type Actor as RuntimeActor, type ActorDefinition } from "../engine/scene/Actor"
|
import { Actor, type Actor as RuntimeActor, type ActorDefinition } from "engine/scene/Actor"
|
||||||
|
|
||||||
type World = { updates: string[] }
|
type World = { updates: string[] }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { expect, test } from "bun:test"
|
import { expect, test } from "bun:test"
|
||||||
import type { Texture } from "../engine/render/Texture"
|
import type { Texture } from "engine/render/Texture"
|
||||||
import { buildLevel } from "../game/level"
|
import { buildLevel } from "game/level"
|
||||||
import type { Textures } from "../game/textures"
|
import type { Textures } from "game/textures"
|
||||||
|
|
||||||
const texture: Texture = { width: 1, height: 1, data: new Uint32Array([0xFFFFFFFF]) }
|
const texture: Texture = { width: 1, height: 1, data: new Uint32Array([0xFFFFFFFF]) }
|
||||||
const textures: Textures = {
|
const textures: Textures = {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { expect, test } from "bun:test"
|
import { expect, test } from "bun:test"
|
||||||
import { RenderProtocol } from "../engine/render/RenderProtocol"
|
import { RenderProtocol } from "engine/render/RenderProtocol"
|
||||||
import type { RenderInstance } from "../engine/render/RenderScene"
|
import type { RenderInstance } from "engine/render/RenderScene"
|
||||||
import type { Camera } from "../engine/scene/Camera"
|
import type { Camera } from "engine/scene/Camera"
|
||||||
|
|
||||||
test("render camera protocol owns its complete shared layout", () => {
|
test("render camera protocol owns its complete shared layout", () => {
|
||||||
const input: Camera = { position: { x: 1, y: 2, z: 3 }, yaw: 4, pitch: 5, fov: 6 }
|
const input: Camera = { position: { x: 1, y: 2, z: 3 }, yaw: 4, pitch: 5, fov: 6 }
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@
|
||||||
"esnext"
|
"esnext"
|
||||||
],
|
],
|
||||||
"types": [],
|
"types": [],
|
||||||
|
"paths": {
|
||||||
|
"*": ["./*"]
|
||||||
|
},
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"skipDefaultLibCheck": true,
|
"skipDefaultLibCheck": true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue