UNPKG

@openhps/core

Version:

Open Hybrid Positioning System - Core component

49 lines (45 loc) 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _Binding = _interopRequireDefault(require("./Binding.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Represents a sampler binding type. * * @private * @augments Binding */ class Sampler extends _Binding.default { /** * Constructs a new sampler. * * @param {string} name - The samplers's name. * @param {?Texture} texture - The texture this binding is referring to. */ constructor(name, texture) { super(name); /** * The texture the sampler is referring to. * * @type {?Texture} */ this.texture = texture; /** * The binding's version. * * @type {number} */ this.version = texture ? texture.version : 0; /** * This flag can be used for type testing. * * @type {boolean} * @readonly * @default true */ this.isSampler = true; } } var _default = exports.default = Sampler;