diff --git a/docs/builtin_functions_reference.html b/docs/builtin_functions_reference.html index 2bc7e2c0..58af354b 100644 --- a/docs/builtin_functions_reference.html +++ b/docs/builtin_functions_reference.html @@ -1173,7 +1173,7 @@ - + @@ -1440,6 +1440,9 @@ + + + @@ -1458,6 +1461,15 @@ + + + + + + + + + @@ -1474,7 +1486,7 @@ - + @@ -1711,7 +1723,7 @@
gl.set_font_name(filename: string) -> intsets a freetype/OTF/TTF font as current (and loads it from disk the first time). returns true if success.
gl.set_font_size(size: int, outlinesize: float = 0.000000) -> intsets the font for rendering into this fontsize (in pixels). caches into a texture first time this size is used, flushes from cache if this size is not used an entire frame. font rendering will look best if using 1:1 pixels (careful with gl.scale/gl.translate). an optional outlinesize will give the font a black outline. make sure to call this every frame. returns true if success
gl.set_font_size(size: int, outlinesize: float = 0.000000, outlinecolor: float4 = nil) -> intsets the font for rendering into this fontsize (in pixels). caches into a texture first time this size is used, flushes from cache if this size is not used an entire frame. font rendering will look best if using 1:1 pixels (careful with gl.scale/gl.translate). an optional outlinesize will give the font an outline. make sure to call this every frame. returns true if success
gl.set_max_font_size(size: int)sets the max font size to render to bitmaps. any sizes specified over that by setfontsize will still work but cause scaled rendering. default 256
cg.copy(block: resource<voxels>, pos: int3, size: int3, dest: int3, flip: int3)copy a range of cubes from pos to dest. flip can be 1 (regular copy), or -1 (mirror)for each component, indicating the step from dest. Coordinates automatically clipped to the size of the grid
cg.blit(dst: resource<voxels>, src: resource<voxels>, dst_pos: int3, src_pos: int3, size: int3, flip: int3)copy a range of solid cubes from src to dst starting at src_pos and dst_pos, respectively. flip can be 1 (regular copy), or -1 (mirror)for each component, indicating the step from dest. Coordinates automatically clipped to the size of the grids
cg.clone(block: resource<voxels>, pos: int3, size: int3) -> resource<voxels>clone a range of cubes from pos to a new block. Coordinates automatically clipped to the size of the grid
cg.load_palette(act_palette_file: string) -> int
cg.new_palette(palette: [float4]) -> intCreate a new palette from 256 float4 color values.
cg.get_palette_color(palette_idx: int, entry: int) -> float4
cg.remove_all_palettes()Remove all cached palettes to free up memory. WARNING: existing models will no longer render correctly. You generally only want to do this if you know that none of the existing models are needed.
cg.sample_down(scale: int, world: resource<voxels>)
cg.create_3d_texture(block: resource<voxels>, textureformat: int, monochrome: int = 0) -> resource<texture>returns the new texture, for format, pass flags you want in addition to 3d|single_channel|has_mips
cg.load_vox(name: string, material_palette: bool = false, file_contents: string = nil) -> [resource<voxels>], string?loads a .vox file (supports both MagicaVoxel or VoxLap formats). if material_palette is true the alpha channel will contain material flags. if file_contents is non-nil, it contains the file already loaded. returns vector of blocks or empty if file failed to load, and error string if any
cg.load_vox(name: string, material_palette: bool = false, file_contents: string = nil, remap_palettes: bool = false) -> [resource<voxels>], string?loads a .vox file (supports both MagicaVoxel or VoxLap formats). if material_palette is true the alpha channel will contain material flags. if file_contents is non-nil, it contains the file already loaded. if remap_palettes is true, then the palette will be remapped to match the MagicaVoxel UI if necessary. returns vector of blocks or empty if file failed to load, and error string if any
cg.load_vox_names(name: string) -> [string], string?loads a MagicaVoxel .vox file, and returns its contained sub model names.
- +
im.init(dark_style: bool = false, flags: int = 0, rounding: float = 0.000000, border: float = 0.000000)
im.add_font(font_path: string, size: float) -> int
im.add_font(font_path: string, size: float, glyph_ranges: string = nil) -> intglyph_ranges will activate additional unicode ranges to be rasterized, and can be Default (most European languages), SimplifiedChinese, Japanese, Korean, Cyrillic, Thai, Vietnamese, Greek, ..
im.set_style_color(i: int, color: float4)