📄 Binding.js
¶
📊 Analysis Summary¶
Metric | Count |
---|---|
🔧 Functions | 2 |
🧱 Classes | 1 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 src/renderers/common/Binding.js
Functions¶
Binding.setVisibility(visibility: number): void
¶
JSDoc:
/**
* Makes sure binding's resource is visible for the given shader stage.
*
* @param {number} visibility - The shader stage.
*/
Parameters:
visibility
number
Returns: void
Binding.clone(): Binding
¶
JSDoc:
Returns: Binding
Calls:
Object.assign
Classes¶
Binding
¶
Class Code
class Binding {
/**
* Constructs a new binding.
*
* @param {string} [name=''] - The binding's name.
*/
constructor( name = '' ) {
/**
* The binding's name.
*
* @type {string}
*/
this.name = name;
/**
* A bitmask that defines in what shader stages the
* binding's resource is accessible.
*
* @type {number}
*/
this.visibility = 0;
}
/**
* Makes sure binding's resource is visible for the given shader stage.
*
* @param {number} visibility - The shader stage.
*/
setVisibility( visibility ) {
this.visibility |= visibility;
}
/**
* Clones the binding.
*
* @return {Binding} The cloned binding.
*/
clone() {
return Object.assign( new this.constructor(), this );
}
}