# resource/bunchasset (vanilla.js 0.4.0)

> https://vanillapunch.com/docs/vanilla.js/0.4.0/api/resource/bunchasset/

Bundle asset.

## BunchAsset extends BlobAsset

Bundle asset.

Example: Read a file as a chunk of bytes

```js
import { BunchAsset } from "./build/vanilla.js";

const bunchAsset = new BunchAsset();
await bunchAsset.load("examples/assets/beep.wav");
const blob = bunchAsset.getBlob();
console.log(bunchAsset.getAssetType(), bunchAsset.isLoaded(), blob.size);
```

- `constructor()` (constructor, since 0.0.11): Constructor.
- `async load(assetPath)` (method, since 0.0.11): Loads the asset asynchronously.
  - `assetPath` string: URL of the file to read. (fetched by BlobAsset.load and kept as a Blob)
