import { type Placement, type TurnView } from "./turn.camera.ts"; import { type Plane } from "./turn.kit.ts"; import { type TurnModel, type TurnSettings } from "./turn.model.ts"; import type { ScoreOptions, SurfaceOptions } from "./types.ts"; /** * The matrix that stands a plane in the scene, before the camera: its x along `u`, its y along `v`, its corner `o`, in pixels from the middle of the scene * (`centre`, in feet). */ export declare function planeMatrix(p: Plane, scale: number, centre?: readonly [number, number]): number[]; /** Where everything is for a view in a container: the placement, the matrix of each element and its place in the stack. */ export interface Layout { at: Placement; /** The floor, then the planes in the model's order. */ transforms: string[]; /** The stack of each: 0 for the ground of a hall, 1 for the floor, then the planes far to near from 2. */ stack: number[]; /** How much of each is left: 1 for all but the walls that are between the eye and the surface, which are cut away as the view is low and on their side (`fadeOf`). */ fade: number[]; } /** Work a view out in a container `width` by `height` pixels. */ export declare function layoutOf(model: TurnModel, view: TurnView, width: number, height: number, lens?: number): Layout; /** One plane as an element: its box in pixels and the SVG drawn on it in feet. */ export declare function planeMarkup(p: Plane, scale: number, transform: string, stack: number, fade?: number): string; /** The floor as an element: the flat drawing, in the pixels of the scene. */ export declare function floorMarkup(model: TurnModel, transform: string, stack: number): string; /** The patterns the venue's planes are drawn with, once, in a box of no size: every plane's SVG reads them by id, and the crowd's colours are on this element. */ export declare function defsMarkup(model: TurnModel): string; /** * The attributes of the element the planes stand in. A floor painted in a look (a dojo's mats) gets the drawing's own class, sport and look, so that the stylesheet's rules for the look set * its custom properties here too, and the walls and the wood of the room are the colours of the floor. A theme the options force goes with them. */ export declare function worldAttributes(model: TurnModel): string; /** The floor and the planes of a model, laid out. */ export declare function worldMarkup(model: TurnModel, layout: Layout): string; /** The buttons under the view. */ export declare function controlsMarkup(model: TurnModel, view: TurnView, playing?: boolean): string; /** The size, in pixels, the first view is worked out for. */ export declare const sizeOf: (settings: TurnSettings) => { width: number; height: number; }; /** The 3D view of a model as markup, laid out for `settings.size`; a page's script then makes it turn. */ export declare function turnMarkupOf(model: TurnModel, settings?: TurnSettings): string; /** * A surface as a 3D view, as markup: the flat drawing for a floor, what stands on it as planes, and the controls under it. Pure, so it can be made on a * server; it is a still picture until `mountKyogijoTurn` (or the element) makes it turn in a page. * @example * ```ts * import { turnMarkup } from "@johnmorrisdotca/kyogijo-stadiums/turn"; * const html = turnMarkup({ sport: "volleyball" }, { preset: "end" }); * console.log(html.includes("ky-turn"), html.includes('data-part="net"')); * // true true * ``` */ export declare function turnMarkup(options: SurfaceOptions | ScoreOptions, settings?: TurnSettings): string;