asset_pack 0.0.1 copy "asset_pack: ^0.0.1" to clipboard
asset_pack: ^0.0.1 copied to clipboard

outdatedDart 1 only

Asset Management Library for Dart Games

asset_pack #

==============

Introduction #

An Asset Management Library for Dart Games.

Features #

  • A
  • B

Why asset_pack ? #

1. 2.

Getting Started #

1. Add the following to your project's pubspec.yaml and run pub install.

dependencies:
  asset_pack:
    git: https://github.com/johnmccutchan/assetpack.git

2. Add the correct import for your project.

import 'package:assetpack/assetpack.dart';

Documentation #

API #

Reference Manual

Samples #

1. unit.html

Examples #

1. Initialize an AssetManager:

main() {
  // Construct a new AssetManager.
  AssetManager assets = new AssetManager();
}

2. Load a pack:

main() {
  // Construct a new AssetManager.
  AssetManager assets = new AssetManager();
  // Load 'explosions' from 'explosions.pack'.
  AssetPack explosions = assets.load('localhost/explosions.pack', 'explosions');
}

3. Iterate over assets in an AssetPack:

main() {
  // Construct a new AssetManager.
  AssetManager assets = new AssetManager();
  // Load 'explosions' from 'explosions.pack'.
  AssetPack explosions = assets.load('localhost/explosions.pack', 'explosions');
  explosions.forEach((asset) {
    print('${asset.name} as ${asset.type} from ${asset.url} [loaded: ${asset.isLoaded} status: ${asset.status}]');
  });
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Asset Management Library for Dart Games

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

property_map, unittest

More

Packages that depend on asset_pack