MCPcopy Create free account
hub / github.com/melonjs/melonJS / identifyFormat

Function identifyFormat

packages/melonjs/src/video/texture/atlas.js:45–57  ·  view source on GitHub ↗
(app)

Source from the content-addressed store, hash-verified

43 * @ignore
44 */
45export function identifyFormat(app) {
46 if (app.includes("texturepacker") || app.includes("free-tex-packer")) {
47 return "texturepacker";
48 } else if (app.includes("shoebox")) {
49 return "shoebox";
50 } else if (app.includes("aseprite")) {
51 return "aseprite";
52 } else if (app.includes("melonJS")) {
53 return "melonJS";
54 } else {
55 throw new Error("Unknown texture atlas format: " + app);
56 }
57}
58
59/**
60 * A Texture atlas class, currently supports : <br>

Callers 1

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected