core.js

4.6 kB · javascript · 165 lines

1import * as wasm from "./pkg/core/mrlyjs_core.js";23export { default, initSync } from "./pkg/core/mrlyjs_core.js";4export const Rng = wasm.Rng;5export const Colorizer = wasm.Colorizer;6export const Dtype = wasm.Dtype;7export const HEX_RATIO = wasm.HEX_RATIO;8export const Image = wasm.Image;9export const PNG_MAGIC = wasm.PNG_MAGIC;10export const hex_fit = wasm.hex_fit;11export const hex_size = wasm.hex_size;12export const resample = wasm.resample;13export const unpng = wasm.unpng;14export const cell = {15    anti: wasm.cell_anti,16    binarize: wasm.cell_binarize,17    binarize_otsu: wasm.cell_binarize_otsu,18    blur: wasm.cell_blur,19    color_at: wasm.cell_color_at,20    combine: wasm.cell_combine,21    fractal: wasm.cell_fractal,22    invert: wasm.cell_invert,23    layers: wasm.cell_layers,24    magic: wasm.cell_magic,25    mapping: wasm.cell_mapping,26    merge: wasm.cell_merge,27    moore: wasm.cell_moore,28    mosaic: wasm.cell_mosaic,29    neighbors: wasm.cell_neighbors,30    new: wasm.cell_new,31    new_: wasm.cell_new,32    pad: wasm.cell_pad,33    paint: wasm.cell_paint,34    perforate: wasm.cell_perforate,35    remap: wasm.cell_remap,36    rgba: wasm.cell_rgba,37    rot90_map: wasm.cell_rot90_map,38    rotate: wasm.cell_rotate,39    shape: wasm.cell_shape,40    size: wasm.cell_size,41    tile: wasm.cell_tile,42    tile_map: wasm.cell_tile_map,43};44export const codec = {45    gif: wasm.codec_gif,46    png: wasm.codec_png,47};48export const colors = {49    ALPHA: wasm.colors_ALPHA,50    BLACK: wasm.colors_BLACK,51    BLUE: wasm.colors_BLUE,52    BROWN: wasm.colors_BROWN,53    CYAN: wasm.colors_CYAN,54    DARK: wasm.colors_DARK,55    GRAY: wasm.colors_GRAY,56    GREEN: wasm.colors_GREEN,57    INDIGO: wasm.colors_INDIGO,58    LIGHT: wasm.colors_LIGHT,59    MINT: wasm.colors_MINT,60    NAMES: wasm.colors_NAMES,61    ORANGE: wasm.colors_ORANGE,62    PALETTE: wasm.colors_PALETTE,63    PINK: wasm.colors_PINK,64    PURPLE: wasm.colors_PURPLE,65    RED: wasm.colors_RED,66    TEAL: wasm.colors_TEAL,67    Theme: wasm.colors_Theme,68    WHITE: wasm.colors_WHITE,69    YELLOW: wasm.colors_YELLOW,70    alpha: wasm.colors_alpha,71    board: wasm.colors_board,72    css: wasm.colors_css,73    from_hex: wasm.colors_from_hex,74    gradient: wasm.colors_gradient,75    ink: wasm.colors_ink,76    invert: wasm.colors_invert,77    lightness: wasm.colors_lightness,78    luma_types: wasm.colors_luma_types,79    mix: wasm.colors_mix,80    named: wasm.colors_named,81    random: wasm.colors_random,82    rgb: wasm.colors_rgb,83    rgba: wasm.colors_rgba,84    shades: wasm.colors_shades,85    snap: wasm.colors_snap,86    to_hex: wasm.colors_to_hex,87};88export const error = {89    parse: wasm.error_parse,90};91export const image = {92    blur: wasm.image_blur,93};94export const paint = {95    Config: wasm.paint_Config,96    Edition: wasm.paint_Edition,97    Ink: wasm.paint_Ink,98    Paint: wasm.paint_Paint,99    Scheme: wasm.paint_Scheme,100    Target: wasm.paint_Target,101    apply: wasm.paint_apply,102    coat: wasm.paint_coat,103    paint: wasm.paint_paint,104    prime: wasm.paint_prime,105    random_edition: wasm.paint_random_edition,106    reroll: wasm.paint_reroll,107    setup: wasm.paint_setup,108    tag: wasm.paint_tag,109};110export const ramp = {111    color: wasm.ramp_color,112    colors: wasm.ramp_colors,113};114export const rng = {115    below: wasm.rng_below_,116    boolean: wasm.rng_boolean_,117    chance: wasm.rng_chance_,118    new: wasm.rng_new_,119    new_: wasm.rng_new_,120    range: wasm.rng_range_,121    sample_indices: wasm.rng_sample_indices_,122    unit: wasm.rng_unit_,123};124export const tensor = {125    at: wasm.tensor_at,126    binarize: wasm.tensor_binarize,127    binarize_otsu: wasm.tensor_binarize_otsu,128    blur: wasm.tensor_blur,129    bytes: wasm.tensor_bytes,130    count: wasm.tensor_count,131    dtype: wasm.tensor_dtype,132    exposed: wasm.tensor_exposed,133    filled: wasm.tensor_filled,134    flip: wasm.tensor_flip,135    fractal: wasm.tensor_fractal,136    full: wasm.tensor_full,137    get: wasm.tensor_get,138    i32: wasm.tensor_i32,139    i32s: wasm.tensor_i32s,140    index: wasm.tensor_index,141    invert: wasm.tensor_invert,142    kron: wasm.tensor_kron,143    layers: wasm.tensor_layers,144    neighbors: wasm.tensor_neighbors,145    new: wasm.tensor_new,146    new_: wasm.tensor_new,147    of: wasm.tensor_of,148    otsu_threshold: wasm.tensor_otsu_threshold,149    pad: wasm.tensor_pad,150    perforate: wasm.tensor_perforate,151    put: wasm.tensor_put,152    rot90: wasm.tensor_rot90,153    set: wasm.tensor_set,154    size: wasm.tensor_size,155    slice: wasm.tensor_slice,156    sum: wasm.tensor_sum,157    tile: wasm.tensor_tile,158    transpose: wasm.tensor_transpose,159    typed: wasm.tensor_typed,160    u16: wasm.tensor_u16,161    u16s: wasm.tensor_u16s,162    u32: wasm.tensor_u32,163    u32s: wasm.tensor_u32s,164    u8: wasm.tensor_u8,165};