import type { EntityId } from '../core/types';
import type { Vec3, Quaternion, World3D, MeshPrimitive } from './Runtime3D';
export type Gizmo3DMode = 'translate' | 'rotate' | 'scale';
export type Gizmo3DAxis = 'x' | 'y' | 'z' | 'xy' | 'xz' | 'yz' | 'none';
export type Gizmo3DSpace = 'world' | 'local';
export interface Gizmo3DState {
    mode: Gizmo3DMode;
    activeAxis: Gizmo3DAxis;
    space: Gizmo3DSpace;
    dragging: boolean;
    startPosition: Vec3;
    startRotation: Quaternion;
    startScale: Vec3;
}
export declare function createGizmo3DState(): Gizmo3DState;
export interface PlacementConfig {
    snapEnabled: boolean;
    gridSize: number;
    surfaceSnap: boolean;
    randomRotation: boolean;
}
export declare const DEFAULT_PLACEMENT_CONFIG: PlacementConfig;
export declare function snapToGrid3D(pos: Vec3, gridSize: number): Vec3;
export declare function placeObject(world: World3D, primitive: MeshPrimitive, position: Vec3, config: PlacementConfig): EntityId;
export interface TerrainConfig {
    width: number;
    depth: number;
    resolution: number;
    maxHeight: number;
}
export declare const DEFAULT_TERRAIN_CONFIG: TerrainConfig;
export declare class Terrain3D {
    readonly config: TerrainConfig;
    readonly heightmap: Float32Array;
    constructor(config?: Partial<TerrainConfig>);
    getHeight(gridX: number, gridZ: number): number;
    setHeight(gridX: number, gridZ: number, h: number): void;
    /** Get interpolated height at world coordinates. */
    getHeightAtWorld(worldX: number, worldZ: number): number;
    /** Raise/lower terrain around a point. */
    brush(worldX: number, worldZ: number, radius: number, strength: number): void;
    /** Flatten terrain around a point to a given height. */
    flatten(worldX: number, worldZ: number, radius: number, targetHeight: number): void;
    /** Export heightmap to a simple JSON-serialisable format. */
    serialize(): {
        config: TerrainConfig;
        heights: number[];
    };
    static deserialize(data: {
        config: TerrainConfig;
        heights: number[];
    }): Terrain3D;
}
export interface SkyboxConfig {
    type: 'color' | 'cubemap' | 'hdri';
    color?: {
        r: number;
        g: number;
        b: number;
    };
    textureIds?: string[];
}
export declare const DEFAULT_SKYBOX: SkyboxConfig;
export interface ModelAsset {
    id: string;
    name: string;
    format: 'gltf' | 'glb' | 'fbx' | 'obj';
    meshCount: number;
    materialCount: number;
    animationCount: number;
    boneCount: number;
}
export interface AnimationRetargetMap {
    /** Maps source bone name → target bone name. */
    boneMapping: Record<string, string>;
}
export interface IKChain {
    name: string;
    root: string;
    tip: string;
    poleTarget?: Vec3;
    iterations: number;
    tolerance: number;
}
export interface BlendTreeNode {
    name: string;
    animationId: string | null;
    children: BlendTreeNode[];
    blendParameter: string;
    threshold: number;
}
export declare function createBlendTree(rootName: string): BlendTreeNode;
export declare function addBlendTreeChild(parent: BlendTreeNode, animationId: string, threshold: number, name?: string): BlendTreeNode;
/** Evaluate blend tree → returns pairs of [animId, weight]. */
export declare function evaluateBlendTree(node: BlendTreeNode, parameterValue: number): Array<{
    animationId: string;
    weight: number;
}>;
export interface ShaderUniform {
    name: string;
    type: 'float' | 'vec2' | 'vec3' | 'vec4' | 'mat4' | 'sampler2D';
    value: number | number[] | string;
}
export interface ShaderDef {
    id: string;
    name: string;
    vertexSource?: string;
    fragmentSource?: string;
    uniforms: ShaderUniform[];
}
export interface DecalDef {
    textureId: string;
    size: Vec3;
    angle: number;
    opacity: number;
}
/** Material library for managing PBR materials. */
export declare class MaterialLibrary {
    private materials;
    add(mat: import('./Runtime3D').Material3D): void;
    get(id: string): import('./Runtime3D').Material3D | undefined;
    remove(id: string): boolean;
    all(): import('./Runtime3D').Material3D[];
    /** Duplicate a material with a new id. */
    clone(sourceId: string, newName?: string): import('./Runtime3D').Material3D | null;
    /** Export all materials to JSON-serialisable array. */
    serialize(): import('./Runtime3D').Material3D[];
    load(materials: import('./Runtime3D').Material3D[]): void;
}
export interface FPSTemplateConfig {
    moveSpeed: number;
    lookSensitivity: number;
    jumpForce: number;
    gravity: number;
    weaponSlots: number;
    healthMax: number;
    crosshairSize: number;
}
export declare const DEFAULT_FPS_CONFIG: FPSTemplateConfig;
export interface ThirdPersonTemplateConfig {
    moveSpeed: number;
    sprintMultiplier: number;
    jumpForce: number;
    gravity: number;
    cameraDistance: number;
    cameraPitchMin: number;
    cameraPitchMax: number;
    cameraSmoothing: number;
    lockOnRadius: number;
}
export declare const DEFAULT_THIRD_PERSON_CONFIG: ThirdPersonTemplateConfig;
export interface RacingTemplate3DConfig {
    maxSpeed: number;
    acceleration: number;
    braking: number;
    turnSpeed: number;
    driftFactor: number;
    gravity: number;
    cameraFollowDistance: number;
    cameraHeight: number;
}
export declare const DEFAULT_RACING_3D_CONFIG: RacingTemplate3DConfig;
export interface FlightSimConfig {
    maxThrust: number;
    liftCoefficient: number;
    dragCoefficient: number;
    rollSpeed: number;
    pitchSpeed: number;
    yawSpeed: number;
    gravity: number;
    stallAngle: number;
}
export declare const DEFAULT_FLIGHT_SIM_CONFIG: FlightSimConfig;
export interface HorrorTemplateConfig {
    walkSpeed: number;
    sprintSpeed: number;
    staminaMax: number;
    staminaDrain: number;
    staminaRegen: number;
    flashlightRange: number;
    flashlightAngle: number;
    sanityMax: number;
    sanityDecayRate: number;
    ambientLightIntensity: number;
}
export declare const DEFAULT_HORROR_CONFIG: HorrorTemplateConfig;
