22 lines
794 B
TypeScript
22 lines
794 B
TypeScript
/**
|
|
* D3D Functions
|
|
*
|
|
* These functions should only be used from renderers: feature, which can be set through the renderer property
|
|
*
|
|
* Renderer callbacks are executed from the d3d thread
|
|
* @example
|
|
* menu.add_feature("d3d renderer", "toggle", 0, nil).renderer = d3d_draw
|
|
* @public
|
|
* @noSelf
|
|
*/
|
|
declare namespace d3d {
|
|
|
|
function draw_text(text: string, pos: v2, size: v2, scale: float, color: int, flags: int): void;
|
|
function register_sprite(path: string): int;
|
|
function draw_sprite(id: int, pos: v2, scale: float, rot: float, color: int): void;
|
|
function get_sprite_origin(id: int): v2;
|
|
function get_sprite_size(id: int): v2;
|
|
function draw_line(start: v2, end: v2, size: int, color: int): void;
|
|
function draw_rect(pos: v2, size: v2, color: int): void;
|
|
|
|
} |