vanilladocs
vanillapunch.com
API / resource/bunchasset

resource/bunchasset

묶음 애셋.

Bundle asset.

BunchAssetextends BlobAsset

짝Counterpart: vanilla-engine BunchAsset

묶음 애셋.

Bundle asset.

예제Example파일을 바이트 덩어리로 읽기Read a file as a chunk of bytes
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);
생성자constructorconstructor()#0.0.11 부터since 0.0.11소스source

생성.

Constructor.

짝Counterpart: vanilla-engine BunchAsset.new

메서드methodasync load(assetPath)#0.0.11 부터since 0.0.11소스source

비동기 애셋 로드.

Loads the asset asynchronously.

assetPathstring
읽을 파일 주소. (BlobAsset.load 로 받아 Blob 으로 둔다)URL of the file to read. (fetched by BlobAsset.load and kept as a Blob)

짝Counterpart: vanilla-engine BunchAsset.load