rayjs/examples/lib.raylib.d.ts

2049 lines
96 KiB
TypeScript
Raw Normal View History

2023-05-14 20:19:47 +00:00
interface Color {
/** Color red value */
r: number,
/** Color green value */
g: number,
/** Color blue value */
b: number,
/** Color alpha value */
a: number,
}
declare var Color: {
prototype: Color;
new(r: number, g: number, b: number, a: number): Color;
}
interface Rectangle {
/** Rectangle top-left corner position x */
x: number,
/** Rectangle top-left corner position y */
y: number,
/** Rectangle width */
width: number,
/** Rectangle height */
height: number,
}
declare var Rectangle: {
prototype: Rectangle;
new(x: number, y: number, width: number, height: number): Rectangle;
}
interface Vector2 {
/** Vector x component */
x: number,
/** Vector y component */
y: number,
}
declare var Vector2: {
prototype: Vector2;
new(x: number, y: number): Vector2;
}
interface Vector3 {
/** Vector x component */
x: number,
/** Vector y component */
y: number,
/** Vector z component */
z: number,
}
declare var Vector3: {
prototype: Vector3;
new(x: number, y: number, z: number): Vector3;
}
interface Vector4 {
/** Vector x component */
x: number,
/** Vector y component */
y: number,
/** Vector z component */
z: number,
/** Vector w component */
w: number,
}
declare var Vector4: {
prototype: Vector4;
new(x: number, y: number, z: number, w: number): Vector4;
}
interface Ray {
/** Ray position (origin) */
position: Vector3,
/** Ray direction */
direction: Vector3,
}
declare var Ray: {
prototype: Ray;
new(position: Vector3, direction: Vector3): Ray;
}
interface RayCollision {
/** Did the ray hit something? */
hit: boolean,
/** Distance to the nearest hit */
distance: number,
2023-05-24 20:47:17 +00:00
/** Point of the nearest hit */
point: Vector3,
/** Surface normal of hit */
normal: Vector3,
2023-05-14 20:19:47 +00:00
}
declare var RayCollision: {
prototype: RayCollision;
}
interface Camera2D {
/** Camera offset (displacement from target) */
offset: Vector2,
/** Camera target (rotation and zoom origin) */
target: Vector2,
/** Camera rotation in degrees */
rotation: number,
/** Camera zoom (scaling), should be 1.0f by default */
zoom: number,
}
declare var Camera2D: {
prototype: Camera2D;
new(offset: Vector2, target: Vector2, rotation: number, zoom: number): Camera2D;
}
interface Camera3D {
/** Camera position */
position: Vector3,
/** Camera target it looks-at */
target: Vector3,
/** Camera up vector (rotation over its axis) */
up: Vector3,
/** Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic */
fovy: number,
/** Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC */
projection: number,
}
declare var Camera3D: {
prototype: Camera3D;
new(position: Vector3, target: Vector3, up: Vector3, fovy: number, projection: number): Camera3D;
}
interface BoundingBox {
2023-05-24 20:47:17 +00:00
/** Minimum vertex box-corner */
min: Vector3,
/** Maximum vertex box-corner */
max: Vector3,
2023-05-14 20:19:47 +00:00
}
declare var BoundingBox: {
prototype: BoundingBox;
2023-05-24 20:47:17 +00:00
new(min: Vector3, max: Vector3): BoundingBox;
2023-05-14 20:19:47 +00:00
}
interface Matrix {
}
declare var Matrix: {
prototype: Matrix;
}
interface NPatchInfo {
/** Texture source rectangle */
source: Rectangle,
/** Left border offset */
left: number,
/** Top border offset */
top: number,
/** Right border offset */
right: number,
/** Bottom border offset */
bottom: number,
/** Layout of the n-patch: 3x3, 1x3 or 3x1 */
layout: number,
}
declare var NPatchInfo: {
prototype: NPatchInfo;
new(source: Rectangle, left: number, top: number, right: number, bottom: number, layout: number): NPatchInfo;
}
2023-05-14 20:19:47 +00:00
interface Image {
/** Image base width */
width: number,
/** Image base height */
height: number,
/** Mipmap levels, 1 by default */
mipmaps: number,
/** Data format (PixelFormat type) */
format: number,
}
declare var Image: {
prototype: Image;
}
interface Wave {
/** Total number of frames (considering channels) */
frameCount: number,
/** Frequency (samples per second) */
sampleRate: number,
/** Bit depth (bits per sample): 8, 16, 32 (24 not supported) */
sampleSize: number,
/** Number of channels (1-mono, 2-stereo, ...) */
channels: number,
}
declare var Wave: {
prototype: Wave;
}
interface Sound {
/** Total number of frames (considering channels) */
frameCount: number,
}
declare var Sound: {
prototype: Sound;
}
interface Music {
/** Total number of frames (considering channels) */
frameCount: number,
/** Music looping enable */
looping: boolean,
2023-05-24 20:47:17 +00:00
/** Type of music context (audio filetype) */
ctxType: number,
2023-05-14 20:19:47 +00:00
}
declare var Music: {
prototype: Music;
}
interface Model {
2023-05-24 20:47:17 +00:00
/** Local transform matrix */
transform: Matrix,
/** Number of meshes */
meshCount: number,
/** Number of materials */
materialCount: number,
/** Number of bones */
boneCount: number,
2023-05-14 20:19:47 +00:00
}
declare var Model: {
prototype: Model;
}
interface Mesh {
/** Number of vertices stored in arrays */
vertexCount: number,
/** Number of triangles stored (indexed or not) */
triangleCount: number,
/** Vertex position (XYZ - 3 components per vertex) (shader-location = 0) */
vertices: ArrayBuffer,
/** Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) */
texcoords: ArrayBuffer,
/** Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5) */
texcoords2: ArrayBuffer,
/** Vertex normals (XYZ - 3 components per vertex) (shader-location = 2) */
normals: ArrayBuffer,
/** Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4) */
tangents: ArrayBuffer,
/** Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) */
colors: ArrayBuffer,
/** Vertex indices (in case vertex data comes indexed) */
indices: ArrayBuffer,
/** Animated vertex positions (after bones transformations) */
animVertices: ArrayBuffer,
/** Animated normals (after bones transformations) */
animNormals: ArrayBuffer,
/** Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) */
boneIds: ArrayBuffer,
/** Vertex bone weight, up to 4 bones influence by vertex (skinning) */
boneWeights: ArrayBuffer,
2023-05-14 20:19:47 +00:00
}
declare var Mesh: {
prototype: Mesh;
new(): Mesh;
2023-05-14 20:19:47 +00:00
}
interface Shader {
2023-05-24 20:47:17 +00:00
/** Shader program id */
id: number,
2023-05-14 20:19:47 +00:00
}
declare var Shader: {
prototype: Shader;
}
interface Texture {
/** Texture base width */
width: number,
/** Texture base height */
height: number,
2023-05-24 20:47:17 +00:00
/** Mipmap levels, 1 by default */
mipmaps: number,
/** Data format (PixelFormat type) */
format: number,
2023-05-14 20:19:47 +00:00
}
declare var Texture: {
prototype: Texture;
}
interface Font {
/** Base size (default chars height) */
baseSize: number,
2023-05-24 20:47:17 +00:00
/** Number of glyph characters */
glyphCount: number,
/** Padding around the glyph characters */
glyphPadding: number,
2023-05-14 20:19:47 +00:00
}
declare var Font: {
prototype: Font;
}
interface RenderTexture {
2023-05-24 20:47:17 +00:00
/** OpenGL framebuffer object id */
id: number,
}
declare var RenderTexture: {
prototype: RenderTexture;
}
interface MaterialMap {
/** Material map texture */
texture: Texture,
/** Material map color */
color: Color,
/** Material map value */
value: number,
}
declare var MaterialMap: {
prototype: MaterialMap;
}
interface Material {
/** Material shader */
shader: Shader,
}
declare var Material: {
prototype: Material;
}
2023-05-14 20:19:47 +00:00
/** Initialize window and OpenGL context */
declare function initWindow(width: number, height: number, title: string): void;
/** Check if KEY_ESCAPE pressed or Close icon pressed */
declare function windowShouldClose(): boolean;
/** Close window and unload OpenGL context */
declare function closeWindow(): void;
/** Check if window has been initialized successfully */
declare function isWindowReady(): boolean;
/** Check if window is currently fullscreen */
declare function isWindowFullscreen(): boolean;
/** Check if window is currently hidden (only PLATFORM_DESKTOP) */
declare function isWindowHidden(): boolean;
/** Check if window is currently minimized (only PLATFORM_DESKTOP) */
declare function isWindowMinimized(): boolean;
/** Check if window is currently maximized (only PLATFORM_DESKTOP) */
declare function isWindowMaximized(): boolean;
/** Check if window is currently focused (only PLATFORM_DESKTOP) */
declare function isWindowFocused(): boolean;
/** Check if window has been resized last frame */
declare function isWindowResized(): boolean;
/** Check if one specific window flag is enabled */
declare function isWindowState(flag: number): boolean;
/** Set window configuration state using flags (only PLATFORM_DESKTOP) */
declare function setWindowState(flags: number): void;
/** Clear window configuration state flags */
declare function clearWindowState(flags: number): void;
/** Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP) */
declare function toggleFullscreen(): void;
/** Set window state: maximized, if resizable (only PLATFORM_DESKTOP) */
declare function maximizeWindow(): void;
/** Set window state: minimized, if resizable (only PLATFORM_DESKTOP) */
declare function minimizeWindow(): void;
/** Set window state: not minimized/maximized (only PLATFORM_DESKTOP) */
declare function restoreWindow(): void;
2023-05-15 21:02:41 +00:00
/** Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP) */
declare function setWindowIcon(image: Image): void;
2023-05-14 20:19:47 +00:00
/** Set title for window (only PLATFORM_DESKTOP) */
declare function setWindowTitle(title: string): void;
/** Set window position on screen (only PLATFORM_DESKTOP) */
declare function setWindowPosition(x: number, y: number): void;
/** Set monitor for the current window (fullscreen mode) */
declare function setWindowMonitor(monitor: number): void;
/** Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) */
declare function setWindowMinSize(width: number, height: number): void;
/** Set window dimensions */
declare function setWindowSize(width: number, height: number): void;
/** Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP) */
declare function setWindowOpacity(opacity: number): void;
/** Get current screen width */
declare function getScreenWidth(): number;
/** Get current screen height */
declare function getScreenHeight(): number;
/** Get current render width (it considers HiDPI) */
declare function getRenderWidth(): number;
/** Get current render height (it considers HiDPI) */
declare function getRenderHeight(): number;
/** Get number of connected monitors */
declare function getMonitorCount(): number;
/** Get current connected monitor */
declare function getCurrentMonitor(): number;
/** Get specified monitor position */
declare function getMonitorPosition(monitor: number): Vector2;
/** Get specified monitor width (current video mode used by monitor) */
declare function getMonitorWidth(monitor: number): number;
/** Get specified monitor height (current video mode used by monitor) */
declare function getMonitorHeight(monitor: number): number;
/** Get specified monitor physical width in millimetres */
declare function getMonitorPhysicalWidth(monitor: number): number;
/** Get specified monitor physical height in millimetres */
declare function getMonitorPhysicalHeight(monitor: number): number;
/** Get specified monitor refresh rate */
declare function getMonitorRefreshRate(monitor: number): number;
/** Get window position XY on monitor */
declare function getWindowPosition(): Vector2;
/** Get window scale DPI factor */
declare function getWindowScaleDPI(): Vector2;
/** Get the human-readable, UTF-8 encoded name of the primary monitor */
declare function getMonitorName(monitor: number): string;
/** Set clipboard text content */
declare function setClipboardText(text: string): void;
/** Get clipboard text content */
declare function getClipboardText(): string;
/** Enable waiting for events on EndDrawing(), no automatic event polling */
declare function enableEventWaiting(): void;
/** Disable waiting for events on EndDrawing(), automatic events polling */
declare function disableEventWaiting(): void;
/** Shows cursor */
declare function showCursor(): void;
/** Hides cursor */
declare function hideCursor(): void;
/** Check if cursor is not visible */
declare function isCursorHidden(): boolean;
/** Enables cursor (unlock cursor) */
declare function enableCursor(): void;
/** Disables cursor (lock cursor) */
declare function disableCursor(): void;
/** Check if cursor is on the screen */
declare function isCursorOnScreen(): boolean;
/** Set background color (framebuffer clear color) */
declare function clearBackground(color: Color): void;
/** Setup canvas (framebuffer) to start drawing */
declare function beginDrawing(): void;
/** End canvas drawing and swap buffers (double buffering) */
declare function endDrawing(): void;
/** Begin 2D mode with custom camera (2D) */
declare function beginMode2D(camera: Camera2D): void;
/** Ends 2D mode with custom camera */
declare function endMode2D(): void;
/** Begin 3D mode with custom camera (3D) */
declare function beginMode3D(camera: Camera3D): void;
/** Ends 3D mode and returns to default 2D orthographic mode */
declare function endMode3D(): void;
/** Begin drawing to render texture */
declare function beginTextureMode(target: RenderTexture): void;
/** Ends drawing to render texture */
declare function endTextureMode(): void;
2023-05-15 21:02:41 +00:00
/** Begin custom shader drawing */
declare function beginShaderMode(shader: Shader): void;
/** End custom shader drawing (use default shader) */
declare function endShaderMode(): void;
2023-05-14 20:19:47 +00:00
/** Begin blending mode (alpha, additive, multiplied, subtract, custom) */
declare function beginBlendMode(mode: number): void;
/** End blending mode (reset to default: alpha blending) */
declare function endBlendMode(): void;
/** Begin scissor mode (define screen area for following drawing) */
declare function beginScissorMode(x: number, y: number, width: number, height: number): void;
/** End scissor mode */
declare function endScissorMode(): void;
2023-05-15 21:02:41 +00:00
/** Load shader from files and bind default locations */
declare function loadShader(vsFileName: string, fsFileName: string): Shader;
2023-05-24 20:47:17 +00:00
/** Load shader from code strings and bind default locations */
declare function loadShaderFromMemory(vsCode: string, fsCode: string): Shader;
2023-05-15 21:02:41 +00:00
/** Check if a shader is ready */
declare function isShaderReady(shader: Shader): boolean;
/** Get shader uniform location */
declare function getShaderLocation(shader: Shader, uniformName: string): number;
/** Get shader attribute location */
declare function getShaderLocationAttrib(shader: Shader, attribName: string): number;
2023-05-16 06:28:30 +00:00
/** Set shader uniform value */
declare function setShaderValue(shader: Shader, locIndex: number, value: any, uniformType: number): void;
2023-05-15 21:02:41 +00:00
/** Set shader uniform value (matrix 4x4) */
declare function setShaderValueMatrix(shader: Shader, locIndex: number, mat: Matrix): void;
/** Set shader uniform value for texture (sampler2d) */
2023-05-16 06:28:30 +00:00
declare function setShaderValueTexture(shader: Shader, locIndex: number, texture: Texture): void;
/** Unload shader from GPU memory (VRAM) */
declare function unloadShader(shader: Shader): void;
2023-05-15 21:02:41 +00:00
/** Get a ray trace from mouse position */
2023-05-16 06:28:30 +00:00
declare function getMouseRay(mousePosition: Vector2, camera: Camera3D): Ray;
2023-05-15 21:02:41 +00:00
/** Get camera transform matrix (view matrix) */
2023-05-16 06:28:30 +00:00
declare function getCameraMatrix(camera: Camera3D): Matrix;
2023-05-14 20:19:47 +00:00
/** Get camera 2d transform matrix */
declare function getCameraMatrix2D(camera: Camera2D): Matrix;
2023-05-15 21:02:41 +00:00
/** Get the screen space position for a 3d world space position */
2023-05-16 06:28:30 +00:00
declare function getWorldToScreen(position: Vector3, camera: Camera3D): Vector2;
2023-05-14 20:19:47 +00:00
/** Get the world space position for a 2d camera screen space position */
declare function getScreenToWorld2D(position: Vector2, camera: Camera2D): Vector2;
2023-05-15 21:02:41 +00:00
/** Get size position for a 3d world space position */
2023-05-16 06:28:30 +00:00
declare function getWorldToScreenEx(position: Vector3, camera: Camera3D, width: number, height: number): Vector2;
2023-05-14 20:19:47 +00:00
/** Get the screen space position for a 2d camera world space position */
declare function getWorldToScreen2D(position: Vector2, camera: Camera2D): Vector2;
/** Set target FPS (maximum) */
declare function setTargetFPS(fps: number): void;
/** Get current FPS */
declare function getFPS(): number;
/** Get time in seconds for last frame drawn (delta time) */
declare function getFrameTime(): number;
/** Get elapsed time in seconds since InitWindow() */
declare function getTime(): number;
/** Get a random value between min and max (both included) */
declare function getRandomValue(min: number, max: number): number;
/** Set the seed for the random number generator */
declare function setRandomSeed(seed: number): void;
/** Takes a screenshot of current screen (filename extension defines format) */
declare function takeScreenshot(fileName: string): void;
/** Setup init configuration flags (view FLAGS) */
declare function setConfigFlags(flags: number): void;
/** Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...) */
declare function traceLog(logLevel: number, text: string): void;
/** Set the current threshold (minimum) log level */
declare function setTraceLogLevel(logLevel: number): void;
/** Open URL with default system browser (if available) */
declare function openURL(url: string): void;
2023-05-24 20:47:17 +00:00
/** Load file data as byte array (read) */
declare function loadFileData(fileName: string): ArrayBuffer;
/** Save data to file from byte array (write), returns true on success */
declare function saveFileData(fileName: string, data: any, bytesToWrite: number): boolean;
2023-05-14 20:19:47 +00:00
/** Load text data from file (read), returns a '\0' terminated string */
declare function loadFileText(fileName: string): string;
/** Save text data to file (write), string must be '\0' terminated, returns true on success */
declare function saveFileText(fileName: string, text: string): boolean;
/** Check if file exists */
declare function fileExists(fileName: string): boolean;
/** Check if a directory path exists */
declare function directoryExists(dirPath: string): boolean;
/** Check file extension (including point: .png, .wav) */
declare function isFileExtension(fileName: string, ext: string): boolean;
/** Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h) */
declare function getFileLength(fileName: string): number;
/** Get pointer to extension for a filename string (includes dot: '.png') */
declare function getFileExtension(fileName: string): string;
/** Get pointer to filename for a path string */
declare function getFileName(filePath: string): string;
/** Get filename string without extension (uses static string) */
declare function getFileNameWithoutExt(filePath: string): string;
/** Get full path for a given fileName with path (uses static string) */
declare function getDirectoryPath(filePath: string): string;
/** Get previous directory path for a given path (uses static string) */
declare function getPrevDirectoryPath(dirPath: string): string;
/** Get current working directory (uses static string) */
declare function getWorkingDirectory(): string;
/** Get the directory if the running application (uses static string) */
declare function getApplicationDirectory(): string;
/** Change working directory, return true on success */
declare function changeDirectory(dir: string): boolean;
/** Check if a given path is a file or a directory */
declare function isPathFile(path: string): boolean;
/** Check if a file has been dropped into window */
declare function isFileDropped(): boolean;
/** Get file modification time (last write time) */
declare function getFileModTime(fileName: string): number;
/** Check if a key has been pressed once */
declare function isKeyPressed(key: number): boolean;
/** Check if a key is being pressed */
declare function isKeyDown(key: number): boolean;
/** Check if a key has been released once */
declare function isKeyReleased(key: number): boolean;
/** Check if a key is NOT being pressed */
declare function isKeyUp(key: number): boolean;
/** Set a custom key to exit program (default is ESC) */
declare function setExitKey(key: number): void;
/** Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty */
declare function getKeyPressed(): number;
/** Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty */
declare function getCharPressed(): number;
/** Check if a gamepad is available */
declare function isGamepadAvailable(gamepad: number): boolean;
/** Get gamepad internal name id */
declare function getGamepadName(gamepad: number): string;
/** Check if a gamepad button has been pressed once */
declare function isGamepadButtonPressed(gamepad: number, button: number): boolean;
/** Check if a gamepad button is being pressed */
declare function isGamepadButtonDown(gamepad: number, button: number): boolean;
/** Check if a gamepad button has been released once */
declare function isGamepadButtonReleased(gamepad: number, button: number): boolean;
/** Check if a gamepad button is NOT being pressed */
declare function isGamepadButtonUp(gamepad: number, button: number): boolean;
/** Get the last gamepad button pressed */
declare function getGamepadButtonPressed(): number;
/** Get gamepad axis count for a gamepad */
declare function getGamepadAxisCount(gamepad: number): number;
/** Get axis movement value for a gamepad axis */
declare function getGamepadAxisMovement(gamepad: number, axis: number): number;
/** Set internal gamepad mappings (SDL_GameControllerDB) */
declare function setGamepadMappings(mappings: string): number;
/** Check if a mouse button has been pressed once */
declare function isMouseButtonPressed(button: number): boolean;
/** Check if a mouse button is being pressed */
declare function isMouseButtonDown(button: number): boolean;
/** Check if a mouse button has been released once */
declare function isMouseButtonReleased(button: number): boolean;
/** Check if a mouse button is NOT being pressed */
declare function isMouseButtonUp(button: number): boolean;
/** Get mouse position X */
declare function getMouseX(): number;
/** Get mouse position Y */
declare function getMouseY(): number;
/** Get mouse position XY */
declare function getMousePosition(): Vector2;
/** Get mouse delta between frames */
declare function getMouseDelta(): Vector2;
/** Set mouse position XY */
declare function setMousePosition(x: number, y: number): void;
/** Set mouse offset */
declare function setMouseOffset(offsetX: number, offsetY: number): void;
/** Set mouse scaling */
declare function setMouseScale(scaleX: number, scaleY: number): void;
/** Get mouse wheel movement for X or Y, whichever is larger */
declare function getMouseWheelMove(): number;
/** Get mouse wheel movement for both X and Y */
declare function getMouseWheelMoveV(): Vector2;
/** Set mouse cursor */
declare function setMouseCursor(cursor: number): void;
/** Get touch position X for touch point 0 (relative to screen size) */
declare function getTouchX(): number;
/** Get touch position Y for touch point 0 (relative to screen size) */
declare function getTouchY(): number;
/** Get touch position XY for a touch point index (relative to screen size) */
declare function getTouchPosition(index: number): Vector2;
/** Get touch point identifier for given index */
declare function getTouchPointId(index: number): number;
/** Get number of touch points */
declare function getTouchPointCount(): number;
/** Enable a set of gestures using flags */
declare function setGesturesEnabled(flags: number): void;
/** Check if a gesture have been detected */
declare function isGestureDetected(gesture: number): boolean;
/** Get latest detected gesture */
declare function getGestureDetected(): number;
/** Get gesture hold time in milliseconds */
declare function getGestureHoldDuration(): number;
/** Get gesture drag vector */
declare function getGestureDragVector(): Vector2;
/** Get gesture drag angle */
declare function getGestureDragAngle(): number;
/** Get gesture pinch delta */
declare function getGesturePinchVector(): Vector2;
/** Get gesture pinch angle */
declare function getGesturePinchAngle(): number;
2023-05-15 21:02:41 +00:00
/** Update camera position for selected mode */
declare function updateCamera(camera: Camera3D, mode: number): void;
2023-05-15 21:02:41 +00:00
/** Update camera movement/rotation */
declare function updateCameraPro(camera: Camera3D, movement: Vector3, rotation: Vector3, zoom: number): void;
2023-05-24 20:47:17 +00:00
/** Set texture and rectangle to be used on shapes drawing */
declare function setShapesTexture(texture: Texture, source: Rectangle): void;
2023-05-14 20:19:47 +00:00
/** Draw a pixel */
declare function drawPixel(posX: number, posY: number, color: Color): void;
/** Draw a pixel (Vector version) */
declare function drawPixelV(position: Vector2, color: Color): void;
/** Draw a line */
declare function drawLine(startPosX: number, startPosY: number, endPosX: number, endPosY: number, color: Color): void;
/** Draw a line (Vector version) */
declare function drawLineV(startPos: Vector2, endPos: Vector2, color: Color): void;
/** Draw a line defining thickness */
declare function drawLineEx(startPos: Vector2, endPos: Vector2, thick: number, color: Color): void;
/** Draw a line using cubic-bezier curves in-out */
declare function drawLineBezier(startPos: Vector2, endPos: Vector2, thick: number, color: Color): void;
/** Draw line using quadratic bezier curves with a control point */
declare function drawLineBezierQuad(startPos: Vector2, endPos: Vector2, controlPos: Vector2, thick: number, color: Color): void;
/** Draw line using cubic bezier curves with 2 control points */
declare function drawLineBezierCubic(startPos: Vector2, endPos: Vector2, startControlPos: Vector2, endControlPos: Vector2, thick: number, color: Color): void;
/** Draw a color-filled circle */
declare function drawCircle(centerX: number, centerY: number, radius: number, color: Color): void;
/** Draw a piece of a circle */
declare function drawCircleSector(center: Vector2, radius: number, startAngle: number, endAngle: number, segments: number, color: Color): void;
/** Draw circle sector outline */
declare function drawCircleSectorLines(center: Vector2, radius: number, startAngle: number, endAngle: number, segments: number, color: Color): void;
/** Draw a gradient-filled circle */
declare function drawCircleGradient(centerX: number, centerY: number, radius: number, color1: Color, color2: Color): void;
/** Draw a color-filled circle (Vector version) */
declare function drawCircleV(center: Vector2, radius: number, color: Color): void;
/** Draw circle outline */
declare function drawCircleLines(centerX: number, centerY: number, radius: number, color: Color): void;
/** Draw ellipse */
declare function drawEllipse(centerX: number, centerY: number, radiusH: number, radiusV: number, color: Color): void;
/** Draw ellipse outline */
declare function drawEllipseLines(centerX: number, centerY: number, radiusH: number, radiusV: number, color: Color): void;
/** Draw ring */
declare function drawRing(center: Vector2, innerRadius: number, outerRadius: number, startAngle: number, endAngle: number, segments: number, color: Color): void;
/** Draw ring outline */
declare function drawRingLines(center: Vector2, innerRadius: number, outerRadius: number, startAngle: number, endAngle: number, segments: number, color: Color): void;
/** Draw a color-filled rectangle */
declare function drawRectangle(posX: number, posY: number, width: number, height: number, color: Color): void;
/** Draw a color-filled rectangle (Vector version) */
declare function drawRectangleV(position: Vector2, size: Vector2, color: Color): void;
/** Draw a color-filled rectangle */
declare function drawRectangleRec(rec: Rectangle, color: Color): void;
/** Draw a color-filled rectangle with pro parameters */
declare function drawRectanglePro(rec: Rectangle, origin: Vector2, rotation: number, color: Color): void;
/** Draw a vertical-gradient-filled rectangle */
declare function drawRectangleGradientV(posX: number, posY: number, width: number, height: number, color1: Color, color2: Color): void;
/** Draw a horizontal-gradient-filled rectangle */
declare function drawRectangleGradientH(posX: number, posY: number, width: number, height: number, color1: Color, color2: Color): void;
/** Draw a gradient-filled rectangle with custom vertex colors */
declare function drawRectangleGradientEx(rec: Rectangle, col1: Color, col2: Color, col3: Color, col4: Color): void;
/** Draw rectangle outline */
declare function drawRectangleLines(posX: number, posY: number, width: number, height: number, color: Color): void;
/** Draw rectangle outline with extended parameters */
declare function drawRectangleLinesEx(rec: Rectangle, lineThick: number, color: Color): void;
/** Draw rectangle with rounded edges */
declare function drawRectangleRounded(rec: Rectangle, roundness: number, segments: number, color: Color): void;
/** Draw rectangle with rounded edges outline */
declare function drawRectangleRoundedLines(rec: Rectangle, roundness: number, segments: number, lineThick: number, color: Color): void;
/** Draw a color-filled triangle (vertex in counter-clockwise order!) */
declare function drawTriangle(v1: Vector2, v2: Vector2, v3: Vector2, color: Color): void;
/** Draw triangle outline (vertex in counter-clockwise order!) */
declare function drawTriangleLines(v1: Vector2, v2: Vector2, v3: Vector2, color: Color): void;
/** Draw a regular polygon (Vector version) */
declare function drawPoly(center: Vector2, sides: number, radius: number, rotation: number, color: Color): void;
/** Draw a polygon outline of n sides */
declare function drawPolyLines(center: Vector2, sides: number, radius: number, rotation: number, color: Color): void;
/** Draw a polygon outline of n sides with extended parameters */
declare function drawPolyLinesEx(center: Vector2, sides: number, radius: number, rotation: number, lineThick: number, color: Color): void;
/** Check collision between two rectangles */
declare function checkCollisionRecs(rec1: Rectangle, rec2: Rectangle): boolean;
/** Check collision between two circles */
declare function checkCollisionCircles(center1: Vector2, radius1: number, center2: Vector2, radius2: number): boolean;
/** Check collision between circle and rectangle */
declare function checkCollisionCircleRec(center: Vector2, radius: number, rec: Rectangle): boolean;
/** Check if point is inside rectangle */
declare function checkCollisionPointRec(point: Vector2, rec: Rectangle): boolean;
/** Check if point is inside circle */
declare function checkCollisionPointCircle(point: Vector2, center: Vector2, radius: number): boolean;
/** Check if point is inside a triangle */
declare function checkCollisionPointTriangle(point: Vector2, p1: Vector2, p2: Vector2, p3: Vector2): boolean;
/** Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] */
declare function checkCollisionPointLine(point: Vector2, p1: Vector2, p2: Vector2, threshold: number): boolean;
/** Get collision rectangle for two rectangles collision */
declare function getCollisionRec(rec1: Rectangle, rec2: Rectangle): Rectangle;
/** Load image from file into CPU memory (RAM) */
declare function loadImage(fileName: string): Image;
/** Load image from RAW file data */
declare function loadImageRaw(fileName: string, width: number, height: number, format: number, headerSize: number): Image;
2023-05-24 20:47:17 +00:00
/** Load image from memory buffer, fileType refers to extension: i.e. '.png' */
declare function loadImageFromMemory(fileType: string, fileData: ArrayBuffer, dataSize: number): Image;
2023-05-14 20:19:47 +00:00
/** Load image from GPU texture data */
2023-05-16 06:28:30 +00:00
declare function loadImageFromTexture(texture: Texture): Image;
2023-05-14 20:19:47 +00:00
/** Load image from screen buffer and (screenshot) */
declare function loadImageFromScreen(): Image;
/** Check if an image is ready */
declare function isImageReady(image: Image): boolean;
/** Unload image from CPU memory (RAM) */
declare function unloadImage(image: Image): void;
2023-05-14 20:19:47 +00:00
/** Export image data to file, returns true on success */
declare function exportImage(image: Image, fileName: string): boolean;
/** Generate image: plain color */
declare function genImageColor(width: number, height: number, color: Color): Image;
/** Generate image: vertical gradient */
declare function genImageGradientV(width: number, height: number, top: Color, bottom: Color): Image;
/** Generate image: horizontal gradient */
declare function genImageGradientH(width: number, height: number, left: Color, right: Color): Image;
/** Generate image: radial gradient */
declare function genImageGradientRadial(width: number, height: number, density: number, inner: Color, outer: Color): Image;
/** Generate image: checked */
declare function genImageChecked(width: number, height: number, checksX: number, checksY: number, col1: Color, col2: Color): Image;
/** Generate image: white noise */
declare function genImageWhiteNoise(width: number, height: number, factor: number): Image;
/** Generate image: perlin noise */
declare function genImagePerlinNoise(width: number, height: number, offsetX: number, offsetY: number, scale: number): Image;
/** Generate image: cellular algorithm, bigger tileSize means bigger cells */
declare function genImageCellular(width: number, height: number, tileSize: number): Image;
/** Generate image: grayscale image from text data */
declare function genImageText(width: number, height: number, text: string): Image;
/** Create an image duplicate (useful for transformations) */
declare function imageCopy(image: Image): Image;
/** Create an image from another image piece */
declare function imageFromImage(image: Image, rec: Rectangle): Image;
/** Create an image from text (default font) */
declare function imageText(text: string, fontSize: number, color: Color): Image;
2023-05-15 21:02:41 +00:00
/** Create an image from text (custom sprite font) */
declare function imageTextEx(font: Font, text: string, fontSize: number, spacing: number, tint: Color): Image;
/** Convert image data to desired format */
2023-05-16 06:28:30 +00:00
declare function imageFormat(image: Image, newFormat: number): void;
2023-05-15 21:02:41 +00:00
/** Convert image to POT (power-of-two) */
2023-05-16 06:28:30 +00:00
declare function imageToPOT(image: Image, fill: Color): void;
2023-05-15 21:02:41 +00:00
/** Crop an image to a defined rectangle */
2023-05-16 06:28:30 +00:00
declare function imageCrop(image: Image, crop: Rectangle): void;
2023-05-15 21:02:41 +00:00
/** Crop image depending on alpha value */
2023-05-16 06:28:30 +00:00
declare function imageAlphaCrop(image: Image, threshold: number): void;
2023-05-15 21:02:41 +00:00
/** Clear alpha channel to desired color */
2023-05-16 06:28:30 +00:00
declare function imageAlphaClear(image: Image, color: Color, threshold: number): void;
2023-05-15 21:02:41 +00:00
/** Apply alpha mask to image */
2023-05-16 06:28:30 +00:00
declare function imageAlphaMask(image: Image, alphaMask: Image): void;
2023-05-15 21:02:41 +00:00
/** Premultiply alpha channel */
2023-05-16 06:28:30 +00:00
declare function imageAlphaPremultiply(image: Image): void;
2023-05-15 21:02:41 +00:00
/** Apply Gaussian blur using a box blur approximation */
2023-05-16 06:28:30 +00:00
declare function imageBlurGaussian(image: Image, blurSize: number): void;
2023-05-15 21:02:41 +00:00
/** Resize image (Bicubic scaling algorithm) */
2023-05-16 06:28:30 +00:00
declare function imageResize(image: Image, newWidth: number, newHeight: number): void;
2023-05-15 21:02:41 +00:00
/** Resize image (Nearest-Neighbor scaling algorithm) */
2023-05-16 06:28:30 +00:00
declare function imageResizeNN(image: Image, newWidth: number, newHeight: number): void;
2023-05-15 21:02:41 +00:00
/** Resize canvas and fill with color */
2023-05-16 06:28:30 +00:00
declare function imageResizeCanvas(image: Image, newWidth: number, newHeight: number, offsetX: number, offsetY: number, fill: Color): void;
2023-05-15 21:02:41 +00:00
/** Compute all mipmap levels for a provided image */
2023-05-16 06:28:30 +00:00
declare function imageMipmaps(image: Image): void;
2023-05-15 21:02:41 +00:00
/** Dither image data to 16bpp or lower (Floyd-Steinberg dithering) */
2023-05-16 06:28:30 +00:00
declare function imageDither(image: Image, rBpp: number, gBpp: number, bBpp: number, aBpp: number): void;
2023-05-15 21:02:41 +00:00
/** Flip image vertically */
2023-05-16 06:28:30 +00:00
declare function imageFlipVertical(image: Image): void;
2023-05-15 21:02:41 +00:00
/** Flip image horizontally */
2023-05-16 06:28:30 +00:00
declare function imageFlipHorizontal(image: Image): void;
2023-05-15 21:02:41 +00:00
/** Rotate image clockwise 90deg */
2023-05-16 06:28:30 +00:00
declare function imageRotateCW(image: Image): void;
2023-05-15 21:02:41 +00:00
/** Rotate image counter-clockwise 90deg */
2023-05-16 06:28:30 +00:00
declare function imageRotateCCW(image: Image): void;
2023-05-15 21:02:41 +00:00
/** Modify image color: tint */
2023-05-16 06:28:30 +00:00
declare function imageColorTint(image: Image, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Modify image color: invert */
2023-05-16 06:28:30 +00:00
declare function imageColorInvert(image: Image): void;
2023-05-15 21:02:41 +00:00
/** Modify image color: grayscale */
2023-05-16 06:28:30 +00:00
declare function imageColorGrayscale(image: Image): void;
2023-05-15 21:02:41 +00:00
/** Modify image color: contrast (-100 to 100) */
2023-05-16 06:28:30 +00:00
declare function imageColorContrast(image: Image, contrast: number): void;
2023-05-15 21:02:41 +00:00
/** Modify image color: brightness (-255 to 255) */
2023-05-16 06:28:30 +00:00
declare function imageColorBrightness(image: Image, brightness: number): void;
2023-05-15 21:02:41 +00:00
/** Modify image color: replace color */
2023-05-16 06:28:30 +00:00
declare function imageColorReplace(image: Image, color: Color, replace: Color): void;
/** Load color data from image as a Color array (RGBA - 32bit) */
declare function loadImageColors(image: Image): ArrayBuffer;
2023-05-14 20:19:47 +00:00
/** Get image alpha border rectangle */
declare function getImageAlphaBorder(image: Image, threshold: number): Rectangle;
/** Get image pixel color at (x, y) position */
declare function getImageColor(image: Image, x: number, y: number): Color;
2023-05-15 21:02:41 +00:00
/** Clear image background with given color */
2023-05-16 06:28:30 +00:00
declare function imageClearBackground(dst: Image, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw pixel within an image */
2023-05-16 06:28:30 +00:00
declare function imageDrawPixel(dst: Image, posX: number, posY: number, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw pixel within an image (Vector version) */
2023-05-16 06:28:30 +00:00
declare function imageDrawPixelV(dst: Image, position: Vector2, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw line within an image */
2023-05-16 06:28:30 +00:00
declare function imageDrawLine(dst: Image, startPosX: number, startPosY: number, endPosX: number, endPosY: number, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw line within an image (Vector version) */
2023-05-16 06:28:30 +00:00
declare function imageDrawLineV(dst: Image, start: Vector2, end: Vector2, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw a filled circle within an image */
2023-05-16 06:28:30 +00:00
declare function imageDrawCircle(dst: Image, centerX: number, centerY: number, radius: number, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw a filled circle within an image (Vector version) */
2023-05-16 06:28:30 +00:00
declare function imageDrawCircleV(dst: Image, center: Vector2, radius: number, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw circle outline within an image */
2023-05-16 06:28:30 +00:00
declare function imageDrawCircleLines(dst: Image, centerX: number, centerY: number, radius: number, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw circle outline within an image (Vector version) */
2023-05-16 06:28:30 +00:00
declare function imageDrawCircleLinesV(dst: Image, center: Vector2, radius: number, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw rectangle within an image */
2023-05-16 06:28:30 +00:00
declare function imageDrawRectangle(dst: Image, posX: number, posY: number, width: number, height: number, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw rectangle within an image (Vector version) */
2023-05-16 06:28:30 +00:00
declare function imageDrawRectangleV(dst: Image, position: Vector2, size: Vector2, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw rectangle within an image */
2023-05-16 06:28:30 +00:00
declare function imageDrawRectangleRec(dst: Image, rec: Rectangle, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw rectangle lines within an image */
2023-05-16 06:28:30 +00:00
declare function imageDrawRectangleLines(dst: Image, rec: Rectangle, thick: number, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw a source image within a destination image (tint applied to source) */
2023-05-16 06:28:30 +00:00
declare function imageDraw(dst: Image, src: Image, srcRec: Rectangle, dstRec: Rectangle, tint: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw text (using default font) within an image (destination) */
2023-05-16 06:28:30 +00:00
declare function imageDrawText(dst: Image, text: string, posX: number, posY: number, fontSize: number, color: Color): void;
2023-05-15 21:02:41 +00:00
/** Draw text (custom sprite font) within an image (destination) */
2023-05-16 06:28:30 +00:00
declare function imageDrawTextEx(dst: Image, font: Font, text: string, position: Vector2, fontSize: number, spacing: number, tint: Color): void;
2023-05-14 20:19:47 +00:00
/** Load texture from file into GPU memory (VRAM) */
2023-05-16 06:28:30 +00:00
declare function loadTexture(fileName: string): Texture;
2023-05-14 20:19:47 +00:00
/** Load texture from image data */
2023-05-16 06:28:30 +00:00
declare function loadTextureFromImage(image: Image): Texture;
2023-05-14 20:19:47 +00:00
/** Load cubemap from image, multiple image cubemap layouts supported */
2023-05-16 06:28:30 +00:00
declare function loadTextureCubemap(image: Image, layout: number): Texture;
/** Load texture for rendering (framebuffer) */
declare function loadRenderTexture(width: number, height: number): RenderTexture;
2023-05-14 20:19:47 +00:00
/** Check if a texture is ready */
2023-05-16 06:28:30 +00:00
declare function isTextureReady(texture: Texture): boolean;
/** Unload texture from GPU memory (VRAM) */
declare function unloadTexture(texture: Texture): void;
/** Check if a render texture is ready */
declare function isRenderTextureReady(target: RenderTexture): boolean;
/** Unload render texture from GPU memory (VRAM) */
declare function unloadRenderTexture(target: RenderTexture): void;
2023-05-24 20:47:17 +00:00
/** Update GPU texture with new data */
declare function updateTexture(texture: Texture, pixels: any): void;
/** Update GPU texture rectangle with new data */
declare function updateTextureRec(texture: Texture, rec: Rectangle, pixels: any): void;
2023-05-15 21:02:41 +00:00
/** Generate GPU mipmaps for a texture */
declare function genTextureMipmaps(texture: Texture): void;
2023-05-14 20:19:47 +00:00
/** Set texture scaling filter mode */
2023-05-16 06:28:30 +00:00
declare function setTextureFilter(texture: Texture, filter: number): void;
2023-05-14 20:19:47 +00:00
/** Set texture wrapping mode */
2023-05-16 06:28:30 +00:00
declare function setTextureWrap(texture: Texture, wrap: number): void;
2023-05-14 20:19:47 +00:00
/** Draw a Texture2D */
2023-05-16 06:28:30 +00:00
declare function drawTexture(texture: Texture, posX: number, posY: number, tint: Color): void;
2023-05-14 20:19:47 +00:00
/** Draw a Texture2D with position defined as Vector2 */
2023-05-16 06:28:30 +00:00
declare function drawTextureV(texture: Texture, position: Vector2, tint: Color): void;
2023-05-14 20:19:47 +00:00
/** Draw a Texture2D with extended parameters */
2023-05-16 06:28:30 +00:00
declare function drawTextureEx(texture: Texture, position: Vector2, rotation: number, scale: number, tint: Color): void;
2023-05-14 20:19:47 +00:00
/** Draw a part of a texture defined by a rectangle */
2023-05-16 06:28:30 +00:00
declare function drawTextureRec(texture: Texture, source: Rectangle, position: Vector2, tint: Color): void;
2023-05-14 20:19:47 +00:00
/** Draw a part of a texture defined by a rectangle with 'pro' parameters */
2023-05-16 06:28:30 +00:00
declare function drawTexturePro(texture: Texture, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: number, tint: Color): void;
/** Draws a texture (or part of it) that stretches or shrinks nicely */
declare function drawTextureNPatch(texture: Texture, nPatchInfo: NPatchInfo, dest: Rectangle, origin: Vector2, rotation: number, tint: Color): void;
2023-05-14 20:19:47 +00:00
/** Get color with alpha applied, alpha goes from 0.0f to 1.0f */
declare function fade(color: Color, alpha: number): Color;
/** Get hexadecimal value for a Color */
declare function colorToInt(color: Color): number;
/** Get Color normalized as float [0..1] */
declare function colorNormalize(color: Color): Vector4;
/** Get Color from normalized values [0..1] */
declare function colorFromNormalized(normalized: Vector4): Color;
/** Get HSV values for a Color, hue [0..360], saturation/value [0..1] */
declare function colorToHSV(color: Color): Vector3;
/** Get a Color from HSV values, hue [0..360], saturation/value [0..1] */
declare function colorFromHSV(hue: number, saturation: number, value: number): Color;
/** Get color multiplied with another color */
declare function colorTint(color: Color, tint: Color): Color;
/** Get color with brightness correction, brightness factor goes from -1.0f to 1.0f */
declare function colorBrightness(color: Color, factor: number): Color;
/** Get color with contrast correction, contrast values between -1.0f and 1.0f */
declare function colorContrast(color: Color, contrast: number): Color;
/** Get color with alpha applied, alpha goes from 0.0f to 1.0f */
declare function colorAlpha(color: Color, alpha: number): Color;
/** Get src alpha-blended into dst color with tint */
declare function colorAlphaBlend(dst: Color, src: Color, tint: Color): Color;
/** Get Color structure from hexadecimal value */
declare function getColor(hexValue: number): Color;
/** Get pixel data size in bytes for certain format */
declare function getPixelDataSize(width: number, height: number, format: number): number;
/** Get the default Font */
declare function getFontDefault(): Font;
/** Load font from file into GPU memory (VRAM) */
declare function loadFont(fileName: string): Font;
/** Load font from Image (XNA style) */
declare function loadFontFromImage(image: Image, key: Color, firstChar: number): Font;
/** Check if a font is ready */
declare function isFontReady(font: Font): boolean;
/** Unload font from GPU memory (VRAM) */
declare function unloadFont(font: Font): void;
2023-05-14 20:19:47 +00:00
/** Draw current FPS */
declare function drawFPS(posX: number, posY: number): void;
/** Draw text (using default font) */
declare function drawText(text: string, posX: number, posY: number, fontSize: number, color: Color): void;
/** Draw text using font and additional parameters */
declare function drawTextEx(font: Font, text: string, position: Vector2, fontSize: number, spacing: number, tint: Color): void;
/** Draw text using Font and pro parameters (rotation) */
declare function drawTextPro(font: Font, text: string, position: Vector2, origin: Vector2, rotation: number, fontSize: number, spacing: number, tint: Color): void;
/** Draw one character (codepoint) */
declare function drawTextCodepoint(font: Font, codepoint: number, position: Vector2, fontSize: number, tint: Color): void;
/** Measure string width for default font */
declare function measureText(text: string, fontSize: number): number;
/** Measure string size for Font */
declare function measureTextEx(font: Font, text: string, fontSize: number, spacing: number): Vector2;
/** Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found */
declare function getGlyphIndex(font: Font, codepoint: number): number;
/** Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found */
declare function getGlyphAtlasRec(font: Font, codepoint: number): Rectangle;
/** Draw a line in 3D world space */
declare function drawLine3D(startPos: Vector3, endPos: Vector3, color: Color): void;
/** Draw a point in 3D space, actually a small line */
declare function drawPoint3D(position: Vector3, color: Color): void;
/** Draw a circle in 3D world space */
declare function drawCircle3D(center: Vector3, radius: number, rotationAxis: Vector3, rotationAngle: number, color: Color): void;
/** Draw a color-filled triangle (vertex in counter-clockwise order!) */
declare function drawTriangle3D(v1: Vector3, v2: Vector3, v3: Vector3, color: Color): void;
/** Draw cube */
declare function drawCube(position: Vector3, width: number, height: number, length: number, color: Color): void;
/** Draw cube (Vector version) */
declare function drawCubeV(position: Vector3, size: Vector3, color: Color): void;
/** Draw cube wires */
declare function drawCubeWires(position: Vector3, width: number, height: number, length: number, color: Color): void;
/** Draw cube wires (Vector version) */
declare function drawCubeWiresV(position: Vector3, size: Vector3, color: Color): void;
/** Draw sphere */
declare function drawSphere(centerPos: Vector3, radius: number, color: Color): void;
/** Draw sphere with extended parameters */
declare function drawSphereEx(centerPos: Vector3, radius: number, rings: number, slices: number, color: Color): void;
/** Draw sphere wires */
declare function drawSphereWires(centerPos: Vector3, radius: number, rings: number, slices: number, color: Color): void;
/** Draw a cylinder/cone */
declare function drawCylinder(position: Vector3, radiusTop: number, radiusBottom: number, height: number, slices: number, color: Color): void;
/** Draw a cylinder with base at startPos and top at endPos */
declare function drawCylinderEx(startPos: Vector3, endPos: Vector3, startRadius: number, endRadius: number, sides: number, color: Color): void;
/** Draw a cylinder/cone wires */
declare function drawCylinderWires(position: Vector3, radiusTop: number, radiusBottom: number, height: number, slices: number, color: Color): void;
/** Draw a cylinder wires with base at startPos and top at endPos */
declare function drawCylinderWiresEx(startPos: Vector3, endPos: Vector3, startRadius: number, endRadius: number, sides: number, color: Color): void;
/** Draw a capsule with the center of its sphere caps at startPos and endPos */
declare function drawCapsule(startPos: Vector3, endPos: Vector3, radius: number, slices: number, rings: number, color: Color): void;
/** Draw capsule wireframe with the center of its sphere caps at startPos and endPos */
declare function drawCapsuleWires(startPos: Vector3, endPos: Vector3, radius: number, slices: number, rings: number, color: Color): void;
/** Draw a plane XZ */
declare function drawPlane(centerPos: Vector3, size: Vector2, color: Color): void;
/** Draw a ray line */
declare function drawRay(ray: Ray, color: Color): void;
/** Draw a grid (centered at (0, 0, 0)) */
declare function drawGrid(slices: number, spacing: number): void;
/** Load model from files (meshes and materials) */
declare function loadModel(fileName: string): Model;
/** Load model from generated mesh (default material) */
declare function loadModelFromMesh(mesh: Mesh): Model;
/** Check if a model is ready */
declare function isModelReady(model: Model): boolean;
/** Unload model (including meshes) from memory (RAM and/or VRAM) */
declare function unloadModel(model: Model): void;
2023-05-14 20:19:47 +00:00
/** Compute model bounding box limits (considers all meshes) */
declare function getModelBoundingBox(model: Model): BoundingBox;
/** Draw a model (with texture if set) */
declare function drawModel(model: Model, position: Vector3, scale: number, tint: Color): void;
/** Draw a model with extended parameters */
declare function drawModelEx(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: number, scale: Vector3, tint: Color): void;
/** Draw a model wires (with texture if set) */
declare function drawModelWires(model: Model, position: Vector3, scale: number, tint: Color): void;
/** Draw a model wires (with texture if set) with extended parameters */
declare function drawModelWiresEx(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: number, scale: Vector3, tint: Color): void;
/** Draw bounding box (wires) */
declare function drawBoundingBox(box: BoundingBox, color: Color): void;
/** Draw a billboard texture */
2023-05-16 06:28:30 +00:00
declare function drawBillboard(camera: Camera3D, texture: Texture, position: Vector3, size: number, tint: Color): void;
2023-05-14 20:19:47 +00:00
/** Draw a billboard texture defined by source */
2023-05-16 06:28:30 +00:00
declare function drawBillboardRec(camera: Camera3D, texture: Texture, source: Rectangle, position: Vector3, size: Vector2, tint: Color): void;
2023-05-14 20:19:47 +00:00
/** Draw a billboard texture defined by source and rotation */
2023-05-16 06:28:30 +00:00
declare function drawBillboardPro(camera: Camera3D, texture: Texture, source: Rectangle, position: Vector3, up: Vector3, size: Vector2, origin: Vector2, rotation: number, tint: Color): void;
2023-05-15 21:02:41 +00:00
/** Upload mesh vertex data in GPU and provide VAO/VBO ids */
2023-05-16 06:28:30 +00:00
declare function uploadMesh(mesh: Mesh, dynamic: boolean): void;
/** Update mesh vertex data in GPU for a specific buffer index */
declare function updateMeshBuffer(mesh: Mesh, index: number, data: any, dataSize: number, offset: number): void;
/** Unload mesh data from CPU and GPU */
declare function unloadMesh(mesh: Mesh): void;
/** Draw a 3d mesh with material and transform */
declare function drawMesh(mesh: Mesh, material: Material, transform: Matrix): void;
/** Draw multiple mesh instances with material and different transforms */
declare function drawMeshInstanced(mesh: Mesh, material: Material, transforms: Matrix, instances: number): void;
2023-05-14 20:19:47 +00:00
/** Export mesh data to file, returns true on success */
declare function exportMesh(mesh: Mesh, fileName: string): boolean;
/** Compute mesh bounding box limits */
declare function getMeshBoundingBox(mesh: Mesh): BoundingBox;
2023-05-15 21:02:41 +00:00
/** Compute mesh tangents */
2023-05-16 06:28:30 +00:00
declare function genMeshTangents(mesh: Mesh): void;
2023-05-14 20:19:47 +00:00
/** Generate polygonal mesh */
declare function genMeshPoly(sides: number, radius: number): Mesh;
/** Generate plane mesh (with subdivisions) */
declare function genMeshPlane(width: number, length: number, resX: number, resZ: number): Mesh;
/** Generate cuboid mesh */
declare function genMeshCube(width: number, height: number, length: number): Mesh;
/** Generate sphere mesh (standard sphere) */
declare function genMeshSphere(radius: number, rings: number, slices: number): Mesh;
/** Generate half-sphere mesh (no bottom cap) */
declare function genMeshHemiSphere(radius: number, rings: number, slices: number): Mesh;
/** Generate cylinder mesh */
declare function genMeshCylinder(radius: number, height: number, slices: number): Mesh;
/** Generate cone/pyramid mesh */
declare function genMeshCone(radius: number, height: number, slices: number): Mesh;
/** Generate torus mesh */
declare function genMeshTorus(radius: number, size: number, radSeg: number, sides: number): Mesh;
/** Generate trefoil knot mesh */
declare function genMeshKnot(radius: number, size: number, radSeg: number, sides: number): Mesh;
/** Generate heightmap mesh from image data */
declare function genMeshHeightmap(heightmap: Image, size: Vector3): Mesh;
/** Generate cubes-based map mesh from image data */
declare function genMeshCubicmap(cubicmap: Image, cubeSize: Vector3): Mesh;
/** Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps) */
declare function loadMaterialDefault(): Material;
/** Check if a material is ready */
declare function isMaterialReady(material: Material): boolean;
/** Unload material from GPU memory (VRAM) */
declare function unloadMaterial(material: Material): void;
/** Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...) */
declare function setMaterialTexture(material: Material, mapType: number, texture: Texture): void;
/** Replace material in slot materialIndex */
declare function setModelMaterial(model: Model, materialIndex: number, material: Material): void;
/** Set material for a mesh */
declare function setModelMeshMaterial(model: Model, meshId: number, materialId: number): void;
2023-05-14 20:19:47 +00:00
/** Check collision between two spheres */
declare function checkCollisionSpheres(center1: Vector3, radius1: number, center2: Vector3, radius2: number): boolean;
/** Check collision between two bounding boxes */
declare function checkCollisionBoxes(box1: BoundingBox, box2: BoundingBox): boolean;
/** Check collision between box and sphere */
declare function checkCollisionBoxSphere(box: BoundingBox, center: Vector3, radius: number): boolean;
/** Get collision info between ray and sphere */
declare function getRayCollisionSphere(ray: Ray, center: Vector3, radius: number): RayCollision;
/** Get collision info between ray and box */
declare function getRayCollisionBox(ray: Ray, box: BoundingBox): RayCollision;
/** Get collision info between ray and mesh */
declare function getRayCollisionMesh(ray: Ray, mesh: Mesh, transform: Matrix): RayCollision;
/** Get collision info between ray and triangle */
declare function getRayCollisionTriangle(ray: Ray, p1: Vector3, p2: Vector3, p3: Vector3): RayCollision;
/** Get collision info between ray and quad */
declare function getRayCollisionQuad(ray: Ray, p1: Vector3, p2: Vector3, p3: Vector3, p4: Vector3): RayCollision;
/** Initialize audio device and context */
declare function initAudioDevice(): void;
/** Close the audio device and context */
declare function closeAudioDevice(): void;
/** Check if audio device has been initialized successfully */
declare function isAudioDeviceReady(): boolean;
/** Set master volume (listener) */
declare function setMasterVolume(volume: number): void;
/** Load wave data from file */
declare function loadWave(fileName: string): Wave;
2023-05-24 20:47:17 +00:00
/** Load wave from memory buffer, fileType refers to extension: i.e. '.wav' */
declare function loadWaveFromMemory(fileType: string, fileData: ArrayBuffer, dataSize: number): Wave;
2023-05-14 20:19:47 +00:00
/** Checks if wave data is ready */
declare function isWaveReady(wave: Wave): boolean;
/** Load sound from file */
declare function loadSound(fileName: string): Sound;
/** Load sound from wave data */
declare function loadSoundFromWave(wave: Wave): Sound;
/** Checks if a sound is ready */
declare function isSoundReady(sound: Sound): boolean;
2023-05-24 20:47:17 +00:00
/** Update sound buffer with new data */
declare function updateSound(sound: Sound, data: any, sampleCount: number): void;
/** Unload wave data */
declare function unloadWave(wave: Wave): void;
/** Unload sound */
declare function unloadSound(sound: Sound): void;
2023-05-14 20:19:47 +00:00
/** Export wave data to file, returns true on success */
declare function exportWave(wave: Wave, fileName: string): boolean;
/** Play a sound */
declare function playSound(sound: Sound): void;
/** Stop playing a sound */
declare function stopSound(sound: Sound): void;
/** Pause a sound */
declare function pauseSound(sound: Sound): void;
/** Resume a paused sound */
declare function resumeSound(sound: Sound): void;
/** Check if a sound is currently playing */
declare function isSoundPlaying(sound: Sound): boolean;
/** Set volume for a sound (1.0 is max level) */
declare function setSoundVolume(sound: Sound, volume: number): void;
/** Set pitch for a sound (1.0 is base level) */
declare function setSoundPitch(sound: Sound, pitch: number): void;
/** Set pan for a sound (0.5 is center) */
declare function setSoundPan(sound: Sound, pan: number): void;
/** Copy a wave to a new wave */
declare function waveCopy(wave: Wave): Wave;
2023-05-15 21:02:41 +00:00
/** Crop a wave to defined samples range */
2023-05-16 06:28:30 +00:00
declare function waveCrop(wave: Wave, initSample: number, finalSample: number): void;
2023-05-15 21:02:41 +00:00
/** Convert wave data to desired format */
2023-05-16 06:28:30 +00:00
declare function waveFormat(wave: Wave, sampleRate: number, sampleSize: number, channels: number): void;
2023-05-14 20:19:47 +00:00
/** Load music stream from file */
declare function loadMusicStream(fileName: string): Music;
/** Checks if a music stream is ready */
declare function isMusicReady(music: Music): boolean;
/** Unload music stream */
declare function unloadMusicStream(music: Music): void;
2023-05-14 20:19:47 +00:00
/** Start music playing */
declare function playMusicStream(music: Music): void;
/** Check if music is playing */
declare function isMusicStreamPlaying(music: Music): boolean;
/** Updates buffers for music streaming */
declare function updateMusicStream(music: Music): void;
/** Stop music playing */
declare function stopMusicStream(music: Music): void;
/** Pause music playing */
declare function pauseMusicStream(music: Music): void;
/** Resume playing paused music */
declare function resumeMusicStream(music: Music): void;
/** Seek music to a position (in seconds) */
declare function seekMusicStream(music: Music, position: number): void;
/** Set volume for music (1.0 is max level) */
declare function setMusicVolume(music: Music, volume: number): void;
/** Set pitch for a music (1.0 is base level) */
declare function setMusicPitch(music: Music, pitch: number): void;
/** Set pan for a music (0.5 is center) */
declare function setMusicPan(music: Music, pan: number): void;
/** Get music time length (in seconds) */
declare function getMusicTimeLength(music: Music): number;
/** Get current music time played (in seconds) */
declare function getMusicTimePlayed(music: Music): number;
/** Clamp float value */
2023-05-15 15:44:28 +00:00
declare function clamp(value: number, min: number, max: number): number;
/** Calculate linear interpolation between two floats */
2023-05-15 15:44:28 +00:00
declare function lerp(start: number, end: number, amount: number): number;
/** Normalize input value within input range */
2023-05-15 15:44:28 +00:00
declare function normalize(value: number, start: number, end: number): number;
/** Remap input value within input range to output range */
2023-05-15 15:44:28 +00:00
declare function remap(value: number, inputStart: number, inputEnd: number, outputStart: number, outputEnd: number): number;
/** Wrap input value from min to max */
2023-05-15 15:44:28 +00:00
declare function wrap(value: number, min: number, max: number): number;
/** Check whether two given floats are almost equal */
2023-05-15 15:44:28 +00:00
declare function floatEquals(x: number, y: number): number;
/** Vector with components value 0.0f */
2023-05-15 15:44:28 +00:00
declare function vector2Zero(): Vector2;
/** Vector with components value 1.0f */
2023-05-15 15:44:28 +00:00
declare function vector2One(): Vector2;
/** Add two vectors (v1 + v2) */
2023-05-15 15:44:28 +00:00
declare function vector2Add(v1: Vector2, v2: Vector2): Vector2;
/** Add vector and float value */
2023-05-15 15:44:28 +00:00
declare function vector2AddValue(v: Vector2, add: number): Vector2;
/** Subtract two vectors (v1 - v2) */
2023-05-15 15:44:28 +00:00
declare function vector2Subtract(v1: Vector2, v2: Vector2): Vector2;
/** Subtract vector by float value */
2023-05-15 15:44:28 +00:00
declare function vector2SubtractValue(v: Vector2, sub: number): Vector2;
/** Calculate vector length */
2023-05-15 15:44:28 +00:00
declare function vector2Length(v: Vector2): number;
/** Calculate vector square length */
2023-05-15 15:44:28 +00:00
declare function vector2LengthSqr(v: Vector2): number;
/** Calculate two vectors dot product */
2023-05-15 15:44:28 +00:00
declare function vector2DotProduct(v1: Vector2, v2: Vector2): number;
/** Calculate distance between two vectors */
2023-05-15 15:44:28 +00:00
declare function vector2Distance(v1: Vector2, v2: Vector2): number;
/** Calculate square distance between two vectors */
2023-05-15 15:44:28 +00:00
declare function vector2DistanceSqr(v1: Vector2, v2: Vector2): number;
/** Calculate angle between two vectors
NOTE: Angle is calculated from origin point (0, 0) */
2023-05-15 15:44:28 +00:00
declare function vector2Angle(v1: Vector2, v2: Vector2): number;
/** Calculate angle defined by a two vectors line
NOTE: Parameters need to be normalized
Current implementation should be aligned with glm::angle */
2023-05-15 15:44:28 +00:00
declare function vector2LineAngle(start: Vector2, end: Vector2): number;
/** Scale vector (multiply by value) */
2023-05-15 15:44:28 +00:00
declare function vector2Scale(v: Vector2, scale: number): Vector2;
/** Multiply vector by vector */
2023-05-15 15:44:28 +00:00
declare function vector2Multiply(v1: Vector2, v2: Vector2): Vector2;
/** Negate vector */
2023-05-15 15:44:28 +00:00
declare function vector2Negate(v: Vector2): Vector2;
/** Divide vector by vector */
2023-05-15 15:44:28 +00:00
declare function vector2Divide(v1: Vector2, v2: Vector2): Vector2;
/** Normalize provided vector */
2023-05-15 15:44:28 +00:00
declare function vector2Normalize(v: Vector2): Vector2;
/** Transforms a Vector2 by a given Matrix */
2023-05-15 15:44:28 +00:00
declare function vector2Transform(v: Vector2, mat: Matrix): Vector2;
/** Calculate linear interpolation between two vectors */
2023-05-15 15:44:28 +00:00
declare function vector2Lerp(v1: Vector2, v2: Vector2, amount: number): Vector2;
/** Calculate reflected vector to normal */
2023-05-15 15:44:28 +00:00
declare function vector2Reflect(v: Vector2, normal: Vector2): Vector2;
/** Rotate vector by angle */
2023-05-15 15:44:28 +00:00
declare function vector2Rotate(v: Vector2, angle: number): Vector2;
/** Move Vector towards target */
2023-05-15 15:44:28 +00:00
declare function vector2MoveTowards(v: Vector2, target: Vector2, maxDistance: number): Vector2;
/** Invert the given vector */
2023-05-15 15:44:28 +00:00
declare function vector2Invert(v: Vector2): Vector2;
/** Clamp the components of the vector between
min and max values specified by the given vectors */
2023-05-15 15:44:28 +00:00
declare function vector2Clamp(v: Vector2, min: Vector2, max: Vector2): Vector2;
/** Clamp the magnitude of the vector between two min and max values */
2023-05-15 15:44:28 +00:00
declare function vector2ClampValue(v: Vector2, min: number, max: number): Vector2;
/** Check whether two given vectors are almost equal */
2023-05-15 15:44:28 +00:00
declare function vector2Equals(p: Vector2, q: Vector2): number;
/** Vector with components value 0.0f */
2023-05-15 15:44:28 +00:00
declare function vector3Zero(): Vector3;
/** Vector with components value 1.0f */
2023-05-15 15:44:28 +00:00
declare function vector3One(): Vector3;
/** Add two vectors */
2023-05-15 15:44:28 +00:00
declare function vector3Add(v1: Vector3, v2: Vector3): Vector3;
/** Add vector and float value */
2023-05-15 15:44:28 +00:00
declare function vector3AddValue(v: Vector3, add: number): Vector3;
/** Subtract two vectors */
2023-05-15 21:02:41 +00:00
declare function vector3Subtract(v1: Vector3, v2: Vector3): Vector3;
/** Subtract vector by float value */
2023-05-15 21:02:41 +00:00
declare function vector3SubtractValue(v: Vector3, sub: number): Vector3;
/** Multiply vector by scalar */
2023-05-15 21:02:41 +00:00
declare function vector3Scale(v: Vector3, scalar: number): Vector3;
/** Multiply vector by vector */
2023-05-15 21:02:41 +00:00
declare function vector3Multiply(v1: Vector3, v2: Vector3): Vector3;
/** Calculate two vectors cross product */
2023-05-15 21:02:41 +00:00
declare function vector3CrossProduct(v1: Vector3, v2: Vector3): Vector3;
/** Calculate one vector perpendicular vector */
2023-05-15 21:02:41 +00:00
declare function vector3Perpendicular(v: Vector3): Vector3;
/** Calculate vector length */
declare function vector3Length(v: Vector3): number;
/** Calculate vector square length */
declare function vector3LengthSqr(v: Vector3): number;
/** Calculate two vectors dot product */
2023-05-15 21:02:41 +00:00
declare function vector3DotProduct(v1: Vector3, v2: Vector3): number;
/** Calculate distance between two vectors */
2023-05-15 21:02:41 +00:00
declare function vector3Distance(v1: Vector3, v2: Vector3): number;
/** Calculate square distance between two vectors */
2023-05-15 21:02:41 +00:00
declare function vector3DistanceSqr(v1: Vector3, v2: Vector3): number;
/** Calculate angle between two vectors */
2023-05-15 21:02:41 +00:00
declare function vector3Angle(v1: Vector3, v2: Vector3): number;
/** Negate provided vector (invert direction) */
2023-05-15 21:02:41 +00:00
declare function vector3Negate(v: Vector3): Vector3;
/** Divide vector by vector */
2023-05-15 21:02:41 +00:00
declare function vector3Divide(v1: Vector3, v2: Vector3): Vector3;
/** Normalize provided vector */
2023-05-15 21:02:41 +00:00
declare function vector3Normalize(v: Vector3): Vector3;
/** Transforms a Vector3 by a given Matrix */
2023-05-15 21:02:41 +00:00
declare function vector3Transform(v: Vector3, mat: Matrix): Vector3;
/** Transform a vector by quaternion rotation */
2023-05-16 06:28:30 +00:00
declare function vector3RotateByQuaternion(v: Vector3, q: Vector4): Vector3;
/** Rotates a vector around an axis */
2023-05-15 21:02:41 +00:00
declare function vector3RotateByAxisAngle(v: Vector3, axis: Vector3, angle: number): Vector3;
/** Calculate linear interpolation between two vectors */
2023-05-15 21:02:41 +00:00
declare function vector3Lerp(v1: Vector3, v2: Vector3, amount: number): Vector3;
/** Calculate reflected vector to normal */
2023-05-15 21:02:41 +00:00
declare function vector3Reflect(v: Vector3, normal: Vector3): Vector3;
/** Get min value for each pair of components */
2023-05-15 21:02:41 +00:00
declare function vector3Min(v1: Vector3, v2: Vector3): Vector3;
/** Get max value for each pair of components */
2023-05-15 21:02:41 +00:00
declare function vector3Max(v1: Vector3, v2: Vector3): Vector3;
/** Compute barycenter coordinates (u, v, w) for point p with respect to triangle (a, b, c)
NOTE: Assumes P is on the plane of the triangle */
2023-05-15 21:02:41 +00:00
declare function vector3Barycenter(p: Vector3, a: Vector3, b: Vector3, c: Vector3): Vector3;
/** Projects a Vector3 from screen space into object space
NOTE: We are avoiding calling other raymath functions despite available */
2023-05-15 21:02:41 +00:00
declare function vector3Unproject(source: Vector3, projection: Matrix, view: Matrix): Vector3;
/** Invert the given vector */
2023-05-15 21:02:41 +00:00
declare function vector3Invert(v: Vector3): Vector3;
/** Clamp the components of the vector between
min and max values specified by the given vectors */
2023-05-15 21:02:41 +00:00
declare function vector3Clamp(v: Vector3, min: Vector3, max: Vector3): Vector3;
/** Clamp the magnitude of the vector between two values */
2023-05-15 21:02:41 +00:00
declare function vector3ClampValue(v: Vector3, min: number, max: number): Vector3;
/** Check whether two given vectors are almost equal */
2023-05-15 21:02:41 +00:00
declare function vector3Equals(p: Vector3, q: Vector3): number;
/** Compute the direction of a refracted ray where v specifies the
normalized direction of the incoming ray, n specifies the
normalized normal vector of the interface of two optical media,
and r specifies the ratio of the refractive index of the medium
from where the ray comes to the refractive index of the medium
on the other side of the surface */
2023-05-15 21:02:41 +00:00
declare function vector3Refract(v: Vector3, n: Vector3, r: number): Vector3;
/** Compute matrix determinant */
2023-05-15 21:02:41 +00:00
declare function matrixDeterminant(mat: Matrix): number;
/** Get the trace of the matrix (sum of the values along the diagonal) */
2023-05-15 21:02:41 +00:00
declare function matrixTrace(mat: Matrix): number;
/** Transposes provided matrix */
2023-05-15 21:02:41 +00:00
declare function matrixTranspose(mat: Matrix): Matrix;
/** Invert provided matrix */
2023-05-15 21:02:41 +00:00
declare function matrixInvert(mat: Matrix): Matrix;
/** Get identity matrix */
2023-05-15 21:02:41 +00:00
declare function matrixIdentity(): Matrix;
/** Add two matrices */
2023-05-15 21:02:41 +00:00
declare function matrixAdd(left: Matrix, right: Matrix): Matrix;
/** Subtract two matrices (left - right) */
2023-05-15 21:02:41 +00:00
declare function matrixSubtract(left: Matrix, right: Matrix): Matrix;
/** Get two matrix multiplication
NOTE: When multiplying matrices... the order matters! */
2023-05-15 21:02:41 +00:00
declare function matrixMultiply(left: Matrix, right: Matrix): Matrix;
/** Get translation matrix */
2023-05-15 21:02:41 +00:00
declare function matrixTranslate(x: number, y: number, z: number): Matrix;
/** Create rotation matrix from axis and angle
NOTE: Angle should be provided in radians */
2023-05-15 21:02:41 +00:00
declare function matrixRotate(axis: Vector3, angle: number): Matrix;
/** Get x-rotation matrix
NOTE: Angle must be provided in radians */
2023-05-15 21:02:41 +00:00
declare function matrixRotateX(angle: number): Matrix;
/** Get y-rotation matrix
NOTE: Angle must be provided in radians */
2023-05-15 21:02:41 +00:00
declare function matrixRotateY(angle: number): Matrix;
/** Get z-rotation matrix
NOTE: Angle must be provided in radians */
2023-05-15 21:02:41 +00:00
declare function matrixRotateZ(angle: number): Matrix;
/** Get xyz-rotation matrix
NOTE: Angle must be provided in radians */
2023-05-15 21:02:41 +00:00
declare function matrixRotateXYZ(angle: Vector3): Matrix;
/** Get zyx-rotation matrix
NOTE: Angle must be provided in radians */
2023-05-15 21:02:41 +00:00
declare function matrixRotateZYX(angle: Vector3): Matrix;
/** Get scaling matrix */
2023-05-15 21:02:41 +00:00
declare function matrixScale(x: number, y: number, z: number): Matrix;
/** Get perspective projection matrix */
2023-05-15 21:02:41 +00:00
declare function matrixFrustum(left: number, right: number, bottom: number, top: number, near: number, far: number): Matrix;
/** Get perspective projection matrix
NOTE: Fovy angle must be provided in radians */
2023-05-15 21:02:41 +00:00
declare function matrixPerspective(fovy: number, aspect: number, near: number, far: number): Matrix;
/** Get orthographic projection matrix */
2023-05-15 21:02:41 +00:00
declare function matrixOrtho(left: number, right: number, bottom: number, top: number, near: number, far: number): Matrix;
/** Get camera look-at matrix (view matrix) */
2023-05-15 21:02:41 +00:00
declare function matrixLookAt(eye: Vector3, target: Vector3, up: Vector3): Matrix;
/** Add two quaternions */
2023-05-16 06:28:30 +00:00
declare function quaternionAdd(q1: Vector4, q2: Vector4): Vector4;
/** Add quaternion and float value */
2023-05-16 06:28:30 +00:00
declare function quaternionAddValue(q: Vector4, add: number): Vector4;
/** Subtract two quaternions */
2023-05-16 06:28:30 +00:00
declare function quaternionSubtract(q1: Vector4, q2: Vector4): Vector4;
/** Subtract quaternion and float value */
2023-05-16 06:28:30 +00:00
declare function quaternionSubtractValue(q: Vector4, sub: number): Vector4;
/** Get identity quaternion */
2023-05-16 06:28:30 +00:00
declare function quaternionIdentity(): Vector4;
/** Computes the length of a quaternion */
2023-05-16 06:28:30 +00:00
declare function quaternionLength(q: Vector4): number;
/** Normalize provided quaternion */
2023-05-16 06:28:30 +00:00
declare function quaternionNormalize(q: Vector4): Vector4;
/** Invert provided quaternion */
2023-05-16 06:28:30 +00:00
declare function quaternionInvert(q: Vector4): Vector4;
/** Calculate two quaternion multiplication */
2023-05-16 06:28:30 +00:00
declare function quaternionMultiply(q1: Vector4, q2: Vector4): Vector4;
/** Scale quaternion by float value */
2023-05-16 06:28:30 +00:00
declare function quaternionScale(q: Vector4, mul: number): Vector4;
/** Divide two quaternions */
2023-05-16 06:28:30 +00:00
declare function quaternionDivide(q1: Vector4, q2: Vector4): Vector4;
/** Calculate linear interpolation between two quaternions */
2023-05-16 06:28:30 +00:00
declare function quaternionLerp(q1: Vector4, q2: Vector4, amount: number): Vector4;
/** Calculate slerp-optimized interpolation between two quaternions */
2023-05-16 06:28:30 +00:00
declare function quaternionNlerp(q1: Vector4, q2: Vector4, amount: number): Vector4;
/** Calculates spherical linear interpolation between two quaternions */
2023-05-16 06:28:30 +00:00
declare function quaternionSlerp(q1: Vector4, q2: Vector4, amount: number): Vector4;
/** Calculate quaternion based on the rotation from one vector to another */
2023-05-16 06:28:30 +00:00
declare function quaternionFromVector3ToVector3(from: Vector3, to: Vector3): Vector4;
/** Get a quaternion for a given rotation matrix */
2023-05-16 06:28:30 +00:00
declare function quaternionFromMatrix(mat: Matrix): Vector4;
/** Get a matrix for a given quaternion */
2023-05-16 06:28:30 +00:00
declare function quaternionToMatrix(q: Vector4): Matrix;
/** Get rotation quaternion for an angle and axis
NOTE: Angle must be provided in radians */
2023-05-16 06:28:30 +00:00
declare function quaternionFromAxisAngle(axis: Vector3, angle: number): Vector4;
/** Get the quaternion equivalent to Euler angles
NOTE: Rotation order is ZYX */
2023-05-16 06:28:30 +00:00
declare function quaternionFromEuler(pitch: number, yaw: number, roll: number): Vector4;
/** Get the Euler angles equivalent to quaternion (roll, pitch, yaw)
NOTE: Angles are returned in a Vector3 struct in radians */
2023-05-16 06:28:30 +00:00
declare function quaternionToEuler(q: Vector4): Vector3;
/** Transform a quaternion given a transformation matrix */
2023-05-16 06:28:30 +00:00
declare function quaternionTransform(q: Vector4, mat: Matrix): Vector4;
/** Check whether two given quaternions are almost equal */
2023-05-16 06:28:30 +00:00
declare function quaternionEquals(p: Vector4, q: Vector4): number;
/** */
declare function getCameraForward(camera: Camera3D): Vector3;
/** */
declare function getCameraUp(camera: Camera3D): Vector3;
/** */
declare function getCameraRight(camera: Camera3D): Vector3;
2023-05-26 22:47:44 +00:00
/** */
declare function cameraMoveForward(camera: Camera3D, distance: number, moveInWorldPlane: boolean): void;
/** */
declare function cameraMoveUp(camera: Camera3D, distance: number): void;
/** */
declare function cameraMoveRight(camera: Camera3D, distance: number, moveInWorldPlane: boolean): void;
/** */
declare function cameraMoveToTarget(camera: Camera3D, delta: number): void;
2023-05-26 22:47:44 +00:00
/** */
declare function cameraYaw(camera: Camera3D, angle: number, rotateAroundTarget: boolean): void;
/** */
declare function cameraPitch(camera: Camera3D, angle: number, lockView: boolean, rotateAroundTarget: boolean, rotateUp: boolean): void;
/** */
declare function cameraRoll(camera: Camera3D, angle: number): void;
/** */
declare function getCameraViewMatrix(camera: Camera3D): Matrix;
/** */
declare function getCameraProjectionMatrix(camera: Camera3D, aspect: number): Matrix;
2023-05-26 22:47:44 +00:00
/** Enable gui controls (global state) */
declare function guiEnable(): void;
/** Disable gui controls (global state) */
declare function guiDisable(): void;
/** Lock gui controls (global state) */
declare function guiLock(): void;
/** Unlock gui controls (global state) */
declare function guiUnlock(): void;
/** Check if gui is locked (global state) */
declare function guiIsLocked(): boolean;
/** Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f */
declare function guiFade(alpha: number): void;
/** Set gui state (global state) */
declare function guiSetState(state: number): void;
/** Get gui state (global state) */
declare function guiGetState(): number;
/** Set gui custom font (global state) */
declare function guiSetFont(font: Font): void;
/** Get gui custom font (global state) */
declare function guiGetFont(): Font;
/** Set one style property */
declare function guiSetStyle(control: number, property: number, value: number): void;
/** Get one style property */
declare function guiGetStyle(control: number, property: number): number;
/** Window Box control, shows a window that can be closed */
declare function guiWindowBox(bounds: Rectangle, title: string): boolean;
/** Group Box control with text name */
declare function guiGroupBox(bounds: Rectangle, text: string): void;
/** Line separator control, could contain text */
declare function guiLine(bounds: Rectangle, text: string): void;
/** Panel control, useful to group controls */
declare function guiPanel(bounds: Rectangle, text: string): void;
/** Scroll Panel control */
declare function guiScrollPanel(bounds: Rectangle, text: string, content: Rectangle, scroll: Vector2): Rectangle;
/** Label control, shows text */
declare function guiLabel(bounds: Rectangle, text: string): void;
/** Button control, returns true when clicked */
declare function guiButton(bounds: Rectangle, text: string): boolean;
/** Label button control, show true when clicked */
declare function guiLabelButton(bounds: Rectangle, text: string): boolean;
/** Toggle Button control, returns true when active */
declare function guiToggle(bounds: Rectangle, text: string, active: boolean): boolean;
/** Toggle Group control, returns active toggle index */
declare function guiToggleGroup(bounds: Rectangle, text: string, active: number): number;
/** Check Box control, returns true when active */
declare function guiCheckBox(bounds: Rectangle, text: string, checked: boolean): boolean;
/** Combo Box control, returns selected item index */
declare function guiComboBox(bounds: Rectangle, text: string, active: number): number;
/** Text Box control, updates input text */
declare function guiTextBox(bounds: Rectangle, text: string, textSize: number, editMode: boolean): boolean;
/** Text Box control with multiple lines */
declare function guiTextBoxMulti(bounds: Rectangle, text: string, textSize: number, editMode: boolean): boolean;
/** Slider control, returns selected value */
declare function guiSlider(bounds: Rectangle, textLeft: string, textRight: string, value: number, minValue: number, maxValue: number): number;
/** Slider Bar control, returns selected value */
declare function guiSliderBar(bounds: Rectangle, textLeft: string, textRight: string, value: number, minValue: number, maxValue: number): number;
/** Progress Bar control, shows current progress value */
declare function guiProgressBar(bounds: Rectangle, textLeft: string, textRight: string, value: number, minValue: number, maxValue: number): number;
/** Status Bar control, shows info text */
declare function guiStatusBar(bounds: Rectangle, text: string): void;
/** Dummy control for placeholders */
declare function guiDummyRec(bounds: Rectangle, text: string): void;
/** Grid control, returns mouse cell position */
declare function guiGrid(bounds: Rectangle, text: string, spacing: number, subdivs: number): Vector2;
/** Message Box control, displays a message */
declare function guiMessageBox(bounds: Rectangle, title: string, message: string, buttons: string): number;
/** Color Picker control (multiple color controls) */
declare function guiColorPicker(bounds: Rectangle, text: string, color: Color): Color;
/** Color Panel control */
declare function guiColorPanel(bounds: Rectangle, text: string, color: Color): Color;
/** Color Bar Alpha control */
declare function guiColorBarAlpha(bounds: Rectangle, text: string, alpha: number): number;
/** Color Bar Hue control */
declare function guiColorBarHue(bounds: Rectangle, text: string, value: number): number;
/** Load style file over global style variable (.rgs) */
declare function guiLoadStyle(fileName: string): void;
/** Load style default over global style */
declare function guiLoadStyleDefault(): void;
/** Get text with icon id prepended (if supported) */
declare function guiIconText(iconId: number, text: string): string;
/** */
declare function guiDrawIcon(iconId: number, posX: number, posY: number, pixelSize: number, color: Color): void;
/** Set icon scale (1 by default) */
declare function guiSetIconScale(scale: number): void;
/** Set icon pixel value */
declare function guiSetIconPixel(iconId: number, x: number, y: number): void;
/** Clear icon pixel value */
declare function guiClearIconPixel(iconId: number, x: number, y: number): void;
/** Check icon pixel value */
declare function guiCheckIconPixel(iconId: number, x: number, y: number): boolean;
/** Linear Easing functions */
declare function easeLinearNone(t: number, b: number, c: number, d: number): number;
/** Ease: Linear */
declare function easeLinearIn(t: number, b: number, c: number, d: number): number;
/** Ease: Linear In */
declare function easeLinearOut(t: number, b: number, c: number, d: number): number;
/** Ease: Linear Out */
declare function easeLinearInOut(t: number, b: number, c: number, d: number): number;
/** Sine Easing functions */
declare function easeSineIn(t: number, b: number, c: number, d: number): number;
/** Ease: Sine In */
declare function easeSineOut(t: number, b: number, c: number, d: number): number;
/** Ease: Sine Out */
declare function easeSineInOut(t: number, b: number, c: number, d: number): number;
/** Circular Easing functions */
declare function easeCircIn(t: number, b: number, c: number, d: number): number;
/** Ease: Circular In */
declare function easeCircOut(t: number, b: number, c: number, d: number): number;
/** Ease: Circular Out */
declare function easeCircInOut(t: number, b: number, c: number, d: number): number;
/** Cubic Easing functions */
declare function easeCubicIn(t: number, b: number, c: number, d: number): number;
/** Ease: Cubic In */
declare function easeCubicOut(t: number, b: number, c: number, d: number): number;
/** Ease: Cubic Out */
declare function easeCubicInOut(t: number, b: number, c: number, d: number): number;
/** Quadratic Easing functions */
declare function easeQuadIn(t: number, b: number, c: number, d: number): number;
/** Ease: Quadratic In */
declare function easeQuadOut(t: number, b: number, c: number, d: number): number;
/** Ease: Quadratic Out */
declare function easeQuadInOut(t: number, b: number, c: number, d: number): number;
/** Exponential Easing functions */
declare function easeExpoIn(t: number, b: number, c: number, d: number): number;
/** Ease: Exponential In */
declare function easeExpoOut(t: number, b: number, c: number, d: number): number;
/** Ease: Exponential Out */
declare function easeExpoInOut(t: number, b: number, c: number, d: number): number;
/** Back Easing functions */
declare function easeBackIn(t: number, b: number, c: number, d: number): number;
/** Bounce Easing functions */
declare function easeBounceOut(t: number, b: number, c: number, d: number): number;
/** Ease: Bounce In */
declare function easeBounceInOut(t: number, b: number, c: number, d: number): number;
/** Elastic Easing functions */
declare function easeElasticIn(t: number, b: number, c: number, d: number): number;
/** (PI/180.0) */
declare var DEG2RAD: number;
/** (180.0/PI) */
declare var RAD2DEG: number;
2023-05-14 20:19:47 +00:00
/** Light Gray */
declare var LIGHTGRAY: Color;
/** Gray */
declare var GRAY: Color;
/** Dark Gray */
declare var DARKGRAY: Color;
/** Yellow */
declare var YELLOW: Color;
/** Gold */
declare var GOLD: Color;
/** Orange */
declare var ORANGE: Color;
/** Pink */
declare var PINK: Color;
/** Red */
declare var RED: Color;
/** Maroon */
declare var MAROON: Color;
/** Green */
declare var GREEN: Color;
/** Lime */
declare var LIME: Color;
/** Dark Green */
declare var DARKGREEN: Color;
/** Sky Blue */
declare var SKYBLUE: Color;
/** Blue */
declare var BLUE: Color;
/** Dark Blue */
declare var DARKBLUE: Color;
/** Purple */
declare var PURPLE: Color;
/** Violet */
declare var VIOLET: Color;
/** Dark Purple */
declare var DARKPURPLE: Color;
/** Beige */
declare var BEIGE: Color;
/** Brown */
declare var BROWN: Color;
/** Dark Brown */
declare var DARKBROWN: Color;
/** White */
declare var WHITE: Color;
/** Black */
declare var BLACK: Color;
/** Blank (Transparent) */
declare var BLANK: Color;
/** Magenta */
declare var MAGENTA: Color;
/** My own White (raylib logo) */
declare var RAYWHITE: Color;
/** Key: NULL, used for no key pressed */
declare var KEY_NULL: number;
/** Key: ' */
declare var KEY_APOSTROPHE: number;
/** Key: , */
declare var KEY_COMMA: number;
/** Key: - */
declare var KEY_MINUS: number;
/** Key: . */
declare var KEY_PERIOD: number;
/** Key: / */
declare var KEY_SLASH: number;
/** Key: 0 */
declare var KEY_ZERO: number;
/** Key: 1 */
declare var KEY_ONE: number;
/** Key: 2 */
declare var KEY_TWO: number;
/** Key: 3 */
declare var KEY_THREE: number;
/** Key: 4 */
declare var KEY_FOUR: number;
/** Key: 5 */
declare var KEY_FIVE: number;
/** Key: 6 */
declare var KEY_SIX: number;
/** Key: 7 */
declare var KEY_SEVEN: number;
/** Key: 8 */
declare var KEY_EIGHT: number;
/** Key: 9 */
declare var KEY_NINE: number;
/** Key: ; */
declare var KEY_SEMICOLON: number;
/** Key: = */
declare var KEY_EQUAL: number;
/** Key: A | a */
declare var KEY_A: number;
/** Key: B | b */
declare var KEY_B: number;
/** Key: C | c */
declare var KEY_C: number;
/** Key: D | d */
declare var KEY_D: number;
/** Key: E | e */
declare var KEY_E: number;
/** Key: F | f */
declare var KEY_F: number;
/** Key: G | g */
declare var KEY_G: number;
/** Key: H | h */
declare var KEY_H: number;
/** Key: I | i */
declare var KEY_I: number;
/** Key: J | j */
declare var KEY_J: number;
/** Key: K | k */
declare var KEY_K: number;
/** Key: L | l */
declare var KEY_L: number;
/** Key: M | m */
declare var KEY_M: number;
/** Key: N | n */
declare var KEY_N: number;
/** Key: O | o */
declare var KEY_O: number;
/** Key: P | p */
declare var KEY_P: number;
/** Key: Q | q */
declare var KEY_Q: number;
/** Key: R | r */
declare var KEY_R: number;
/** Key: S | s */
declare var KEY_S: number;
/** Key: T | t */
declare var KEY_T: number;
/** Key: U | u */
declare var KEY_U: number;
/** Key: V | v */
declare var KEY_V: number;
/** Key: W | w */
declare var KEY_W: number;
/** Key: X | x */
declare var KEY_X: number;
/** Key: Y | y */
declare var KEY_Y: number;
/** Key: Z | z */
declare var KEY_Z: number;
/** Key: [ */
declare var KEY_LEFT_BRACKET: number;
/** Key: '\' */
declare var KEY_BACKSLASH: number;
/** Key: ] */
declare var KEY_RIGHT_BRACKET: number;
/** Key: ` */
declare var KEY_GRAVE: number;
/** Key: Space */
declare var KEY_SPACE: number;
/** Key: Esc */
declare var KEY_ESCAPE: number;
/** Key: Enter */
declare var KEY_ENTER: number;
/** Key: Tab */
declare var KEY_TAB: number;
/** Key: Backspace */
declare var KEY_BACKSPACE: number;
/** Key: Ins */
declare var KEY_INSERT: number;
/** Key: Del */
declare var KEY_DELETE: number;
/** Key: Cursor right */
declare var KEY_RIGHT: number;
/** Key: Cursor left */
declare var KEY_LEFT: number;
/** Key: Cursor down */
declare var KEY_DOWN: number;
/** Key: Cursor up */
declare var KEY_UP: number;
/** Key: Page up */
declare var KEY_PAGE_UP: number;
/** Key: Page down */
declare var KEY_PAGE_DOWN: number;
/** Key: Home */
declare var KEY_HOME: number;
/** Key: End */
declare var KEY_END: number;
/** Key: Caps lock */
declare var KEY_CAPS_LOCK: number;
/** Key: Scroll down */
declare var KEY_SCROLL_LOCK: number;
/** Key: Num lock */
declare var KEY_NUM_LOCK: number;
/** Key: Print screen */
declare var KEY_PRINT_SCREEN: number;
/** Key: Pause */
declare var KEY_PAUSE: number;
/** Key: F1 */
declare var KEY_F1: number;
/** Key: F2 */
declare var KEY_F2: number;
/** Key: F3 */
declare var KEY_F3: number;
/** Key: F4 */
declare var KEY_F4: number;
/** Key: F5 */
declare var KEY_F5: number;
/** Key: F6 */
declare var KEY_F6: number;
/** Key: F7 */
declare var KEY_F7: number;
/** Key: F8 */
declare var KEY_F8: number;
/** Key: F9 */
declare var KEY_F9: number;
/** Key: F10 */
declare var KEY_F10: number;
/** Key: F11 */
declare var KEY_F11: number;
/** Key: F12 */
declare var KEY_F12: number;
/** Key: Shift left */
declare var KEY_LEFT_SHIFT: number;
/** Key: Control left */
declare var KEY_LEFT_CONTROL: number;
/** Key: Alt left */
declare var KEY_LEFT_ALT: number;
/** Key: Super left */
declare var KEY_LEFT_SUPER: number;
/** Key: Shift right */
declare var KEY_RIGHT_SHIFT: number;
/** Key: Control right */
declare var KEY_RIGHT_CONTROL: number;
/** Key: Alt right */
declare var KEY_RIGHT_ALT: number;
/** Key: Super right */
declare var KEY_RIGHT_SUPER: number;
/** Key: KB menu */
declare var KEY_KB_MENU: number;
/** Key: Keypad 0 */
declare var KEY_KP_0: number;
/** Key: Keypad 1 */
declare var KEY_KP_1: number;
/** Key: Keypad 2 */
declare var KEY_KP_2: number;
/** Key: Keypad 3 */
declare var KEY_KP_3: number;
/** Key: Keypad 4 */
declare var KEY_KP_4: number;
/** Key: Keypad 5 */
declare var KEY_KP_5: number;
/** Key: Keypad 6 */
declare var KEY_KP_6: number;
/** Key: Keypad 7 */
declare var KEY_KP_7: number;
/** Key: Keypad 8 */
declare var KEY_KP_8: number;
/** Key: Keypad 9 */
declare var KEY_KP_9: number;
/** Key: Keypad . */
declare var KEY_KP_DECIMAL: number;
/** Key: Keypad / */
declare var KEY_KP_DIVIDE: number;
/** Key: Keypad * */
declare var KEY_KP_MULTIPLY: number;
/** Key: Keypad - */
declare var KEY_KP_SUBTRACT: number;
/** Key: Keypad + */
declare var KEY_KP_ADD: number;
/** Key: Keypad Enter */
declare var KEY_KP_ENTER: number;
/** Key: Keypad = */
declare var KEY_KP_EQUAL: number;
/** Key: Android back button */
declare var KEY_BACK: number;
/** Key: Android menu button */
declare var KEY_MENU: number;
/** Key: Android volume up button */
declare var KEY_VOLUME_UP: number;
/** Key: Android volume down button */
declare var KEY_VOLUME_DOWN: number;
/** Mouse button left */
declare var MOUSE_BUTTON_LEFT: number;
/** Mouse button right */
declare var MOUSE_BUTTON_RIGHT: number;
/** Mouse button middle (pressed wheel) */
declare var MOUSE_BUTTON_MIDDLE: number;
/** Mouse button side (advanced mouse device) */
declare var MOUSE_BUTTON_SIDE: number;
/** Mouse button extra (advanced mouse device) */
declare var MOUSE_BUTTON_EXTRA: number;
/** Mouse button forward (advanced mouse device) */
declare var MOUSE_BUTTON_FORWARD: number;
/** Mouse button back (advanced mouse device) */
declare var MOUSE_BUTTON_BACK: number;
/** Set to try enabling V-Sync on GPU */
declare var FLAG_VSYNC_HINT: number;
/** Set to run program in fullscreen */
declare var FLAG_FULLSCREEN_MODE: number;
/** Set to allow resizable window */
declare var FLAG_WINDOW_RESIZABLE: number;
/** Set to disable window decoration (frame and buttons) */
declare var FLAG_WINDOW_UNDECORATED: number;
/** Set to hide window */
declare var FLAG_WINDOW_HIDDEN: number;
/** Set to minimize window (iconify) */
declare var FLAG_WINDOW_MINIMIZED: number;
/** Set to maximize window (expanded to monitor) */
declare var FLAG_WINDOW_MAXIMIZED: number;
/** Set to window non focused */
declare var FLAG_WINDOW_UNFOCUSED: number;
/** Set to window always on top */
declare var FLAG_WINDOW_TOPMOST: number;
/** Set to allow windows running while minimized */
declare var FLAG_WINDOW_ALWAYS_RUN: number;
/** Set to allow transparent framebuffer */
declare var FLAG_WINDOW_TRANSPARENT: number;
/** Set to support HighDPI */
declare var FLAG_WINDOW_HIGHDPI: number;
/** Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED */
declare var FLAG_WINDOW_MOUSE_PASSTHROUGH: number;
/** Set to try enabling MSAA 4X */
declare var FLAG_MSAA_4X_HINT: number;
/** Set to try enabling interlaced video format (for V3D) */
declare var FLAG_INTERLACED_HINT: number;
/** Blend textures considering alpha (default) */
declare var BLEND_ALPHA: number;
/** Blend textures adding colors */
declare var BLEND_ADDITIVE: number;
/** Blend textures multiplying colors */
declare var BLEND_MULTIPLIED: number;
/** Blend textures adding colors (alternative) */
declare var BLEND_ADD_COLORS: number;
/** Blend textures subtracting colors (alternative) */
declare var BLEND_SUBTRACT_COLORS: number;
/** Blend premultiplied textures considering alpha */
declare var BLEND_ALPHA_PREMULTIPLY: number;
/** Blend textures using custom src/dst factors (use rlSetBlendFactors()) */
declare var BLEND_CUSTOM: number;
/** Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate()) */
declare var BLEND_CUSTOM_SEPARATE: number;
/** Display all logs */
declare var LOG_ALL: number;
/** Trace logging, intended for internal use only */
declare var LOG_TRACE: number;
/** Debug logging, used for internal debugging, it should be disabled on release builds */
declare var LOG_DEBUG: number;
/** Info logging, used for program execution info */
declare var LOG_INFO: number;
/** Warning logging, used on recoverable failures */
declare var LOG_WARNING: number;
/** Error logging, used on unrecoverable failures */
declare var LOG_ERROR: number;
/** Fatal logging, used to abort program: exit(EXIT_FAILURE) */
declare var LOG_FATAL: number;
/** Disable logging */
declare var LOG_NONE: number;
/** Default pointer shape */
declare var MOUSE_CURSOR_DEFAULT: number;
/** Arrow shape */
declare var MOUSE_CURSOR_ARROW: number;
/** Text writing cursor shape */
declare var MOUSE_CURSOR_IBEAM: number;
/** Cross shape */
declare var MOUSE_CURSOR_CROSSHAIR: number;
/** Pointing hand cursor */
declare var MOUSE_CURSOR_POINTING_HAND: number;
/** Horizontal resize/move arrow shape */
declare var MOUSE_CURSOR_RESIZE_EW: number;
/** Vertical resize/move arrow shape */
declare var MOUSE_CURSOR_RESIZE_NS: number;
/** Top-left to bottom-right diagonal resize/move arrow shape */
declare var MOUSE_CURSOR_RESIZE_NWSE: number;
/** The top-right to bottom-left diagonal resize/move arrow shape */
declare var MOUSE_CURSOR_RESIZE_NESW: number;
/** The omnidirectional resize/move cursor shape */
declare var MOUSE_CURSOR_RESIZE_ALL: number;
/** The operation-not-allowed shape */
declare var MOUSE_CURSOR_NOT_ALLOWED: number;
/** 8 bit per pixel (no alpha) */
declare var PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: number;
/** 8*2 bpp (2 channels) */
declare var PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA: number;
/** 16 bpp */
declare var PIXELFORMAT_UNCOMPRESSED_R5G6B5: number;
/** 24 bpp */
declare var PIXELFORMAT_UNCOMPRESSED_R8G8B8: number;
/** 16 bpp (1 bit alpha) */
declare var PIXELFORMAT_UNCOMPRESSED_R5G5B5A1: number;
/** 16 bpp (4 bit alpha) */
declare var PIXELFORMAT_UNCOMPRESSED_R4G4B4A4: number;
/** 32 bpp */
declare var PIXELFORMAT_UNCOMPRESSED_R8G8B8A8: number;
/** 32 bpp (1 channel - float) */
declare var PIXELFORMAT_UNCOMPRESSED_R32: number;
/** 32*3 bpp (3 channels - float) */
declare var PIXELFORMAT_UNCOMPRESSED_R32G32B32: number;
/** 32*4 bpp (4 channels - float) */
declare var PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: number;
/** 4 bpp (no alpha) */
declare var PIXELFORMAT_COMPRESSED_DXT1_RGB: number;
/** 4 bpp (1 bit alpha) */
declare var PIXELFORMAT_COMPRESSED_DXT1_RGBA: number;
/** 8 bpp */
declare var PIXELFORMAT_COMPRESSED_DXT3_RGBA: number;
/** 8 bpp */
declare var PIXELFORMAT_COMPRESSED_DXT5_RGBA: number;
/** 4 bpp */
declare var PIXELFORMAT_COMPRESSED_ETC1_RGB: number;
/** 4 bpp */
declare var PIXELFORMAT_COMPRESSED_ETC2_RGB: number;
/** 8 bpp */
declare var PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA: number;
/** 4 bpp */
declare var PIXELFORMAT_COMPRESSED_PVRT_RGB: number;
/** 4 bpp */
declare var PIXELFORMAT_COMPRESSED_PVRT_RGBA: number;
/** 8 bpp */
declare var PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA: number;
/** 2 bpp */
declare var PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: number;
/** Perspective projection */
declare var CAMERA_PERSPECTIVE: number;
/** Orthographic projection */
declare var CAMERA_ORTHOGRAPHIC: number;
2023-05-15 21:02:41 +00:00
/** Custom camera */
declare var CAMERA_CUSTOM: number;
/** Free camera */
declare var CAMERA_FREE: number;
/** Orbital camera */
declare var CAMERA_ORBITAL: number;
/** First person camera */
declare var CAMERA_FIRST_PERSON: number;
/** Third person camera */
declare var CAMERA_THIRD_PERSON: number;
2023-05-16 06:28:30 +00:00
/** Shader location: vertex attribute: position */
declare var SHADER_LOC_VERTEX_POSITION: number;
/** Shader location: vertex attribute: texcoord01 */
declare var SHADER_LOC_VERTEX_TEXCOORD01: number;
/** Shader location: vertex attribute: texcoord02 */
declare var SHADER_LOC_VERTEX_TEXCOORD02: number;
/** Shader location: vertex attribute: normal */
declare var SHADER_LOC_VERTEX_NORMAL: number;
/** Shader location: vertex attribute: tangent */
declare var SHADER_LOC_VERTEX_TANGENT: number;
/** Shader location: vertex attribute: color */
declare var SHADER_LOC_VERTEX_COLOR: number;
/** Shader location: matrix uniform: model-view-projection */
declare var SHADER_LOC_MATRIX_MVP: number;
/** Shader location: matrix uniform: view (camera transform) */
declare var SHADER_LOC_MATRIX_VIEW: number;
/** Shader location: matrix uniform: projection */
declare var SHADER_LOC_MATRIX_PROJECTION: number;
/** Shader location: matrix uniform: model (transform) */
declare var SHADER_LOC_MATRIX_MODEL: number;
/** Shader location: matrix uniform: normal */
declare var SHADER_LOC_MATRIX_NORMAL: number;
/** Shader location: vector uniform: view */
declare var SHADER_LOC_VECTOR_VIEW: number;
/** Shader location: vector uniform: diffuse color */
declare var SHADER_LOC_COLOR_DIFFUSE: number;
/** Shader location: vector uniform: specular color */
declare var SHADER_LOC_COLOR_SPECULAR: number;
/** Shader location: vector uniform: ambient color */
declare var SHADER_LOC_COLOR_AMBIENT: number;
/** Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE) */
declare var SHADER_LOC_MAP_ALBEDO: number;
/** Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR) */
declare var SHADER_LOC_MAP_METALNESS: number;
/** Shader location: sampler2d texture: normal */
declare var SHADER_LOC_MAP_NORMAL: number;
/** Shader location: sampler2d texture: roughness */
declare var SHADER_LOC_MAP_ROUGHNESS: number;
/** Shader location: sampler2d texture: occlusion */
declare var SHADER_LOC_MAP_OCCLUSION: number;
/** Shader location: sampler2d texture: emission */
declare var SHADER_LOC_MAP_EMISSION: number;
/** Shader location: sampler2d texture: height */
declare var SHADER_LOC_MAP_HEIGHT: number;
/** Shader location: samplerCube texture: cubemap */
declare var SHADER_LOC_MAP_CUBEMAP: number;
/** Shader location: samplerCube texture: irradiance */
declare var SHADER_LOC_MAP_IRRADIANCE: number;
/** Shader location: samplerCube texture: prefilter */
declare var SHADER_LOC_MAP_PREFILTER: number;
/** Shader location: sampler2d texture: brdf */
declare var SHADER_LOC_MAP_BRDF: number;
/** Shader uniform type: float */
declare var SHADER_UNIFORM_FLOAT: number;
/** Shader uniform type: vec2 (2 float) */
declare var SHADER_UNIFORM_VEC2: number;
/** Shader uniform type: vec3 (3 float) */
declare var SHADER_UNIFORM_VEC3: number;
/** Shader uniform type: vec4 (4 float) */
declare var SHADER_UNIFORM_VEC4: number;
/** Shader uniform type: int */
declare var SHADER_UNIFORM_INT: number;
/** Shader uniform type: ivec2 (2 int) */
declare var SHADER_UNIFORM_IVEC2: number;
/** Shader uniform type: ivec3 (3 int) */
declare var SHADER_UNIFORM_IVEC3: number;
/** Shader uniform type: ivec4 (4 int) */
declare var SHADER_UNIFORM_IVEC4: number;
/** Shader uniform type: sampler2d */
declare var SHADER_UNIFORM_SAMPLER2D: number;
/** Albedo material (same as: MATERIAL_MAP_DIFFUSE) */
declare var MATERIAL_MAP_ALBEDO: number;
/** Metalness material (same as: MATERIAL_MAP_SPECULAR) */
declare var MATERIAL_MAP_METALNESS: number;
/** Normal material */
declare var MATERIAL_MAP_NORMAL: number;
/** Roughness material */
declare var MATERIAL_MAP_ROUGHNESS: number;
/** Ambient occlusion material */
declare var MATERIAL_MAP_OCCLUSION: number;
/** Emission material */
declare var MATERIAL_MAP_EMISSION: number;
/** Heightmap material */
declare var MATERIAL_MAP_HEIGHT: number;
/** Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP) */
declare var MATERIAL_MAP_CUBEMAP: number;
/** Irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP) */
declare var MATERIAL_MAP_IRRADIANCE: number;
/** Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP) */
declare var MATERIAL_MAP_PREFILTER: number;
/** Brdf material */
declare var MATERIAL_MAP_BRDF: number;
/** Albedo material (same as: MATERIAL_MAP_DIFFUSE */
declare var MATERIAL_MAP_DIFFUSE: number;
/** Metalness material (same as: MATERIAL_MAP_SPECULAR) */
declare var MATERIAL_MAP_SPECULAR: number;