|
| 1 | +/* tslint:disable */ |
| 2 | +/* eslint-disable */ |
| 3 | +export class SoftwareRenderer { |
| 4 | + free(): void; |
| 5 | +/** |
| 6 | +* @returns {SoftwareRenderer} |
| 7 | +*/ |
| 8 | + static new(): SoftwareRenderer; |
| 9 | +/** |
| 10 | +* Update the given CPU-side drawable\'s attributes given its ID. |
| 11 | +* Will create a new drawable on the CPU side if one doesn\'t yet exist. |
| 12 | +* @param {number} id |
| 13 | +* @param {Float32Array | undefined} matrix |
| 14 | +* @param {number | undefined} silhouette |
| 15 | +* @param {any | undefined} effects |
| 16 | +* @param {number} effect_bits |
| 17 | +* @param {boolean} use_nearest_neighbor |
| 18 | +*/ |
| 19 | + set_drawable(id: number, matrix: Float32Array | undefined, silhouette: number | undefined, effects: any | undefined, effect_bits: number, use_nearest_neighbor: boolean): void; |
| 20 | +/** |
| 21 | +* Delete the CPU-side drawable with the given ID. |
| 22 | +* @param {number} id |
| 23 | +*/ |
| 24 | + remove_drawable(id: number): void; |
| 25 | +/** |
| 26 | +* Update the given silhouette\'s attributes and data given the corresponding skin\'s ID. |
| 27 | +* Will create a new silhouette if one does not exist. |
| 28 | +* @param {number} id |
| 29 | +* @param {number} w |
| 30 | +* @param {number} h |
| 31 | +* @param {Uint8Array} data |
| 32 | +* @param {number} nominal_width |
| 33 | +* @param {number} nominal_height |
| 34 | +* @param {boolean} premultiplied |
| 35 | +*/ |
| 36 | + set_silhouette(id: number, w: number, h: number, data: Uint8Array, nominal_width: number, nominal_height: number, premultiplied: boolean): void; |
| 37 | +/** |
| 38 | +* Delete the silhouette that corresponds to the skin with the given ID. |
| 39 | +* @param {number} id |
| 40 | +*/ |
| 41 | + remove_silhouette(id: number): void; |
| 42 | +/** |
| 43 | +* Check if a particular Drawable is touching any in a set of Drawables. |
| 44 | +* Will only check inside the given bounds. |
| 45 | +* @param {number} drawable |
| 46 | +* @param {Int32Array} candidates |
| 47 | +* @param {any} rect |
| 48 | +* @returns {boolean} |
| 49 | +*/ |
| 50 | + is_touching_drawables(drawable: number, candidates: Int32Array, rect: any): boolean; |
| 51 | +/** |
| 52 | +* Check if a certain color in a drawable is touching a particular color. |
| 53 | +* @param {number} drawable |
| 54 | +* @param {Int32Array} candidates |
| 55 | +* @param {any} rect |
| 56 | +* @param {Uint8Array} color |
| 57 | +* @param {Uint8Array} mask |
| 58 | +* @returns {boolean} |
| 59 | +*/ |
| 60 | + color_is_touching_color(drawable: number, candidates: Int32Array, rect: any, color: Uint8Array, mask: Uint8Array): boolean; |
| 61 | +/** |
| 62 | +* Check if a certain drawable is touching a particular color. |
| 63 | +* @param {number} drawable |
| 64 | +* @param {Int32Array} candidates |
| 65 | +* @param {any} rect |
| 66 | +* @param {Uint8Array} color |
| 67 | +* @returns {boolean} |
| 68 | +*/ |
| 69 | + is_touching_color(drawable: number, candidates: Int32Array, rect: any, color: Uint8Array): boolean; |
| 70 | +/** |
| 71 | +* Check if the drawable with the given ID is touching any pixel in the given rectangle. |
| 72 | +* @param {number} drawable |
| 73 | +* @param {any} rect |
| 74 | +* @returns {boolean} |
| 75 | +*/ |
| 76 | + drawable_touching_rect(drawable: number, rect: any): boolean; |
| 77 | +/** |
| 78 | +* Return the ID of the drawable that covers the most pixels in the given rectangle. |
| 79 | +* Drawables earlier in the list will occlude those lower in the list. |
| 80 | +* @param {Int32Array} candidates |
| 81 | +* @param {any} rect |
| 82 | +* @returns {number} |
| 83 | +*/ |
| 84 | + pick(candidates: Int32Array, rect: any): number; |
| 85 | +/** |
| 86 | +* Calculate the convex hull points for the drawable with the given ID. |
| 87 | +* @param {number} drawable |
| 88 | +* @returns {Float32Array} |
| 89 | +*/ |
| 90 | + drawable_convex_hull_points(drawable: number): Float32Array; |
| 91 | +} |
0 commit comments