@openhps/core
Version:
Open Hybrid Positioning System - Core component
39 lines (37 loc) • 1.27 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _StorageBufferAttribute = _interopRequireDefault(require("./StorageBufferAttribute.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* This special type of buffer attribute is intended for compute shaders.
* It can be used to encode draw parameters for indirect draw calls.
*
* Note: This type of buffer attribute can only be used with `WebGPURenderer`
* and a WebGPU backend.
*
* @augments StorageBufferAttribute
*/
class IndirectStorageBufferAttribute extends _StorageBufferAttribute.default {
/**
* Constructs a new storage buffer attribute.
*
* @param {number|Uint32Array} count - The item count. It is also valid to pass a `Uint32Array` as an argument.
* The subsequent parameter is then obsolete.
* @param {number} itemSize - The item size.
*/
constructor(count, itemSize) {
super(count, itemSize, Uint32Array);
/**
* This flag can be used for type testing.
*
* @type {boolean}
* @readonly
* @default true
*/
this.isIndirectStorageBufferAttribute = true;
}
}
var _default = exports.default = IndirectStorageBufferAttribute;