Sign in

    Milky2018/mgstudio/asset does not have a README file

    Has_TextureAtlas

    pub(open) trait Has_TextureAtlas {
    get_texture_atlas_store(self : Self) ->
    ComponentStore
    [TextureAtlas]
    }

    AssetEvent

    pub(all) enum AssetEvent[T] {
    Added(Handle[T])
    Modified(Handle[T])
    Removed(Handle[T])
    LoadedWithDependencies(Handle[T])
    }

    AssetId

    pub struct AssetId[T] {
    id : Int
    phantom : T?
    }

    impl Eq for AssetId[T]
    impl Show for AssetId[T]

    AssetId::index

    fn[T] AssetId::index(self : AssetId[T]) -> Int

    AssetId::new

    fn[T] AssetId::new(id : Int) -> AssetId[T]

    AssetServer

    pub struct AssetServer {
    paths : Array[String]
    }

    AssetServer::get_handle

    fn AssetServer::get_handle(_self : AssetServer, path : String) -> Handle[Image]?

    AssetServer::load

    fn AssetServer::load(self : AssetServer, path : String) -> Handle[Image]

    AssetServer::load_folder

    fn AssetServer::load_folder(self : AssetServer, path : String) -> Handle[LoadedFolder]

    AssetServer::load_font

    fn AssetServer::load_font(self : AssetServer, path : String) -> Handle[Font]

    AssetServer::load_nearest

    fn AssetServer::load_nearest(self : AssetServer, path : String) -> Handle[Image]

    AssetServer::load_wgsl

    fn AssetServer::load_wgsl(self : AssetServer, path : String) -> Handle[Shader]

    AssetServer::new

    Assets

    pub struct Assets[T] {
    items : Array[T?]
    alive : Int
    events : Array[AssetEvent[T]]
    }

    Assets::add

    fn[T] Assets::add(self : Assets[T], value : T) -> Handle[T]

    Assets::contains

    fn[T] Assets::contains(self : Assets[T], handle : Handle[T]) -> Bool

    Assets::drain_events

    fn[T] Assets::drain_events(self : Assets[T]) -> Array[AssetEvent[T]]

    Assets::get

    fn[T] Assets::get(self : Assets[T], handle : Handle[T]) -> T?

    Assets::insert

    fn[T] Assets::insert(self : Assets[T], handle : Handle[T], value : T) -> Bool

    Inserts or updates the asset at the given handle id.

    This grows the internal storage if handle.id() exceeds the current length.

    Assets::is_empty

    fn[T] Assets::is_empty(self : Assets[T]) -> Bool

    Assets::len

    fn[T] Assets::len(self : Assets[T]) -> Int

    Assets::new

    fn[T] Assets::new() -> Assets[T]

    Assets::remove

    fn[T] Assets::remove(self : Assets[T], handle : Handle[T]) -> T?

    Assets::set

    fn[T] Assets::set(self : Assets[T], handle : Handle[T], value : T) -> Bool

    DynamicTextureAtlasBuilder

    pub struct DynamicTextureAtlasBuilder {
    size :
    UVec2

    padding : Int
    free_rects : Array[
    URect
    ]
    }

    DynamicTextureAtlasBuilder::add_texture

    DynamicTextureAtlasBuilder::new

    DynamicTextureAtlasBuilderError

    pub(all) enum DynamicTextureAtlasBuilderError {
    FailedToAllocateSpace
    }

    Font

    pub struct Font {
    }

    Handle

    pub struct Handle[T] {
    id : Int
    phantom : T?
    }

    Handle::asset_id

    fn[T] Handle::asset_id(self : Handle[T]) -> AssetId[T]

    Handle::from_asset_id

    fn[T] Handle::from_asset_id(asset_id : AssetId[T]) -> Handle[T]

    Handle::id

    fn[T] Handle::id(self : Handle[T]) -> Int

    Handle::new

    fn[T] Handle::new(id : Int) -> Handle[T]

    Image

    pub struct Image {
    width : Int
    height : Int
    pixels : Bytes
    }

    Image::new

    fn Image::new(width : Int, height : Int, pixels : Bytes) -> Image

    ImageSampler

    pub(all) enum ImageSampler {
    Linear
    Nearest
    }

    LoadedFolder

    pub struct LoadedFolder {
    handles : Array[Handle[Image]]
    }

    Shader

    pub struct Shader {
    source : String
    }

    Shader::new

    fn Shader::new(source : String) -> Shader

    TextureAtlas

    pub struct TextureAtlas {
    layout : Handle[TextureAtlasLayout]
    index : Int
    }

    TextureAtlas::new

    fn TextureAtlas::new(layout : Handle[TextureAtlasLayout], index : Int) -> TextureAtlas

    TextureAtlas::texture_rect

    TextureAtlas::with_index

    fn TextureAtlas::with_index(self : TextureAtlas, index : Int) -> TextureAtlas

    TextureAtlas::with_layout

    fn TextureAtlas::with_layout(self : TextureAtlas, layout : Handle[TextureAtlasLayout]) -> TextureAtlas

    TextureAtlasBuilder

    pub struct TextureAtlasBuilder {
    padding :
    UVec2

    initial_size :
    UVec2

    max_size :
    UVec2

    nearest : Bool
    textures : Array[Handle[Image]]
    }

    TextureAtlasBuilder::add_texture

    TextureAtlasBuilder::default

    TextureAtlasBuilder::initial_size

    TextureAtlasBuilder::padding

    TextureAtlasBuilder::sampler_nearest

    fn TextureAtlasBuilder::sampler_nearest(self : TextureAtlasBuilder, nearest : Bool) -> TextureAtlasBuilder

    TextureAtlasBuilder::try_build

    TextureAtlasLayout

    pub struct TextureAtlasLayout {
    size :
    UVec2

    textures : Array[
    URect
    ]
    }

    TextureAtlasLayout::add_texture

    TextureAtlasLayout::from_grid

    TextureAtlasLayout::is_empty

    fn TextureAtlasLayout::is_empty(self : TextureAtlasLayout) -> Bool

    TextureAtlasLayout::len

    fn TextureAtlasLayout::len(self : TextureAtlasLayout) -> Int

    TextureAtlasLayout::new_empty

    TextureAtlasSources

    pub struct TextureAtlasSources {
    texture_ids : Array[(Handle[Image], Int)]
    }

    TextureAtlasSources::handle

    TextureAtlasSources::texture_index

    fn TextureAtlasSources::texture_index(self : TextureAtlasSources, texture : Handle[Image]) -> Int?

    asset_add_texture_atlas_layout

    fn asset_add_texture_atlas_layout(layout : TextureAtlasLayout) -> Handle[TextureAtlasLayout]

    asset_copy_texture_to_texture

    fn asset_copy_texture_to_texture(dst : Handle[Image], dst_pos :
    UVec2
    , src : Handle[Image]) -> Unit

    asset_create_dynamic_texture

    fn asset_create_dynamic_texture(size :
    UVec2
    , nearest : Bool) -> Handle[Image]

    asset_font_read_bytes

    fn asset_font_read_bytes(font : Handle[Font]) -> Bytes?

    asset_get_loaded_folder

    fn asset_get_loaded_folder(handle : Handle[LoadedFolder]) -> LoadedFolder?

    asset_get_texture_atlas_layout

    fn asset_get_texture_atlas_layout(handle : Handle[TextureAtlasLayout]) -> TextureAtlasLayout?

    asset_is_texture_loaded

    fn asset_is_texture_loaded(texture : Handle[Image]) -> Bool

    asset_loaded_folder_drain_events

    fn asset_loaded_folder_drain_events() -> Array[AssetEvent[LoadedFolder]]

    asset_plugin

    asset_plugin_nearest

    fn[W] asset_plugin_nearest(app :
    App
    [W]) ->
    App
    [W]

    asset_set_default_sampler_nearest

    fn asset_set_default_sampler_nearest(enabled : Bool) -> Unit

    asset_set_texture_atlas_layout

    fn asset_set_texture_atlas_layout(handle : Handle[TextureAtlasLayout], layout : TextureAtlasLayout) -> Bool

    asset_set_texture_sampler

    fn asset_set_texture_sampler(texture : Handle[Image], sampler : ImageSampler) -> Unit

    asset_system

    fn[W] asset_system(_world : W) -> Unit

    asset_texture_height

    fn asset_texture_height(texture : Handle[Image]) -> Int

    asset_texture_width

    fn asset_texture_width(texture : Handle[Image]) -> Int

    asset_update_loaded_folders

    fn asset_update_loaded_folders() -> Unit

    asset_update_texture_region

    fn asset_update_texture_region(texture : Handle[Image], rect :
    URect
    , glyph_id : Int) -> Unit

    asset_update_texture_region_rgba8

    fn asset_update_texture_region_rgba8(texture : Handle[Image], rect :
    URect
    , pixels_rgba8 : Bytes) -> Unit

    ecs_components

    let ecs_components : Array[String]

    ECS component types discovered via #ecs.component.

    ecs_resources

    let ecs_resources : Array[String]

    ECS resource types discovered via #ecs.resource.

    host_asset_copy_texture_to_texture

    fn host_asset_copy_texture_to_texture(dst_texture_id : Int, dst_x : Int, dst_y : Int, src_texture_id : Int) -> Unit

    host_asset_create_dynamic_texture

    fn host_asset_create_dynamic_texture(width : Int, height : Int, nearest : Bool) -> Int

    host_asset_font_bytes_get

    fn host_asset_font_bytes_get(font_id : Int, index : Int) -> Int

    host_asset_font_bytes_get_u32

    fn host_asset_font_bytes_get_u32(font_id : Int, index : Int) -> Int

    host_asset_font_bytes_len

    fn host_asset_font_bytes_len(font_id : Int) -> Int

    host_asset_is_texture_loaded

    fn host_asset_is_texture_loaded(texture_id : Int) -> Bool

    host_asset_load_folder

    fn host_asset_load_folder(path : String) -> Int

    host_asset_load_font

    fn host_asset_load_font(path : String) -> Int

    host_asset_load_texture

    fn host_asset_load_texture(path : String, nearest : Bool) -> Int

    host_asset_load_wgsl

    fn host_asset_load_wgsl(path : String) -> Int

    host_asset_loaded_folder_handles_get

    fn host_asset_loaded_folder_handles_get(folder_id : Int, index : Int) -> Int

    host_asset_loaded_folder_handles_len

    fn host_asset_loaded_folder_handles_len(folder_id : Int) -> Int

    host_asset_poll_loaded_folder_event_id

    fn host_asset_poll_loaded_folder_event_id() -> Int

    host_asset_poll_loaded_folder_event_kind

    fn host_asset_poll_loaded_folder_event_kind() -> Int

    host_asset_set_texture_sampler

    fn host_asset_set_texture_sampler(texture_id : Int, sampler : Int) -> Unit

    host_asset_texture_height

    fn host_asset_texture_height(texture_id : Int) -> Int

    host_asset_texture_width

    fn host_asset_texture_width(texture_id : Int) -> Int

    host_asset_update_texture_region

    fn host_asset_update_texture_region(texture_id : Int, x : Int, y : Int, width : Int, height : Int, glyph_id : Int) -> Unit

    host_asset_update_texture_region_bytes

    fn host_asset_update_texture_region_bytes(texture_id : Int, x : Int, y : Int, width : Int, height : Int, bytes_id : Int) -> Unit