semicongine/loaders

Procs

proc getLoaded[T: ResourceType](path: string; package = DEFAULT_PACKAGE): T
proc isLoaded[T: ResourceType](path: string; package = DEFAULT_PACKAGE): bool
proc loadAsync[T: ResourceType](path: string; package = DEFAULT_PACKAGE)
proc loadAudio(path: string; package = DEFAULT_PACKAGE): SoundData {....gcsafe,
    raises: [IOError, OSError, Exception, KeyError], tags: [ReadIOEffect],
    forbids: [].}
proc loadBytes(path, package: string): seq[byte] {....gcsafe,
    raises: [IOError, OSError, KeyError, Exception], tags: [ReadIOEffect],
    forbids: [].}
proc loadConfig(path: string; package = DEFAULT_PACKAGE): Config {....gcsafe,
    raises: [IOError, OSError, Exception, ValueError, KeyError],
    tags: [ReadIOEffect, RootEffect, WriteIOEffect], forbids: [].}
proc loadImage[T: PixelType](path: string; package = DEFAULT_PACKAGE): Image[T] {.
    ...gcsafe.}
proc loadImageArray[T: PixelType](path: string; tilesize: uint32;
                                  package = DEFAULT_PACKAGE): ImageArray[T] {.
    ...gcsafe.}
proc loadImageArray[T: PixelType](paths: openArray[string];
                                  package = DEFAULT_PACKAGE): ImageArray[T] {.
    ...gcsafe.}
proc loadJson(path: string; package = DEFAULT_PACKAGE): JsonNode {....gcsafe, raises: [
    IOError, OSError, JsonParsingError, ValueError, KeyError, Exception],
    tags: [ReadIOEffect, WriteIOEffect], forbids: [].}
proc loadMeshes[TMesh, TMaterial](path: string; meshAttributesMapping: static
    MeshAttributeNames; materialAttributesMapping: static MaterialAttributeNames;
                                  package = DEFAULT_PACKAGE): GltfData[TMesh,
    TMaterial] {....gcsafe.}