UNPKG

rl-loadout-lib

Version:

Load Rocket League assets into three.js

88 lines 2.97 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const three_1 = require("three"); const DEFAULT_BUCKET = 'https://storage.googleapis.com/rl-loadout'; const DEFAULT_HOST = 'https://rocket-loadout.com'; /** * Configuration class that affects how rl-loadout-lib behaves. */ class RocketConfig { constructor(init) { /** * The host of the API used for retrieving item information. Default: https://rocket-loadout.com */ this.backendHost = DEFAULT_HOST; /** * The Google Cloud Storage bucket that contains the assets. Default : https://storage.googleapis.com/rl-loadout */ this.assetHost = DEFAULT_BUCKET; /** * Loading manager used by all loaders inside rl-loadout-lib. */ this.loadingManager = three_1.DefaultLoadingManager; /** * Quality of textures to be loaded. * @see {@link TextureQuality} */ this.textureQuality = TextureQuality.HIGH; /** * Format of textures to be loaded. * @see {@link TextureFormat} */ this.textureFormat = TextureFormat.TGA; /** * Quality of models to be loaded. This is currently unused. * @see {@link ModelQuality} */ this.modelQuality = ModelQuality.HIGH; /** * Whether draco compressed models should be loaded. */ this.useCompressedModels = false; Object.assign(this, init); } } exports.RocketConfig = RocketConfig; /** * Quality of textures, when downloading them. */ var TextureQuality; (function (TextureQuality) { /** * Load textures in half the size (half width and height). */ TextureQuality[TextureQuality["LOW"] = 0] = "LOW"; /** * Load textures in original sizes. */ TextureQuality[TextureQuality["HIGH"] = 1] = "HIGH"; })(TextureQuality = exports.TextureQuality || (exports.TextureQuality = {})); /** * Format of textures, when downloading them. */ var TextureFormat; (function (TextureFormat) { /** * Load textures in PNG format with lossy compression. */ TextureFormat[TextureFormat["PNG"] = 0] = "PNG"; /** * Load textures in TGA format with lossless LRE compression. */ TextureFormat[TextureFormat["TGA"] = 1] = "TGA"; })(TextureFormat = exports.TextureFormat || (exports.TextureFormat = {})); /** * Quality of models, when downloading them. Not currently used by the library. */ var ModelQuality; (function (ModelQuality) { /** * Download models with less faces/vertices. These models have the decimate modifier applied to them with blender. */ ModelQuality[ModelQuality["LOW"] = 0] = "LOW"; /** * Download models with original quality. */ ModelQuality[ModelQuality["HIGH"] = 1] = "HIGH"; })(ModelQuality = exports.ModelQuality || (exports.ModelQuality = {})); //# sourceMappingURL=rocket-config.js.map