UNPKG

@knopkem/little-game-engine-ts

Version:

LittleGameEngineTS - Tiny and Fast HTML5 Game Engine typescript port of LittleJS

97 lines (96 loc) 3.96 kB
/** * LittleJS Medal System * <br> - Debug overlay with mouse pick * <br> - Debug primitive rendering * <br> - Save screenshots to disk * @namespace Debug */ /** True if debug is enabled * @default * @memberof Debug */ export declare const debug = 1; /** True if asserts are enaled * @default * @memberof Debug */ export declare const enableAsserts = 1; /** Size to render debug points by default * @default * @memberof Debug */ export declare const debugPointSize = 0.5; /** True if watermark with FPS should be down * @default * @memberof Debug */ export declare const showWatermark = 1; /** True if god mode is enabled, handle this however you want * @default * @memberof Debug */ export declare const godMode = 0; export declare let debugPrimitives: any, debugOverlay: number, debugPhysics: number, debugRaycast: number, debugParticles: number, debugGamepads: number, debugMedals: number, debugTakeScreenshot: any, downloadLink: any; /** Asserts if the experssion is false, does not do anything in release builds * @param {Boolean} assertion * @param {Object} output * @memberof Debug */ export declare const ASSERT: (...assert: any[]) => void; /** Draw a debug rectangle in world space * @param {Vector2} pos * @param {Vector2} [size=new Vector2()] * @param {String} [color='#fff'] * @param {Number} [time=0] * @param {Number} [angle=0] * @param {Boolean} [fill=0] * @memberof Debug */ export declare const debugRect: (pos: any, size?: import("./engineUtilities").Vector2, color?: string, time?: number, angle?: number, fill?: number) => void; /** Draw a debug circle in world space * @param {Vector2} pos * @param {Number} [radius=0] * @param {String} [color='#fff'] * @param {Number} [time=0] * @param {Boolean} [fill=0] * @memberof Debug */ export declare const debugCircle: (pos: any, radius?: number, color?: string, time?: number, fill?: number) => void; /** Draw a debug point in world space * @param {Vector2} pos * @param {String} [color='#fff'] * @param {Number} [time=0] * @param {Number} [angle=0] * @memberof Debug */ export declare const debugPoint: (pos: any, color: any, time: any, angle: any) => void; /** Draw a debug line in world space * @param {Vector2} posA * @param {Vector2} posB * @param {String} [color='#fff'] * @param {Number} [thickness=.1] * @param {Number} [time=0] * @memberof Debug */ export declare const debugLine: (posA: any, posB: any, color: any, thickness: number | undefined, time: any) => void; /** Draw a debug axis aligned bounding box in world space * @param {Vector2} posA * @param {Vector2} sizeA * @param {Vector2} posB * @param {Vector2} sizeB * @param {String} [color='#fff'] * @memberof Debug */ export declare const debugAABB: (pA: any, sA: any, pB: any, sB: any, color: any) => void; /** Draw a debug axis aligned bounding box in world space * @param {String} text * @param {Vector2} pos * @param {Number} [size=1] * @param {String} [color='#fff'] * @param {Number} [time=0] * @param {Number} [angle=0] * @param {String} [font='monospace'] * @memberof Debug */ export declare const debugText: (text: any, pos: any, size?: number, color?: string, time?: number, angle?: number, font?: string) => void; /** Clear all debug primitives in the list * @memberof Debug */ export declare const debugClear: () => any[]; /** Save a canvas to disk * @param {HTMLCanvasElement} canvas * @param {String} [filename] * @memberof Debug */ export declare const debugSaveCanvas: (canvas: any, _filename?: string) => void; export declare const debugInit: () => void; export declare const debugUpdate: () => void; export declare const debugRender: () => void; export declare const debugToggleParticleEditor: () => void; export declare const debugParticleSettings: string[][];