@openhps/core
Version:
Open Hybrid Positioning System - Core component
42 lines (39 loc) • 1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _Buffer = _interopRequireDefault(require("./Buffer.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Represents a storage buffer binding type.
*
* @private
* @augments Buffer
*/
class StorageBuffer extends _Buffer.default {
/**
* Constructs a new uniform buffer.
*
* @param {string} name - The buffer's name.
* @param {BufferAttribute} attribute - The buffer attribute.
*/
constructor(name, attribute) {
super(name, attribute ? attribute.array : null);
/**
* This flag can be used for type testing.
*
* @type {BufferAttribute}
*/
this.attribute = attribute;
/**
* This flag can be used for type testing.
*
* @type {boolean}
* @readonly
* @default true
*/
this.isStorageBuffer = true;
}
}
var _default = exports.default = StorageBuffer;