pw-js-api
Version:
A PixelWalker Library, aims to be minimal with support for browsers.
36 lines • 2.4 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const Constants_js_1 = require("../util/Constants.js");
const PWApiClient_js_1 = tslib_1.__importDefault(require("./PWApiClient.js"));
/**
* This standalone class has all (static) functions related to the atlases.
*/
class PWAtlases {
/**
* This is the json including the data for aura toggle animations, fire, team colour, smileys and other sprites.
*/
static getSpritesJSON() {
return PWApiClient_js_1.default.request(Constants_js_1.Endpoint.Client + "/atlases/sprites.json");
}
/**
* This is the json including the data for blocks (including animations / morphs, action blocks, decorations).
*/
static getBlocksJSON() {
return PWApiClient_js_1.default.request(Constants_js_1.Endpoint.Client + "/atlases/sprites.json");
}
/**
* This is the spritesheet (image in arraybuffer) for aura toggle animations, fire, team colour, smileys and other sprites.
*/
static getSpritesPNG() {
return PWApiClient_js_1.default.request(Constants_js_1.Endpoint.Client + "/atlases/sprites.png");
}
/**
* This is the spritesheet (image in arraybuffer) for blocks (including animations / morphs, action blocks, decorations).
*/
static getBlocksPNG() {
return PWApiClient_js_1.default.request(Constants_js_1.Endpoint.Client + "/atlases/blocks.png");
}
}
exports.default = PWAtlases;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUFdBdGxhc2VzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vbGliL2FwaS9QV0F0bGFzZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsdURBQWdEO0FBQ2hELDhFQUEyQztBQUUzQzs7R0FFRztBQUNILE1BQXFCLFNBQVM7SUFDMUI7O09BRUc7SUFDSCxNQUFNLENBQUMsY0FBYztRQUNqQixPQUFPLHdCQUFXLENBQUMsT0FBTyxDQUFnQix1QkFBUSxDQUFDLE1BQU0sR0FBRyx1QkFBdUIsQ0FBQyxDQUFBO0lBQ3hGLENBQUM7SUFFRDs7T0FFRztJQUNILE1BQU0sQ0FBQyxhQUFhO1FBQ2hCLE9BQU8sd0JBQVcsQ0FBQyxPQUFPLENBQWdCLHVCQUFRLENBQUMsTUFBTSxHQUFHLHVCQUF1QixDQUFDLENBQUE7SUFDeEYsQ0FBQztJQUVEOztPQUVHO0lBQ0gsTUFBTSxDQUFDLGFBQWE7UUFDaEIsT0FBTyx3QkFBVyxDQUFDLE9BQU8sQ0FBYyx1QkFBUSxDQUFDLE1BQU0sR0FBRyxzQkFBc0IsQ0FBQyxDQUFBO0lBQ3JGLENBQUM7SUFFRDs7T0FFRztJQUNILE1BQU0sQ0FBQyxZQUFZO1FBQ2YsT0FBTyx3QkFBVyxDQUFDLE9BQU8sQ0FBYyx1QkFBUSxDQUFDLE1BQU0sR0FBRyxxQkFBcUIsQ0FBQyxDQUFBO0lBQ3BGLENBQUM7Q0FDSjtBQTVCRCw0QkE0QkMifQ==