Header menu logo Nu

AssetGraph Module

Types

Type Description

AssetGraph

A graph of all the assets used in a game.

Functions and values

Function or value Description

AssetGraph.buildAssets inputDirectory outputDirectory refinementDirectory fullBuild assetGraph

Full Usage: AssetGraph.buildAssets inputDirectory outputDirectory refinementDirectory fullBuild assetGraph

Parameters:
    inputDirectory : string
    outputDirectory : string
    refinementDirectory : string
    fullBuild : bool
    assetGraph : AssetGraph

Build all the available assets found in the given asset graph.

inputDirectory : string
outputDirectory : string
refinementDirectory : string
fullBuild : bool
assetGraph : AssetGraph

AssetGraph.collectAssets associationOpt assetGraph

Full Usage: AssetGraph.collectAssets associationOpt assetGraph

Parameters:
    associationOpt : string option
    assetGraph : AssetGraph

Returns: Asset list

Collect all the available assets from an asset graph document.

associationOpt : string option
assetGraph : AssetGraph
Returns: Asset list

AssetGraph.empty

Full Usage: AssetGraph.empty

Returns: AssetGraph

The empty asset graph.

Returns: AssetGraph

AssetGraph.make filePathOpt packageDescriptors

Full Usage: AssetGraph.make filePathOpt packageDescriptors

Parameters:
Returns: AssetGraph

Make an asset graph.

filePathOpt : string option
packageDescriptors : Map<string, PackageDescriptor>
Returns: AssetGraph

AssetGraph.makeFromFileOpt filePath

Full Usage: AssetGraph.makeFromFileOpt filePath

Parameters:
    filePath : string

Returns: AssetGraph

Make an asset graph, attempting to use the file at the given file path.

filePath : string
Returns: AssetGraph

AssetGraph.tryCollectAssetsFromPackage associationOpt packageName assetGraph

Full Usage: AssetGraph.tryCollectAssetsFromPackage associationOpt packageName assetGraph

Parameters:
    associationOpt : string option
    packageName : string
    assetGraph : AssetGraph

Returns: Either<string, Asset list>

Attempt to collect all the available assets from a package.

associationOpt : string option
packageName : string
assetGraph : AssetGraph
Returns: Either<string, Asset list>

Type something to start searching.