@kernel.chat/kbot 3.88.0 → 3.94.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/tools/audio-engine.d.ts +72 -0
- package/dist/tools/audio-engine.js +426 -0
- package/dist/tools/coordination-engine.d.ts +127 -0
- package/dist/tools/coordination-engine.js +543 -0
- package/dist/tools/evolution-engine.d.ts +102 -0
- package/dist/tools/evolution-engine.js +746 -0
- package/dist/tools/foundation-engines.d.ts +111 -0
- package/dist/tools/foundation-engines.js +520 -0
- package/dist/tools/index.js +9 -0
- package/dist/tools/living-world.d.ts +161 -0
- package/dist/tools/living-world.js +1054 -0
- package/dist/tools/narrative-engine.d.ts +58 -0
- package/dist/tools/narrative-engine.js +681 -0
- package/dist/tools/render-engine.js +5 -5
- package/dist/tools/research-engine.d.ts +58 -0
- package/dist/tools/research-engine.js +550 -0
- package/dist/tools/rom-engine.d.ts +130 -0
- package/dist/tools/rom-engine.js +1208 -0
- package/dist/tools/social-engine.d.ts +100 -0
- package/dist/tools/social-engine.js +540 -0
- package/dist/tools/sprite-engine.js +40 -26
- package/dist/tools/stream-brain.js +4 -4
- package/dist/tools/stream-intelligence.d.ts +6 -0
- package/dist/tools/stream-intelligence.js +239 -49
- package/dist/tools/stream-renderer.js +805 -639
- package/dist/tools/stream-self-eval.d.ts +96 -0
- package/dist/tools/stream-self-eval.js +764 -0
- package/dist/tools/tile-world.d.ts +40 -0
- package/dist/tools/tile-world.js +1070 -0
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { CanvasRenderingContext2D } from 'canvas';
|
|
2
|
+
export declare const TILE_SIZE = 16;
|
|
3
|
+
export declare const CHUNK_WIDTH = 36;
|
|
4
|
+
export declare const CHUNK_HEIGHT = 26;
|
|
5
|
+
export declare const WORLD_HEIGHT = 40;
|
|
6
|
+
export type BlockType = 'air' | 'grass' | 'dirt' | 'stone' | 'sand' | 'water' | 'wood' | 'leaves' | 'ore_iron' | 'ore_gold' | 'ore_diamond' | 'lava' | 'snow' | 'ice' | 'brick' | 'glass';
|
|
7
|
+
export interface Chunk {
|
|
8
|
+
x: number;
|
|
9
|
+
tiles: BlockType[][];
|
|
10
|
+
generated: boolean;
|
|
11
|
+
modified: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface TileWorld {
|
|
14
|
+
chunks: Map<number, Chunk>;
|
|
15
|
+
cameraX: number;
|
|
16
|
+
surfaceLevel: number;
|
|
17
|
+
seed: number;
|
|
18
|
+
timeOfDay: 'day' | 'night' | 'sunset' | 'dawn';
|
|
19
|
+
weather: string;
|
|
20
|
+
}
|
|
21
|
+
/** Generate a chunk at the given chunk X index */
|
|
22
|
+
export declare function generateChunk(world: TileWorld, chunkX: number): Chunk;
|
|
23
|
+
/** Initialize a fresh tile world */
|
|
24
|
+
export declare function initTileWorld(seed?: number): TileWorld;
|
|
25
|
+
/** Save world to disk (only modified chunks to keep file small) */
|
|
26
|
+
export declare function saveWorld(world: TileWorld): void;
|
|
27
|
+
/** Load world from disk, returns null if no save exists */
|
|
28
|
+
export declare function loadWorld(): TileWorld | null;
|
|
29
|
+
/** Update camera to follow the robot with smooth lerp */
|
|
30
|
+
export declare function updateCamera(world: TileWorld, robotWorldX: number, panelWidth?: number): void;
|
|
31
|
+
/** Convert world pixel X to tile X (absolute) */
|
|
32
|
+
export declare function worldXToTile(worldPixelX: number): number;
|
|
33
|
+
/** Convert tile X to world pixel X */
|
|
34
|
+
export declare function tileToWorldX(tileX: number): number;
|
|
35
|
+
/** Render the visible tile world */
|
|
36
|
+
export declare function renderTileWorld(ctx: CanvasRenderingContext2D, world: TileWorld, panelX: number, panelY: number, panelWidth: number, panelHeight: number, robotWorldX: number, frame: number): void;
|
|
37
|
+
/** Parse and handle tile world chat commands. Returns response string or null if not a tile command. */
|
|
38
|
+
export declare function handleTileCommand(text: string, username: string, world: TileWorld, robotWorldPixelX: number): string | null;
|
|
39
|
+
export declare function registerTileWorldTools(): void;
|
|
40
|
+
//# sourceMappingURL=tile-world.d.ts.map
|