-
Notifications
You must be signed in to change notification settings - Fork 15
Assets pipeline
hugeen edited this page Oct 19, 2012
·
15 revisions
This file (/game/assets.js) is called automatically to feed the assets backbone collection
return [
{ type: "sprites", name: "wolf", size: 135, scenes: ["level"] },
{ type: "sprites", name: "pig", size: 115, scenes: ["level"] }
];
// Add Image to the assets collection
assets.add({ type: "images", name: "background", scenes: ["level"] });
// Add Audio to the assets collection
assets.add({ type: "audio", name: "music", scenes: ["level"] });
// Add Sprite to the assets collection
assets.add({ type: "sprites", name: "wolf", size: 135, scenes: ["level"] });