@pixagram/renderart 0.1.3 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,289 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
-
4
- export class CrtConfig {
5
- free(): void;
6
- [Symbol.dispose](): void;
7
- constructor();
8
- /**
9
- * Create preset: Authentic CRT look
10
- */
11
- static preset_authentic(): CrtConfig;
12
- /**
13
- * Create preset: Subtle modern look
14
- */
15
- static preset_subtle(): CrtConfig;
16
- /**
17
- * Create preset: Flat screen (no curvature)
18
- */
19
- static preset_flat(): CrtConfig;
20
- /**
21
- * Horizontal warp intensity (0.0 - 0.1)
22
- */
23
- warp_x: number;
24
- /**
25
- * Vertical warp intensity (0.0 - 0.1)
26
- */
27
- warp_y: number;
28
- /**
29
- * Scanline hardness (-10.0 to 0.0, more negative = sharper)
30
- */
31
- scan_hardness: number;
32
- /**
33
- * Scanline opacity (0.0 - 1.0)
34
- */
35
- scan_opacity: number;
36
- /**
37
- * Shadow mask opacity (0.0 - 1.0)
38
- */
39
- mask_opacity: number;
40
- /**
41
- * Enable barrel distortion
42
- */
43
- enable_warp: boolean;
44
- /**
45
- * Enable scanlines
46
- */
47
- enable_scanlines: boolean;
48
- /**
49
- * Enable shadow mask
50
- */
51
- enable_mask: boolean;
52
- }
53
-
54
- export class HexConfig {
55
- free(): void;
56
- [Symbol.dispose](): void;
57
- constructor();
58
- /**
59
- * Create preset with borders
60
- */
61
- static preset_bordered(): HexConfig;
62
- /**
63
- * Create preset for pointy-top hexagons
64
- */
65
- static preset_pointy(): HexConfig;
66
- /**
67
- * Hexagon orientation
68
- */
69
- orientation: HexOrientation;
70
- /**
71
- * Draw hexagon borders
72
- */
73
- draw_borders: boolean;
74
- /**
75
- * Border color (RGBA packed as u32: 0xRRGGBBAA)
76
- */
77
- border_color: number;
78
- /**
79
- * Border thickness in pixels
80
- */
81
- border_thickness: number;
82
- /**
83
- * Background color (RGBA packed as u32)
84
- */
85
- background_color: number;
86
- }
87
-
88
- /**
89
- * Hexagon orientation type
90
- */
91
- export enum HexOrientation {
92
- /**
93
- * Flat edge at top, vertices on left/right
94
- */
95
- FlatTop = 0,
96
- /**
97
- * Vertex at top, flat edges on left/right
98
- */
99
- PointyTop = 1,
100
- }
101
-
102
- export class UpscaleResult {
103
- private constructor();
104
- free(): void;
105
- [Symbol.dispose](): void;
106
- /**
107
- * Pointer to the output buffer in WASM memory
108
- */
109
- readonly ptr: number;
110
- /**
111
- * Length of the output buffer in bytes
112
- */
113
- readonly len: number;
114
- /**
115
- * Output image width
116
- */
117
- readonly width: number;
118
- /**
119
- * Output image height
120
- */
121
- readonly height: number;
122
- }
123
-
124
- export class XbrzConfig {
125
- free(): void;
126
- [Symbol.dispose](): void;
127
- constructor();
128
- /**
129
- * Preset for sharp edges
130
- */
131
- static preset_sharp(): XbrzConfig;
132
- /**
133
- * Preset for smooth output
134
- */
135
- static preset_smooth(): XbrzConfig;
136
- /**
137
- * Luminance weight for edge detection (0.0 - 1.0)
138
- */
139
- luminance_weight: number;
140
- /**
141
- * Equal color tolerance (0 - 50)
142
- */
143
- equal_color_tolerance: number;
144
- /**
145
- * Dominant direction threshold (3.5 - 6.0)
146
- */
147
- dominant_direction_threshold: number;
148
- /**
149
- * Steep direction threshold (2.0 - 3.0)
150
- */
151
- steep_direction_threshold: number;
152
- }
153
-
154
- /**
155
- * Apply CRT effect with default configuration
156
- */
157
- export function crt_upscale(input: Uint8Array, src_w: number, src_h: number, scale: number): UpscaleResult;
158
-
159
- /**
160
- * Apply CRT effect with custom configuration
161
- */
162
- export function crt_upscale_config(input: Uint8Array, src_w: number, src_h: number, scale: number, config: CrtConfig): UpscaleResult;
163
-
164
- /**
165
- * Get WASM memory for zero-copy data transfer
166
- */
167
- export function get_memory(): any;
168
-
169
- /**
170
- * Get output dimensions for hexagonal upscaling
171
- */
172
- export function hex_get_dimensions(src_w: number, src_h: number, scale: number, orientation: HexOrientation): Uint32Array;
173
-
174
- /**
175
- * Apply hexagonal upscaling with default configuration
176
- */
177
- export function hex_upscale(input: Uint8Array, src_w: number, src_h: number, scale: number): UpscaleResult;
178
-
179
- /**
180
- * Apply hexagonal upscaling with custom configuration
181
- */
182
- export function hex_upscale_config(input: Uint8Array, src_w: number, src_h: number, scale: number, config: HexConfig): UpscaleResult;
183
-
184
- export function init(): void;
185
-
186
- /**
187
- * Apply xBRZ upscaling with default configuration
188
- */
189
- export function xbrz_upscale(input: Uint8Array, src_w: number, src_h: number, scale: number): UpscaleResult;
190
-
191
- /**
192
- * Apply xBRZ upscaling with custom configuration
193
- */
194
- export function xbrz_upscale_config(input: Uint8Array, src_w: number, src_h: number, scale: number, config: XbrzConfig): UpscaleResult;
195
-
196
- export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
197
-
198
- export interface InitOutput {
199
- readonly memory: WebAssembly.Memory;
200
- readonly __wbg_crtconfig_free: (a: number, b: number) => void;
201
- readonly __wbg_get_crtconfig_warp_x: (a: number) => number;
202
- readonly __wbg_set_crtconfig_warp_x: (a: number, b: number) => void;
203
- readonly __wbg_get_crtconfig_warp_y: (a: number) => number;
204
- readonly __wbg_set_crtconfig_warp_y: (a: number, b: number) => void;
205
- readonly __wbg_get_crtconfig_scan_hardness: (a: number) => number;
206
- readonly __wbg_set_crtconfig_scan_hardness: (a: number, b: number) => void;
207
- readonly __wbg_get_crtconfig_scan_opacity: (a: number) => number;
208
- readonly __wbg_set_crtconfig_scan_opacity: (a: number, b: number) => void;
209
- readonly __wbg_get_crtconfig_mask_opacity: (a: number) => number;
210
- readonly __wbg_set_crtconfig_mask_opacity: (a: number, b: number) => void;
211
- readonly __wbg_get_crtconfig_enable_warp: (a: number) => number;
212
- readonly __wbg_set_crtconfig_enable_warp: (a: number, b: number) => void;
213
- readonly __wbg_get_crtconfig_enable_scanlines: (a: number) => number;
214
- readonly __wbg_set_crtconfig_enable_scanlines: (a: number, b: number) => void;
215
- readonly __wbg_get_crtconfig_enable_mask: (a: number) => number;
216
- readonly __wbg_set_crtconfig_enable_mask: (a: number, b: number) => void;
217
- readonly crtconfig_new: () => number;
218
- readonly crtconfig_preset_authentic: () => number;
219
- readonly crtconfig_preset_subtle: () => number;
220
- readonly crtconfig_preset_flat: () => number;
221
- readonly crt_upscale: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
222
- readonly crt_upscale_config: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
223
- readonly __wbg_hexconfig_free: (a: number, b: number) => void;
224
- readonly __wbg_get_hexconfig_orientation: (a: number) => number;
225
- readonly __wbg_set_hexconfig_orientation: (a: number, b: number) => void;
226
- readonly __wbg_get_hexconfig_draw_borders: (a: number) => number;
227
- readonly __wbg_set_hexconfig_draw_borders: (a: number, b: number) => void;
228
- readonly __wbg_get_hexconfig_border_color: (a: number) => number;
229
- readonly __wbg_set_hexconfig_border_color: (a: number, b: number) => void;
230
- readonly __wbg_get_hexconfig_border_thickness: (a: number) => number;
231
- readonly __wbg_set_hexconfig_border_thickness: (a: number, b: number) => void;
232
- readonly __wbg_get_hexconfig_background_color: (a: number) => number;
233
- readonly __wbg_set_hexconfig_background_color: (a: number, b: number) => void;
234
- readonly hexconfig_new: () => number;
235
- readonly hexconfig_preset_bordered: () => number;
236
- readonly hexconfig_preset_pointy: () => number;
237
- readonly hex_upscale: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
238
- readonly hex_upscale_config: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
239
- readonly hex_get_dimensions: (a: number, b: number, c: number, d: number) => [number, number];
240
- readonly xbrzconfig_new: () => number;
241
- readonly xbrzconfig_preset_sharp: () => number;
242
- readonly xbrzconfig_preset_smooth: () => number;
243
- readonly xbrz_upscale: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
244
- readonly xbrz_upscale_config: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
245
- readonly get_memory: () => any;
246
- readonly upscaleresult_ptr: (a: number) => number;
247
- readonly upscaleresult_len: (a: number) => number;
248
- readonly upscaleresult_width: (a: number) => number;
249
- readonly upscaleresult_height: (a: number) => number;
250
- readonly __wbg_get_xbrzconfig_luminance_weight: (a: number) => number;
251
- readonly __wbg_get_xbrzconfig_equal_color_tolerance: (a: number) => number;
252
- readonly __wbg_get_xbrzconfig_dominant_direction_threshold: (a: number) => number;
253
- readonly __wbg_get_xbrzconfig_steep_direction_threshold: (a: number) => number;
254
- readonly __wbg_set_xbrzconfig_luminance_weight: (a: number, b: number) => void;
255
- readonly __wbg_set_xbrzconfig_equal_color_tolerance: (a: number, b: number) => void;
256
- readonly __wbg_set_xbrzconfig_dominant_direction_threshold: (a: number, b: number) => void;
257
- readonly __wbg_set_xbrzconfig_steep_direction_threshold: (a: number, b: number) => void;
258
- readonly init: () => void;
259
- readonly __wbg_upscaleresult_free: (a: number, b: number) => void;
260
- readonly __wbg_xbrzconfig_free: (a: number, b: number) => void;
261
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
262
- readonly __wbindgen_malloc: (a: number, b: number) => number;
263
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
264
- readonly __wbindgen_externrefs: WebAssembly.Table;
265
- readonly __externref_table_dealloc: (a: number) => void;
266
- readonly __wbindgen_start: () => void;
267
- }
268
-
269
- export type SyncInitInput = BufferSource | WebAssembly.Module;
270
-
271
- /**
272
- * Instantiates the given `module`, which can either be bytes or
273
- * a precompiled `WebAssembly.Module`.
274
- *
275
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
276
- *
277
- * @returns {InitOutput}
278
- */
279
- export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
280
-
281
- /**
282
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
283
- * for everything else, calls `WebAssembly.instantiate` directly.
284
- *
285
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
286
- *
287
- * @returns {Promise<InitOutput>}
288
- */
289
- export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;