UNPKG

@hiddentao/clockwork-engine

Version:

A TypeScript/PIXI.js game engine for deterministic, replayable games with built-in rendering

38 lines 1.06 kB
/** * Coordinate Transform Utilities * * Shared functions for world-to-screen and screen-to-world coordinate transformations. */ /** * Transform world coordinates to screen coordinates * * @param worldX World X coordinate * @param worldY World Y coordinate * @param viewportPosition Viewport position in world space * @param zoom Viewport zoom level * @returns Screen coordinates */ export declare function worldToScreen(worldX: number, worldY: number, viewportPosition: { x: number; y: number; }, zoom: number): { x: number; y: number; }; /** * Transform screen coordinates to world coordinates * * @param screenX Screen X coordinate * @param screenY Screen Y coordinate * @param viewportPosition Viewport position in world space * @param zoom Viewport zoom level * @returns World coordinates */ export declare function screenToWorld(screenX: number, screenY: number, viewportPosition: { x: number; y: number; }, zoom: number): { x: number; y: number; }; //# sourceMappingURL=coordinateTransforms.d.ts.map